[uClibc]buildroot binaries made for preexisting linux won't exec
David Wuertele
dave-gnus at bfnet.com
Fri Feb 21 02:11:46 UTC 2003
Hi, I downloaded the buildroot snapshot on Feb 18 (two days ago), and
was able to build a root without editing anything, just by typing
"make". Cool!
Then I made some changes. The goal is to build a root filesystem for
an existing kernel on an embedded MIPS little-endian system. The
existing kernel is a heavily-patched 2.4.18 that I got from my cpu
vendor.
The changes I made were:
1. change the ARCH variable to be "mipsel" instead of "i386"
2. change the "TARGETS+=user-mode-linux" to "system-linux"
3. in make/system-linux.mk, change LINUX_SOURCE to point to my actual
source
That's it. I ran make, and voila, I got a toolchain and a rootfs
without any errors. Quite impressive! Except it doesn't work. :-(
I boot my embedded system with the arguments:
nfsroot=10.0.0.157:/nfsroot rw ip=10.0.1.3
The host 10.0.0.157 is an NFS server, and when I export my vendor's
huge linux system as /nfsroot, my embedded system boots and mounts it
fine. But when I export the newly generated uclibc rootfs as
/nfsroot, my embedded system freezes after it tries to mount it.
Using KGDB I see that the kernel gets all the way to the point where
it tries to exec /sbin/init, then it croaks.
When I use my vendor's nfsroot to boot to a shell, then mount the
uclibc rootfs on "/mnt/ucroot", I can mount it OK. I see all the
files in /mnt/ucroot that I expect in a root filesystem. But when
I try to "exec /mnt/ucroot/bin/busybox", I get:
bash: /mnt/ucroot/bin/busybox: No such file or directory
bash: /mnt/ucroot/bin/busybox: No such file or directory
Any suggestions? Should I use my vendor's toolchain to compile uclibc
et al?
Thanks,
Dave
More information about the uClibc
mailing list