New IT forum Follow us on Twitter
22 May 2012, 10:13:06 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: TonidoPlug2 - Now in stock!
 
   Home   SHOP Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Bad Magic Number = one poorly plug  (Read 1500 times)
RandomCake
Newbie
*
Posts: 5


« on: 25 February 2010, 01:51:23 am »

Hi,
I've just gone through the process described in the SheevaPlug Installer 1.0, I'm on Linux Mint and when I tell the plug to boot I get:

Code:
Marvell>> boot

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

The install its self seemed to go okay (but I don't know what I'm looking at really!):
Code:
$ sudo php -f runme.php nand

 **** exec(modprobe ftdi_sio vendor=0x9e88 product=0x9e8f)
 **** Preparing environment variables file ...
reading uboot/uboot-env/uboot-dflt.txt
uboot/uboot-env/fw_setenv baudrate 115200
CRC read error on uboot-env.bin: Success
uboot/uboot-env/fw_setenv loads_echo 0
uboot/uboot-env/fw_setenv ipaddr 10.4.50.165
uboot/uboot-env/fw_setenv serverip 10.4.50.5
uboot/uboot-env/fw_setenv rootpath /mnt/ARM_FS/
uboot/uboot-env/fw_setenv netmask 255.255.255.0
uboot/uboot-env/fw_setenv stdin serial
uboot/uboot-env/fw_setenv stdout serial
uboot/uboot-env/fw_setenv stderr serial
uboot/uboot-env/fw_setenv console console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0\(uboot\)ro,0x1ff00000@0x100000\(root\)
uboot/uboot-env/fw_setenv mainlineLinux no
uboot/uboot-env/fw_setenv CASset min
uboot/uboot-env/fw_setenv enaMonExt no
uboot/uboot-env/fw_setenv enaCpuStream no
uboot/uboot-env/fw_setenv enaWrAllo no
uboot/uboot-env/fw_setenv pexMode RC
uboot/uboot-env/fw_setenv disL2Cache no
uboot/uboot-env/fw_setenv setL2CacheWT yes
uboot/uboot-env/fw_setenv disL2Prefetch yes
uboot/uboot-env/fw_setenv enaICPref yes
uboot/uboot-env/fw_setenv enaDCPref yes
uboot/uboot-env/fw_setenv sata_dma_mode yes
uboot/uboot-env/fw_setenv MALLOC_len 1
uboot/uboot-env/fw_setenv ethprime egiga0
uboot/uboot-env/fw_setenv netbsd_en no
uboot/uboot-env/fw_setenv vxworks_en no
uboot/uboot-env/fw_setenv bootargs_root root=/dev/nfs rw
uboot/uboot-env/fw_setenv bootargs_end :::DB88FXX81:eth0:none
uboot/uboot-env/fw_setenv image_name uImage
uboot/uboot-env/fw_setenv bootcmd tftpboot 0x2000000 \$\(image_name\)\;setenv bootargs \$\(console\) \$\(bootargs_root\) nfsroot=\$\(serverip\):\$\(rootpath\) ip=\$\(ipaddr\):\$\(serverip\)\$\(bootargs_end\) \$\(mvNetConfig\) \$\(mvPhoneConfig\)\;  bootm 0x2000000\;
uboot/uboot-env/fw_setenv standalone fsload 0x2000000 \$\(image_name\)\;setenv bootargs \$\(console\) root=/dev/mtdblock0 rw ip=\$\(ipaddr\):\$\(serverip\)\$\(bootargs_end\) \$\(mvPhoneConfig\)\; bootm 0x2000000\;
uboot/uboot-env/fw_setenv bootdelay 3
uboot/uboot-env/fw_setenv disaMvPnp no
uboot/uboot-env/fw_setenv ethaddr 00:50:43:4e:2a:14
uboot/uboot-env/fw_setenv ethmtu 1500
uboot/uboot-env/fw_setenv mvPhoneConfig mv_phone_config=dev0:fxs,dev1:fxs
uboot/uboot-env/fw_setenv mvNetConfig mv_net_config=\(00:11:88:0f:62:81,0:1:2:3\),mtu=1500
uboot/uboot-env/fw_setenv usb0Mode host
uboot/uboot-env/fw_setenv yuk_ethaddr 00:00:00:EE:51:81
uboot/uboot-env/fw_setenv nandEcc 1bit
uboot/uboot-env/fw_setenv netretry no
uboot/uboot-env/fw_setenv rcvrip 169.254.100.100
uboot/uboot-env/fw_setenv loadaddr 0x02000000
uboot/uboot-env/fw_setenv autoload no
uboot/uboot-env/fw_setenv enaAutoRecovery yes
uboot/uboot-env/fw_setenv ethact egiga0
reading uboot/uboot-env/uboot-nand-custom.txt
uboot/uboot-env/fw_setenv bootargs_root ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs
uboot/uboot-env/fw_setenv mtdpartitions mtdparts=orion_nand:0x400000@0x100000\(uImage\),0x1fb00000@0x500000\(rootfs\)
uboot/uboot-env/fw_setenv ethaddr 00:50:43:01:c1:e6
uboot/uboot-env/fw_setenv real_bootcmd setenv bootargs \$\(bootargs_console\) \$\(mtdpartitions\) \$\(bootargs_root\)\; nand read.e 0x00800000 0x00100000 0x00400000\; bootm 0x00800000
uboot/uboot-env/fw_setenv bootargs_console console=ttyS0,115200
uboot/uboot-env/fw_setenv bootcmd run recover1
uboot/uboot-env/fw_setenv recover1 setenv mainlineLinux yes\; setenv arcNumber 2097\; setenv bootcmd run recover2\; saveenv\; reset
uboot/uboot-env/fw_setenv recover2 run recover3\; setenv bootcmd \$\(real_bootcmd\)\; saveenv\; setenv bootargs \$\(bootargs_console\) \$\(mtdpartitions\) root=/dev/ram0 rw ramdisk=0x01100000,8M install_type=nand\; bootm 0x00800000 0x01100000
uboot/uboot-env/fw_setenv recover3 run recover4\; nand erase clean 0x00100000 0x00400000\; nand write.e 0x00800000 0x00100000 0x00400000
uboot/uboot-env/fw_setenv recover4 usb start\; fatload usb 0 0x00800000 uImage\; fatload usb 0 0x01100000 initrd

 **** Burning uboot and environment variables ... This will take few minutes ...
