• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1] 2
Author Topic: SheevaPlug: no boot from SDHC after u-boot upgrade to DENX 2012.04.01-2  (Read 12740 times)
odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« on: July 17, 2012, 12:25:59 PM »

By accident I ran across the new DENX u-boot version 2012.04.01-2 (also for the SheevaPlug) at http://people.debian.org/~tbm/u-boot/2012.04.01-2/sheevaplug/

Being brave I updated my SheevaPlug from 2011.12-3 to 2012.04.01-2, but just to notice, that it wouldn't boot the Debian Squeeze from the SDHC card any longer. Thus it falls back to NAND:

Quote
Marvell>> reset
resetting ...


U-Boot 2012.04.01 (Jun 01 2012 - 02:27:06)
Marvell-Sheevaplug - eSATA - SD/MMC

SoC:   Kirkwood 88F6281_A0
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 1 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found
SDHC found. Card desciption is:
Manufacturer:       0x01, OEM "PA"
Product name:       "SQ04G", revision 7.4
Serial number:      1940688398
Manufacturing date: 7/2011
CRC:                0x00, b0 = 0
mmc1 is available
Loading file "/uImage" from mmc device 0:1 (xxa1)
1431936 bytes read
Loading file "/uInitrd" from mmc device 0:1 (xxa1)
5684091 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Debian kernel 2.6.32-5-kirkwood
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1431872 Bytes = 1.4 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!

NAND read: device 0 offset 0x100000, size 0x400000
 4194304 bytes read: OK
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-2.6.38.2
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2798752 Bytes = 2.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK
[...]

After downgrading to 2011.12-3, everything works again as expected:

Quote
Marvell>> reset
resetting ...


U-Boot 2011.12 (Mar 11 2012 - 18:59:46)
Marvell-Sheevaplug - eSATA - SD/MMC

SoC:   Kirkwood 88F6281_A0
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 1 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found
SDHC found. Card desciption is:
Manufacturer:       0x01, OEM "PA"
Product name:       "SQ04G", revision 7.4
Serial number:      1940688398
Manufacturing date: 7/2011
CRC:                0x00, b0 = 0
mmc1 is available
Loading file "/uImage" from mmc device 0:1 (xxa1)
1431936 bytes read
Loading file "/uInitrd" from mmc device 0:1 (xxa1)
5684091 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Debian kernel 2.6.32-5-kirkwood
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1431872 Bytes = 1.4 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   Debian ramdisk 2.6.32-5-kirkwood
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5684027 Bytes = 5.4 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

These are my u-boot environment variables:
Code:
baudrate=115200
bootargs_console=console=ttyS0,115200
bootargs_nand=rootfstype=jffs2 console=ttyS0,115200 mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 rw ip=194.174.11.254:194.174.11.5:194.174.11.1:255.255.255.0:Share:eth0:none
bootcmd=usb start; setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x00800000 0x01100000; run bootcmd_nand
bootcmd_mmc=mmc init; ext2load mmc 0:1 0x00800000 /uImage; ext2load mmc 0:1 0x01100000 /uInitrd
bootcmd_nand=setenv bootargs $(bootargs_nand); nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
bootdelay=3
ethact=egiga0
ethaddr=00:50:43:01:d8:11
serverip=194.174.11.6
stderr=serial
stdin=serial
stdout=serial
x_bootargs=console=ttyS0,115200 mtdparts=orion_nand:512k(uboot),4m@1m(kernel),507m@5m(rootfs) rw
x_bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs
x_bootcmd_kernel=nand read 0x6400000 0x100000 0x400000
x_bootcmd_sata=ide reset;
x_bootcmd_usb=usb start;
Logged

replabrobin
Newbie
*

Karma: 2
Posts: 6


View Profile
« Reply #1 on: September 07, 2012, 12:45:37 AM »

I have also tried the http://people.debian.org/~tbm/u-boot/2012.04.01-2/sheevaplug/u-boot.kwb uboot and had exactly the same result. I guess there is some error in the patches as applied there. You can revert to pingtoo 3.4.27 and that should get you back to where you were before. I have looked at the patches from here http://people.debian.org/~tbm/u-boot/2012.04.01-2/u-boot_2012.04.01-2.debian.tar.gz and will attempt to patch the latest denx code and rebuild. Did you try and contact tbm?
Logged

replabrobin
Newbie
*

Karma: 2
Posts: 6


View Profile
« Reply #2 on: September 07, 2012, 01:31:51 AM »

If you want to try more bravery you can inhibit the crc check that causes the failure by using the environment variable verify (use setenv verify no). Of course that assumes the problem is only in the crc check. If that's not the case and the kernel has been offset loaded or something then all bets are off and you could trash the plug.
Logged

replabrobin
Newbie
*

Karma: 2
Posts: 6


View Profile
« Reply #3 on: September 07, 2012, 03:38:58 AM »

Well I have had at least some success. I applied just one of the patches from 2012.04.01-2 (kerma-sheevaplug-mvsdio.diff) which adds in the SD related stuff to the very latest denx uboot code. Using the openocd and the u-boot.elf from that build I do get the SD boot to work.
Logged

ruidc
Newbie
*

Karma: 0
Posts: 36


View Profile
« Reply #4 on: September 07, 2012, 04:31:25 PM »

sounds hairy, which kernel is that with?
Logged

