New IT forum
01 September 2014, 01:39:34 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: GertDuino now in stock.
 
   Home   SHOP Help Search Login Register  
Pages: [1]
  Print  
Author Topic: U-Boot environment variables for Sheevaplug factory version  (Read 12028 times)
NewIT_Marcus
Hero Member
*****
Posts: 960


« on: 16 November 2009, 06:37:29 pm »

Bootlog for original, uncustomised NewIT SheevaPlug

Sold from 2009-10-10 - now

U-Boot version 3.4.16

Ubuntu with 2.6.22.18 kernel.

U-Boot code:

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

U-Boot 1.1.4 (Mar 19 2009 - 16:06:59) Marvell version: 3.4.16

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

Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB
DRAM CS[1] base 0x10000000   size 256MB
DRAM Total size 512MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0


U-Boot environment variables:

Marvell>> printenv

Code:
baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
netmask=255.255.0.0
console=console=ttyS0,115200
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_root=root=/dev/mtdblock2 ro
ethmtu=1500
usb0Mode=host
nandEcc=1bit
ethact=egiga0
serverip=10.10.0.2
ipaddr=10.10.0.1
cesvcid=ULULULULULULPPULULULULULDA
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;
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethaddr=00:50:43:01:64:27
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
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


sorted environment variables:
Code:
autoload=no
baudrate=115200
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
bootargs_end=:::DB88FXX81:eth0:none
bootargs_root=root=/dev/mtdblock2 ro
bootcmd=nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
bootdelay=3
CASset=min
cesvcid=ULULULULULULPPULULULULULDA
console=console=ttyS0,115200
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:64:27
ethmtu=1500
ethprime=egiga0
image_name=uImage
ipaddr=10.10.0.1
loadaddr=0x02000000
loads_echo=0
mainlineLinux=no
MALLOC_len=1
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.0.0
netretry=no
pexMode=RC
rcvrip=169.254.100.100
rootpath=/mnt/ARM_FS/
run_diag=no
sata_dma_mode=yes
serverip=10.10.0.2
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


See also:

(modified to update links to data for other configs)
2009-12-09: Added link to new multi-boot configuration.
« Last Edit: 09 December 2009, 10:58:00 pm by NewIT_Marcus » Logged
drbob49
Newbie
*
Posts: 7


« Reply #1 on: 29 December 2009, 11:29:20 am »

Thanks Marcus - having played around with various USB and SD card images, altering the environment variables each time, it's a useful sanity check to go back to the original as-shipped condition.  Obviously, if I had made careful notes of what I'd changed, I could have figured it out anyway  ... perhaps that's a new year's resolution.

If it's of help to anyone else, to get back to this condition after resetting the environment variables (resetenv, reset) the following lines are all that's required:

Code:
set console=console=ttyS0,115200
set bootargs_root=root=/dev/mtdblock2 ro
set standalone 'fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000'
set bootargs 'console=ttyS0,115200 mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 rw'
set bootcmd 'nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
saveenv



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


« Reply #2 on: 01 November 2010, 12:29:22 am »

Here's a switchable booting system for plugs with the original JFFS2 filesystem (and original kernel) on NAND. It is not appropriate if you have an upgraded kernel. If you have an upgraded kernel, a better solution should be available and I'll post that in a few days once I've got it all written down and tested.



* You MUST upgrade U-Boot in order to be able to boot from SD card. We recommend version 3.4.23.

See http://www.cyrius.com/debian/kirkwood/sheevaplug/uboot-upgrade.html

* Set up a TFTP server.

In U-Boot:
Code:
setenv serverip 10.42.43.1 # IP of your TFTP server
setenv ipaddr 10.42.43.2
bubt uboot.bin

In the example code, U-Boot image is hosted on your TFTP server with name uboot.bin

When the upgrade process will ask whether you want to change the environment:

**Warning**
If U-Boot Endiannes is going to change (LE->BE or BE->LE),
Then Env parameters should be overridden..
Override Env parameters? (y/n) n

Make sure to answer "n" here.

After rebooting, enter the following commands at the U-Boot prompt to change and add some environment variables:

Code:
setenv bootargs_console 'console=ttyS0,115200'
setenv bootargs_root_jffs2 'root=/dev/mtdblock2 ro'
setenv mtdpartitions_jffs2 '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'
setenv jffs2_config 'setenv arcNumber;setenv mainlineLinux no;setenv bootargs_root $(bootargs_root_jffs2);setenv bootcmd run bootcmd_jffs2;saveenv;reset'
setenv bootcmd_jffs2 'setenv bootargs $(bootargs_console) $(mtdpartitions_jffs2); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000'
setenv bootargs_root_mmc 'root=/dev/mmcblk0p2 rootdelay=5'
setenv mmc_config 'setenv arcNumber 2097;setenv mainlineLinux yes;setenv bootcmd run bootcmd_mmc;saveenv;reset'
setenv bootcmd_mmc 'setenv bootargs $(bootargs_console) $(bootargs_root_mmc); mmcinit; ext2load mmc 0:1 0x800000 /uImage; bootm 0x00800000'
saveenv
reset

At this point, your plug will continue to boot from the JFFS2 filesystem on NAND.

To activate the SD card boot, type the following at the U-Boot prompt:

Code:
run mmc_config

The plug will boot from SD card until you change it back to NAND boot, whcih you can do with the following code:

Code:
run jffs2_config

The plug can't be multibooted in the way that our UBIFS configurations do (where if there is an SD card present, the plug will boot from the SD card, if not, it will boot from NAND). In this "switchable" scenario however, you can (easily) switch from one boot method to the other.

The SD card should have a uImage (kernel) on partition #1, and rootfs on partition #2. Our images prepared in this way are here (or you can manually create / roll your own).

This solution can work for eSATA plugs but there are some additional considerations regarding suitable kernels and arcNumber. We'll be preparing some new SD card images over the next few days that will simplify the options for this switchable / multibooting system. I will post relevant information (possibly in a new thread) when we do that.

The environment variables that are at the heart of this solution can be changed / improved to a genuine multibooting system if you have an upgraded kernel on both SD card and NAND. (It is the difference between the kernels, and the requirements of the arcNumber and mainlineLinux environment variables that make this whole setup a bit tricky). I will post instructions on how to upgrade the NAND kernel and the relevant environment variable changes for that scenario, hopefully in just a few days.

2010-11-03:
Edited to indicate recommended version of U-Boot.
« Last Edit: 03 November 2010, 05:54:46 pm by NewIT_Marcus » Logged
BenMcDui
Newbie
*
Posts: 7


« Reply #3 on: 19 September 2012, 03:46:36 pm »

Hello Marcus,
having followed your latest instructions, this is what I get when trying to boot from SD:

Code:
Marvell>> run mmc_config
Saving Environment to NAND...
Erasing Nand...
Erasing at 0x60000 -- 100% complete.
Writing to Nand... done
resetting ...


U-Boot 2011.12 (Mar 11 2012 - 18:59:46)
Marvell-Sheevaplug - eSATA - SD/MMC

SoC:   Kirkwood 88F6281_A1
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
Unknown command 'mmcinit' - try 'help'
** Bad partition 1 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Marvell>> printenv
arcNumber=2097
baudrate=115200
bootargs=console=ttyS0,115200 root=/dev/mmcblk0p1 rootdelay=5
bootargs_console=console=ttyS0,115200
bootargs_root=root=/dev/mtdblock2 ro
bootargs_root_jffs2=root=/dev/mtdblock2 ro
bootargs_root_mmc=root=/dev/mmcblk0p1 rootdelay=5
bootargs_root_nand=ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs
bootcmd=run bootcmd_mmc
bootcmd_jffs2=setenv bootargs $(bootargs_console) $(mtdpartitions_jffs2); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000
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
bootdelay=10
ethact=egiga0
ethaddr=F0:AD:4E:01:2A:BD
jffs2_config=setenv arcNumber;setenv mainlineLinux no;setenv bootargs_root $(bootargs_root_jffs2);setenv bootcmd run bootcmd_jffs2;saveenv;reset
mainlineLinux=yes
mmc_config=setenv arcNumber 2097;setenv mainlineLinux yes;setenv bootcmd run bootcmd_mmc;saveenv;reset
mtdpartitions=mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs)
mtdpartitions_jffs2=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
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: 1721/131068 bytes

I changed mmcblk0p2 in mmcblk0p1 as this is the partition I use on my SD-card.

When trying NAND:

Code:
Marvell>> run jffs2_config
Saving Environment to NAND...
Erasing Nand...
Erasing at 0x60000 -- 100% complete.
Writing to Nand... done
resetting ...


U-Boot 2011.12 (Mar 11 2012 - 18:59:46)
Marvell-Sheevaplug - eSATA - SD/MMC

SoC:   Kirkwood 88F6281_A1
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x100000, size 0x400000
 4194304 bytes read: OK
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-2.6.22.18
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2106696 Bytes = 2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
And here the system hangs.

The response here is identical to what I already posted in http://www.newit.co.uk/forum/index.php/topic,3545.0.html and http://www.newit.co.uk/forum/index.php/topic,194.15.html.

Have you got any idea?
Logged
BenMcDui
Newbie
*
Posts: 7


« Reply #4 on: 20 September 2012, 12:24:31 pm »

Well, I managed to find Marvell version: 3.4.23 (http://plugcomputer.org/plugforum/index.php?action=dlattach;topic=1134.0;attach=201 ). I comes as "u-boot-rd88f6281Sheevaplug_400db_nand.bin-pingtoo-patch.01".

But after I upgraded my plug with it, and gave the reset, the plug started to behave like, you know, a b***k.
I will post my full account later on this forum.

My next approach will now be to follow bigbear59's procedure: http://plugcomputer.org/plugforum/index.php?topic=3680.0.
Logged
trampjuice
Newbie
*
Posts: 30


« Reply #5 on: 26 March 2013, 12:31:16 pm »

I am using
U-Boot 1.1.4 (Dec 27 2009 - 22:03:21) Marvell version: 3.4.27 - pingtoo patch.01
 
I have found that to stop the hanging brick syndrome when resetting  and booting you have to

setenv mainlineLinux yes
setenv arcNumber 2678
saveenv
reset

NOTE: NOT setenv arcNumber  2097 - the newer kernal images do not boot otherwise with arcNumber 2097.



Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!