Open On-Chip Debugger 0.2.0 (2009-07-26-14:56) Release
$URL: http://svn.berlios.de/svnroot/repos/openocd/tags/openocd-0.2.0/src/openocd.c $
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.797890s
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 79.799774s

 **** U-boot should be up and running now. Open your console ...

Any help would be greatly appreciated.

RandomCake
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #1 on: 25 February 2010, 08:30:05 am »

You'll need to check your environment variables.

Did you have the serial console open whilst you were running the installer? If so, you should have seen other progress messages that would have helped you see that the process had worked correctly (or not).

You can connect your USB stick, and serial console, and run recover1 in U-Boot. That should re-do the process and you can watch it.
Logged
RandomCake
Newbie
*
Posts: 5


« Reply #2 on: 25 February 2010, 02:14:31 pm »

Thank you so much Markus!

I realised that I had missed out 'uboot-custom.txt' the first time, I put that on the USB and re-ran the installer using 'run recover1' and now it's all working beautifully, now to get writing to them NTFS partitions! Smiley

Thanks

P.S.
Is there any way to have the OS installed to NAND, but have some programs installed to an SD card while still using Apt-Get to manage the packages?
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #3 on: 25 February 2010, 06:12:32 pm »

Thank you so much Markus!

I realised that I had missed out 'uboot-custom.txt' the first time, I put that on the USB and re-ran the installer using 'run recover1' and now it's all working beautifully, now to get writing to them NTFS partitions! Smiley

Thanks

P.S.
Is there any way to have the OS installed to NAND, but have some programs installed to an SD card while still using Apt-Get to manage the packages?

Glad you got it working again. apt-get ntfs-3g to add your NTFS functionality.

On your final question:

Software installation spreads files throughout the filesystem. Let's take samba as an example:

dpkg -L samba

