Difference between revisions of "U-boot Default Environmental Variables and Values"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
(LS-Pro v2)
Line 19: Line 19:
 
=====U-Boot 1.1.4 LiSt 2.1.0 (Nov 15 2006 - 18:03:28) LinkStation HG / KuroBox HG=====
 
=====U-Boot 1.1.4 LiSt 2.1.0 (Nov 15 2006 - 18:03:28) LinkStation HG / KuroBox HG=====
 
version & date above, made by kuroguy
 
version & date above, made by kuroguy
 
+
 
  values:  to be listed...
 
  values:  to be listed...
 
+
  
  
Line 240: Line 240:
 
   
 
   
 
  Environment size: 1130/4092 bytes
 
  Environment size: 1130/4092 bytes
 +
 +
 +
==Restoring Default Values to U-Boot Env Vars==
 +
'''Use at your own risk.  Erasing in U-Boot can be potentially disasterous.'''  Make sure you research your board before proceeding.  The values shown below are for a custom build of UBoot for an LSPro. 
 +
If you want to restore the values that were specified at build time for UBoot, you can do it by:
 +
*research (in UBoot sources, see the include/configs/<boardname-or-linkstation-name>.h) to see where the environment variables are and the size of the sector(s) for them, then compute the begin and the end, as in feroceon.h :
 +
#define CFG_ENV_ADDR    0xfffff000
 +
#define CFG_ENV_SIZE         0x1000        
 +
#define CFG_ENV_SECT_SIZE 0x1000
 +
*compute the begin and end
 +
begin = fffff000
 +
end = begin + 1000 = ffffffff
 +
*unprotect, erase and protect
 +
=> protect off fffff000 ffffffff                                               
 +
Un-Protected 1 sectors                                                         
 +
=> erase fffff000 ffffffff                                                                                                                                 
 +
Erased 1 sectors                                                               
 +
=> protect on fffff000 ffffffff                                               
 +
Protected 1 sectors

Revision as of 02:19, 14 March 2008


Contents

Reference Page for U-boot Env Vars & Values

Please add only stock or standard values from a U-boot version supplied by Buffalo or by a developer associated w/ the Wiki, and no custom values, except in the place at the end. Please list:

  1. source of U-boot (Buffalo, wiki, foonas)
  2. the version
  3. the date of build and
  4. all stock/standard env vars.

The version and date can be found in U-boot's boot messages via netcat or a serial terminal (if you have fitted a cable to your box's Serial_port). The values can be found by issuing the command "printenv" while in U-boot, or the command "nvram -c printenv" whilst in EM etc.

LS1

LS2

LS-HG

U-Boot 1.1.4 LiSt 2.1.0 (Nov 15 2006 - 18:03:28) LinkStation HG / KuroBox HG

version & date above, made by kuroguy

values:  to be listed...


U-Boot 1.2.0 (Apr 10 2007 - 19:13:32) LinkStation HG / KuroBox HG

version and date above, made by bitbake/timtimred - for foonas-em on a KuroHG

bootargs=root=/dev/sda1 netconsole=6666@192.168.11.150/,@192.168.11.149/ rtc-rs5c372.probe=0,0x32
bootcmd=run bootcmd1
nfsboot=bootp;run nfsargs;bootm
bootdelay=10
baudrate=57600
autoload=no
stdin=nc
stdout=nc
stderr=nc
ipaddr=192.168.11.150
netmask=255.255.255.0
serverip=192.168.11.149
ncip=192.168.11.149
netretry=no
nc=setenv stdin nc;setenv stdout nc;setenv stderr nc
ser=setenv stdin serial;setenv stdout serial;setenv stderr serial
ldaddr=800000
hdpart=0:1
hdload=echo Loading ${hdpart}:${hdfile};ext2load ide ${hdpart} ${ldaddr} ${hdfile};ext2load ide ${hdpart} 7f0000 boot/kuroboxHG.dtb
boothd=setenv bootargs root=/dev/sda1 netconsole=6666@192.168.11.150/,@192.168.11.149/ rtc-rs5c372.probe=0,0x32
hdboot=run hdload boothd
flboot=setenv bootargs root=/dev/hda1;bootm ffc00000
emboot=setenv bootargs root=/dev/ram0;bootm ffc00000
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
bootretry=30
bootcmd1=run hdboot;run flboot
bootcmd2=run flboot
bootcmd3=run emboot
writeng=protect off fff70000 fff7ffff;era fff70000 fff7ffff;mw.l 800000 4e474e47 1;cp.b 800000 fff70000 4
writeok=protect off fff70000 fff7ffff;era fff70000 fff7ffff;mw.l 800000 4f4b4f4b 1;cp.b 800000 fff70000 4
ubpart=0:1
ubfile=share/u-boot/u-boot-hg.flash.bin
ubload=echo Loading ${ubpart}:${ubfile};ext2load ide ${ubpart} ${ldaddr} ${ubfile}
ubsaddr=fff00000
ubeaddr=fff2ffff
ubflash=protect off ${ubsaddr} ${ubeaddr};era ${ubsaddr} ${ubeaddr};cp.b ${ldaddr} ${ubsaddr} ${filesize};cmp.b ${ldaddr} ${ubsaddr} ${filesize}
upgrade=run ubload ubflash
ethact=RTL8169#0
hdfile=boot/uImage
foofl1=cp.b FFC00000 800000 2FFFFF;cp.b fff80000 AFFFFF 7E887
foofl2=setenv bootargs netconsole=6666@192.168.11.150/,@192.168.11.149/ rtc-rs5c372.probe=0,0x32 root=/dev/ram0 rw;bootm ${ldaddr} - FFFFF743
fooflboot=run foofl1 foofl2

Environment size: 1895/65532 bytes

LS-Pro v1

U-Boot 1.1.1 (Jun 12 2006 - 10:32:00) Marvell version: 1.10.8 Stock Buffalo U-boot
baudrate=115200
loads_echo=0
ipaddr=192.168.11.150
rootpath=/nfs/arm
cpuName=926
CASset=min
MALLOC_len=4
bootargs_end=:::DB88FXX81:eth0:none
ethact=egiga0
ethaddr=00:16:01:41:8E:33
buffalo_minor_ver=BOOT_MINOR_VER=1.00
ethprime=egiga0
usb0Mode=host
usb1Mode=host
bootargs=console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M panic=5 BOOTVER=1.10
serverip=192.168.11.1
buffalo_ver=BOOTVER=1.01
build_time=10:35:38
initrd=initrd.buffalo
kernel=uImage.buffalo
bootargs_base=console=ttyS0,115200
bootargs_root=root=/dev/sda2 rw initrd=0x00800040,15M panic=5
def_tftp=tftp 0x00100000 $(kernel);tftp 0x00800000 $(initrd);setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver);bootm 0x00100000 0x00800000
stdin=serial
stdout=serial
stderr=serial
enaMonExt=no
enaFlashBuf=yes
enaCpuStream=no
bootdelay=3
disaMvPnp=no
overEthAddr=no
force_tftp=1
bootcmd=tftp 0x00100000 $(kernel);tftp 0x00800000 $(initrd);setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver);bootm 0x00100000 0x00800000

Environment size: 1010/4092 bytes

LS-Pro v2

U-Boot 1.1.1 (Apr 18 2007 - 18:35:44) Marvell version: 1.12.1 - TINY
bootargs=$(bootargs_base) $(bootargs_root)
baudrate=115200
loads_echo=0
rootpath=/nfs/arm
cpuName=926
CASset=min
MALLOC_len=4
bootargs_end=:::DB88FXX81:eth0:none
ethact=egiga0
ethaddr=00:16:01:41:4E:2B
filesize=40000
fileaddr=100000
ipaddr=192.168.11.150
serverip=192.168.11.1
stdin=serial
stdout=serial
stderr=serial
enaMonExt=no
enaFlashBuf=yes
enaCpuStream=no
ethprime=egiga0
buffalo_ver=BOOTVER=1.10
buffalo_minor_ver=BOOT_MINOR_VER=1.00
build_time=18:35:39
initrd=initrd.buffalo
kernel=uImage.buffalo
bootargs_base=console=ttyS0,115200
bootargs_root=root=/dev/sda2 rw initrd=0x00800040,15M panic=5
def_tftp=tftp 0x00100000 $(kernel);tftp 0x00800000 $(initrd);setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver) tftpboot=yes;bootm 0x00100000 0x00800000
bootdelay=3
disaMvPnp=no
overEthAddr=no
usb0Mode=host
usb1Mode=host
force_tftp=1
bootcmd=tftp 0x00100000 $(kernel);tftp 0x00800000 $(initrd);setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver) tftpboot=yes;bootm 0x00100000 0x00800000

Environment size: 1019/4092 bytes

KuroPro

U-Boot 1.1.1 (Apr 10 2007 - 18:10:08) Marvell version: 1.12.1 - TINY
baudrate=115200                                                                 
loads_echo=0                                                                    
ipaddr=192.168.11.150                                                           
serverip=192.168.11.1                                                           
rootpath=/nfs/arm                                                               
cpuName=926                                                                     
CASset=min                                                                      
MALLOC_len=4                                                                    
bootargs_end=:::DB88FXX81:eth0:none                                             
ethact=egiga0                                                                   
buffalo_ver=BOOTVER=1.091                                                       
build_time=18:10:02                                                             
initrd=initrd.buffalo                                                           
kernel=uImage.buffalo                                                           
bootargs_base=console=ttyS0,115200                                              
bootargs_root=root=/dev/mtdblock2 rw panic=5                                    
bootargs=$(bootargs_base) $(bootargs_root) $(buffalo_ver)                       
nand_uImage_offset=20000                                                        
default_kernel_addr=0x00100000                                                  
default_initrd_addr=0x02000000                                                  
bootcmd=nboot $(default_kernel_addr)  0 $(nand_uImage_offset) ;setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver); bootm $(default_kernel_addr)                                                                                    
def_tftp=tftp $(default_kernel_addr) $(kernel); tftp $(default_initrd_addr) $(initrd); setenv bootargs $(bootargs_base) $(bootargs_root)  rw initrd=0x02000040,20M panic=5 $(buffalo_ver); bootm $(default_kernel_addr) $(default_initrd_addr)   
nand_boot=yes                                                                  
ethaddr=00:16:01:A4:E5:5A                                                       
stdin=serial                                                                    
stdout=serial                                                                   
stderr=serial                                                                   
enaMonExt=no                                                                    
enaFlashBuf=yes                                                                 
enaCpuStream=no                                                                 
ethprime=egiga0                                                                 
bootdelay=3                                                                     
disaMvPnp=no                                                                    
overEthAddr=no                                                                  
usb0Mode=host                                                                   
usb1Mode=host

Environment size: 1099/4092 bytes


Custom UBoot Builds

UBoot build from buff109 GPL sources

U-Boot 1.1.1 (Feb 27 2008 - 22:04:35) D_G's BuffNASCentral Marvell version: 1.12.1 - TINY

bootargs=$(bootargs_base) $(bootargs_root)
baudrate=115200
loads_echo=0
rootpath=/nfs/arm
cpuName=926
CASset=min
MALLOC_len=4
bootargs_end=:::DB88FXX81:eth0:none
ethact=egiga0
ethaddr=00:16:01:41:4E:2B
buffalo_minor_ver=BOOT_MINOR_VER=1.00
filesize=3c010
fileaddr=100000
ipaddr=192.168.11.150
serverip=192.168.11.149
buffalo_ver=BOOTVER=1.09
build_time=22:04:27
initrd=initrd.buffalo
kernel=uImage.buffalo
bootargs_base=console=ttyS0,115200
bootargs_root=root=/dev/sda2 rw initrd=0x00800040,15M panic=5
def_tftp=tftp 0x00100000 $(kernel);tftp 0x00800000 $(initrd);setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver) tftpboot=yes;bootm 0x0010000
stdin=serial                                
stdout=serial                               
stderr=serial                               
enaMonExt=no
enaFlashBuf=yes
enaCpuStream=no
ethprime=egiga0
bootdelay=3
disaMvPnp=no
overEthAddr=no
usb0Mode=host
usb1Mode=host
force_tftp=1
bootcmd=tftp 0x00100000 $(kernel);tftp 0x00800000 $(initrd);setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver) tftpboot=yes;bootm 0x00100000

Environment size: 1130/4092 bytes


Restoring Default Values to U-Boot Env Vars

Use at your own risk. Erasing in U-Boot can be potentially disasterous. Make sure you research your board before proceeding. The values shown below are for a custom build of UBoot for an LSPro. If you want to restore the values that were specified at build time for UBoot, you can do it by:

  • research (in UBoot sources, see the include/configs/<boardname-or-linkstation-name>.h) to see where the environment variables are and the size of the sector(s) for them, then compute the begin and the end, as in feroceon.h :
#define CFG_ENV_ADDR    			0xfffff000
#define CFG_ENV_SIZE			        0x1000	         
#define CFG_ENV_SECT_SIZE			0x1000
  • compute the begin and end
begin = fffff000
end = begin + 1000 = ffffffff
  • unprotect, erase and protect
=> protect off fffff000 ffffffff                                                
Un-Protected 1 sectors                                                          
=> erase fffff000 ffffffff                                                                                                                                   
Erased 1 sectors                                                                
=> protect on fffff000 ffffffff                                                 
Protected 1 sectors