OpenWrt Forum Archive

Topic: Permantly modify u-boot environment

The content of this topic has been archived on 29 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

All,

I had to restore my TP-link 841ND v8 router firmware using a seria cable due to a wrong firmware upload I did when tried to move it to openwrt.

Everything was fine I was able to restore and install the openwrt sucessfully.

But I have one issue. Th bootcmd variable is point to tftp and everytime i reset the router, it stop there. To bring the router online, I need to use the "tpl" to stop the boot process and manually issue the command "bootm 0x9f0200".

My uboot does not have the saveenv command. In this case, how can I change the bootcmd and save it so every hardware rebbot, it will load the firmware on the right place?

Thx,

wow, how that happened?

I mean, was it stopping there before you flashed from serial?

I'd try to restore tplink firmware, then update to their lastest fw (should update uboot too).

Honestly I dont know if it was hapening before. I guess in somehow I modified the uboot when tried to update the fw.

I wil try this it and let you know.

Thx.

See the output of the setenv.

wasp> printenv
bootargs=console=ttyS0,115200 root=31:02 rootfstype=squashfs init=/sbin/init mtdparts=ath-nor0:128k(u-boot),1024k(kernel),2816k(rootfs),64k(config),64k(art)
bootdelay=1
baudrate=115200
ethaddr=0xba:0xbe:0xfa:0xce:0x08:0x41
ipaddr=192.168.1.111
serverip=192.168.1.100
dir=
bc=ap123
lu=tftp 0x81000000 ${dir}u-boot.bin&&erase 0x9f000000 +$filesize;cp.b $fileaddr 0x9f000000 $filesize
lf=tftp 0x81000000 ${dir}${bc}-squashfs&&erase 0x9f120000 +$filesize;cp.b $fileaddr 0x9f120000 $filesize
stdin=serial
stdout=serial
stderr=serial
ethact=eth1
bootcmd=tftpboot 80001000 vxWorks.bin; go 80001000

Environment size: 591/65532 bytes

nebbia88,
thanks for your help :-)  Just a matter of 2 fw restore. One without boot, followed by the one with boot.

Thx,

Do you have any problems while booting with original tp-link firmware ?
Try another openwrt image.


EDIT: My bootlog of 841n v8.4


wasp> printenv
bootargs=console=ttyS0,115200 root=31:02 rootfstype=squashfs init=/sbin/init mtdparts=ath-nor0:128k(u-boot),1024k(kernel),2816k(rootfs),64k(config),64k(art)
bootcmd=bootm 0x9f020000
bootdelay=1
baudrate=115200
ethaddr=0xba:0xbe:0xfa:0xce:0x08:0x41
ipaddr=192.168.1.111
serverip=192.168.1.100
dir=
bc=ap123
lu=tftp 0x81000000 ${dir}u-boot.bin&&erase 0x9f000000 +$filesize;cp.b $fileaddr 0x9f000000 $filesize
lf=tftp 0x81000000 ${dir}${bc}-squashfs&&erase 0x9f120000 +$filesize;cp.b $fileaddr 0x9f120000 $filesize
stdin=serial
stdout=serial
stderr=serial
ethact=eth0

Environment size: 565/65532 bytes

(Last edited by Experimentator on 28 Apr 2014, 15:54)

The discussion might have continued from here.