gcc - Cross compile uClibc can't find some linux kernel header -
here quick description followed details. try cross compile uclibc arm eabi. have own compiled linux kernel , extracted header files. placed in folder. in uclibc ".config" file have variable kernel_headers= set proper folder. in fact, during compilation headers found point. here example found , breaks mid way: compiling file
"libc/inet/if_index.c"
that file generate series on chained includes in each file follow:
"libc/inet/netlinkaccess.h" (this #include of following linux header)
"kernel_hdr/linux/rtnetlink.h" (this 1 #include next one)
"kernel_hdr/linux/netlink.h" (this 1 #include next one)
"kernel_hdr/linux/kernel.h" (this 1 tries , fails #include )
this #include <asm/types.h>
breaks chain. it's first 1 not #include <linux/xxx.h>
<asm/xxx.h>
. file asm/types.h exist not found. no warnings no error. says
" error: unknown type name '__kernel_long_t'"
that type defined in broken series of includes. put big syntax error see if reads it. nope! thought there problem handling kernel header folder structure recognition. tried merge kernel header uclibc regular headers (...uclibc/include/). no matter how set kernel_headers= (empty or full path) in .config file, exact same behaviour. have no clue how solve one.
here more details on setup:
workstation : ubuntu 16.04 lts
uclibc latest version git downloaded 3 days ago
linux kernel version 4.9.0 coming xilinx git. (i work on zynq dual cortex a9)
gcc arm eabi coming xilinx sdk 2017.1.
with toolchain, compiled custom fsbl (first stage boot loader), custom linux kernel (i skip u-boot, fsbl loads kernel straight), device tree , package whole thing, runs on hardware rootfs. i'm building custom rootfs (busybox successful, dropbear etc. ) failing uclibc can't compile because not find of includes inside of header files although exist.
to build uclibc, use uclibc folder:
make menuconfig make clean make cross=arm-linux-gnueabi-
how can make uclibc build find kernel header files?
Comments
Post a Comment