uclibc on coldfire 5475 eval board
chrigi at nateurope.com
Tue Sep 26 19:26:20 UTC 2006
I am trying to compile and run uclibc and busybox on a Freescale/Logicpd
evaluation board with Coldfire 5475 CPU. Freescale delivers a Linux BSP
that contains the Metrowerks m68k cross compiler, kernel 2.6.10 including
Freescale patches, glibc and busybox. The board runs when using the (newly
compiled) kernel and the Freescale delivered binaries. However, I cannot
use the precompiled binaries due to resource limitations on the final
target system, therefore I want to compile and run uclibc and busybox.
Whatever I do, after starting successfully the kernel I got the message:
VFS: Mounted root (nfs filesystem).
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
The root filesystem was mounted correctly, but it seems that no init process
can be found, even in case I pass kernel command line options (init=/bin/init).
To avoid any mistake in busybox compilation I wrote a test program that
simply prints out a 'hello' message. This one works with the Freescale
delivered glibc but not with the newly compiled uclibc.
So far I tested metrowerks compiler m68k-linux-gcc (GCC) 3.4.0, compiler
from http://www.codesourcery.com/gnu_toolchains/coldfire m68k-uclinux-gcc
(GCC) 4.1.0, uclibc 0.9.28 and uclibc snapshot 26-Sep-2006 00:10. In the
main Rules.mak I replaced line
CC = $(CROSS)gcc
CC = $(CROSS)gcc -mcfv4e
to be sure that the code is correctly created for the Coldfire 5475 CPU.
If option -mcfv4e is passed to the compiler in the uclibc code the file
ldso/ldso/m68k/resolve.S does not compile, so I replaced the erroneous line:
jmp (%d0) // line 22
When trying to install the uclibc snapshot code I got following error message:
install -d ../rootfs/lib
install -m 644 lib/lib*-0.9.29.so \
cd lib && tar -cf - *.so.* | tar -xf - -C ../rootfs/lib
tar: ../rootfs/lib: Cannot chdir: No such file or directory
tar: Error is not recoverable: exiting now
make: *** [install_runtime] Error 2
Therefore I replaced the install sequence in Makefile.in by the
install sequence from uclibc 0.9.28.
If anybody can help me with these questions I would appreciate it.
1. Why could the kernel not start any 'init' process ?
Is it possible that I applied some wrong uclibc configuration ?
I used following Library Installation Options:
2. How do I configure uclibc for a specific CPU type ?
Is it correct, that this setting has to be done in the Rules.mak ?
3. How can resolve.S be compiled for a CPU type that does not support
the given instruction ?
Does the assembler replacement work ?
4. Does the 'make install' fail because of 'snapshot' sources ?
Sorry for so many questions at once but any help is very much appreciated.
More information about the uClibc