• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: plug does not boot when unattended, boot fine w/ console  (Read 2002 times)
fovea1959
Newbie
*

Karma: 0
Posts: 3


View Profile
« on: August 22, 2011, 10:13:22 AM »

have a sheevaplug with the Marvell shipped uboot. Running archlinux ARM.

when first powered up, it sits there with a green and blue LED. If I attach a console at that point, it's sitting at the Marvell>> prompt. If I issue a "boot" or "reset" command, it boots up perfectly.

I was able to catch it w/ a console immediately after powerup, here's what it's saying:
Code:
Flash:  0 kB

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
Error! cmd : 8, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
No MMC card found
** Bad partition 1 **
## Booting image at 00800000 ...
Bad Magic Number

If I issue a boot or reset command at this point, all is will, so perhaps the MMC card is slow to come online? so I'm thinking I need to bump bootdelay to a larger number... except that setenv bootdelay doesn't survive a reset.

What do I have to do to get this thing to boot unattended? I have a posting over on the archlinux forums, my homework is to 1) try rootdelay instead of bootdelay, then 2) update uboot.

Any other thoughts to take home for the troubleshooting session tonight?

here is the environment.
Code:
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=a0000
e=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
CASset=min
MALLOC_len=1
ethprime=egiga0
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
bootargs_root=root=/dev/mmcblk0p2 rootdelay=5
ethaddr=00:50:43:01:c1:e6
real_bootcmd=setenv bootargs $(bootargs_console) $(bootargs_root); mmcinit; ext2load mmc 0:1 0x800000 /uImage; bootm 0x00800000
bootargs_console=console=ttyS0,115200
recover1=setenv mainlineLinux yes; setenv arcNumber 2097; setenv bootcmd run recover2; saveenv; reset
recover2=run recover3; setenv bootcmd $(real_bootcmd); saveenv; setenv bootargs $(bootargs_console) root=/dev/ram0 rw ramdisk=0x01100000,8M install_type=mmc; bootm 0x00800000 0x01100000
recover3=usb start; fatload usb 0 0x00800000 uImage; fatload usb 0 0x01100000 initrd
arcNumber=2097
filesize=32D62A
bootcmd=setenv bootargs $(bootargs_console) $(bootargs_root); mmcinit; ext2load mmc 0:1 0x800000 /uImage; bootm 0x00800000
stdin=serial
stdout=serial
stderr=serial
nandEnvBase=a0000
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
pcieTune=no
bootargs=console=ttyS0,115200 root=/dev/mmcblk0p2 rootdelay=5
Logged

restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #1 on: August 22, 2011, 06:22:42 PM »

If it were me, I'd first install the most recent DENIC uBoot, or at least the uBoot that comes with the SheevaPlug installer.

If that doesn't work, I'd look at the SD-card.  Perhaps it is not compatible with the SheevaPlug.  Try another brand.  Or, perhaps it could be made to work reliably with a bit of tweaking, say, by coding two mmcinits before trying to ext2load the uImage.

Good luck with it.
Logged

fovea1959
Newbie
*

Karma: 0
Posts: 3


View Profile
« Reply #2 on: August 25, 2011, 05:20:41 AM »

I tried doubling up the mmcinit command first (I was trying to do as little changing as possible, reflashes scare me, especially uboot ones). That appears to have done the trick, need to do some more testing to see if it just worked once, or will work consistently.

When I get a newer uboot, I'll try slipping a sleep in there instead of the mmcinit, then we'll know if it's the extra time or the extra mmcinit that fixes it, but I'm not that curious/daring/long on free time right now.

Thanks very much for the good suggestions, I will probably get around to putting the newest uboot on later this fall. The doubled up mmcinit is an effective, cheap, and safe workaround....
Logged

bad_gui
Jr. Member
**

Karma: 0
Posts: 50


View Profile
« Reply #3 on: September 05, 2011, 07:03:36 PM »

I have a similar problem.  If my plug loses power, it will hang at the Marvell prompt and I need to connect with serial terminal and issue a command to boot it.

It hangs with this error:
Code:
uap_sdio: probe of mmc0:0001:1 failed with error -1

I upgraded u-boot and have it boot from an SD card using the instructions from popon here

http://plugcomputer.org/plugforum/index.php?topic=1642.15


I would like to try adding the mmcinit commands but I can't figure out how to pass them to u-boot

Here is my configuration:
Code:
Marvell>> version
U-Boot 2010.03-01161-gd91b0a9 (Apr 22 2010 - 03:24:41)
Marvell-GuruPlug

Code:
Marvell>> printenv
bootcmd=${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000;
bootdelay=3
baudrate=115200
x_bootcmd_usb=usb start
x_bootcmd_kernel=nand read.e 0x6400000 0x100000 0x400000
x_bootargs=console=ttyS0,115200
serverip=192.168.1.4
ipaddr=192.168.1.2
ethact=egiga0
mainlineLinux=yes
arcNumber=2659
bootargs=console=ttyS0,115200 root=0811 rootdelay=10
x_bootargs_root=ubi.mtd=2 root=0811 rootdelay=10
stdin=serial
stdout=serial
stderr=serial

According to this tutorial http://www.cyrius.com/debian/kirkwood/sheevaplug/unpack.html, should I have a bootcmd_mmc
paramter?

Code:
setenv bootargs_console console=ttyS0,115200
setenv bootargs_root 'root=/dev/mmcblk0p2'
setenv bootcmd_mmc 'mmc init; ext2load mmc 0:1 0x00800000 /uImage; ext2load mmc 0:1 0x01100000 /uInitrd'
setenv bootcmd 'setenv bootargs $(bootargs_console) $(bootargs_root); run bootcmd_mmc; bootm 0x00800000 0x01100000'
saveenv

Could someone write out the steps to amend the mmcinit command to u-boot? 

Based on the original instructions that worked for me I would do this:

Code:
Marvell>> editenv x_bootargs_root
edit: ubi.mtd=2 root=0811 mmcinit mmcinit rootdelay=10
Marvell>> saveenv



Logged

fovea1959
Newbie
*

Karma: 0
Posts: 3


View Profile
« Reply #4 on: September 06, 2011, 05:45:48 AM »

I'm on vacation, but my recollection is that I simply changed the bootcmd variable.

Code:
setenv bootcmd 'setenv bootargs $(bootargs_console) $(bootargs_root); mmcinit; mmcinit; ext2load mmc 0:1 0x800000 /uImage; bootm 0x00800000'
saveenv

If I had the newer uboot, I would probably use editenv to modify that same environment variable.

I'll probably get around to getting a newer uboot in a month or two.
Logged

Pages: [1]
Print
Jump to: