[U-Boot] Booting with rootfs on ramdisk

Ayewin Oung ayewinoung at googlemail.com
Thu May 20 11:04:17 CEST 2010


Hi Peter

Thanks for your help, I did as you suggested and it seems to go further,
however, it couldn't successfully mount the rootfs, and come back as

No filesystem could mount root, tried:  ext2 cramfs msdos vfat

Is there anything I should compile in the linux kernel, I've make sure,
ticks in ltib for followings:

1. Second extended fs support
2. Kernel automounter version 4 support (..)

Any pointers much appreciated, and thanks in advance.

Ayewin


Full boot output.
===========

uboot> run bootcmd
    HW MAC address:  A0:70:64:6B:58:C7
Link Active Port 0 Speed 100Mbits, FullDuplex.
TFTP from server 192.168.2.4; our IP address is 192.168.2.6
Filename 'uImage'.
Load address: 0x80000000
Loading: #################################################################
     ################################
done
Bytes transferred = 1416776 (159e48 hex)
    HW MAC address:  A0:70:64:6B:58:C7
Link Active Port 0 Speed 100Mbits, FullDuplex.
TFTP from server 192.168.2.4; our IP address is 192.168.2.6
Filename 'rootfs.ext2.gz.uboot'.
Load address: 0x81000000
Loading: #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     ##
done
Bytes transferred = 5745973 (57ad35 hex)
## Booting kernel from Legacy Image at 80000000 ...
   Image Name:   Linux-2.6.27.8
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1416712 Bytes =  1.4 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 81000000 ...
   Image Name:   uboot ext2 ramdisk rootfs
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5745909 Bytes =  5.5 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing
Linux........................................................... done,
booting the kernel.
�Linux version 2.6.27.8 (engineer at MayMyo) (gcc version 4.1.2) #58 PREEMPT
Thu May 20 09:37:03 BST 2010
CPU: ARM926EJ-S [41069264] revision 4 (ARMv5TEJ), cr=00053177
Machine: Padauk Systems PTP16P Board
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
CPU0: D cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
Kernel command line: mem=16M console=ttyS0,115200n8 root=/dev/ram rw
ramdisk_size=16384 ip=dhcp ethaddr=a0:70:64:6b:58:c7
PID hash table entries: 64 (order: 6, 256 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 16MB = 16MB total
Memory: 13188KB available (2696K code, 199K data, 104K init)
Calibrating delay loop... 84.73 BogoMIPS (lpj=169472)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 288 bytes
NET: Registered protocol family 16
LPC32XX DMA driver
LPC32XX unique ID: 0006291c75701b6e58dc8cb71086f480
SCSI subsystem initialized
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 25
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x40090000 (irq = 9) is a 16550A
console [ttyS0] enabled
brd: module loaded
loop: module loaded
LPC32XX_mii_bus: probed
eth0: LPC32XX mac at 0x31060000 irq 29
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:00, irq=-1)
Driver 'sd' needs updating - please use bus_type methods
NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix NAND 256MiB 3,3V
8-bit)
Scanning device for bad blocks
Creating 7 MTD partitions on "lpc32xx_nand":
0x00000000-0x00040000 : "ptp16p-kickstart"
0x00040000-0x000c0000 : "ptp16p-s1l"
0x000c0000-0x00220000 : "ptp16p-wlv"
0x00220000-0x00260000 : "ptp16p-bparams"
0x00260000-0x00360000 : "ptp16p-uboot"
0x00400000-0x02000000 : "ptp16p-kernel"
0x02000000-0x10000000 : "ptp16p-rootfs"
mice: PS/2 mouse device common for all mice
rtc-lpc32xx rtc-lpc32xx: rtc core: registered rtc-lpc32xx as rtc0
i2c /dev entries driver
PNX4008-WDT: PNX4008 Watchdog Timer: heartbeat 19 sec
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
VFP support v0.3: implementor 41 architecture 1 part 10 variant 9 rev 1
rtc-lpc32xx rtc-lpc32xx: setting system clock to 2005-02-16 07:43:56 UTC
(1108539836)
Sending DHCP requests .., OK
IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.2.6
IP-Config: Complete:
     device=eth0, addr=192.168.2.6, mask=255.255.255.0, gw=192.168.2.254,
     host=192.168.2.6, domain=pdksys.local, nis-domain=(none),
     bootserver=0.0.0.0, rootserver=0.0.0.0, rootpath=
List of all partitions:
1f00        256 mtdblock0 (driver?)
1f01        512 mtdblock1 (driver?)
1f02       1408 mtdblock2 (driver?)
1f03        256 mtdblock3 (driver?)
1f04       1024 mtdblock4 (driver?)
1f05      28672 mtdblock5 (driver?)
1f06     229376 mtdblock6 (driver?)
No filesystem could mount root, tried:  ext2 cramfs msdos vfat
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(1,0)





On 19 May 2010 19:12, Peter Barada <peterb at logicpd.com> wrote:

>  On Wed, 2010-05-19 at 19:03 +0100, Ayewin Oung wrote:
>
> Hi list
>
> I need help and pointers, to get rootfs on ramdisk. I've build kernel and
> ram image and when the kernel try to boot, the kernel always want to load
> rootfs from NFS. Please see attached output. And I'm not sure how kernel
> know here to find ramdisk etc.. Please help with the following:
>
> 1. A list of kernel configuration options need to set, to be able to use
> ramdisk as rootfs.
> 2. Definative u-boot command line to let kernel know where the ramdisk image
> is and to use it as rootfs.
> 3. How to disable kernel from trying to mount rootfs via NFS.
>
>  1) Make sure that CONFIG_BLK_DEV_RAM is enabled.
>
> 2) You can peruse other board configurations, but the following should do:
>
> => setenv xipboot=setenv bootargs console=${consoledev},${baudrate}
> root=/dev/ram rw ramdisk_size=${ramdisksize} ${otherbootargs};bootm
> ${loadaddr} ${rootfsaddr}
> => setenv ramdisksize 16384 # whatever KB you need to hold the ramdisk
> => setenv loadaddr 0x...  # where the kernel is loaded into memory
> => setenv rootfsaddr 0x... # where you load the ramdisk into memory
> => saveenv
>
> => tftpboot $loadaddr uImage
> => tftpboot $rootfsaddr rootfs.ext2.gz.uboot
> => run xipboot
>
> 3) By specifying the root as /dev/ram, not /dev/nfs
>
> Should work, but your mileage may vary....
>
>
> Thanks so much in advance.
>
> Ayewin
>
>
>
>
> uboot> run bootcmd
>     HW MAC address:  A0:70:64:6B:58:C7
> Link Active Port 0 Speed 100Mbits, FullDuplex.
> TFTP from server 192.168.2.4; our IP address is 192.168.2.6
> Filename 'uImage'.
> Load address: 0x80000000
> Loading: #################################################################
>      #################################
> done
> Bytes transferred = 1426684 (15c4fc hex)
>     HW MAC address:  A0:70:64:6B:58:C7
> Link Active Port 0 Speed 100Mbits, FullDuplex.
> TFTP from server 192.168.2.4; our IP address is 192.168.2.6
> Filename 'rootfs.ext2.gz.uboot'.
> Load address: 0x81000000
> Loading: #################################################################
>      #################################################################
>      #################################################################
>      #################################################################
>      #################################################################
>      #################################################################
>      ##
> done
> Bytes transferred = 5745981 (57ad3d hex)
> ## Booting kernel from Legacy Image at 80000000 ...
>    Image Name:   Linux-2.6.27.8
>    Image Type:   ARM Linux Kernel Image (uncompressed)
>    Data Size:    1426620 Bytes =  1.4 MB
>    Load Address: 80008000
>    Entry Point:  80008000
>    Verifying Checksum ... OK
> ## Loading init Ramdisk from Legacy Image at 81000000 ...
>    Image Name:   uboot ext2 ramdisk rootfs
>    Image Type:   ARM Linux RAMDisk Image (gzip compressed)
>    Data Size:    5745917 Bytes =  5.5 MB
>    Load Address: 00000000
>    Entry Point:  00000000
>    Verifying Checksum ... OK
>    Loading Kernel Image ... OK
> OK
>
> Starting kernel ...
>
> Uncompressing
> Linux............................................................ done,
> booting the kernel.
> �Linux version 2.6.27.8 (engineer at MayMyo) (gcc version 4.1.2) #57 PREEMPT
> Wed May 19 18:31:27 BST 2010
> CPU: ARM926EJ-S [41069264] revision 4 (ARMv5TEJ), cr=00053177
> Machine: Padauk Systems PTP16P Board
> Memory policy: ECC disabled, Data cache writeback
> CPU0: D VIVT write-back cache
> CPU0: I cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
> CPU0: D cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
> Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
> Kernel command line: mem=16M console=ttyS0,115200n8 root=/dev/ram0 rw
> ip=dhcp ethaddr=a0:70:64:6b:58:c7
> PID hash table entries: 64 (order: 6, 256 bytes)
> Console: colour dummy device 80x30
> Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
> Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
> Memory: 16MB = 16MB total
> Memory: 13172KB available (2724K code, 198K data, 92K init)
> Calibrating delay loop... 84.73 BogoMIPS (lpj=169472)
> Mount-cache hash table entries: 512
> CPU: Testing write buffer coherency: ok
> net_namespace: 288 bytes
> NET: Registered protocol family 16
> LPC32XX DMA driver
> LPC32XX unique ID: 0006291c75701b6e58dc8cb71086f480
> SCSI subsystem initialized
> NET: Registered protocol family 2
> IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
> TCP established hash table entries: 512 (order: 0, 4096 bytes)
> TCP bind hash table entries: 512 (order: -1, 2048 bytes)
> TCP: Hash tables configured (established 512 bind 512)
> TCP reno registered
> NET: Registered protocol family 1
> NetWinder Floating Point Emulator V0.97 (double precision)
> JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
> msgmni has been set to 25
> io scheduler noop registered
> io scheduler anticipatory registered
> io scheduler deadline registered
> io scheduler cfq registered (default)
> Serial: 8250/16550 driver4 ports, IRQ sharing disabled
> serial8250.0: ttyS0 at MMIO 0x40090000 (irq = 9) is a 16550A
> console [ttyS0] enabled
> loop: module loaded
> LPC32XX_mii_bus: probed
> eth0: LPC32XX mac at 0x31060000 irq 29
> eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:00, irq=-1)
> Driver 'sd' needs updating - please use bus_type methods
> NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix NAND 256MiB 3,3V
> 8-bit)
> Scanning device for bad blocks
> Creating 7 MTD partitions on "lpc32xx_nand":
> 0x00000000-0x00040000 : "ptp16p-kickstart"
> 0x00040000-0x000c0000 : "ptp16p-s1l"
> 0x000c0000-0x00220000 : "ptp16p-wlv"
> 0x00220000-0x00260000 : "ptp16p-bparams"
> 0x00260000-0x00360000 : "ptp16p-uboot"
> 0x00400000-0x02000000 : "ptp16p-kernel"
> 0x02000000-0x10000000 : "ptp16p-rootfs"
> mice: PS/2 mouse device common for all mice
> rtc-lpc32xx rtc-lpc32xx: rtc core: registered rtc-lpc32xx as rtc0
> i2c /dev entries driver
> PNX4008-WDT: PNX4008 Watchdog Timer: heartbeat 19 sec
> TCP cubic registered
> NET: Registered protocol family 17
> RPC: Registered udp transport module.
> RPC: Registered tcp transport module.
> ieee80211: 802.11 data/management/control stack, git-1.1.13
> ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno at linux.intel.com>
> VFP support v0.3: implementor 41 architecture 1 part 10 variant 9 rev 1
> rtc-lpc32xx rtc-lpc32xx: setting system clock to 1971-01-26 23:12:43 UTC
> (33779563)
> Sending DHCP requests .., OK
> IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.2.6
> IP-Config: Complete:
>      device=eth0, addr=192.168.2.6, mask=255.255.255.0, gw=192.168.2.254,
>      host=192.168.2.6, domain=pdksys.local, nis-domain=(none),
>      bootserver=0.0.0.0, rootserver=0.0.0.0, rootpath=
> Looking up port of RPC 100003/2 on 0.0.0.0
> rpcbind: server 0.0.0.0 not responding, timed out
> Root-NFS: Unable to get nfsd port number from server, using default
> Looking up port of RPC 100005/1 on 0.0.0.0
> rpcbind: server 0.0.0.0 not responding, timed out
> Root-NFS: Unable to get mountd port number from server, using default
> Root-NFS: Server returned error -5 while mounting /tftpboot/192.168.2.6
>
> VFS: Unable to mount root fs via NFS, trying floppy.
> VFS: Cannot open root device "ram0" or unknown-block(2,0)
> Please append a correct "root=" boot option; here are the available
> partitions:
> 1f00        256 mtdblock0 (driver?)
> 1f01        512 mtdblock1 (driver?)
> 1f02       1408 mtdblock2 (driver?)
> 1f03        256 mtdblock3 (driver?)
> 1f04       1024 mtdblock4 (driver?)
> 1f05      28672 mtdblock5 (driver?)
> 1f06     229376 mtdblock6 (driver?)
> Kernel panic - not syncing: VFS: Unable to mount root fs on
> unknown-block(2,0)
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.dehttp://lists.denx.de/mailman/listinfo/u-boot
>
>
>


More information about the U-Boot mailing list