New IT forum Follow us on Twitter
21 May 2012, 06:31:49 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: Dual boot nand-sd almost there..  (Read 991 times)
msalmon69
Newbie
*
Posts: 7


« on: 20 September 2011, 08:21:04 am »

I did my homework. I upgraded my sheevaplug to denx u-boot, run the installer following the instructions at http://www.cyrius.com/debian/kirkwood/sheevaplug/install.html

To reboot I sort of used:
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'

I say 'sort of' because I think I had to enter those commands one by one but anywaythey worked the 2nd time around.

I have now a full Debian Squeeze LAMP stack on my 16GB SD card and all my apps work fine.

However I want to setup a dual SD/NAND boot w/out the risk of bricking my plug and I need help! As usual if the SD card is not there the plug should go with the NAND.

Looking somewhere in this forum I could see that
Code:
bootargs_console=console=ttyS0,115200
bootargs_root_mmc=root=/dev/mmcblk0p2 rootdelay=5
bootcmd_mmc=setenv bootargs $(bootargs_console) $(bootargs_root_mmc); mmcinit; ext2load mmc 0:1 0x800000 /uImage; bootm 0x00800000
bootcmd=run bootcmd_mmc; run bootcmd_nand

would do the trick. I know close to nothing about all those u-boot commands and I wonder if someone can help me "merge" these boot commands with mine (at the top)?

Thanks

Mich
Logged
d_strigaro
Newbie
*
Posts: 9


« Reply #1 on: 20 September 2011, 10:03:41 pm »

I think that if you want a dual boot, you would see this topic:

http://www.newit.co.uk/forum/index.php/topic,194.0.html

I hope it could help you!
Logged
msalmon69
Newbie
*
Posts: 7


« Reply #2 on: 21 September 2011, 06:09:52 am »

I have looked at about all the pages that relate to dual boot of this forum and some others too.  What I need is some specific help, if at all possible to merge the 3 sets of u-boots commands I listed to obtain one that will work without failing (bricking)

On the other hand if you guys,expert with the sheevaplug believe I have no risk bricking my unit, I am ready to do all kinds of tests on my own.

Thanks
Logged
d_strigaro
Newbie
*
Posts: 9


« Reply #3 on: 21 September 2011, 08:18:07 am »

I'm not an expert of sheevaplug, but i had some adventures with it Cheesy .
For this reason, i'm not responsible if i'll tell you some wrong advices that could brick your plug!!!

I think that if you set your u-boot like it is well explained in the topic that i post you everything could go on well, because i read that the first boot is set on the sd card and only if it is not present there will be the boot from nand memory.

Excuse me for my english but i'm italian.
Logged
msalmon69
Newbie
*
Posts: 7


« Reply #4 on: 22 September 2011, 10:40:01 am »

Thankd d_strigaro, but what I really need is for someone to validate myspecific settings as described in my 1st post. I also would be interested to know if there is a way to find the file type w/out having to get to the marvell prompt. Thanks.
Logged
msalmon69
Newbie
*
Posts: 7


« Reply #5 on: 24 September 2011, 10:33:34 am »

No taker?
Logged
Confusticated
New IT customer
Hero Member
*
Posts: 511


« Reply #6 on: 24 September 2011, 04:27:06 pm »

Quote
if there is a way to find the file type
Please elaborate, I do not understand what you mean by 'file type'
Logged

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


« Reply #7 on: 24 September 2011, 04:57:19 pm »

By file type I means UBIFS of JFFS2

Thanks
Logged
msalmon69
Newbie
*
Posts: 7


« Reply #8 on: 27 September 2011, 02:23:52 pm »

May be I should re-phrase the question?

I have:
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'

which allows me to boot my sheevaplug from a (probably) JFFS2 SD created while folloing the instructions at:
Quote

I think my original sheevaPlug NAND hasn't changed. From there, what do I need to do to create a dual SD/NAND boot, meaning if the SD card is not in then the plug boots from the original NAND boot?

Thanks again.
Logged
d_strigaro
Newbie
*
Posts: 9


« Reply #9 on: 27 September 2011, 10:32:00 pm »

Could you post your settings that appear with the command 'printenv'?
Logged
msalmon69
Newbie
*
Posts: 7


« Reply #10 on: 28 September 2011, 06:29:37 am »

Here are the original settings:

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:zz:zz
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

Here are the settings after migrating to Debian using the "installer":

Code:
U-Boot 2011.03 (Apr 26 2011 - 21:50:07)
Marvell-Sheevaplug - eSATA - SD/MMC

SoC:   Kirkwood 88F6281_A1
DRAM:  512 MiB
NAND:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
Marvell>> printenv bootargs
## Error: "bootargs" not defined
Marvell>> printenv
baudrate=115200
bootcmd=${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; ${x_bootcmd_usb}; ${x_bootcmd_sata}; bootm 0x6400000;
bootdelay=3
ethact=egiga0
ethaddr=F0:AD:4E:00:zz:zz
stderr=serial
stdin=serial
stdout=serial
x_bootargs=console=ttyS0,115200 mtdparts=orion_nand:512k(uboot),4m@1m(kernel),507m@5m(rootfs) rw
x_bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs
x_bootcmd_kernel=nand read 0x6400000 0x100000 0x400000
x_bootcmd_sata=ide reset;
x_bootcmd_usb=usb start;

Environment size: 532/131068 bytes

What I added to be able to start from SD (I haven't tried yet to boot from NAND):

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'

Thanks
Logged
d_strigaro
Newbie
*
Posts: 9


« Reply #11 on: 28 September 2011, 08:21:39 am »

If i were you i would do this steps:
1- save your u-boot settings because in case will be something wrong  you know how to boot your sheevaplug and the point where you could restart;

2- i try to set u-boot as in the topic that i posted you.

But i think that you don't know how to do it!

Your 'printenv' must appear in this way:

Code:
arcNumber=2097
autoload=no
baudrate=115200
bootargs_console=console=ttyS0,115200
bootargs_end=:::DB88FXX81:eth0:none
bootargs_root_mmc=root=/dev/mmcblk0p2 rootdelay=5
bootargs_root_nand=ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs
bootargs_root=ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs
bootcmd_mmc=setenv bootargs $(bootargs_console) $(bootargs_root_mmc); mmcinit; ext2load mmc 0:1 0x800000 /uImage; bootm 0x00800000
bootcmd_nand=setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_root_nand); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000
bootcmd=run bootcmd_mmc; run bootcmd_nand
bootdelay=3
CASset=min
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
disaMvPnp=no
disL2Cache=no
disL2Prefetch=yes
enaAutoRecovery=yes
enaCpuStream=no
enaDCPref=yes
enaICPref=yes
enaMonExt=no
enaWrAllo=no
ethact=egiga0
ethaddr=00:50:43:01:xx:xx
ethmtu=1500
ethprime=egiga0
filesize=32D62A
image_name=uImage
ipaddr=10.4.50.165
loadaddr=0x02000000
loads_echo=0
mainlineLinux=yes
MALLOC_len=1
mtdpartitions=mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs)
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
nandEcc=1bit
nandEnvBase=a0000
netbsd_en=no
netmask=255.255.255.0
netretry=no
pcieTune=no
pexMode=RC
rcvrip=169.254.100.100
real_bootcmd=run bootcmd_mmc; run bootcmd_nand
recover1=setenv mainlineLinux yes; setenv arcNumber 2097; setenv bootcmd run recover2; saveenv; reset
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
recover3=run recover4; nand erase clean 0x00100000 0x00400000; nand write.e 0x00800000 0x00100000 0x00400000
recover4=usb start; fatload usb 0 0x00800000 uImage; fatload usb 0 0x01100000 initrd
rootpath=/mnt/ARM_FS/
sata_dma_mode=yes
serverip=10.4.50.5
setL2CacheWT=yes
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
stderr=serial
stdin=serial
stdout=serial
usb0Mode=host
vxworks_en=no
yuk_ethaddr=00:00:00:EE:51:81

so you would do this for every settings:

Code:
setenv arcNumber 2097
setenv autoload no
ecc..

You must notice that i don't write the '=' this is the way to set it.
For 'ethaddr' you must put the macaddress of your sheevaplug.
For 'ipaddr' you must put the address that you sheevaplug have in your network (you can see it in the settings of your router if you have it)
For 'serverip' you must put the network address of the pc where you are doing this steps.

After this you could save this setting with:

Code:
saveenv

Thid command saves the settings! If you don't do this after the first reboot you will have the settings that you have from the point where you start!
Than you can boot your sheevaplug.

Excuse me for my english it is difficult to explain it because i'm italian.

P.S.
For these two setting you must write in this way:


Code:
setenv bootcmd_mmc 'setenv bootargs $(bootargs_console) $(bootargs_root_mmc); mmcinit; ext2load mmc 0:1 0x800000 /uImage; bootm 0x00800000'

setenv bootcmd_nand 'setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_root_nand); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000'

PLEASE NOTE THAT:

I'm not an expert of sheevaplug, but i had some adventures with it  .
For this reason, i'm not responsible if i'll tell you some wrong advices that could brick your plug!!!


In any case if your sheevaplug is good and you can use it i don't know why you want to do this.
« Last Edit: 28 September 2011, 09:28:54 am by d_strigaro » 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!