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

Login with username, password and session length
News: EFIKA MX reviewed in Linux User & Developer issue 104
 
   Home   SHOP Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Adding eSata option to multi-boot Black Sheevaplug  (Read 1126 times)
Sh_Tophe
Newbie
*
Posts: 9


« on: 10 April 2011, 09:15:10 pm »

Hi there,

I recently purchased a black eSata multiboot Sheevaplug from NewIt. In an effort of setting this unit as a web/mail/file server I installed Squeeze onto an external 2.5" eSata drive, everything went like a charm. Now comes the part where I need to boot the thing from U-Boot.

I would like to add an eSata boot option to the already existing multiboot set of env variables, something like (SD/eSata order don't really matter):

1--> Check for SD, if present boot from SD, if not present goto 2
2--> Check for eSata, if present boot from eSata, if not goto 3
3--> Boot from internal nand

I have installed Squeeze as follow on my HD :

partition 1: /boot (ext2)
partition 2: / (ext3)
partition 3: /home (ext3)
partition 4: /swap (swap)

U-boot version is as follow (should be ok for eSata boot but wanna confirm with you)

Code:
 
      __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: SHEEVA PLUG LE

U-Boot 1.1.4 (Jul 14 2009 - 06:46:57) Marvell version: 3.4.16

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CF120

Soc: MV88F6281 Rev 3 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz


And my current U-boot env variables are as follow (sorted)

Code:
arcNumber=2678
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=XX:XX:XX:XX: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
netbsd_en=no
netmask=255.255.255.0
netretry=no
pexMode=RC
rcvrip=169.254.100.100
real_bootcmd=run bootcmd_mmc; run bootcmd_nand
recover1=setenv mainlineLinux yes; setenv arcNumber 2678; 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 my question is:

What do I need to modify/add to the U-boot env variables to make the new boot sequence with eSata check work?

Help would be very much appreciated on that one

Thanks in advance
Chris



« Last Edit: 10 April 2011, 10:14:49 pm by Sh_Tophe » Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #1 on: 11 April 2011, 07:27:32 am »

There is an example of eSATA code on this page: http://www.cyrius.com/debian/kirkwood/sheevaplug/install.html
Logged
Sh_Tophe
Newbie
*
Posts: 9


« Reply #2 on: 11 April 2011, 04:53:04 pm »

thanks Marcus, already had the info found on that page.

The question was more like: how to integrate the code found on the page you linked into the existing NewIt multiboot sequence so it would add eSata boot check on top of the already existing SD and Nand boot sequence....

« Last Edit: 11 April 2011, 05:17:20 pm by Sh_Tophe » Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #3 on: 11 April 2011, 05:36:56 pm »

Create a bootargs_root_esata and a bootcmd_esata (and save them, or at least ensure that you copy the values somewhere). Use the _mmc variables as models, but with changes appropriate to the esata partition. Then try manually booting with "run bootcmd_esata", and when you have it working, change bootcmd to incorporate your bootcmd_esata
Logged
NewIT_James
Administrator
Sr. Member
*****
Posts: 394


« Reply #4 on: 11 April 2011, 05:41:25 pm »

Hi,

Have a read here also.

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

NewIT James
Logged

NewITJames
Sh_Tophe
Newbie
*
Posts: 9


« Reply #5 on: 11 April 2011, 09:33:30 pm »

Ok, I got it to wrk, what I did is as follow:

ADD the following to the preexisting env variables:

Code:
setenv bootargs_root_esata root=/dev/sda2 rw rootdelay=5
setenv bootcmd_esata 'setenv bootargs $(bootargs_console) $(bootargs_root_esata); run esataload; bootm 0x00800000 0x01100000'
setenv esataload 'ide reset; ext2load ide 1:1 0x00800000 /uImage; ext2load ide 1:1 0x01100000 /uInitrd'

Since my external HD is partitionned as follow:  /boot; /; /home; /swap I set root_esata to sda2 and since the first HD on the sheevaplug esata port is disk 1 the boot partition is then 1:1 i.e disk 1, partition 1 (/boot).

I had to create the "esataload" variable as I could no fit all arguments in the "bootcmd_esata" variable; U-Boot complained that was too many arguments at once....

Then I modified the original bootcmd variable and changed it to

Code:
setenv bootcmd 'run bootcmd_mmc; run bootcmd_esata; run bootcmd_nand'

Now the Plug boots first from the SD card if present, if not from external eSata if present, if not from internal nand.

Thanks Marcus for the tips and I hope this is clear enough for anyone else who would want to acheive the same thing.

Chris
« Last Edit: 11 April 2011, 09:42:24 pm by Sh_Tophe » Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #6 on: 11 April 2011, 09:42:11 pm »

I had to create the "esataload" variable as I could no fit all arguments in the "bootcmd_esata" variable; U-Boot complained that was too many arguments at once....

Glad you figured it out, and thanks for the update.

Creating additional environment variables in order to group commands that serve a common purpose is a useful technique, especially if the command is usable in more than one scenario. openocd can write longer values (more than 16 arguments - ie spaces between what the interpreter assumes to be arguments) - but openocd is unwieldy so the way you've done it makes perfect sense.
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!