[ELDK] Rebuilding busybox in ELDK 4.1 for arm platforms
Giuseppe Modugno
g.modugno at elettronika.it
Tue Aug 5 11:11:46 CEST 2008
Hi all,
I want to rebuild busybox to use ash shell instead of msh shell (the
shell compiled in busybox of SELF ramdisk).
The first strange thing.
---
user at ubuntu704desktop:~/eldk41arm$ arm-linux-rpm -i
/mnt/target/SRPMS/busybox-1.3.0-1.src.rpm
user at ubuntu704desktop:~/eldk41arm$ arm-linux-rpm -qa | grep busybox
user at ubuntu704desktop:~/eldk41arm$ arm-linux-rpm -e busyboxerror:
package busybox is not installed
user at ubuntu704desktop:~/eldk41arm$ arm-linux-rpm -e busybox-13.0-1
error: package busybox-13.0-1 is not installed
---
It seems the package isn't added in the local database of installed
packages. So I can't remove it. But I think it is really installed
because:
---
user at ubuntu704desktop:~/eldk41arm$ ls ./usr/src/denx/SOURCES/
busybox-1.00-eldk-ctty.patch busybox-1.3.0-eldk-multiple-
consoles.patch
busybox-1.3.0-eldk-config busybox-1.3.0-eldk.patch
busybox-1.3.0-eldk-loadfont.patch busybox-1.3.0-eldk-printf-
gettext.patch
busybox-1.3.0-eldk-logconsole.patch busybox-1.3.0.tar.gz
busybox-1.3.0-eldk-malloc.patch
---
The second strange thing:
---
user at ubuntu704desktop:~/eldk41arm/usr/src/denx/SPECS$ grep ppc
busybox.spec
make HOSTCC="/usr/bin/gcc -B/usr/bin/" ARCH=ppc oldconfig
make HOSTCC="/usr/bin/gcc -B/usr/bin/" ARCH=ppc CC="gcc
$RPM_OPT_FLAGS"
make HOSTCC="/usr/bin/gcc -B/usr/bin/" ARCH=ppc CC="gcc
$RPM_OPT_FLAGS" doc busybox.links
- bump again for double-long bug on ppc(64)
---
I think make is wrongly called with ARCH=ppc parameter, so I changed
them in ARCH=arm.
Now the third strange thing:
---
user at ubuntu704desktop:~/eldk41arm/usr/src/denx/SPECS$ arm-linux-
rpmbuild -ba busybox.spec
...
+ make HOSTCC=/usr/bin/gcc -B/usr/bin/ ARCH=arm CC=gcc -O2
SPLIT include/autoconf.h -> include/config/*
GEN include/bbconfigopts.h
HOSTCC applets/usage
GEN include/usage_compressed.h
CC applets/applets.o
CC applets/busybox.o
LD applets/built-in.o
arm-linux-ld: applets/applets.o: Relocations in generic ELF (EM: 3)
applets/applets.o: could not read symbols: File in wrong format
make[1]: *** [applets/built-in.o] Error 1
make: *** [applets] Error 2
error: Bad exit status from /home/user/eldk41arm/var/tmp/rpm-
tmp.83224 (%build)
RPM build errors:
Bad exit status from /home/user/eldk41arm/var/tmp/rpm-tmp.83224
(%build)
---
So I changed "make" in busybox.spec to use arm-linux-gcc and not gcc:
---
user at ubuntu704desktop:~/eldk41arm/usr/src/denx/SPECS$ grep make
busybox.spec
make HOSTCC="/usr/bin/gcc -B/usr/bin/" ARCH=arm oldconfig
make HOSTCC="/usr/bin/gcc -B/usr/bin/" ARCH=arm CC="arm-linux-gcc
$RPM_OPT_FLAGS"
make HOSTCC="/usr/bin/gcc -B/usr/bin/" ARCH=arm CC="arm-linux-gcc
$RPM_OPT_FLAGS" doc busybox.links
---
And now I have the following error:
---
user at ubuntu704desktop:~/eldk41arm/usr/src/denx/SPECS$ arm-linux-
rpmbuild -ba busybox.spec
...
CC networking/inetd.o
CC networking/interface.o
CC networking/ip.o
In file included from networking/libiproute/utils.h:9,
from networking/ip.c:17:
networking/libiproute/libnetlink.h:9:27: error: linux/if_addr.h: No
such file or directory
networking/libiproute/libnetlink.h:10:27: error: linux/if_link.h: No
such file or directory
make[1]: *** [networking/ip.o] Error 1
make: *** [networking] Error 2
error: Bad exit status from /home/user/eldk41arm/var/tmp/rpm-
tmp.79428 (%build)
RPM build errors:
Bad exit status from /home/user/eldk41arm/var/tmp/rpm-tmp.79428
(%build)
---
Really if_addr.h and if_link.h aren't present in
~/eldk41arm/arm/usr/src/linux/include/linux, but I have them in
/usr/include/linux (Ubuntu kernel include files).
How can I solve these problems to build busybox again? After that,
how can I modify the configuration of busybox to use ash shell?
Thanks for the help.
Giuseppe
More information about the eldk
mailing list