• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Need help booting with new root (SD card)  (Read 5119 times)
Jonas Jensen
Newbie
*

Karma: 0
Posts: 4


View Profile WWW
« on: August 23, 2011, 02:02:39 AM »

multistrap seems like a good tool for creating a customised working root. I have prepared an SD card with ext2 root partition and added the blkid to fstab. Now I have some trouble getting the SheevaPlug to boot with the new root.

Note that I have previously downloaded a new kernel from http://sheeva.with-linux.com/sheeva/2.6/2.6.39/2.6.39.3/ and installed it on the SheevaPlug nand.

First something interesting. The old bootargs "root=/dev/mtdblock0" points to the root located on internal NAND, which is not what I want but from the log you can see the kernel is aware of the "mmcblk0p#" partitions on the SD card :

Quote
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
mmc0: mvsdio driver initialized, lacking card detect (fall back to polling)
...
VFS: Cannot open root device "mtdblock0" or unknown-block(31,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00            1024 mtdblock0  (driver?)
1f01            4096 mtdblock1  (driver?)
1f02          519168 mtdblock2  (driver?)
b300         1931264 mmcblk0  driver: mmcblk
  b301          294304 mmcblk0p1 00000000-0000-0000-0000-000000000mmcblk0p1
  b302          489888 mmcblk0p2 00000000-0000-0000-0000-000000000mmcblk0p2
  b303         1145088 mmcblk0p3 00000000-0000-0000-0000-000000000mmcblk0p3
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,0)
[<c0034e50>] (unwind_backtrace+0x0/0xe0) from [<c0406f40>] (panic+0x58/0x178)
[<c0406f40>] (panic+0x58/0x178) from [<c0008d80>] (mount_block_root+0x1bc/0x1fc)
[<c0008d80>] (mount_block_root+0x1bc/0x1fc) from [<c0008f58>] (mount_root+0xa0/0xc0)
[<c0008f58>] (mount_root+0xa0/0xc0) from [<c00090dc>] (prepare_namespace+0x164/0x1c4)
[<c00090dc>] (prepare_namespace+0x164/0x1c4) from [<c00089dc>] (kernel_init+0x100/0x13c)
[<c00089dc>] (kernel_init+0x100/0x13c) from [<c0031314>] (kernel_thread_exit+0x0/0x8)

ok, so switch to bootargs "root=/dev/mmcblk0p1":

Quote
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
mmc0: mvsdio driver initialized, lacking card detect (fall back to polling)
...
VFS: Cannot open root device "mmcblk0p1" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00            1024 mtdblock0  (driver?)
1f01            4096 mtdblock1  (driver?)
1f02          519168 mtdblock2  (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
[<c0034e50>] (unwind_backtrace+0x0/0xe0) from [<c0406f40>] (panic+0x58/0x178)
[<c0406f40>] (panic+0x58/0x178) from [<c0008d80>] (mount_block_root+0x1bc/0x1fc)
[<c0008d80>] (mount_block_root+0x1bc/0x1fc) from [<c0008f58>] (mount_root+0xa0/0xc0)
[<c0008f58>] (mount_root+0xa0/0xc0) from [<c00090dc>] (prepare_namespace+0x164/0x1c4)
[<c00090dc>] (prepare_namespace+0x164/0x1c4) from [<c00089dc>] (kernel_init+0x100/0x13c)
[<c00089dc>] (kernel_init+0x100/0x13c) from [<c0031314>] (kernel_thread_exit+0x0/0x8)

Now the kernel does not find the SD card at all. What gives?

How can I make it find my SD card and boot with my new root ?


U-Boot log 1:
Quote
U-Boot 1.1.4 (Jul 14 2009 - 06:46:57) Marvell version: 3.4.16
U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CF120
...
Marvell>> setenv bootargs 'console=ttyS0,115200 rw root=/dev/mmcblk0p1'; nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000
...
Linux version 2.6.39.3 (kelly@speedy) (gcc version 4.5.3 (PlugComputer G++ 20110530) ) #2 PREEMPT Sat Jul 9 16:55:05 MDT 2011
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
mmc0: mvsdio driver initialized, lacking card detect (fall back to polling)
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
oprofile: hardware counters not available
oprofile: using timer interrupt.
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
registered taskstats version 1
rtc-mv rtc-mv: setting system clock to 2011-08-23 09:03:38 UTC (1314090218)
Root-NFS: no NFS server address
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "mmcblk0p1" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00            1024 mtdblock0  (driver?)
1f01            4096 mtdblock1  (driver?)
1f02          519168 mtdblock2  (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
[<c0034e50>] (unwind_backtrace+0x0/0xe0) from [<c0406f40>] (panic+0x58/0x178)
[<c0406f40>] (panic+0x58/0x178) from [<c0008d80>] (mount_block_root+0x1bc/0x1fc)
[<c0008d80>] (mount_block_root+0x1bc/0x1fc) from [<c0008f58>] (mount_root+0xa0/0xc0)
[<c0008f58>] (mount_root+0xa0/0xc0) from [<c00090dc>] (prepare_namespace+0x164/0x1c4)
[<c00090dc>] (prepare_namespace+0x164/0x1c4) from [<c00089dc>] (kernel_init+0x100/0x13c)
[<c00089dc>] (kernel_init+0x100/0x13c) from [<c0031314>] (kernel_thread_exit+0x0/0x8)

U-Boot log 2:
Quote
U-Boot 1.1.4 (Jul 14 2009 - 06:46:57) Marvell version: 3.4.16
U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CF120

Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB
DRAM CS[1] base 0x10000000   size 256MB
DRAM Total size 512MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB
CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0
Marvell>> print
baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2
000000;
ethaddr=00:50:43:f8:15:24
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethact=egiga0
bootargs_UBIFS_root=ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs
bootcmd_mmc=mmcinit; ext2load mmc 0:1 0x00800000 /uImage; ext2load mmc 0:1 0x01100000 /uInitrd
bootargs_console=console=ttyS0,115200
serverip=10.0.1.200
ipaddr=10.0.1.210
bootcmd=setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_UBIFS_root); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000
arcNumber=2097
mtdpartitions=mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs)
bootcmd_MMC=setenv bootargs $(bootargs_MMC_root); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000
bc=setenv bootargs $(bootargs_console) rw root=/dev/mtdblock0; nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000
bootargs_MMC_root=console=ttyS0,115200 rw root=/dev/mmcblk0p1
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes

Environment size: 1810/131068 bytes
Marvell>> setenv bootargs 'console=ttyS0,115200 rw root=/dev/mtdblock0'; nand read.<INTERRUPT>                                        
Marvell>> setenv bootargs 'console=ttyS0,115200 rw root=/dev/mmcblk0p1'; nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000

NAND read: device 0 offset 0x100000, size 0x400000

Reading data from 0x4ff800 -- 100% complete.
 4194304 bytes read: OK
## Booting image at 00800000 ...
   Image Name:   Linux-2.6.39.3
   Created:      2011-07-09  22:55:09 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2822552 Bytes =  2.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Initializing cgroup subsys cpu
Linux version 2.6.39.3 (kelly@speedy) (gcc version 4.5.3 (PlugComputer G++ 20110530) ) #2 PREEMPT Sat Jul 9 16:55:05 MDT 2011
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Marvell SheevaPlug Reference Board
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line: console=ttyS0,115200 rw root=/dev/mmcblk0p1
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 512MB = 512MB total
Memory: 513232k/513232k available, 11056k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xe0800000 - 0xfe800000   ( 480 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .init : 0xc0008000 - 0xc0030000   ( 160 kB)
      .text : 0xc0030000 - 0xc055c6ac   (5298 kB)
      .data : 0xc055e000 - 0xc0592488   ( 210 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptable hierarchical RCU implementation.
        RCU-based detection of stalled CPUs is disabled.
        Verbose stalled-CPUs detection is disabled.
NR_IRQS:114
sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 21474ms
Console: colour dummy device 80x30
Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
devtmpfs: initialized
NET: Registered protocol family 16
Kirkwood: MV88F6281-A0, TCLK=200000000.
Feroceon L2: Enabling L2
Feroceon L2: Cache support initialised.
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource orion_clocksource
Switched to NOHz mode on CPU #0
FS-Cache: Loaded
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
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.
FS-Cache: Netfs 'nfs' registered for caching
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
JFS: nTxBlock = 4009, nTxLock = 32077
msgmni has been set to 1002
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
console [ttyS0] enabled
brd: module loaded
loop: module loaded
NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 4045 at 0x00001f9a0000
Creating 3 MTD partitions on "orion_nand":
0x000000000000-0x000000100000 : "u-boot"
0x000000100000-0x000000500000 : "uImage"
0x000000500000-0x000020000000 : "root"
mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
mv643xx_eth smi: probed
mv643xx_eth_port mv643xx_eth_port.0: eth0: port 0 with MAC address 00:50:43:f8:15:24
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
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.
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
mousedev: PS/2 mouse device common for all mice
rtc-mv rtc-mv: rtc core: registered rtc-mv as rtc0
i2c /dev entries driver
cpuidle: using governor ladder
cpuidle: using governor menu
mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
mv_xor mv_xor.2: Marvell XOR: ( xor cpy )
mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
mmc0: mvsdio driver initialized, lacking card detect (fall back to polling)
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
oprofile: hardware counters not available
oprofile: using timer interrupt.
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
registered taskstats version 1
rtc-mv rtc-mv: setting system clock to 2011-08-23 09:06:47 UTC (1314090407)
Root-NFS: no NFS server address
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "mmcblk0p1" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00            1024 mtdblock0  (driver?)
1f01            4096 mtdblock1  (driver?)
1f02          519168 mtdblock2  (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
[<c0034e50>] (unwind_backtrace+0x0/0xe0) from [<c0406f40>] (panic+0x58/0x178)
[<c0406f40>] (panic+0x58/0x178) from [<c0008d80>] (mount_block_root+0x1bc/0x1fc)
[<c0008d80>] (mount_block_root+0x1bc/0x1fc) from [<c0008f58>] (mount_root+0xa0/0xc0)
[<c0008f58>] (mount_root+0xa0/0xc0) from [<c00090dc>] (prepare_namespace+0x164/0x1c4)
[<c00090dc>] (prepare_namespace+0x164/0x1c4) from [<c00089dc>] (kernel_init+0x100/0x13c)
[<c00089dc>] (kernel_init+0x100/0x13c) from [<c0031314>] (kernel_thread_exit+0x0/0x8)

« Last Edit: August 23, 2011, 02:08:52 AM by Kasreyn » Logged

birdman
Sr. Member
****

Karma: 4
Posts: 443


View Profile WWW
« Reply #1 on: August 23, 2011, 04:36:01 PM »

Quote
ok, so switch to bootargs "root=/dev/mmcblk0p1":
...
How can I make it find my SD card and boot with my new root ?
You need to have mmcinit in your boot command.  It's not just the kernel that needs to see it, Uboot needs to see it too in order to read the kernel from it.
Logged

ajay.bhargav
Newbie
*

Karma: 1
Posts: 5


View Profile
« Reply #2 on: August 31, 2011, 12:16:53 AM »

try setting bootargs as

Code:
console=ttyS0,115200n8 root=/dev/mmcblk0p1 rootwait rw

make sure you have root on partition 1 of your MMC.
Logged

Jonas Jensen
Newbie
*

Karma: 0
Posts: 4


View Profile WWW
« Reply #3 on: September 06, 2011, 02:46:37 AM »

try setting bootargs as

Code:
console=ttyS0,115200n8 root=/dev/mmcblk0p1 rootwait rw

make sure you have root on partition 1 of your MMC.

That does do the trick.

Thank you for answering  Grin
Logged

Pages: [1]
Print
Jump to: