busybox compile

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

busybox compile

3,330 Views
shunpinglin
Contributor III

In QorIQ, I compile busybox, fail.

Please help!

splin@splin-VirtualBox:~/source/busybox$ pwd
/home/splin/source/busybox

splin@splin-VirtualBox:~/source/busybox$ make fsl_defconfig

splin@splin-VirtualBox:~/source/busybox$ make
  SPLIT   include/autoconf.h -> include/config/*
  GEN     include/bbconfigopts.h
  HOSTCC  applets/usage
applets/usage.c: In function ‘main’:
applets/usage.c:52:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
   write(STDOUT_FILENO, usage_array[i].usage, strlen(usage_array[i].usage) + 1);
   ^
  GEN     include/usage_compressed.h
  HOSTCC  applets/applet_tables
applets/applet_tables.c: In function ‘main’:
applets/applet_tables.c:161:4: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
    fgets(line_old, sizeof(line_old), fp);
    ^
  GEN     include/applet_tables.h
  CC      applets/applets.o
In file included from /opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/lib/arm-fsl-linux-gnueabi/gcc/arm-fsl-linux-gnueabi/4.9.3/include-fixed/syslimits.h:7:0,
                 from /opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/lib/arm-fsl-linux-gnueabi/gcc/arm-fsl-linux-gnueabi/4.9.3/include-fixed/limits.h:34,
                 from include/platform.h:141,
                 from include/libbb.h:13,
                 from include/busybox.h:8,
                 from applets/applets.c:9:
/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/lib/arm-fsl-linux-gnueabi/gcc/arm-fsl-linux-gnueabi/4.9.3/include-fixed/limits.h:168:61: error: no include path in which to search for limits.h
 #include_next <limits.h>  /* recurse down to the real one */
                                                             ^
In file included from include/libbb.h:13:0,
                 from include/busybox.h:8,
                 from applets/applets.c:9:
include/platform.h:152:23: fatal error: byteswap.h: No such file or directory
 # include <byteswap.h>
                       ^
compilation terminated.
scripts/Makefile.build:197: recipe for target 'applets/applets.o' failed
make[1]: *** [applets/applets.o] Error 1
Makefile:373: recipe for target 'applets_dir' failed
make: *** [applets_dir] Error 2

Labels (1)
2 Replies

2,210 Views
Pavel
NXP Employee
NXP Employee

Look at the Chapter 11.4 and Section 11.4.4.1 of NXP SDK 2.0-1703 documentation:

https://www.nxp.com/docs/en/supporting-information/QORIQ-SDK-2.0-IC-REV0.pdf

 

See also the Chapter 9.2 and the Section 9.2.3.1 of NXP LSDK documentation:

https://www.nxp.com/docs/en/supporting-information/LSDK-KC-REV0.pdf

 

Use these documentation for building busybox.


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

2,210 Views
shunpinglin
Contributor III

OK, I found the cause. SDK Set the environment CC:

arm-fsl-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7 --sysroot=/opt/fsl-qoriq/2.0/sysroots/cortexa7hf-vfp-neon-fsl-linux-gnueabi

but the Makefile of busybox is:

CC              = $(CROSS_COMPILE)gcc

So it replaces original CC's value.

One method:

CC              ?= $(CROSS_COMPILE)gcc