• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1] 2
Author Topic: Can't boot my Sheevaplug  (Read 6086 times)
marlar
Newbie
*

Karma: 0
Posts: 19


View Profile
« on: August 08, 2010, 03:57:01 PM »

Hi everybody,

I have tried booting my Sheevaplug for a couple of hours. I can log into it with the serial console, but all I see is the Marvell>> prompt. If I then enter "boot", I get these messages:

USB:   scanning bus for devices... 1 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found
** Bad partition 1 **
** Bad partition 1 **
## Booting image at 00400000 ...
Bad Magic Number

The U-Boot version is : U-Boot 1.1.4 (Mar 19 2009 - 16:06:59) Marvell version: 3.4.16

I have tried upgrading the U-Boot according to this guide:
http://www.cyrius.com/debian/kirkwood/sheevaplug/uboot-upgrade.html

But that didn't make any difference. I still get the Bad Magic Number error.

Any advice would be much appriciated!

Thanks,
Martin
Logged

lyzby
Newbie
*

Karma: 0
Posts: 48


View Profile
« Reply #1 on: August 09, 2010, 09:14:59 AM »

When you enter the 'boot' command in u-boot, what happens is governed by what is in the environment variables, 'bootcmd' and 'bootargs'.  What do you get when you do the following?

printenv bootcmd
printenv bootargs
Logged

odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« Reply #2 on: August 09, 2010, 09:16:34 AM »

I guess you're tying to boot from a device attached to the plug's USB port?

Maybe you should have a look at the FAQ sections about uboot and USB http://www.openplug.org/plugwiki/index.php/Frequently_Asked_Questions#UBoot_Stuff
Logged

marlar
Newbie
*

Karma: 0
Posts: 19


View Profile
« Reply #3 on: August 09, 2010, 01:04:13 PM »

Lyzby:

printenv bootcmd
bootcmd=setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x00800000 0x01100000

printenv bootargs
bootargs=console=ttyS0,115200

I must admit that it doesn't give me a clue. What does it tell you?

Odoll:

You could very well be right. I mailed the previous owner today and he had the OS installed on a USB drive. So it is probably setup for booting from the USB port.

However, I have tried many things today (not always understading the tutorials!) so it is not unlikely I have changed the environment variables myself :-)
Logged

marlar
Newbie
*

Karma: 0
Posts: 19


View Profile
« Reply #4 on: August 09, 2010, 01:16:57 PM »

Odoll, I tried following the guide you pointed out to me re. resetting the U-Boot Env.

Now the output when booting is a bit different:

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

reading NAND page at offset 0x100000 failed
 4194304 bytes read: ERROR
## Booting image at 00800000 ...
Bad Magic Number
Logged

marlar
Newbie
*

Karma: 0
Posts: 19


View Profile
« Reply #5 on: August 09, 2010, 01:22:51 PM »

In case it helps, here is all the environment settings:

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
bootcmd=nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
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
ethaddr=00:50:43:4c:02:26
run_diag=no
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
pcieTune=no
Logged

lyzby
Newbie
*

Karma: 0
Posts: 48


View Profile
« Reply #6 on: August 09, 2010, 06:21:25 PM »

bootcmd and bootargs continue to provide the information which u-boot uses to try to boot.  In your first posting, the part of bootcmd which said, "run boot_mmc" indicates that that was trying to boot from an SD card (mmc).  But the fact that you got a message about "scanning for usb devices' indicates that it was muddled, and was trying to read from usb.

But all that is history now.  What exactly did you do to get to the situation which the latest printenv shows?  This shows that u-boot is now trying to boot from nand.  You can run the separate parts of bootcmd individually to see exactly what is happening.  In particular you should run "read.e 0x800000 0x100000 0x400000" to see what the output is.  This is trying to read your uImage into memory location 0x800000 from nand location 0x100000 for 0x400000 bytes.  This is the typical nand boot process.  What is located there (i.e., what uImage did you try to load there)?
Logged

marlar
Newbie
*

Karma: 0
Posts: 19


View Profile
« Reply #7 on: August 10, 2010, 12:51:52 AM »

I followed this guide:
http://www.openplug.org/plugwiki/index.php/Factory_Default_u-Boot_Environment

and performed these steps:

Code:
resetenv
reset

setenv bootcmd 'nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
setenv 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'
setenv ethaddr 00:50:43:4c:02:26
setenv run_diag no
saveenv

reset

I will try running the individual parts of the bootcmd a bit later as I don't have my SheevaPlug with me.
Logged

lyzby
Newbie
*

Karma: 0
Posts: 48


View Profile
« Reply #8 on: August 10, 2010, 04:40:44 AM »

Recovering default values in u-boot won't help if what is in nand is not ok.  Since your plug's previous owner changed the boot environment, you don't know what is in nand, tho it appears to be something unbootable.

You might want to do a fresh install.  This can be done fairly easily with the ESIA/EPIA installer.  Unless you have a preference otherwise, I could recommend the Debian Squeeze nand installation, or the one for the original firmware, Ubuntu 9.04.  All you need for either can be downloaded from the Sourceforge site here:
https://sourceforge.net/projects/epia/

Download the installer and then back on the Sourceforge site click "View all files" to download the distribution files.

The installer thread, 9 pages worth, is here: http://plugcomputer.org/plugforum/index.php?topic=1400.0
Logged

marlar
Newbie
*

Karma: 0
Posts: 19


View Profile
« Reply #9 on: August 10, 2010, 05:53:14 AM »

Thanks lyzby, I will try the installer.

What, in short, is the pro and con between the Debian and the defauit Ubuntu installation?

If it is just a matter of taste, I will probably go for Debian as I run other servers with Debian Lenny. And it could be funny to try the newer Squeeze. Furthermore, I intend on running Squeezebox Server on it, and then there is sweet name coincidense Smiley
Logged

Fletch
Jr. Member
**

Karma: 1
Posts: 61


View Profile
« Reply #10 on: August 10, 2010, 06:00:33 AM »

If your plug is bricked, take a look at http://wiki.slimdevices.com/index.php/SqueezePlug. It's a modified version of the Sheevaplug Installer that installs u-boot, installs Debian to either NAND or MMC  and provides some scripts to install and configure Squeezebox Server.
Logged

lyzby
Newbie
*

Karma: 0
Posts: 48


View Profile
« Reply #11 on: August 10, 2010, 08:53:56 AM »

I personally know of no reason to prefer the Ubuntu 9.04 distribution to Debian.  If you know Debian, I'd go for it. 
Logged

marlar
Newbie
*

Karma: 0
Posts: 19


View Profile
« Reply #12 on: August 10, 2010, 03:16:52 PM »

Both of these methods require two USB sticks (which I haven't). Isn't there a way to restore the NAND using a SD card?

Btw, I have managed to get it running with Debian on the SD card, but I would like to use the internal NAND instead. Can I somehow copy the SD card to the NAND?

If not, I guess I will have to buy two sticks.
Logged

tylernt
Jr. Member
**

Karma: 2
Posts: 56


View Profile
« Reply #13 on: August 10, 2010, 03:49:26 PM »

Can I somehow copy the SD card to the NAND?
Yes. First you load your images into RAM using any of u-Boot's standard load mechanisms: tftp, or fatload/ext2load from MMC/SD/USB. Once in RAM, you can use the write.e command to flash the image to NAND.
Logged

marlar
Newbie
*

Karma: 0
Posts: 19


View Profile
« Reply #14 on: August 10, 2010, 04:15:42 PM »

tylernt, that sounds very good!

I am afraid I don't understand how to use the load mechanisms though. I mean the exact commands. Can you help me with that?

Would appreciate it very much.

Thanks,
Martin
Logged

Pages: [1] 2
Print
Jump to: