Hello,
On 02/18/2013 09:20 PM, Alberich de megres wrote:
Hello again,
I was looking on how the kernel build works.
All error happened when building the kernel at: oldconfig prepare
scripts, and modules. The first one is defined into the
include/kernel-defaults.mk <http://kernel-defaults.mk>, which is called
in this line (inside Kernel/Configure/Default define):
$(MAKE) $(KERNEL_MAKEOPTS) oldconfig prepare scripts
I can edit the KERNEL_MAKEOPTS variable to pass KBUILD_CFLAGS="" (for
example), but I'm will be overwriting an internal kernel Makefile
variable. How openwrt passes the CFLAGS to the kernel?
I tried the KBUILD_CFLAGS way (I also tried to include a CFLAGS="" into
KERNEL_MAKEOPTS, with no result), but I got a new different error (I
think due to I overwrote the flags). Is there some export? are the flags
stored at some place?
Thanks in advance
I'm including the output
export MAKEFLAGS= ;make -C
/home/projects/con/delme/openwrt/build_dir/linux-hardfp/linux-3.6
CROSS_COMPILE="arm-hardfp-linux-gnueabi-" ARCH="arm" KBUILD_HAVE_NLS=no
CONFIG_SHELL="/usr/local/bin/bash" KBUILD_CFLAGS="-O2 -pipe -mfpu=vfp
-mtune=arm1176jzf-s -march=armv6zk" CC="arm-hardfp-linux-gnueabi-gcc"
oldconfig prepare scripts
make[5]: Entering directory `/home/projects/con/rp-kernel'
scripts/kconfig/conf --oldconfig Kconfig
#
# configuration written to .config
#
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[7]: `include/generated/mach-types.h' is up to date.
CC arch/arm/kernel/asm-offsets.s
In file included from include/linux/time.h:9:0,
from include/linux/timex.h:56,
from include/linux/sched.h:57,
from arch/arm/kernel/asm-offsets.c:13:
include/linux/math64.h: In function 'div_u64_rem':
include/linux/math64.h:55:15: error: '__LINUX_ARM_ARCH__' undeclared
(first use in this function)
include/linux/math64.h:55:15: note: each undeclared identifier is
reported only once for each function it appears in
It seems like overriding KBUILD_CFLAGS like you do prevents the internal
ARM kernel Makefile in arch/arm/Makefile to define $(arch-y) for your
specific platform, thus causing your build failure because
__LINUX_ARM_ARCH__ is not defined.
Having said that, if I do modify an ARM target to have the following CFLAGS:
CFLAGS:=-Mfloat-abit=hard -mfpu=vfp I can build OpenWrt which uses the
hardware floating point ABI. Can you summarize the list of changes that
you have made to your OpenWrt copy?
--
Florian
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel