New IT forum Follow us on Twitter
04 February 2012, 04:44:40 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: U-Boot environment variables for Sheevaplug factory version  (Read 4377 times)
NewIT_Marcus
Administrator
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
Administrator
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
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!