tbm
Full Member
***

Karma: 7
Posts: 121



View Profile WWW
« Reply #5 on: September 08, 2012, 02:04:05 AM »

Thanks for your reports.  I filed a bug report in the Debian Bug Tracking system so the u-boot maintainer in Debian, Clint Adams, is aware of this issue: http://bugs.debian.org/687006

Please send/copy any further information you have to bug nummer at bugs.debian.org.
Logged

replabrobin
Newbie
*

Karma: 2
Posts: 6


View Profile
« Reply #6 on: September 08, 2012, 05:19:22 AM »

Thanks TBM my efforts got me a u-boot that can get the kernel CRC checked, but I found that it was failing to saveenv properly. ruidc I don't think the kernel version is any kind of problem as it works fine with older u-boots. The reason this is of interest is the l2 cache bug that prevents older u-boot from booting kernels > 3.2.
Logged

replabrobin
Newbie
*

Karma: 2
Posts: 6


View Profile
« Reply #7 on: September 08, 2012, 05:43:12 AM »

Looked at the patches that were in 2011.12-3 and it seems the kirkwood-disable-l2c.diff is there as well so I'm guessing that 2011.12-3  which works well for me with SDHC/MMC will boot the latest kernels. I'll give that a whirl.
Logged

ruidc
Newbie
*

Karma: 0
Posts: 36


View Profile
« Reply #8 on: September 08, 2012, 10:13:26 AM »

replabrobin: i understand, just wanted confirmation that you had newer kernels working - as the older kernels work fine with the older, marvell u-boot.

tbm: have you approached the denx u-boot marvell maintainer to try to mainline the sd card patch(es)? I had an initial positive response from the maintainer over email yesterday  - would be happy to put you in contact with each other.
Logged

replabrobin
Newbie
*

Karma: 2
Posts: 6


View Profile
« Reply #9 on: September 08, 2012, 11:00:46 AM »

ruidc I have 3.5.2 working on my sheevaplug booted with 2011.12-3
Logged

ruidc
Newbie
*

Karma: 0
Posts: 36


View Profile
« Reply #10 on: September 08, 2012, 11:40:31 AM »

good stuff, am having issues but have posted that on http://archlinuxarm.org/forum/viewtopic.php?f=23&t=3224&start=20#p20765
Logged

odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« Reply #11 on: March 20, 2013, 07:04:23 AM »

I filed a bug report in the Debian Bug Tracking system so the u-boot maintainer in Debian, Clint Adams, is aware of this issue: http://bugs.debian.org/687006

While following up on this thread and reading the latest info posted to http://bugs.debian.org/687006#20 I see that the same code but translated with another compiler works!? As far as I can see the binary on tbm's site is still the 'faulty' one?

And further reading  http://bugs.debian.org/687006#25 I'd be keen to test the version with the new generic MMC/SDIO driver, as it "fixes an issue with most SDHC cards because of timeout delay" as I seem to suffer from that one as well (after power cycling the plug I have to wait a few seconds and have to press the reset button to get my SD card recognized by the system). Is there already a (publically) available binary (I'm not too good in compling stuff myself ;-)
Logged

odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« Reply #12 on: March 20, 2013, 07:40:15 AM »

PS: just 'found' the test binary here  https://doukki.net/plugs/sheevaplug/testing/

PPS: and just found the link to a "Marvell uboot (3.4.16)" version in the "Linux distributions" section of this forum http://www.plugcomputer.org/plugforum/index.php?topic=6239.msg20460
Logged

ruidc
Newbie
*

Karma: 0
Posts: 36


View Profile
« Reply #13 on: March 20, 2013, 08:43:43 AM »

unfortunately from offline conversation between the Debian developer and the Marvell custodian to uBoot, there was not much appetite/availability to fix the code. The one referred to by me on my Archlinux post did the job for me. Otherwise a faster or different SD card may be your fastest bet.
Logged

odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« Reply #14 on: May 09, 2013, 03:54:26 AM »

Just a minor note:

Quote from: odoll
... after power cycling the plug I have to wait a few seconds and have to press the reset button to get my SD card recognized by the system ...

Whilst running my second attempt to upgrade my SheevaPlug from Squeeze to Wheezy (using this German Guide http://www.sysadminslife.com/linux/howto-upgrade-debian-6-squeeze-zu-debian-7-wheezy/) though everything looked promising after the first reboot, except the smbd not coming up, I noticed I couldn't make proper images from the Panasonic SD after upgrade as both dd and WinImage complained about I/O errors reading the SDHC card. (Luckily I had a copy of the card from shortly before the upgrade, which I could put onto another spare, but only class 4 Panasonic SDHC).

Thus I decided no longer trusting the old one and  to order a new SHDC (class 10) Transcend and give the upgrade to Wheezy a third try, which I'm currently on now ...

While making another copy of the image to the new SHDC, putting it into the slot, powering the plug and silently starting to count up to ten to when I usually press the reset button, I found the attached USB drive to make the 'proper' I/O noise, showing me, that the image booted without having me to reset the plug :-)

Thus the new Transcend SDHC seems to be more 'recognisable' to the plug that the other SDs I used to far ... to be confirmed in a few ours when I have to do the first reboot after the upgrade ;-)
Logged

Pages: [1] 2
Print
Jump to: