New IT forum Follow us on Twitter
21 May 2012, 06:11:15 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: reset of uboot env vars  (Read 1024 times)
Justefluste
Newbie
*
Posts: 3


« on: 02 September 2011, 07:54:50 pm »

Hello there,

I'm stuck !
I've received my SheevaPlug (UBIFS with Squeeze on NAND) two weeks ago... and I think I've already screwed up my uboot env vars !!!
Everything went wrong since I used the "reset" command in uboot console... I think I understand my mistake now.


As a consequence, my plug doesn't boot anymore.
The boot sequence I can see is the following :


U-Boot 1.1.4 (Nov  4 2009 - 12:58:36) Marvell version: 3.4.23

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

Soc: 88F6281 A1 (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
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB
*** Warning - bad CRC or NAND, using default environment

Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0
egiga0 no link
Using egiga0 device
TFTP from server 10.4.50.5; our IP address is 10.4.50.165
Filename 'uImage'.
Load address: 0x2000000
Loading: T T T T T T T T T T
Retry count exceeded; starting again
## Booting image at 02000000 ...
Bad Magic Number
Unknown command '<NULL>' - try 'help'

So apparently the boot process can not launch the sytem on NAND and tries to access a TFTP server...
I'm almost sure that the sytem on NAND is not corrupted and stil works, but how can I get the proper uboot environnement vars back ? do I have to run the SheevaPlug Installer ?

Help is needed here !
Best regards,
Nico
Logged
Justefluste
Newbie
*
Posts: 3


« Reply #1 on: 02 September 2011, 07:56:35 pm »

For information, the printenv output as it is now

autoload=no
baudrate=115200
bootargs_end=:::DB88FXX81:eth0:none
bootargs_root=root=/dev/nfs rw
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root) root=/dev/nfs rw nfsroot=10.4.50.5:/mnt/ARM_FS/ ip=10.4.50.165:10.4.50.5:::DB88FXX81:eth0:none mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500 mv_phone_config=dev0:fxs,dev1:fxs
bootcmd=tftpboot 0x2000000 $(image_name); setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvNetConfig) $(mvPhoneConfig);  bootm 0x2000000;
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:f0:2a:2a
ethmtu=1500
ethprime=egiga0
image_name=uImage
ipaddr=10.4.50.165
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
nandEnvBase=a0000
netbsd_en=no
netmask=255.255.255.0
netretry=no
pcieTune=no
pexMode=RC
rcvrip=169.254.100.100
rootpath=/mnt/ARM_FS/
run_diag=yes
sata_dma_mode=yes
serverip=10.4.50.5
setL2CacheWT=yes
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/tdblock0 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
Logged
NewIT_James
Administrator
Sr. Member
*****
Posts: 394


« Reply #2 on: 02 September 2011, 08:30:09 pm »

Hi Justefluste ,

This post shows how the envvars should look.

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


NewITJames
Logged

NewITJames
Justefluste
Newbie
*
Posts: 3


« Reply #3 on: 03 September 2011, 05:22:38 pm »

Thanks a lot NewITJames !

I'm back in the game

Justefluste
Logged
leshkin
Newbie
*
Posts: 2


« Reply #4 on: 27 September 2011, 09:38:53 pm »

Hi there,

Sorry to hijack this thread, but I'm pretty much in the same boat after messing about with my Sheevaplug, but being completely new to uboot can't figure out how to get my config back to the one described in this post: http://www.newit.co.uk/forum/index.php/topic,194.0.html

I'm really after some pointers as far as how to define the variables correctly to match the correct multiboot config manually, without using the installer if possible.

I know now that I should have been recording my changes, but any help get me back on track would be well received.

leshkin
Logged
leshkin
Newbie
*
Posts: 2


« Reply #5 on: 05 October 2011, 09:48:25 pm »

So, for benefit of others:

Setting environment variables is done like the below (remove the equals sign and encase the value with ' '):
Code:
setenv arcNumber '2097'
setenv bootargs_root 'ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs'
setenv mtdpartitions 'mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs)'
setenv ethaddr 'f0:ad:4e:00:38:82'
setenv bootargs_console 'console=ttyS0,115200'
setenv bootargs_root_nand 'ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs'
setenv bootcmd_nand 'setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_root_nand); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000'
setenv bootargs_root_mmc 'root=/dev/mmcblk0p2 rootdelay=5'
setenv bootcmd_mmc 'setenv bootargs $(bootargs_console) $(bootargs_root_mmc); mmcinit; ext2load mmc 0:1 0x800000 /uImage; bootm 0x00800000'
setenv real_bootcmd 'run bootcmd_mmc; run bootcmd_nand'
setenv filesize '32D62A'
setenv bootcmd 'run bootcmd_mmc; run bootcmd_nand'
setenv mainlineLinux 'yes'

Compare the output of printenv for a proper config as listed in http://www.newit.co.uk/forum/index.php/topic,194.0.html

Remove variables that are not listed in that post by typing setenv <variable>, without defining any values.

Recover1, recover2, etc variables are not required if you are setting up uboot environment manually and have an SD card ready to go.

Hope this helps someone and they don't waste time trying to piece together the information form 20 different sources like I had to.

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!