Linux Uboot source code compilation in UBUNTU 12.04 Host PC

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

Linux Uboot source code compilation in UBUNTU 12.04 Host PC

3,251 Views
jk1z
Contributor I

Dear All,

I started to work in IMX53QSB board, without using LTIB.

I have separated out the source codes from LTIB package, and compiled it separately in FEDORA machine, and it got compiled and worked. (using the cross compiler).

Now I try to setup the work environment in UBUNTU 12.04 host PC. where I setup the PATH to cross compiler as I did in FEDORA PC. But here it is not compiling.

For Linux compilation:

==============================================================

linux-2.6.35.3# make ARCH=arm imx5_defconfig
HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c:106:23: error: no include path in which to search for sys/types.h
scripts/basic/fixdep.c:107:22: error: no include path in which to search for sys/stat.h
scripts/basic/fixdep.c:108:22: error: no include path in which to search for sys/mman.h
scripts/basic/fixdep.c:109:20: error: no include path in which to search for unistd.h
scripts/basic/fixdep.c:110:19: error: no include path in which to search for fcntl.h
scripts/basic/fixdep.c:111:20: error: no include path in which to search for string.h
scripts/basic/fixdep.c:112:20: error: no include path in which to search for stdlib.h
scripts/basic/fixdep.c:113:19: error: no include path in which to search for stdio.h
scripts/basic/fixdep.c:114:20: error: no include path in which to search for limits.h
scripts/basic/fixdep.c:115:19: error: no include path in which to search for ctype.h
scripts/basic/fixdep.c:116:23: error: no include path in which to search for arpa/inet.h

.

.

.

==================================================================

For UBOOT

================================================================

u-boot-2009.08# make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
Generating include/autoconf.mk
Generating include/autoconf.mk.dep
for dir in tools examples/standalone examples/api ; do make -C $dir _depend ; done
gcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found
compilation terminated.
make[1]: Entering directory `/home/nimbeon/jk/imx/uboot/u-boot-2009.08/tools'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/nimbeon/jk/imx/uboot/u-boot-2009.08/tools'
make[1]: Entering directory `/home/nimbeon/jk/imx/uboot/u-boot-2009.08/examples/standalone'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/nimbeon/jk/imx/uboot/u-boot-2009.08/examples/standalone'
make[1]: Entering directory `/home/nimbeon/jk/imx/uboot/u-boot-2009.08/examples/api'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/nimbeon/jk/imx/uboot/u-boot-2009.08/examples/api'
make -C tools all
gcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found
compilation terminated.
make[1]: Entering directory `/home/nimbeon/jk/imx/uboot/u-boot-2009.08/tools'
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /home/nimbeon/jk/imx/uboot/u-boot-2009.08/include -idirafter /home/nimbeon/jk/imx/uboot/u-boot-2009.08/include2 -idirafter /home/nimbeon/jk/imx/uboot/u-boot-2009.08/include -I /home/nimbeon/jk/imx/uboot/u-boot-2009.08/libfdt -I /home/nimbeon/jk/imx/uboot/u-boot-2009.08/tools -DTEXT_BASE=0x77800000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -O -o gen_eth_addr.o gen_eth_addr.c -c
gen_eth_addr.c:24:19: fatal error: stdio.h: No such file or directory
compilation terminated.
make[1]: *** [gen_eth_addr.o] Error 1
make[1]: Leaving directory `/home/nimbeon/jk/imx/uboot/u-boot-2009.08/tools'
make: *** [tools] Error 2

.

.

.

=======================================================

I did not get why these errors are coming. If anyone come across this already, or if you have inputs kindly share.

thanks and regards,

jk

Labels (1)
0 Kudos
2 Replies

1,156 Views
jk1z
Contributor I

Hi ww,

I resolved the issue by re-installing the OS and other tools, and it is working now. Sorry I am not sure of the rootcause.

regards

jk

0 Kudos

1,156 Views
WolfgangW
Contributor I

Hi jk,

on your Ubuntu machine, do you have development tools installed? Can you compile a simple "hello world" C program to run natively on the host?

I thought at least U-Boot should be able to compile without any reference to host include files, but it still looks to me as if some very basic development tools/libs/headers on the host are missing, which also disturbs cross compiling. For more elaborated things like kernel or even userland, you will need the host environment anyways. (Although it would be desirable to get rid of these references, but currently it looks as if developers care even less for proper cross compilation...)

Maybe somebody else more familiar with Ubuntu can give a hint which packages to install.

Regards,
Wolfgang

0 Kudos