• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Environment Variables  (Read 2770 times)
mookiedog
Newbie
*

Karma: 5
Posts: 25


View Profile
« on: March 03, 2012, 12:52:26 PM »

Can someone help me here:  I am interested in getting the output of a 'printenv' command for a totally stock late-model sheevaplug.  As part of the debian install, I overwrote some of the uboot environment variables.  Debian is OK, but I can't boot from the NAND anymore, and I can't figure out what I need to change back to boot from the NAND.
Logged

odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« Reply #1 on: March 04, 2012, 08:27:47 AM »

I think the Wiki@http://plugcomputer.org/plugwiki/index.php/Factory_Default_u-Boot_Environment has a copy of a "default" config
Logged

mookiedog
Newbie
*

Karma: 5
Posts: 25


View Profile
« Reply #2 on: March 04, 2012, 11:23:47 PM »

I saw that, but it seems that there are a lot of differences between plugs.  I'll post the differences between my two plugs at some point soon.  My new plug (the one that I need help with) has way less environment variables than the old one, and doesn't seem to need them either.
Logged

Ringding
Newbie
*

Karma: 0
Posts: 5


View Profile
« Reply #3 on: June 15, 2012, 05:30:01 AM »

Yesterday I found out that, when you overwrite the block that stores the environment variables with garbage, the defaults get restored. For me, that's a block of size 0x20000 starting at 0xa0000.
Logged

joeyboy
Newbie
*

Karma: 0
Posts: 3


View Profile
« Reply #4 on: December 20, 2012, 11:18:18 PM »

So when you write garbage, what defaults does UBOOT reload?  The article makes a distinction between u-boot default and u-boot factory default.
http://www.plugcomputer.org/Documentation/howtos/factory-default-u-boot-environment/

I just got a used 0802 Dreamplug and want to find out what the previous owner might have changed.
Logged

bnborg
Newbie
*

Karma: 0
Posts: 31


View Profile
« Reply #5 on: December 28, 2012, 02:03:26 PM »

There seem to be a lot of differences in the different plug types and versions of U-Boot.

On my SheevaPlug with U-Boot 2011.06 (Jul 03 2011 - 02:54:01), there is an "env" command:
Code:
Marvell>> ? env
env - environment handling commands

Usage:
env default -f - reset default environment
env edit name - edit environment variable
env export [-t | -b | -c] addr [size] - export environment
env import [-d] [-t | -b | -c] addr [size] - import environment
env print [name ...] - print environment
env run var [...] - run commands in an environment variable
env save - save environment
env set [-f] name [arg ...]

Marvell>>
I tried using it when I was getting some wierd behavior.I am sorry I didn't keep a copy of it.But one thing I have always wondered was what all those "x_bootargs*" and "x_bootcmd*" settings were for.  I didn't get an answer but I noticed that they were all re-created.

Now, I cannot boot the onboard nand.  So I missed something in my boot sequence.  Uimage and uinitrd seem to load and verify ok but it hangs on booting the kernel.

But the good news is that my new Debian testing version on an SD seems to work fine so far:
This is Debian 7.0, "Wheezy", "Linux debian 3.2.0-4-kirkwood #1 Debian 3.2.35-2 armv5tel GNU/Linux".

Logged

PlugBoy
Newbie
*

Karma: 0
Posts: 2


View Profile
« Reply #6 on: March 14, 2013, 11:22:53 AM »

Here is my dump:

Code:
baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
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;
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethact=egiga0
ethaddr=F0:AD:4E:00:F4:1B
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
ipaddr=192.168.0.99
serverip=192.168.0.17

Environment size: 1334/131068 bytes

Logged

Pages: [1]
Print
Jump to: