• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Yet another sheevaplug dual boot question  (Read 2468 times)
michelk
Newbie
*

Karma: 0
Posts: 5


View Profile
« on: September 19, 2011, 05:57:26 AM »

After some months with tonidoPlugs I turned my attention to sheevaplugs. Unlike Tonido, sheeva doesn't have a u-boot which allows mand OR USB/SD boot.

First I upgraded u-boot to the DENX version (http://www.cyrius.com/debian/kirkwood/sheevaplug/uboot-upgrade.html) and then used the installer to prepare a Debian squeeze on a 16GB  ultra-fast SD card. I then booted marvell with:

 
Code:
setenv bootargs_console console=ttyS0,115200
setenv bootcmd_mmc 'mmc init; ext2load mmc 0:1 0x00800000 /uImage; ext2load mmc 0:1 0x01100000 /uInitrd'
setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x00800000 0x01100000'
saveenv

Now, how can I prepare a set of boot commands that will:
try to boot from SD
if it fails (no SD for example) then boot from NAND

Thanks

Here is my original NAND printenv:

Code:
Marvell>> version

U-Boot 1.1.4 (Dec 27 2009 - 22:03:21) Marvell version: 3.4.27 - pingtoo patch.01
Marvell>> printenv
baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
CASset=min
MALLOC_len=1
ethprime=egiga0setenv
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
filesize=202588
fileaddr=2000000
netmask=255.255.255.0
ipaddr=10.4.50.4
serverip=10.4.50.5
run_diag=no
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
bootcmd=nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
ethaddr=F0:AD:4E:00:xx:yy
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

odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« Reply #1 on: October 05, 2011, 10:58:29 AM »

Also just updated the uboot on my test SheevaPlug from Pingtoo's version to the latest DNEX:

Here's my quick and dirty way how I modified Martin's boot commands to be able to boot into the Ubuntu in NAND, if no SD is attached to the device:

Code:
setenv bootargs_nand 'rootfstype=jffs2 console=ttyS0,115200 mtdparts=orion_nand: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 bootcmd_nand 'setenv bootargs $(bootargs_nand); nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x00800000 0x01100000; run bootcmd_nand'
saveenv
Logged

michelk
Newbie
*

Karma: 0
Posts: 5


View Profile
« Reply #2 on: October 16, 2011, 01:58:57 AM »

odoll:

Thanks for your help. It works. Here is my final env for dual boot:

Code:
setenv bootargs_console console=ttyS0,115200
setenv bootcmd_mmc 'mmc init; mmc init; ext2load mmc 0:1 0x00800000 /uImage; ext2load mmc 0:1 0x01100000 /uInitrd'
setenv bootargs_nand 'rootfstype=jffs2 console=ttyS0,115200 mtdparts=orion_nand: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 bootcmd_nand 'setenv bootargs $(bootargs_nand); nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x00800000 0x01100000; run bootcmd_nand'
saveenv
:

I have installed my "usual" LAMP stack on the SSD card. The setup looks for mysql data and php scripts/data on an attached USK key or an external drive.  All is fine except...  I had one occurence of the USB key un-mounting itself for no reason (I wasn't using the plug but debian has automatic crons running from time to time). 

Did you experience any similar issue?
 
Logged

Yapapa
Newbie
*

Karma: 0
Posts: 6


View Profile
« Reply #3 on: October 17, 2011, 07:44:10 AM »

Hi,
in case it helps...
I have the u-boot 4.27 with the pingto patch and squeeze in NAND (ubifs) and on SD (ext2/3) - kernel is 2.6.38.8.
After having suffered with the DENX u-boot and the 3.0 Kernels...don't know why...
I found this:
http://www.technolust.de/?p=70&lang=en

so my environment is showing these settings. Take care when you copy and paste from the web page; the high commas and the 'x' in the addresses may casue some trouble on the plug - so either type on your own or use an editor to replace the highcommas and the 'x'es.

Much fun & success!
Y.
Logged

odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« Reply #4 on: October 18, 2011, 04:47:41 AM »

Quote
I had one occurence of the USB key un-mounting itself for no reason

yes and no: I wanted to replace a USB2.0 Hitachi Drive by an USB3.0 HDD. But

i) I could get the latter only to be recognised by the SheevaPlug by connecting it via an USB-Hub
ii) the USB3.0 tended to disconnect itself from time to time

==> I sticked with the USB2.0 drive
Logged

michelk
Newbie
*

Karma: 0
Posts: 5


View Profile
« Reply #5 on: October 18, 2011, 05:58:12 AM »

I don't think the sheevaplug support USB 3 at all. I don't know (and I don't believe) they have the capability to downgrade the protocol to USB 2.

On a parallel topic I am experimenting with several barnds, size and speed for SSD cards as well as trying to clone them. Some (well, I have only one) SanDisk 16GB 30mb/s can soft reboot and  can mount the USB/HUB/hard Drive; some like my 8GB 20mb/s can mount the hard drive only when I power off/on the plug, hub abd drive (they are all on one switch). I have tried all kind of delay to no avail. I am getting more SSD cards (only 30mb/s) to see if there is a trenbd.
Logged

Pages: [1]
Print
Jump to: