• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: "Bad Magic Number"  (Read 9778 times)
tehcrash
Newbie
*

Karma: 0
Posts: 8


View Profile
« on: April 13, 2009, 10:04:00 PM »

I followed the instructions provided in the "SheevaPlug - Writing Jaunty Filesystem on the NAND flash" document, and have copied over the new uImage and the ubuntu.jffs2 file.

However, when I rebooted the device, I received the following:

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

Reading data from 0x4ff800 -- 100% complete.
 4194304 bytes read: OK
## Booting image at 00800000 ...
Bad Magic Number
Marvell>>

To be clear, that third to last line does correctly read "00800000", not "0x800000".  It stuck out to me, so I checked the bootargs and bootcmd, but they are correct.

While I nandwrote the uImage file, I did get a message allong the lines of:
Quote
image partially written
Success

Would this possibly be part of the problem?  or does anyone have any idea what could have gone wrong?
Logged

moshiach
Guest
« Reply #1 on: April 14, 2009, 12:03:56 AM »

You've run into the problem with the image being larger than the partition you are trying to write it to. Since your kernel didn't completely write, the CRC is bad.

There are already a couple of threads describing how to change your mtdparts command line to make the uImage partition large enough to flash your kernel.   Look for uImage to large to write to NAND or Problem reflashing Uimage.
Logged

tehcrash
Newbie
*

Karma: 0
Posts: 8


View Profile
« Reply #2 on: April 14, 2009, 09:12:12 AM »

Thank you.
Logged

finkployd
Newbie
*

Karma: 0
Posts: 4


View Profile
« Reply #3 on: April 14, 2009, 11:20:06 AM »

I believe another user posted that a new uImage release (040309 or something) will fit without a problem, although I have not tried it yet myself.  However, it's probably not a bad idea playing around with mtdparts thought just to get a better idea of how it works.
Logged

tehcrash
Newbie
*

Karma: 0
Posts: 8


View Profile
« Reply #4 on: April 14, 2009, 12:04:53 PM »

Yeah, I found that while looking at the thread on the uImage size.  The new uImage runs succesfully.
Logged

Pandemonium
Newbie
*

Karma: 0
Posts: 37


View Profile
« Reply #5 on: April 29, 2009, 12:50:55 PM »

I'm getting "Bad Magic Number" after I compiled my own kernel, flashed it to NAND via USB (following the instructions in the PDF), and then tried to boot it.  My kernel image is actually smaller than the 040309 image provided by Marvell (which I have flashed successfully), probably because I removed support for audio devices when I compiled.  The only other change I made from the default config was enabling TUN/TAP support.  Still, I get Bad Magic Number when I use the suggested mtd1Size 0x300000.  I've tried making it bigger, but have yet to find the right bootargs that'll let me boot at all with a bigger MTD1.  I doubt I need to make it bigger anyway, since my image is smaller.

My cross compiler is the one included on the disc, set up as it says in the PDF.  I compiled the kernel on the disc, following the instructions in the PDF.  I flashed it to NAND from USB using the instructions in the PDF.

Are there any other things I should be looking at for Bad Magic Number? 
Logged

bfmorgan
Guest
« Reply #6 on: April 29, 2009, 01:04:37 PM »

Would you supply your uboot environment - printenv from the Marvell (uboot) prompt. The bootargs are what I'm interested in seeing.
Logged

Pandemonium
Newbie
*

Karma: 0
Posts: 37


View Profile
« Reply #7 on: April 29, 2009, 01:19:15 PM »

Yep.

Code:
Marvell>> print
baudrate=115200
loads_echo=0
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
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;
ethaddr=00:50:43:d6:13:26
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
netretry=no
rcvrip=169.254.100.100
autoload=no
ethact=egiga0
bootcmd=nand read.e 0x800000 0x100000 0x300000; bootm 0x800000
nandEcc=4
loadaddr=0x2000000
mtd1Size=0x300000
filesize=0x44ad000
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000@0x00000(u-boot),0x300000@0x100000(uImage)ro,0x1fc00000@0x400000(rootfs)rw root=/dev/mtdblock2
stdin=serial
stdout=serial
stderr=serial
console=console=ttyS0,115200 mtdparts=nand_mtd:0x100000@0(uboot)ro,0x300000@0x100000(uImage),0x1fc00000@0x400000(rootfs)rw
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

Environment size: 1338/131068 bytes
Logged

Pages: [1]
Print
Jump to: