New IT forum
18 April 2014, 11:15:15 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: PiHub now in stock.
 
   Home   SHOP Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Bad Magic Number after try to install image in provided CD (sheevaplug)  (Read 3737 times)
cmolaro
Newbie
*
Posts: 6


« on: 16 September 2010, 07:43:38 pm »

Hi,

After some days of receiving the plug (thx NewIT!) I was very happy till I decided I'd try to upgrade using the image in the cd.
Using Ubuntu Desktop 10.4 and the provided Install (runme.php) procedure I got this:
Code:
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                                                
                                                                                
NAND read: device 0 offset 0x100000, size 0x400000                              
                                                                                
Reading data from 0x4ff800 -- 100% complete.                                    
 4194304 bytes read: OK                                                        
## Booting image at 00800000 ...                                                
[font=Verdana]Bad Magic Number [/font]                                                              
Marvell>>

Install works partially, as follows:

Code:
For bug reports, read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
2000 kHz
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
dcc downloads are enabled
Info : JTAG tap: feroceon.cpu tap/device found: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)
Info : JTAG Tap/device matched
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0xffff0000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
0 0 1 0: 00052078
NAND flash device 'NAND 512MiB 3,3V 8-bit' found
successfully erased blocks 5 to 6 on NAND flash device 'NAND 512MiB 3,3V 8-bit'
wrote file uboot-env.bin to NAND flash 0 up to offset 0x000c0000 in 19.087997s
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0xffff0000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
0 0 1 0: 00052078
NAND flash device 'NAND 512MiB 3,3V 8-bit' found
successfully erased blocks 0 to 4 on NAND flash device 'NAND 512MiB 3,3V 8-bit'
wrote file uboot.bin to NAND flash 0 up to offset 0x00074000 in 69.247017s
Segmentation fault
 **** openocd FAILED
 **** Is the mini USB cable connected?
 **** Try powering down, then replugging the Sheevaplugroot@T60:/home/cristian/sheevainst#

At the moment of the error above, the plug reboots and I can see funny characters in the minicom connection when loading the kernel:
Code:
Erasing Nand...Writing to Nand... done                                          
## Booting image at 00800000 ...                                                
   Image Name:   Linux-2.6.30.2                                                
   Created:      2009-07-23   1:53:36 UTC                                      
   Image Type:   ARM Linux Kernel Image (uncompressed)                          
   Data Size:    2620440 Bytes =  2.5 MB                                        
   Load Address: 00008000                                                      
   Entry Point:  00008000                                                      
   Verifying Checksum ... OK                                                    
OK                                                                              
## Loading Ramdisk Image at 01100000 ...                                        
   Image Name:   initrd.ext2.gz                                                
   Created:      2009-08-19  14:24:20 UTC                                      
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)                      
   Data Size:    3331562 Bytes =  3.2 MB                                        
   Load Address: 00000000                                                      
   Entry Point:  00000000                                                      
   Verifying Checksum ... OK                                                    
                                                                               ??arting kernel ...                                                            ;???                                                                            ???????ompressing Linux............................................................???qP+ey?g+??BV??j4?*aq-??jAz?wQ7;??J,Y&r?D4?Zi!h?iI??J4$SVR           ?H((B])?
                                                                               ?
                                                                               P
                                                                               6
                                                                               ???{???                                                                            (


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

Code:
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=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/;
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=ubi.mtd=1 root=/dev/sda1:rootfs rootfstype=ubifs                  
mtdpartitions=mtdparts=orion_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000()
ethaddr=f0:ad:4e:00:05:b0                                                      
real_bootcmd=setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_ro0
bootargs_console=console=ttyS0,115200                                          
recover1=setenv mainlineLinux yes; setenv arcNumber 2097; setenv bootcmd run ret
recover2=run recover3; setenv bootcmd $(real_bootcmd); saveenv; setenv bootargs0
recover3=run recover4; nand erase clean 0x00100000 0x00400000; nand write.e 0x00
recover4=usb start; fatload usb 0 0x00800000 uImage; fatload usb 0 0x01100000 id
arcNumber=2097                                                                  
filesize=32D62A                                                                
bootcmd=setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_root); 0
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 mtdparts=orion_mtd:0x400000@0x100000(uImage),0x1fs
                                                                                
Environment size: 2220/131068 bytes                                            
Marvell>>


What I would like like to do is to get back to a factory installation!
I spend hours / days in the internet looking for a solution. I also tried a tftp installation and got same issue.

Thanks a lot for any help!
Cristian
Belgium
« Last Edit: 16 September 2010, 08:11:04 pm by cmolaro » Logged
Confusticated
New IT customer
Hero Member
*
Posts: 656


« Reply #1 on: 16 September 2010, 07:51:34 pm »

If you had an image of the original system available, how would you write it to the plug ?
Would investigating/curing the openocd segfault be a better direction to go ?
Logged

Advocatus Diaboli - My agenda is not to give you the answer, but to guide your thoughts so you derive it for yourself!
cmolaro
Newbie
*
Posts: 6


« Reply #2 on: 16 September 2010, 08:09:48 pm »

Hi!
Thx for your reaction.

I was trying to update the image in the plug: the one installed was older than the one in the CD.
I did follow this http://www.plugcomputer.org/plugwiki/index.php/SheevaPlug_Installer#How_to_install_1.0_.3F 'cause it would give me a newer Ubuntu kernel.
Indeed I spend a lot of time of the openocd issue, actually I started in WinXP but moved to Linux after a while do not getting it to work properly.
Anyway, I have the impression it works "partially" and this is probably the reason behind the lose of the image.
I got out of ideas on where look at related to this...
Any suggestion welcomed!

Thanks again,
Cristian
Logged
NewIT_Marcus
Hero Member
*****
Posts: 960


« Reply #3 on: 17 September 2010, 07:48:34 am »

  • The Sheevaplug installer does NOT return the Sheevaplug to factory condition; it writes a rootfs of the users choice to NAND as UBIFS format (factory is JFFS2)
  • In the event of any problems with using the installer is is essential to know what hardware you have (eSATA or non-eSATA, and more recently, if you have an A1 cpu (for non-eSATA plugs only)
  • Also, for installer issues, it is often helpful to indicate what host operating system you are using

There's a possibility that openocd worked OK, or a possibility that the second stage crapped out:

Code:
wrote file uboot-env.bin to NAND flash 0 up to offset 0x000c0000 in 19.087997s
wrote file uboot.bin to NAND flash 0 up to offset 0x00074000 in 69.247017s
The timings are unusually fast; when we flash (with 2000Hz in the config file) the timings are 30seconds and 116 seconds (usually).

Code:
**** openocd FAILED
 **** Is the mini USB cable connected?
 **** Try powering down, then replugging the Sheevaplugroot@T60:/home/cristian/sheevainst#
Looks like you are using a linux host (or perhaps cygwin). In any event, the advice here is helpful.

Code:
U-Boot 1.1.4 (Jul 19 2009 - 16:03:28) Marvell version: 3.4.19
So you are using the version of U-Boot that we recommend for eSATA?

Although the installer instructions are a mess, the wiki page hasn't been updated in a long time and the plug computer forum thread (although it is quite long now) may be more useful.

You can re-run the installation part 2 by typing run recover1 at the U-Boot Marvell>> prompt, with the USB stick inserted. If necessary, you can put a different uImage and modules on the USB stick before doing so. Given the symptoms that you report, this looks like a sensible way forward, but you need to clear up the hardware questions above.
Logged
cmolaro
Newbie
*
Posts: 6


« Reply #4 on: 17 September 2010, 10:29:25 am »

Hi,

Thanks a lot for your reaction.
Quote
In the event of any problems with using the installer is is essential to know what hardware you have (eSATA or non-eSATA, and more recently, if you have an A1 cpu (for non-eSATA plugs only)

What would be the best of giving you that information? Where should I look at?
Quote
Also, for installer issues, it is often helpful to indicate what host operating system you are using

I am working with Ubuntu Desktop Edition 32 bits 10.04.1 on a Lenovo T60 Laptop.
Quote
So you are using the version of U-Boot that we recommend for eSATA?
I am using the U-boot that came installed in the sheevaplug, no changes done.

Quote
You can re-run the installation part 2 by typing run recover1 at the U-Boot Marvell>> prompt, with the USB stick inserted.

Yep, I did that a number of times and I get always these funny characters.

Thanks a lot for your help!

Cristian
Belgium
Logged
NewITMalcolm
Administrator
Sr. Member
*****
Posts: 394


« Reply #5 on: 17 September 2010, 01:36:32 pm »

Hi,

Try here.

http://www.plugcomputer.org/plugwiki/index.php/SheevaPlug_Installer#How_to_install_1.0_.3F
Logged

NewITJames
cmolaro
Newbie
*
Posts: 6


« Reply #6 on: 17 September 2010, 02:55:31 pm »

Hi,

That was the link I used for the process that ended with my plug not functional...

You asked about hardware, this is what I can read in the back of the plug:

MODEL: 003-SP1001
SKU #: RD-88F6281-BPLUG-A

Does that help to help me?

Thanks again,
Cristian
Logged
NewIT_Marcus
Hero Member
*****
Posts: 960


« Reply #7 on: 17 September 2010, 04:46:50 pm »

Hi,

Thanks a lot for your reaction.
Quote
In the event of any problems with using the installer is is essential to know what hardware you have (eSATA or non-eSATA, and more recently, if you have an A1 cpu (for non-eSATA plugs only)

What would be the best of giving you that information? Where should I look at?

Does it have an eSATA connection on the outside of the plug?

Quote
Also, for installer issues, it is often helpful to indicate what host operating system you are using

I am working with Ubuntu Desktop Edition 32 bits 10.04.1 on a Lenovo T60 Laptop.
Quote
So you are using the version of U-Boot that we recommend for eSATA?
I am using the U-boot that came installed in the sheevaplug, no changes done.

No, you aren't. When you used the installer, and according to the log you posted in your first message:

Code:
wrote file uboot-env.bin to NAND flash 0 up to offset 0x000c0000 in 19.087997s

Quote
You can re-run the installation part 2 by typing run recover1 at the U-Boot Marvell>> prompt, with the USB stick inserted.

Yep, I did that a number of times and I get always these funny characters.

Thanks a lot for your help!

Cristian
Belgium


Corrupted characters in a console session are often just temporary. I've never seen a "good" session go "bad" before, except when the kernel on the plug has been changed on an A1 plug. Here's how to determine if you have an A1 plug
Logged
cmolaro
Newbie
*
Posts: 6


« Reply #8 on: 17 September 2010, 05:44:19 pm »

Yes, it is a A01 without eSata.

Following your link I just changed uImage in the USB stick using the specific for this kind of processor... and it works!
 Cheesy

I just give a try to run recover1 and the root filesystem is being copied now.

I am very impressed with the support of this forum, thanks a lot!
 Smiley
Best regards from Belgium,
Cristian

« Last Edit: 17 September 2010, 05:53:44 pm by cmolaro » Logged
NewIT_Marcus
Hero Member
*****
Posts: 960


« Reply #9 on: 17 September 2010, 05:55:01 pm »

Yes, it is a A01 without eSata.

It's either an A0, or an A1. It's not an A01.

I am assuming that it was an A1 plug; I'm also glad it's working for you now.
Logged
cmolaro
Newbie
*
Posts: 6


« Reply #10 on: 17 September 2010, 05:58:44 pm »

Yes indeed, it is an A1  Smiley

Again, thx for the support!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!