Welcome! Log In Create A New Profile

Advanced

Openwrt on Dockstar : new defaut environment variables

Posted by Ré 
Hi,
on my second Dockstar, i put the new Uboot (2015.10) and i would like to put Openwrt; Unfortunately, it starts searching a kernel image on usb device . i would like put OW on nand of dockstar, not on usb.
I suppose due to env variable (bootcmd). And so, i would like change this default variable to realize this installation :
https://wiki.openwrt.org/doc/howto/dockstar_sandbox
Is it possible ? and How ?
Thanks a lot

My environnement :

DockStar> printenv
arcNumber=2097
baudrate=115200
bootcmd=run bootcmd_uenv; run bootcmd_usb; reset
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
ethaddr=00:10:75:1A:6F:BA
filesize=2000000
led_error=orange blinking
led_exit=green off
led_init=green blinking
led_init=green off
mainlineLinux=yes
mtddevname=rootfs
mtddevnum=2
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
rescue_installed=1
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=/dev/mtdblock2 ro rootfstype=jffs2 $mtdparts $rescue_custom_params
rootdelay=10
rootfstype=ext2
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
stderr=serial
stdin=serial
stdout=serial
uenv_import=echo importing envs ...; env import -t 0x810000
uenv_load=usb start; setenv uenv_loaded 0; for devtype in usb; do for disknum in 0; do run uenv_read_disk; done; done
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x810000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if $devtype part $disknum; then run uenv_read; fi
usb_boot=mw 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=usb start
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=/dev/sda1

Environment size: 1826/131068 bytes
DockStar> version

U-Boot 2015.10-tld-1 (Nov 06 2015 - 15:56:21 -0800)
Seagate FreeAgent DockStar
gcc (Debian 4.9.2-10) 4.9.2
GNU ld (GNU Binutils for Debian) 2.25
DockStar>
Re: Openwrt on Dockstar : new defaut environment variables
January 01, 2016 07:03AM
Ré,

It is certainly possible. I'm on the road right now so I am not sure I have the u-boot env set to post. I'll see of I can find it.

Basically, the envs need to be the same as Jeff orginal u-boot installation. So if you keep the log when you install that u-boot, those can be used to boot openWRT.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Openwrt on Dockstar : new defaut environment variables
January 03, 2016 09:01AM
Re,

I'll post instruction so you can try before commiting them to Nand.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Openwrt on Dockstar : new defaut environment variables
January 04, 2016 02:46AM
Ré,

If you have run the openWrt installation per instruction on that page before installing new u-boot, then try this.

Power up, stop serial console and set these 2 envs one by one with setenv.
setenv pogo_bootcmd 'if fsload uboot-original-mtd0.kwb; then go 0x800200; fi'
setenv bootcmd 'run pogo_bootcmd; reset'

And then
boot

Pls post the entire serial console log here.

This might not work right away but I would like to see the behavior.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 01/04/2016 02:49AM by bodhi.
Re: Openwrt on Dockstar : new defaut environment variables
January 04, 2016 11:41AM
Ré,

This is more likely to work.

Power up, stop serial console and set these envs one by one with setenv, and then boot

setenv rescue_bootcmd 'if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi'
setenv rescue_set_bootargs 'setenv bootargs console=$console ubi.mtd=2 root=/dev/mtdblock2 ro rootfstype=jffs2 $mtdparts $rescue_custom_params'
setenv rescue_installed 1
setenv bootcmd 'run rescue_bootcmd; reset'
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: