plug does not boot when unattended, boots fine w/ console

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

plug does not boot when unattended, boots fine w/ console

Postby fovea1959 » Sat Aug 20, 2011 5:52 pm

not exactly an archlinux question, but a sheevaplug question....

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.

What do I have to do to get this thing to boot unattended?

Here are my environment variables:
$this->bbcode_second_pass_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

')
fovea1959
 
Posts: 20
Joined: Thu Jul 28, 2011 4:24 am

how to set bootdelay?

Postby fovea1959 » Sun Aug 21, 2011 3:23 pm

got some more information: was able to get console going quickly after powerup,

$this->bbcode_second_pass_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 command at this point, all is well, so perhaps the MMC card is just a little slow to come online? so I'm thinking that I just want to bump bootdelay to a larger number...

but now I have a different problem: I can't make a different bootdelay setting stick; it keeps reverting to 3 after a reset.
$this->bbcode_second_pass_code('', '
Marvell>> setenv bootdelay 7
Marvell>> print bootdelay
bootdelay=7
Marvell>> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
Marvell>> reset

__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__|
** MARVELL BOARD: SHEEVA PLUG LE

U-Boot 1.1.4 (Jul 19 2009 - 16:03:28) Marvell version: 3.4.19

U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CFB00

Soc: 88F6281 A1 (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
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB
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
Marvell>> printenv bootdelay
bootdelay=3
')

How do I get a larger bootdelay?

is setting a larger bootdelay the right fix, or something else keeping me from booting at powerup?
fovea1959
 
Posts: 20
Joined: Thu Jul 28, 2011 4:24 am

Re: plug does not boot when unattended, boots fine w/ conso

Postby kmihelich » Sun Aug 21, 2011 6:21 pm

You need rootdelay to be bumped up, not bootdelay. Looks like for sheeva it's set statically in the bootargs command. You'll need to rewrite that variable to get what you want.

Alternately you can swap out rootdelay with rootwait, which will simply wait however long is necessary for the root device to populate into the system instead of timing out after a number of seconds. This is the method employed on our ARMv7 devices, which is a tactic I'm quite fond of now.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: plug does not boot when unattended, boots fine w/ conso

Postby BnBorg » Sun Aug 21, 2011 8:00 pm

I have seen a very similar environment on my SheevaPlug.

The solution I found was to update U-Boot with a newer version, and install Debian. See: http://www.cyrius.com/debian/kirkwood/s ... stall.html.
BnBorg
 
Posts: 10
Joined: Mon Jul 18, 2011 7:26 pm

Re: plug does not boot when unattended, boots fine w/ conso

Postby WarheadsSE » Sun Aug 21, 2011 11:32 pm

No need to install debian, just update uboot.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: plug does not boot when unattended, boots fine w/ conso

Postby fovea1959 » Mon Aug 22, 2011 5:00 pm

I'll try bumping rootdelay up first, then I'll try bumping up to a new uboot. I've seen some references to bootdelay being stuck at 3 with the Marvell loader, so that explains *that*.

the rootdelay suggestion surprises me; I'm reading the error message as the mmcinit command failing, so we aren't even getting to the ext2load command. Doesn't cost anything to try, but I was wondering if I really understand what's happening when....
fovea1959
 
Posts: 20
Joined: Thu Jul 28, 2011 4:24 am

Re: plug does not boot when unattended, boots fine w/ conso

Postby BnBorg » Tue Aug 23, 2011 12:37 am

The link I posted is a good resource, not only for Debian but also for newer versions of U-Boot.

One warning, there has been some trouble booting from USB drives with the latest version, U-Boot 2011.06.

But it does support booting from SD and MTD, including UBIFS and JFFS2.
BnBorg
 
Posts: 10
Joined: Mon Jul 18, 2011 7:26 pm

fixed!!!!!!!!!!!!!!!!!!!

Postby fovea1959 » Thu Aug 25, 2011 12:33 pm

bumping up rootdelay did not help, as I expected. the mmcinit command is probably the one that is failing (I'm not seeing the console output that I expect from a successful mmcinit), so the subsequent commands are moot.

It was suggested over on the plugcomputer.org forum to try doubling up the mmcinit command in bootcmd. I did that, and it appears to have worked (I just tried one power-cycle, will test more tonight).

Either the first mmcinit fiddles with the card enough so that the 2nd can succeed, or else the first mmcinit just wastes enough time so that the card is ready for the 2nd one. I'll figure it out when I get a newer uboot where I have a sleep command and can set bootdelay; then I can figure out which one is true. That will happen in September sometime....

I'll try a newer uboot a little later (keeping Archlinux). I'm not planning to boot from USB for a while, so either the April or June uboot should be fine for me right now (or the September one, by the time I get to looking at this!); I've read descriptions of some other problems with June...

Thanks for all the help, folks!
fovea1959
 
Posts: 20
Joined: Thu Jul 28, 2011 4:24 am


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 3 guests