USB Flash rootfs prep!

Cristian Axenie cristian.axenie at gmail.com
Sat Nov 15 12:05:38 EST 2008


Hello all !
I'm porting a former Control application from x86 (Linux+RTAI+Comedi) to
PowerPC (Xenomai+Comedi for RTDM). I've choosed for my development the ELDK
tool and a MPC8315ERDB platform. So I 've properly patched and build my
kernel with the Xenomai support and I get some errors when running a latency
test app. I've managed to spot the problem , that consists in an
incompatibility between the shared libraries used on the target (ver 2.5)
and the standard libraries used (and with which were compiled the kernel and
the Xenomai addon) version 2.6, and so ld screams and a SegFault appears.
Now I,ve creted an ext2.img rootfs with the rootfs.tar.gz from
/eldk/ppc_6xx/images and I've added in the rootfs some libs and other useful
stuff for Xenomai for elliminating the need for an NFS mount.
My primary concern is now to write the new FS to a USB Flash Stick so that I
can test if the latency tests works now when the libs are compatible (ver
2.6).
So resuming I want to now what are the corect steps to do this, because I've
tried to write the generated ext2.img to my USB flash stick (formated as
ext2) and added to the uBoot bootargs to the following :

setenv usbstick_args setenv bootargs root=/dev/sdb1 ro rootdelay=10
rootfstype=ext2 console=$consoledev,$baudrate;
setenv usbstick 'run usbstick_args;bootm fe500000 - fe700000'
setenv bootcmd run usbstick

As a result I get the following output :

Waiting 10sec before mounting root device...
scsi 2:0:0:0: Direct-Access     SanDisk  Cruzer Micro     0.1  PQ: 0 ANSI: 2
sd 2:0:0:0: [sdb] 2001888 512-byte hardware sectors (1025 MB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sd 2:0:0:0: [sdb] 2001888 512-byte hardware sectors (1025 MB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Assuming drive cache: write through
 sdb: sdb1
sd 2:0:0:0: [sdb] Attached SCSI removable disk
sd 2:0:0:0: Attached scsi generic sg1 type 0
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 156k init
Warning: unable to open an initial console.
Failed to execute /bin/busybox.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to
kernel.
Rebooting in 180 seconds..

Shall I explicitly give the init ? What should be ... init=/sbin/init,
init=/bin/busybox ????

Thanks in advance !!!

Best regards ,
Cristian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20081115/6aa179e1/attachment.htm>


More information about the Linuxppc-embedded mailing list