Date: Sat, 23 Jun 2012 08:35:18 -0600 From: Warner Losh <wlosh@bsdimp.com> To: Tim Kientzle <kientzle@freebsd.org> Cc: arm@freebsd.org Subject: Re: armv6 tree vs. buildkernel Message-ID: <31C8D224-72D4-4BE8-8EC3-29B078C7DAC3@bsdimp.com> In-Reply-To: <3F1A5B5F-0787-41CE-8C77-8B1F9A601172@freebsd.org> References: <3F1A5B5F-0787-41CE-8C77-8B1F9A601172@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jun 22, 2012, at 10:11 PM, Tim Kientzle wrote: > On the BeagleBone, running a very recent armv6 tree: >=20 > # make TARGET_CPUTYPE=3Darmv6 buildworld > # make TARGET_CPUTYPE=3Darmv6 KERNCONF=3DBEAGLEBONE buildkernel > =85. > -------------------------------------------------------------- >>>> stage 3.2: building everything > -------------------------------------------------------------- > cd /usr/obj/usr/src/sys/BEAGLEBONE; MAKEOBJDIRPREFIX=3D/usr/obj = MACHINE_ARCH=3Darm MACHINE=3Darm CPUTYPE=3Darmv6 = GROFF_BIN_PATH=3D/usr/obj/usr/src/tmp/legacy/usr/bin = GROFF_FONT_PATH=3D/usr/obj/usr/src/tmp/legacy/usr/share/groff_font = GROFF_TMAC_PATH=3D/usr/obj/usr/src/tmp/legacy/usr/share/tmac = _SHLIBDIRPREFIX=3D/usr/obj/usr/src/tmp VERSION=3D"FreeBSD 10.0-CURRENT = arm 1000011" INSTALL=3D"sh /usr/src/tools/install.sh" = PATH=3D/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/us= r/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/usr/sbin:= /usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/sbin:/bin:/us= r/sbin:/usr/bin make KERNEL=3Dkernel all -DNO_MODULES_OBJ > cc -mlittle-endian -c -x assembler-with-cpp -DLOCORE -O -pipe = -march=3Darmv6 -DARM_ARCH_6=3D1 -std=3Dc99 -g -Wall -Wredundant-decls = -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes = -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign = -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option = -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq = -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS = -include opt_global.h -fno-common -finline-limit=3D8000 --param = inline-unit-growth=3D100 --param large-function-growth=3D1000 = -D_ARM_ARCH_6 -ffreestanding -Werror /usr/src/sys/arm/arm/locore.S > In file included from /usr/src/sys/arm/arm/locore.S:38: > ./machine/asm.h:139:1: error: "_ARM_ARCH_6" redefined > <command-line>: error: this is the location of the previous definition >=20 >=20 > One solution to this seems to be to edit sys/arm/include/asm.h to = properly redefine these symbols, e.g., >=20 > #if defined(_ARM_ARCH_7) || defined (__ARM_ARCH_6__) || \ > defined (__ARM_ARCH_6J__) > + #undef _ARM_ARCH_6 > #define _ARM_ARCH_6 > #endif >=20 >=20 > After this change, it gets as far as: >=20 > cc -mlittle-endian -c -O -pipe -march=3Darmv6 -DARM_ARCH_6=3D1 = -std=3Dc99 -g -Wall -Wredundant-decls -Wnested-externs = -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline = -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions = -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. = -I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/libfdt = -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common = -finline-limit=3D8000 --param inline-unit-growth=3D100 --param = large-function-growth=3D1000 -D_ARM_ARCH_6 -ffreestanding -Werror = /usr/src/sys/kern/kern_clock.c > {standard input}: Assembler messages: > {standard input}:1363: Error: selected processor does not support = `dmb' > {standard input}:1382: Error: selected processor does not support = `dmb' > *** [kern_clock.o] Error code 1 >=20 > This seems to be due to some mismatch between sys/arm/include/atomic.h = (which is getting ARM_ARCH_7A from somewhere?) and the -march setting. = I hope to track down the details this weekend. >=20 > Tim >=20 > P.S. How is CPUTYPE/TARGET_CPUTYPE supposed to be inferred for = regular "buildworld"? > The only option I can find is to set it explicitly in /etc/src.conf It can't possibly work very well. We need to get TARGET_ARCH=3Darmv6 = working instead of continuing these kludges. Warner=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?31C8D224-72D4-4BE8-8EC3-29B078C7DAC3>