New IT forum
27 June 2022, 12:25:33 pm *
Welcome, %1$s. Please login or register.

: MiraBox now in stock.
 
Pages: [1]

Author Topic: u-boot environment restoring not working..  (Read 4601 times)

elvis61

  • Newbie
  • *
  • Posts: 13
u-boot environment restoring not working..
« on: 02 November 2013, 02:57:15 pm »

hi together,

i saved u-boot-env with openocd as following

> nand dump 0 she-nand-env-1.img 0xA0000 0x1000 # editing this file showed me that it is ok

now i try restore it with

> nand write 0 she-nand-env-1.img 0x60000 # new address area for newer u-boot which i flashed

i get allways error message

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                                                                 
*** Warning - readenv() failed, using default environment

what is wrong..

suggestions are welcomed

regards
Logged

apemberton

  • Full Member
  • ***
  • Posts: 187
Re: u-boot environment restoring not working..
« Reply #1 on: 03 November 2013, 12:14:33 pm »

Whilst I don't see what is wrong with your procedures, since you are able to access u-boot, wouldn't it be possible to view the environment file, which you are able to view, on another machine and copy and paste the values into u-boot using setenv (or editenv) then save the resulting environment using saveenv?

Just for info, I think I am using the same u-boot on a couple of my e-Sata Sheevaplugs and my settings are:-

Code: [Select]
[email protected]:/# cat /etc/fw_env.config
# For standard Sheevaplug
#/dev/mtd0               0xa0000         0x20000         0x20000

# For eSata Sheevaplug
/dev/mtd0               0x60000         0x20000         0x20000

#
#/dev/mtd0        0x40000    0x20000       0x20000
[email protected]:/# fw_printenv
arcNumber=2678
bootcmd=run x_bootcmd_sata; run x_bootcmd_usb; setenv machid 831; run x_bootcmd_mmc; run x_bootcmd_nand; dhcp
ethact=egiga0
ethaddr=00:50:43:01:4a:c0
ideload=ide reset; ext2load ide 1 0x800000 /uImage
machid=a76
mainlineLinux=yes
mmcload=mmc init; ext2load mmc 0:1 0x800000 /uImage
nandload=nand read 0x800000 0x100000 0x400000
stderr=serial
stdin=serial
stdout=serial
usbload=usb reset; fatload usb 0:1 0x800000 /uImage
x_bootargs_console=console=ttyS0,115200; [email protected]$serverip
x_bootargs_mmc=root=/dev/mmcblk0p2 rootdelay=5
x_bootargs_nand=mtdparts=orion_nand:[email protected](uImage),[email protected](rootfs) rw rootfstype=jffs2 rw root=/dev/mtdblock1 rw
x_bootargs_sata=root=/dev/sda2 rw rootwait
x_bootargs_usb=root=/dev/sdb1 rw rootdelay=5
x_bootcmd_mmc=setenv bootargs $(x_bootargs_console) $(x_bootargs_mmc); printenv; run mmcload; bootm 0x800000
x_bootcmd_nand=setenv bootargs $(x_bootargs_console) $(x_bootargs_nand); printenv; run nandload; bootm 0x800000
x_bootcmd_sata=ide reset; setenv bootargs $(x_bootargs_console) $(x_bootargs_sata); printenv; run ideload; bootm 0x800000
x_bootcmd_usb=setenv bootargs $(x_bootargs_console) $(x_bootargs_usb); printenv; run usbload; bootm 0x800000
serverip=192.168.2.240
ipaddr=192.168.2.248
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole


GLUB
Logged
Tony Pemberton

elvis61

  • Newbie
  • *
  • Posts: 13
Re: u-boot environment restoring not working..
« Reply #2 on: 04 November 2013, 07:23:12 pm »

sure i can set all my enviroments using copy and paste and save them using saveenv. no problem.
but
1. it works quickly if restoring works.
2. i checked the address area where i wrote she-nand-env-1.img back.
   it stands there. but u-boot thinks it is wrong and doesn't take it.
3. i will learn it.

best regards
Logged
Pages: [1]
 
 

Powered by MySQL Powered by PHP SMF 2.0.10 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!