Project

General

Profile

Fail to mount Root FS from MicroSD card

Added by Dmitry Gorulko over 11 years ago

Hello!
I am trying to mount Root FS from MicroSD card (ext2 formated).
Boot process fails with kernel panic.

My U-Boot environment:
bootargs=mem=96M console=ttyS1,115200n8 root=/dev/mtdblock0 rw rootwait
bootcmd=sf probe 0; sf read 0xc0700000 0x100000 0x280000; run flashargs; bootm 0xc0700000
baudrate=115200
bootfile="uImage"
ipaddr=192.168.0.50
serverip=192.168.0.11
autoload=no
mtdids=nand0=nand
mtdparts=mtdparts=nand:128M(rootfs),-(userfs)
bootargsbase=mem=96M console=ttyS1,115200n8
flashargs=setenv bootargs ${bootargsbase} ${mtdparts} root=/dev/mtdblock0 rw,noatime rootfstype=jffs2
dspwake=yes
hddargs=setenv bootargs ${bootargsbase} root=/dev/sda1 rw rootwait ip=192.168.0.50
boothdd=sf probe 0; sf read 0xc0700000 0x100000 0x280000; run hddargs; bootm 0xc0700000
sdargs=setenv bootargs mem=96M console=ttyS1,115200n8 root=/dev/mmcblk0p1 rw rootwait ip=192.168.0.50
bootsd=mmcinfo; ext2load mmc 0:1 0xc0700000 /boot/uImage; run sdargs; bootm 0xc0700000
stdin=serial
stdout=serial
stderr=serial
ethaddr=10:20:30:40:50:60
ver=U-Boot 2009.11 (Jul 18 2013 - 18:03:44) *

U-Boot is able to load a kernel from the MicroSD card using ext2load.

Linux kernel boot log:
U-Boot > run bootsd
Device: davinci
Manufacturer ID: 3
OEM: 5344
Name: SU02G
Tran Speed: 25000000
Rd Block Len: 512
SD version 2.0
High Capacity: No
Capacity: 1977614336
Bus Width: 4-bit
Loading file "/boot/uImage" from mmc device 0:1 (xxa1)
1963592 bytes read
  1. Booting kernel from Legacy Image at c0700000 ...
    Image Name: Linux-2.6.34-rc1-CORE2-default-0
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 1963528 Bytes = 1.9 MB
    Load Address: c0008000
    Entry Point: c0008000
    Verifying Checksum ... OK
    Loading Kernel Image ... OK
    OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.34-rc1-CORE2-default-0901 (mitydsp@mitydsp-dev) (gcc version 4.3.3 (GCC) ) #46 PREEMPT Fri Jun 7 16:25:31 KST 2013
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: MityDSP-L138
Peripheral Config Block Found
Enet_Config = 2
PHYMask = 0x80
No LCD Configured
UART0 = 0, 0, 0, 115200
UART1 = 1, 1, 0, 115200
UART2 = 0, 0, 0, 115200
SPI0 = 0, 0, 00, 0, 0
SPI1 = 1, 1, 01, 0, 30000000
Memory policy: ECC disabled, Data cache writethrough
DaVinci da850/omap-l138/am18xx variant 0x1
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 24384
Kernel command line: mem=96M console=ttyS1,115200n8 root=/dev/mmcblk0p1 rw rootwait ip=192.168.0.50
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 96MB = 96MB total
Memory: 93360k/93360k available, 4944k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xff000000 - 0xffe00000 ( 14 MB)
vmalloc : 0xc6800000 - 0xfea00000 ( 898 MB)
lowmem : 0xc0000000 - 0xc6000000 ( 96 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.init : 0xc0008000 - 0xc002a000 ( 136 kB)
.text : 0xc002a000 - 0xc0390000 (3480 kB)
.data : 0xc03aa000 - 0xc03cd180 ( 141 kB)
Experimental preemptable hierarchical RCU implementation.
NR_IRQS:245
Console: colour dummy device 80x30
Calibrating delay loop... 226.91 BogoMIPS (lpj=1134592)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
DaVinci: 144 gpio irqs
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource timer0_1
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 182
io scheduler noop registered (default)
Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c42000 (irq = 25) is a 16550A
serial8250.0: ttyS1 at MMIO 0x1d0c000 (irq = 53) is a 16550A
console [ttyS1] enabled
serial8250.0: ttyS2 at MMIO 0x1d0d000 (irq = 61) is a 16550A
brd: module loaded
ahci ahci: forcing PORTS_IMPL to 0x1
ahci ahci: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
ahci ahci: flags: ncq sntf pm led clo only pmp pio slum part ccc
scsi0 : ahci
ata1: SATA max UDMA/133 irq 67
No NAND device found.
spi_davinci spi_davinci.1: Controller at 0xfef0e000
console [netcon0] enabled
netconsole: network logging started
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci ohci.0: DA8xx OHCI
ohci ohci.0: new USB bus registered, assigned bus number 1
Waiting for USB PHY clock good...
ohci ohci.0: irq 59, io mem 0x01e25000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
omap_rtc: RTC power up reset detected
omap_rtc: already running
davinci_mmc davinci_mmc.0: Using DMA, 4-bit mode
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP cubic registered
NET: Registered protocol family 17
VFP support v0.3: not present
davinci_emac_probe: using random MAC addr: ce:3f:f9:96:9d:98
emac-mii: probed
omap_rtc omap_rtc: setting system clock to 2011-02-23 02:39:39 UTC (1298428779)
mmc0: new SD card at address b853
mmcblk0: mmc0:b853 SU02G 1.84 GiB (ro)
mmcblk0: p1
ata1: SATA link down (SStatus 0 SControl 300)
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=1:07, id=7c0f1)
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
device=eth0, addr=192.168.0.50, mask=255.255.255.0, gw=255.255.255.255,
host=192.168.0.50, domain=, nis-domain=(none),
bootserver=255.255.255.255, rootserver=255.255.255.255, rootpath=
VFS: Cannot open root device "mmcblk0p1" or unknown-block(179,1)
Please append a correct "root=" boot option; here are the available partitions:
b300 1931264 mmcblk0 driver: mmcblk
b301 1930680 mmcblk0p1
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,1)
[<c002f8ac>] (unwind_backtrace+0x0/0xdc) from [<c02b3b2c>] (panic+0x40/0xcc)
[<c02b3b2c>] (panic+0x40/0xcc) from [<c0008f90>] (mount_block_root+0x1d4/0x21c)
[<c0008f90>] (mount_block_root+0x1d4/0x21c) from [<c0009240>] (prepare_namespace+0x164/0x1c8)
[<c0009240>] (prepare_namespace+0x164/0x1c8) from [<c0008484>] (kernel_init+0x118/0x160)
[<c0008484>] (kernel_init+0x118/0x160) from [<c002b938>] (kernel_thread_exit+0x0/0x8)

If I am using that MicroSD card with USB reader there is no problem to mount Root FS from it as /dev/sda.
MMC interface seems to fine by itself as I am able to R/W with it and U-Boot reads kernel normally.

Any suggestions?

Thanks!


Replies (3)

RE: Fail to mount Root FS from MicroSD card - Added by Tim Iskander over 11 years ago

Dmitry,
I believe yhou are missing a comma in your bootargs..
root=/dev/mmcblk0p1 rw rootwait
should be
root=/dev/mmcblk0p1 rw,rootwait

cheers
/Tim

RE: Fail to mount Root FS from MicroSD card - Added by Dmitry Gorulko over 11 years ago

Hello, Tim!

Comma makes no difference, I have tried.

I have got a little progress - I have changed bootargs as follows:

bootsd=mmcinfo; ext2load mmc 0:1 0xc0700000 /boot/uImage; run sdargs; bootm 0xc0700000
sdargs=setenv bootargs mem=96M console=ttyS1,115200n8 root=/dev/mmcblk0p1 ro

In the case when Root FS is RO boot goes further, but doesn't complete anyway.
Now boot log looks like this:

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.34-rc1-CORE2-default-0901 (mitydsp@mitydsp-dev) (gcc version 4.3.3 (GCC) ) #46 PREEMPT Fri Jun 7 16:25:31 KST 2013
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: MityDSP-L138
Peripheral Config Block Found
Enet_Config = 2
PHYMask = 0x80
No LCD Configured
UART0 = 0, 0, 0, 115200
UART1 = 1, 1, 0, 115200
UART2 = 0, 0, 0, 115200
SPI0 = 0, 0, 00, 0, 0
SPI1 = 1, 1, 01, 0, 30000000
Memory policy: ECC disabled, Data cache writethrough
DaVinci da850/omap-l138/am18xx variant 0x1
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 24384
Kernel command line: mem=96M console=ttyS1,115200n8 root=/dev/mmcblk0p1 ro
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 96MB = 96MB total
Memory: 93360k/93360k available, 4944k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xff000000 - 0xffe00000 ( 14 MB)
vmalloc : 0xc6800000 - 0xfea00000 ( 898 MB)
lowmem : 0xc0000000 - 0xc6000000 ( 96 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.init : 0xc0008000 - 0xc002a000 ( 136 kB)
.text : 0xc002a000 - 0xc0390000 (3480 kB)
.data : 0xc03aa000 - 0xc03cd180 ( 141 kB)
Experimental preemptable hierarchical RCU implementation.
NR_IRQS:245
Console: colour dummy device 80x30
Calibrating delay loop... 226.91 BogoMIPS (lpj=1134592)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
DaVinci: 144 gpio irqs
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource timer0_1
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 182
io scheduler noop registered (default)
Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c42000 (irq = 25) is a 16550A
serial8250.0: ttyS1 at MMIO 0x1d0c000 (irq = 53) is a 16550A
console [ttyS1] enabled
serial8250.0: ttyS2 at MMIO 0x1d0d000 (irq = 61) is a 16550A
brd: module loaded
ahci ahci: forcing PORTS_IMPL to 0x1
ahci ahci: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
ahci ahci: flags: ncq sntf pm led clo only pmp pio slum part ccc
scsi0 : ahci
ata1: SATA max UDMA/133 irq 67
No NAND device found.
spi_davinci spi_davinci.1: Controller at 0xfef0e000
console [netcon0] enabled
netconsole: network logging started
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci ohci.0: DA8xx OHCI
ohci ohci.0: new USB bus registered, assigned bus number 1
Waiting for USB PHY clock good...
ohci ohci.0: irq 59, io mem 0x01e25000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
omap_rtc: RTC power up reset detected
omap_rtc: already running
davinci_mmc davinci_mmc.0: Using DMA, 4-bit mode
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP cubic registered
NET: Registered protocol family 17
VFP support v0.3: not present
davinci_emac_probe: using random MAC addr: ae:65:b8:24:53:9f
emac-mii: probed
omap_rtc omap_rtc: setting system clock to 2000-01-01 00:50:14 UTC (946687814)
mmc0: new SD card at address b853
mmcblk0: mmc0:b853 SU02G 1.84 GiB (ro)
mmcblk0: p1
ata1: SATA link down (SStatus 0 SControl 300)
ata1: exception Emask 0x10 SAct 0x0 SErr 0x4050002 action 0xe frozen t4
ata1: irq_stat 0x00400040, connection status changed
ata1: SError: { RecovComm PHYRdyChg CommWake DevExch }
ata1: hard resetting link
ata1: SATA link down (SStatus 0 SControl 300)
ata1: EH complete
ata1: exception Emask 0x10 SAct 0x0 SErr 0x4050002 action 0xe frozen
ata1: irq_stat 0x00000040, connection status changed
ata1: SError: { RecovComm PHYRdyChg CommWake DevExch }
ata1: limiting SATA link speed to 1.5 Gbps
ata1: hard resetting link
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
ata1.00: ATA-8: ST1000DM003-9YN162, CC4C, max UDMA/133
ata1.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
ata1.00: configured for UDMA/133
ata1: EH complete
scsi 0:0:0:0: Direct-Access ATA ST1000DM003-9YN1 CC4C PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
sd 0:0:0:0: [sda] 4096-byte physical blocks
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1
sd 0:0:0:0: [sda] Attached SCSI disk
VFS: Mounted root (ext2 filesystem) readonly on device 179:1.
Freeing init memory: 136K
INIT: version 2.86 booting
Please wait: booting...
Starting udev
/etc/rcS.d/S03udev: line 50: can't create /tmp/uname: Read-only file system
touch: /tmp/uname: Read-only file system
Remounting root file system...
EXT2-fs (mmcblk0p1): warning: mounting unchecked fs, running e2fsck is recommended
Caching udev devnodes
Populating dev cachemv: cannot rename '/tmp/uname': No such file or directory
Configuring network interfaces... eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=1:07, id=7c0f1)
done.
Starting portmap daemon: portmap.
portmap: fork: No such devicenet.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
hwclock: can't open '/dev/misc/rtc': No such file or directory
Wed Feb 23 02:15:00 UTC 2011
hwclock: can't open '/dev/misc/rtc': No such file or directory
PHY: 1:07 - Link is Up - 100/Full

Keeping to dig...

RE: Fail to mount Root FS from MicroSD card - Added by Dmitry Gorulko over 11 years ago

Ok, managed to fix the problem.
I have changed mityomapl138_mmc_get_ro() in board-mityomapl138.c to return(0) since MicroSD has no write protect pin.

    (1-3/3)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)