uclibc on coldfire 5475 eval board

Peter Barada peterb at logicpd.com
Tue Sep 26 19:39:04 UTC 2006

On Tue, 2006-09-26 at 21:26 +0200, Christof Girgenrath wrote:
> Hello,
> 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
> by
> 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
> by
> 	move.l %d0,-(%sp)
> 	rts
> 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 \
>          ../rootfs/lib
> 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:
>     DEVEL_PREFIX="/usr"

Are you sure that the kernel isn't starting up init, but errors out
early before any message comes out?  Try statically linking your init so
you 'll know if it can start up correctly.  If init isn't starting up,
you might have to debug the elf loader in the kernel to see why it may
be erroring out.

> 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 ?

Yes, that assembler replacement looks reasonable (And I've used it on
547x parts).

> 4. Does the 'make install' fail because of 'snapshot' sources ?
> Sorry for so many questions at once but any help is very much appreciated.
> Thank you
> Christof
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://busybox.net/cgi-bin/mailman/listinfo/uclibc

More information about the uClibc mailing list