[U-Boot] Problems booting PPC with RAM root fs

Here's my situation . . . We have a custom PPC-based board that currently boots from a kernel in the on-board flash and the root fs mounted via NFS. My project is to move the root fs into flash; to test that -- mainly to save time and write cycles on the flash -- I'm trying to do my debugging by pulling the root fs into RAM using TFTP then boot from that. of course, it's not working.
Here's a summary of how I got this far: I created a file with dd, formatted it with mke2fs, mounted it (-o loop), copied in a known working root fs), unmounted, gzipped, then ran mkimage as follows:
mkimage \ -n "RAMdisk image" \ -A PPC \ -O linux \ -T ramdisk \ -C gzip \ -d ext2-image.gz \ uboot-image
Here's how I tried to boot the system:
U-Boot 1.1.4 (May 20 2008 - 16:49:25) . . . => setenv netmask 255.255.255.252 => setenv gatewayip 10.3.0.33 => setenv ipaddr 10.3.0.34 => setenv serverip 10.255.8.1 => tftp 0x4000000 testlab/uboot-image (tftp results) done! Bytes transferred = 10014657 (98cfc1 hex) => setenv bootargs console=ttl0,19200,root=/dev/ram,load_ramdisk=1 => bootm 0xFC040000 0x4000000
[ a complete log of the boot session appears below (just in case attachments don't work) ]
The system uncompresses and recognizes the kernel and the rootfs, but fails because for some reason, it's trying to load the root fs via NFS, even though I thought I told it not to do that.
I hope this is as simple as I don't have the right kernel command line args, but I'm at a loss for which args to give it to fix this.
If anyone can please point me in the right direction, I'd really appreciate it.
Thanks, Adam
----- typescript of boot session starts here ----- Reset cause: Powerup This is build nodebd3.1.12 Initializing ECC ... RAM initialized Jumping to U-Boot...
U-Boot 1.1.4 (May 20 2008 - 16:49:25)
I2C: ready DRAM: 128 MB FLASH: 32 MB Found mac: 00:18:17:10:00:cd ethaddr 00:18:17:10:00:cd Hit any key to stop autoboot: 3 2 0 => setenv netmask 255.255.255.252 => setenv gatewayip 10.3.0.33 => setenv ipaddr 10.3.0.34 => setenv serverip 10.255.8.1 => tftp 0x4000000 testlab/uboot-image Ethernet clock acquiring lock... done PHY Hard Reset. setup_phy: PHY found at address 0 setup_phy: PHY found at address 1 XLLTemac_PhyInit: Vitesse 8201 PHY at 1 configured Waiting for link... link up Waiting for DCM lock... locked Speed: 1000Mb, Full duplex TFTP from server 10.255.8.1; our IP address is 10.3.0.34; sending through gateway 10.3.0.33 Filename 'testlab/uboot-image'. Load address: 0x4000000 Loadingg: *################################################################# ################################################################# (line repeats 29 times) ###### done! Bytes transferred = 10014657 (98cfc1 hex) => setenv bootargs console=ttl0,19200,root=/dev/ram,load_ramdisk=1 => bootm 0xFC040000 0x4000000 ## Booting image at fc040000 ... Image Name: Linux-2.4.20_mvl31-ml300 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 633621 Bytes = 618.8 kB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Uncompressing Kernel Image from src 0xfc040040 to dest 0x0..OK ## Loading RAMDisk Image at 04000000 ... Image Name: RAMdisk image for adam Image Type: PowerPC Linux RAMDisk Image (gzip compressed) Data Size: 10014593 Bytes = 9.6 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Loading Ramdisk to 07627000, end 07fb3f81 ... OK Linux version 2.4.20_mvl31-ml300 (dradbin@drdws009.nyc.deshaw.com) (gcc version 3.3.6) #1 Tue Jul 7 16:43:48 EDT 2009 Xilinx Virtex-II Pro port (C) 2002 MontaVista Software, Inc. (source@mvista.com) On node 0 totalpages: 32768 zone(0): 32768 pages. zone(1): 0 pages. zone(2): 0 pages. Kernel command line: console=ttl0,19200,root=/dev/ram,load_ramdisk=1 Xilinx INTC #0 at 0x000003F0 (DCR) Calibrating delay loop... 299.00 BogoMIPS Memory: 118208k available (1092k kernel code, 384k data, 60k init, 0k highmem) Dentry cache hash table entries: 16384 (order: 5, 131072 bytes) Inode cache hash table entries: 8192 (order: 4, 65536 bytes) Mount-cache hash table entries: 2048 (order: 2, 16384 bytes) Buffer-cache hash table entries: 8192 (order: 3, 32768 bytes) Page-cache hash table entries: 32768 (order: 5, 131072 bytes) POSIX conformance testing by UNIFIX Linux NET4.0 for Linux 2.4 Based upon Swansea University Computer Society NET3.039 Initializing RT netlink socket LSP Revision 42 ikconfig 0.5 with /proc/ikconfig Starting kswapd devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au) devfs: boot_options: 0x1 pty: 256 Unix98 ptys configured RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize loop: loaded (max 8 devices) PHY Hard Reset.<3>eth0: using sgDMA mode. [descriptor_init]Recv V:c900d000, P:07fd0000 [descriptor_init]Send V:c900dc80, P:07fd0c80 probe: PHY found at address 0 probe: PHY found at address 1 XLLTemac_PhyInit: Vitesse 8201 PHY at 1 configured PHY status register 00007949 eth0: Xilinx EMAC #0 at 0xFFFFFFFF , irq=30 physmap flash device: 2000000 at fc000000 Number of erase regions: 2 Primary Vendor Command Set: 0001 (Intel/Sharp Extended) Primary Algorithm Table at 010A Alternative Vendor Command Set: 0000 (None) No Alternate Algorithm Table Vcc Minimum: 1.7 V Vcc Maximum: 2.0 V Vpp Minimum: 8.5 V Vpp Maximum: 9.5 V Typical byte/word write timeout: 256 �s Maximum byte/word write timeout: 512 �s Typical full buffer write timeout: 512 �s Maximum full buffer write timeout: 1024 �s Typical block erase timeout: 1024 ms Maximum block erase timeout: 4096 ms Chip erase not supported Device size: 0x2000000 bytes (32 MiB) Flash Device Interface description: 0x0001 - x16-only asynchronous interface Max. bytes in buffer write: 0x40 Number of Erase Block Regions: 2 Erase Region #0: BlockSize 0x20000 bytes, 255 blocks Erase Region #1: BlockSize 0x8000 bytes, 4 blocks cfi_cmdset_0001: Erase suspend on write enabled Using buffer write method kmod: failed to exec /sbin/modprobe -s -k RedBoot, errno = 2 RedBoot partition parsing not available Using physmap partition definition Creating 4 MTD partitions on "phys_mapped_flash": 0x00000000-0x00040000 : "uboot" 0x00040000-0x01fe0000 : "rootfs" 0x01fe0000-0x01fe8000 : "uboot_env" 0x01fe8000-0x02000000 : "unused" NET4: Linux TCP/IP 1.0 for NET4.0 IP Protocols: ICMP, UDP, TCP, IGMP IP: routing cache hash table of 1024 buckets, 8Kbytes TCP: Hash tables configured (established 8192 bind 16384) [xenet_open]stats Tx:0 Rx:0 Txerr:0 Rxerr:0 Txd 0, Rxd 0 Sending DHCP requests .eth0: link up; speed 1000Mb; full duplex PHY control register 00001140; PHY status register 0000796D eth0: Link carrier restored. Resetting DCM [xenet_open]stats Tx:1 Rx:0 Txerr:0 Rxerr:0 Txd 0, Rxd 0 ., OK IP-Config: Got DHCP answer from 10.3.0.33, my address is 10.3.0.34 IP-Config: Complete: device=eth0, addr=10.3.0.34, mask=255.255.255.252, gw=10.3.0.33, host=eit4-board0, domain=lab.desres.deshaw.com, nis-domain=(none), bootserver=10.3.0.33, rootserver=10.3.0.33, rootpath= NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. RAMDISK: Compressed image found at block 0 Freeing initrd memory: 9779k freed EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended VFS: Mounted root (ext2 filesystem). Mounted devfs on /dev Looking up port of RPC 100003/2 on 10.3.0.33 Looking up port of RPC 100005/1 on 10.3.0.33 Root-NFS: Server returned error -13 while mounting /tftpboot/eit4-board0 VFS: Unable to mount root fs via NFS, trying floppy. VFS: Cannot open root device "" or 02:00 Please append a correct "root=" boot option Kernel panic: VFS: Unable to mount root fs on 02:00 <0>Rebooting in 180 seconds.. ----- typescript of boot session ends here -----

Dear Adam Moskowitz,
In message 20100610173438.GA25105@cakewalk.menlo.com you wrote:
Here's my situation . . . We have a custom PPC-based board that currently boots from a kernel in the on-board flash and the root fs mounted via NFS. My project is to move the root fs into flash; to test that -- mainly to save time and write cycles on the flash -- I'm trying to do my debugging by pulling the root fs into RAM using TFTP then boot from that. of course, it's not working.
Here's a summary of how I got this far: I created a file with dd, formatted it with mke2fs, mounted it (-o loop), copied in a known working root fs), unmounted, gzipped, then ran mkimage as follows:
Do you know the root file system builder RFSB? See http://git.denx.de/?p=rfsb.git;a=summary
U-Boot 1.1.4 (May 20 2008 - 16:49:25)
This is a very old version. It does not have any device tree support. Consider updating.
=> setenv bootargs console=ttl0,19200,root=/dev/ram,load_ramdisk=1
You must not use commas to separate arguments; This should be
setenv bootargs 'console=ttl0,19200 root=/dev/ram load_ramdisk=1'
Please RTFM!
The system uncompresses and recognizes the kernel and the rootfs, but fails because for some reason, it's trying to load the root fs via NFS, even though I thought I told it not to do that.
You did not pass a root= argument - this was part of the console= argument and ignored.
Best regards,
Wolfgang Denk
participants (2)
-
Adam Moskowitz
-
Wolfgang Denk