[Clfs-support] [CLFS-DEV] Embedded linux headers

Andrew Bradford andrew at bradfordembedded.com
Mon Jul 29 05:00:18 PDT 2013


On Sun, Jul 28, 2013, at 02:17 PM, Kirk Terrell wrote:
> AS I try to keep up with the changes I noted that you moved the linux 
> headers to ${CFS}/usr/include to {CLFS}/cross-tools/include. When I 
> attempt to compile uClibc I get
> 
> > <stdin>:1:24: fatal error: asm/unistd.h: No such file or directory
> > compilation terminated.
> > <stdin>:1:24: fatal error: asm/unistd.h: No such file or directory
> > compilation terminated.
> > ERROR: Could not generate syscalls.
> > Make sure that you have proper kernel headers.
> > Your .config in KERNEL_HEADERS="" was set to:
> > /home/home/kanj/elfs/aCLFS/gitBOOK/elfsMain/sysBuild/clfs.arm.little/usr/include/
> > make: *** [include/bits/sysnum.h] Error 1
> > clfs-kanj:~/sources/uClibc-0.9.31$

Yes, this is due to this being half way to the desired state, sorry.  I
made some changes for my tryout of {,e}glibc and pulled in a few of the
good commits and this part was a good thing just it didn't include the
rest of the updates.
If you see my github's uClibc config patch[1] it should take care of
uClibc for this issue.  It will also put all the uClibc headers into
cross-tools (so if busybox config wasn't broken before, it should
definitely be broken now :))

[1]:https://github.com/bradfa/clfs-embedded/commit/7316dcc02687409abfa8509aaf7f5ec3b361aba1

My goal is to move all the headers out of the final system and into
cross-tools.  Possibly followed by moving to all the libs also being in
cross-tools and static compiling all the final system parts (busybox, et
al).

> I think the linux, asm and asm-generic folders need to be copied to 
> ${CLFS}/usr/include first to support compiling. I tried just changing 
> the location of the headers - but then busy box still didn't compile 
> because it was looking for headers in linux/ folder.

I'll take a look at busybox next to ensure it can find the headers but
there should be a config option of where to find headers and libs in the
busybox config, similar to how uClibc is.  It might be a few days till I
can get to this as some urgent things came up at work on Friday that
need to get fixed before I get much time freed up.

> As a side not on busybox - I've had no issue in compiling, with uClibc, 
> using TEST_config_rh9 which is included with the source. That would be 
> one less config file to maintain.

That's good to know.
Thanks!
-Andrew



More information about the Clfs-support mailing list