Code:
/.
/usr
/usr/bin
/usr/bin/eventlogadm
/usr/bin/smbstatus.samba3
/usr/bin/smbcontrol
/usr/bin/profiles
/usr/bin/tdbbackup
/usr/bin/pdbedit
/usr/sbin
/usr/sbin/smbd
/usr/sbin/nmbd
/usr/sbin/mksmbpasswd
/usr/lib
/usr/lib/samba
/usr/lib/samba/vfs
/usr/lib/samba/vfs/recycle.so
/usr/lib/samba/vfs/audit.so
/usr/lib/samba/vfs/extd_audit.so
/usr/lib/samba/vfs/full_audit.so
/usr/lib/samba/vfs/netatalk.so
/usr/lib/samba/vfs/fake_perms.so
/usr/lib/samba/vfs/default_quota.so
/usr/lib/samba/vfs/readonly.so
/usr/lib/samba/vfs/cap.so
/usr/lib/samba/vfs/expand_msdfs.so
/usr/lib/samba/vfs/shadow_copy.so
/usr/lib/samba/vfs/shadow_copy2.so
/usr/lib/samba/vfs/xattr_tdb.so
/usr/lib/samba/vfs/streams_xattr.so
/usr/lib/samba/vfs/streams_depot.so
/usr/lib/samba/vfs/readahead.so
/usr/lib/samba/vfs/fileid.so
/usr/lib/samba/vfs/preopen.so
/usr/lib/samba/vfs/syncops.so
/usr/lib/samba/vfs/acl_xattr.so
/usr/lib/samba/vfs/acl_tdb.so
/usr/lib/samba/vfs/smb_traffic_analyzer.so
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/smbstatus.1.gz
/usr/share/man/man1/smbcontrol.1.gz
/usr/share/man/man1/profiles.1.gz
/usr/share/man/man8
/usr/share/man/man8/smbd.8.gz
/usr/share/man/man8/mksmbpasswd.8.gz
/usr/share/man/man8/tdbbackup.8.gz
/usr/share/man/man8/eventlogadm.8.gz
/usr/share/man/man8/nmbd.8.gz
/usr/share/man/man8/pdbedit.8.gz
/usr/share/doc
/usr/share/doc/samba
/usr/share/doc/samba/diagnosis.html
/usr/share/doc/samba/README.Debian
/usr/share/doc/samba/copyright
/usr/share/doc/samba/NEWS.Debian.gz
/usr/share/doc/samba/README.build.gz
/usr/share/doc/samba/changelog.Debian.gz
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/samba
/var
/var/lib
/var/lib/samba
/var/lib/samba/printers
/var/lib/samba/printers/COLOR
/var/lib/samba/printers/IA64
/var/lib/samba/printers/W32ALPHA
/var/lib/samba/printers/W32MIPS
/var/lib/samba/printers/W32PPC
/var/lib/samba/printers/W32X86
/var/lib/samba/printers/WIN40
/var/lib/samba/printers/x64
/var/spool
/var/spool/samba
/etc
/etc/ufw
/etc/ufw/applications.d
/etc/ufw/applications.d/samba
/etc/logrotate.d
/etc/logrotate.d/samba
/etc/init.d
/etc/init.d/samba
/etc/cron.daily
/etc/cron.daily/samba

If you expect to "install" your applications exclusively to the SD card, and not to NAND, then you would have to mount (according to the above list) at least /usr, /var and /etc on the SD card. And if you were to do that, you really might as well put the OS on the SD card. I suppose you could put just /usr and /var on SD, you could even have some funky linking mechanism so that your files in /etc pointed to the SD card, but what would be the benefit?

If you were to manually install applications - and this would be most suitable to simple binaries that don't require documentation or configuration files - then you could far more easily place them on your SD card, and if necessary modify your path to include the relevant location(s).

The way we see the SD card issue is this:

Flash memory wears out. That applies to both the internal (non-replaceable) NAND and external USB sticks and external SD cards. Of those 3 possibilities, we think we'd probably want to use the USB socket for some hardware add-on, which means we can choose between NAND and SD card. Well, we can obtain an SD card with several times the capacity of the NAND for a tenner (and you can buy them from our shop too). If the card wears out, we can dispose of it and buy another. If the NAND wears out, we have to buy a new plug. Since the performance on SD card is just fine, we prefer the SD boot option. Furthermore, if you have (say) 3 SD cards you could allocate them for:

(1). Media Server
(2). Development / kernel compilation etc
(3). Testing new Media Server builds

You can reboot and swap an SD card in about 60 seconds - that's not so easy to do on a desktop with IDE and SATA drives. Each card, with O/S and key data can be backed up / snapshotted (to an external USB or eSATA device) at around 1G per minute (by booting from NAND and using dd).

So we think that a simple SD card boot, with O/S and data all on the card, is the way to go.
Logged
RandomCake
Newbie
*
Posts: 5


« Reply #4 on: 03 March 2010, 01:21:06 pm »

Sounds great, roughly what class of SD card would give equal performance to the internal NAND?

Thanks,

RandomCake
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #5 on: 04 March 2010, 12:15:36 am »

We sell class 6, we're perfectly happy with the performance. (We've also used some slower cards without problems).
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!