Hi FLorian,
The board contains a Broadcom SoC similar to the one in the raspberry pi
(not the same), we have a kernel working for it, but when tryingo to port
the openwrt all blowed up.
For the moment I did: (it is a work in progress)
Created target/linux/hardfp/Makefile
Created target/linux/hardfp/profiles/100-hardfp.mk
Added a valid .config named config-3.6 (copied it after configuring a
working kernel, tested).
100-hardfp contains the basic:
define Profile/Uber
NAME:=Uber
endef
define Profile/Uber/Description
Über Punkt
endef
$(eval $(call Profile,Uber))
target/linux/hardfp/Makefile contains:
include $(TOPDIR)/rules.mk
ARCH:=arm
BOARD:=Uber
BOARDNAME:=Uber
FEATURES:=usb ext4 fpu
LINUX_VERSION:=3.6
#CFLAGS:=-O2 -pipe -mfloat-abi=hard -mfpu=vfp -mtune=arm1176jzf-s
-march=armv6zk
MAINTAINER:=Uber Team
include $(INCLUDE_DIR)/target.mk
define Target/Description
TODO
endef
DEFAULT_PACKAGES += kmod-usb-hid
CFLAGS:=-mfloat-abi=hard -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk
#KBUILD_CFLAGS:=${CFLAGS}
#KBUILD_CFLAGS:=
KERNELNAME:="Image_ubp"
$(eval $(call BuildTarget))
------------------
After this, I'm using an external tool chain, and I'm pointing to an own
kernel git repo.
In the openwrt menuconfig, enables the Advanced configuration option
Enter git repo to clone: i'm using our own
target options
|-> target optimizations: -O2 -pipe -mfloat-abi=hard -mfpu=vfp
-mtune=arm1176jzf-s -march=armv6zk
In Use external toolchain:
edited all options except the last 3 ( program path, toolchain include path
and library path)
---
After this, I tried to compile the openwrt to see if it was working. And
then all issues started.
Thanks for the support,
Alberich
On Tue, Feb 19, 2013 at 2:50 PM, Florian Fainelli <[email protected]>wrote:
> 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
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel