|
|
 |
« on: April 22, 2009, 12:00:32 AM » |
|
Has anyone successfully flashed their device from USB?
I follow the v1.2 instructions in their documentation. I download and verify all the files from Marvell, and flash u-boot-rd88f6281Sheevaplug_400db_nand.bin from a tftp server. I then follow all their instructions, but when it comes to the final reboot into the supposedly working system, it ends with: --- Root-NFS: No NFS server available, giving up. VFS: Unable to mount root fs via NFS, trying floppy. VFS: Cannot open root device "mtdblock2" or unknown-block(2,0) Please append a correct "root=" boot option; here are the available partitions: 1f00 3072 mtdblock0 (driver?) 1f01 520192 mtdblock1 (driver?) Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0) ---
I tried switching root=/dev/mtdblock1 just for kicks, even though I know that's not right. Of course it doesn't work.
Anyway, I've reflashed it now about six times, redownloaded the files, reformatted my flash drive, and tried all kinds of variations on their instructions.
Any clues?
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #1 on: April 22, 2009, 12:19:55 AM » |
|
Is it failing while booting from USB or after you have written the images to the NAND flash when the boot from USB was successful? Can you provide the logs so that it will be easy to debug?
Also, can you check the foloowing: loadaddr (should be 0x2000000) mtd1Size (should be 0x300000) filesize
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #2 on: April 22, 2009, 01:06:32 AM » |
|
Use the following command in the uboot after the images have been written to the NAND:
Marvell>> setenv bootargs 'console=ttyS0,115200 mtdparts=nand_mtd:0x100000@0x00000(u-boot),0x300000@0x100000(uImage)ro,0x1fc00000@0x400000(rootfs)rw root=/dev/mtdblock2'
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #3 on: April 22, 2009, 08:37:35 AM » |
|
Thanks for the reply. It is failing after I have written everything, and am trying to boot from the internal NAND. I flashed using loadaddr 0x2000000, mtd1Size 0x300000, and filesize 0x44ad000. All those arguments I got straight from the documentation (USB Flash Recovery from U-Boot-Rev1.2.pdf). Are there different values I should try? I just tried booting with the bootargs you suggest (which I believe are the same as in the documentation). Still nothing. I went through the entire process again (except for re-upgrading u-boot) and saved a log of it, which you can download here: http://djpandemonium.com/sheevaflash.txt
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #4 on: April 22, 2009, 09:28:30 AM » |
|
Please try the bootargs command I gave you in my previous reply. The command in the document is missng the parameter - 0x100000@0x000000(u-boot). I think the document will be updated shortly.
Thanks.
|
|
|
|
« Last Edit: April 22, 2009, 09:43:19 AM by plugcomp »
|
Logged
|
|
|
|
|
|
|
 |
« Reply #5 on: April 22, 2009, 09:51:58 AM » |
|
Ah, you're right. The documentation is missing that argument.
When I use the bootargs you posted I am now able to mount the file system, but then I get a kernel panic due to a missing init. --- VFS: Mounted root (jffs2 filesystem). Freeing init memory: 124K scsi 0:0:0:0: Direct-Access I-Stick2 IntelligentStick 0.00 PQ: 0 ANSI: 2 Warning: unable to open an initial console. Kernel panic - not syncing: No init found. Try passing init= option to kernel. ---
Any ideas?
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #6 on: April 22, 2009, 09:56:42 AM » |
|
Can you send me the print dump in the uboot. This is how you can get it:
Marvell>> print
Thanks.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #7 on: April 22, 2009, 10:03:00 AM » |
|
Yep. Marvell>> print baudrate=115200 loads_echo=0 ipaddr=10.4.50.165 serverip=10.4.50.5 rootpath=/mnt/ARM_FS/ netmask=255.255.255.0 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 0x2000000; ethaddr=00:50:43:d6:13:26 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:82 nandEcc=1bit netretry=no rcvrip=169.254.100.100 autoload=no ethact=egiga0 loadaddr=0x2000000 mtd1Size=0x300000 filesize=0x44ad000 bootcmd=nand read.e 0x800000 0x100000 0x300000; bootm 0x800000 bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000@0x00000(u-boot),0x300000@0x100000(uImage)ro,0x1fc00000@0x400000(rootfs)rw root=/dev/mtdblock2 stdin=serial stdout=serial stderr=serial console=console=ttyS0,115200 mtdparts=nand_mtd:0x100000@0(uboot)ro,0x300000@0x100000(uImage),0x1fc00000@0x400000(rootfs)rw mainlineLinux=no 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: 1341/131068 bytes Marvell>>
|
|
|
|
« Last Edit: April 22, 2009, 10:06:03 AM by Pandemonium »
|
Logged
|
|
|
|
|
|
|
 |
« Reply #8 on: April 22, 2009, 04:51:50 PM » |
|
Well, it seems that there's something wrong with either the image I'm flashing, or perhaps the NAND memory in my device. If I boot onto the USB flash drive and then try to mount the root filesystem, look at what I find: -sh-3.2# mount -t jffs2 /dev/mtdblock2 /mnt -sh-3.2# JFFS2 notice: (310) check_node_data: wrong data CRC in data node at 0x00069000: read 0xc5585480, calculated 0xa78a6243. JFFS2 warning: (310) jffs2_do_read_inode_internal: Truncating ino #22 to 30236 bytes failed because it only had 16384 bytes to start with! cd /mnt -sh-3.2# find . ./bin ./bin/bash ./bin/bzcat ./bin/bunzip2 ./dev ./etc ./lib ./mnt ./opt ./srv ./tmp ./sys ./var ./usr ./boot ./home ./proc ./sbin ./root ./media ./selinux
Woops. It seems like there's a lot missing there. I'm going to play around with it some more and see if I can figure out why.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #9 on: April 22, 2009, 06:09:42 PM » |
|
There is something really wrong. I reformatted my USB drive to ext3, and redownloaded both the filesystem and USB recovery zips from the Marvell site before unzipping them to the USB drive. I verified that file sizes of the images were appropriate before unmounting the device. I then followed the USB recovery documentation for reflashing. After flashing mtd1 and mtd2, I mounted mtd2 at /mnt and took a look at it. There's not much in there. Most of the root directory structure is there, and there are a few binaries in /bin, but other than that it's completely empty. You can view a log of what's going on here: http://djpandemonium.com/sheevaflash2.txtAs far as I can tell, there's something really wrong with either the flashing process or the NAND memory in the device. Why is it not flashing successfully? Does it have to do with the bad eraseblocks?
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #10 on: April 22, 2009, 06:41:14 PM » |
|
I tried exactly the same method as yours except I did not mount the jffs2 filesystem to /mnt after writing to NAND.
It worked for me. Can you try the same? I will also try playing with it a few times to confirm it works successfully.
You are already taking care of bad blocks by assigning more space in mtdblock2 than the size of the filesystem.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #11 on: April 22, 2009, 08:59:34 PM » |
|
I've reflashed it now 11 times. I only mounted the filesystem that last time just to take a peek and make sure the filesystem was all there. I've done it at least five or six times identical to that time, except without mounting it. Still nothing.
Frankly, I'm out of ideas. The only other thing I can think to try is flashing it from NFS, though I have my doubts about whether that will turn out any differently. I can't think why it would. I went the USB method because I thought it would be easier and take less time.
Out of curiosity, had you used your plug at all before you flashed it? What does your u-boot print dump look like?
|
|
|
|
« Last Edit: April 22, 2009, 09:01:17 PM by Pandemonium »
|
Logged
|
|
|
|
|
|
|
 |
« Reply #12 on: April 22, 2009, 09:07:23 PM » |
|
I would say the we need a 'virgin' printenv from uboot. This would a great reference to return to after the #*@^ hits the fan.
Anybody have an 'out of the box' printenv they can share?
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #13 on: April 22, 2009, 10:52:00 PM » |
|
I can. I have access to a second plug, still in the box. Here's a virgin printenv from it on its second boot: Marvell>> printenv baudrate=115200 loads_echo=0 ipaddr=10.4.50.165 serverip=10.4.50.5 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 0x2000000; 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 ethaddr=00:50:43:01:C3:C2 run_diag=no bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 rw ip=10.4.50.4:10.4.50.5:10.4.50.5:255.255.255.0:DB88FXX81:eth0:none bootcmd=nand read.e 0x800000 0x100000 0x400000; bootm 0x800000 stdin=serial stdout=serial stderr=serial mainlineLinux=no 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: 1330/131068 bytes Marvell>>
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #14 on: April 22, 2009, 11:10:58 PM » |
|
Oh, and to save you the time bfmorgan, don't bother trying to just drop in the virgin bootcmd and/or bootargs. Tried it, and it locks up after booting the kernel.
To me, it seems like the problem is not in u-boot, but in the root filesystem. When I boot from the USB drive images I should be able to mount mtd2 and see all the files just fine. Instead, I'm getting a CRC error, and all I can see are the empty root directories with three executables in /bin. Missing critical files would cause the init kernel panic that we're seeing, wouldn't it? If what I'm seeing is correct when I mount mtd2, then we're missing critical files and a whole lot more.
|
|
|
|
|
Logged
|
|
|
|
|
|