Date: Fri, 22 Jun 2012 21:11:04 -0700 From: Tim Kientzle <kientzle@freebsd.org> To: arm@freebsd.org Subject: armv6 tree vs. buildkernel Message-ID: <3F1A5B5F-0787-41CE-8C77-8B1F9A601172@freebsd.org>
next in thread | raw e-mail | index | archive | help
On the BeagleBone, running a very recent armv6 tree: # 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 One solution to this seems to be to edit sys/arm/include/asm.h to = properly redefine these symbols, e.g., #if defined(_ARM_ARCH_7) || defined (__ARM_ARCH_6__) || \ defined (__ARM_ARCH_6J__) + #undef _ARM_ARCH_6 #define _ARM_ARCH_6 #endif After this change, it gets as far as: 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 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. Tim 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.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F1A5B5F-0787-41CE-8C77-8B1F9A601172>