Welcome! Log In Create A New Profile

Advanced

2016.05 U-Boot Kirkwood - GoFlexNet, GoFlexHome, PogoE02, Dockstar, iConnect, NetgearStora, PogoV4/Mobile, Sheevaplug, NSA325, NSA320, NSA310S, NSA320S, NSA310, HP T5325

Posted by bodhi 
Hello, bodhi!

I tried switching a Debian 8 installtion to systemd, using uEnv.txt
It works if I append 'init=/bin/systemd' to the set_bootargs variable in flash.
But setting by /boot/uEnv.txt doesn't have any effect.

My uEnv.txt:
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params init=/bin/systemd

My whole env:
root@debian:~# fw_printenv
arcNumber=3089
baudrate=115200
bootcmd=sleep 3; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_pogo; reset
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_pogo=run bootcmd_rescue
bootcmd_rescue=run set_bootargs_rescue; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3
bootdelay=10
bootdev=usb
bootfile=uImage-mtd1.img
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-goflexnet.dtb
ethact=egiga0
ethaddr=01:23:45:67:89:01
fileaddr=800000
filesize=ca0
if_netconsole=ping $serverip
ipaddr=192.168.1.40
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
nand_erasesize=20000
nand_oobsize=40
nand_writesize=800
nc_ready=1
ncip=192.168.1.35
partition=nand0,2
preboot=run preboot_nc
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
rescue_installed=1
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.1.35
set_bootargs_rescue=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts
sleep_period=3
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=nc
stdin=nc
stdout=nc
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  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 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15
bootargs=root=/dev/nfs nfsroot=192.168.1.35: ip=192.168.1.40:192.168.1.35:::::off
custom_params=usbcore.autosuspend=-1
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
root@debian:~#

Can you tell why it's ignoring uEnv.txt?
Thank you again! :)


PS:

I found it!

Sorry for bothering you.
I had to do following change:
fw_setenv bootcmd 'run bootcmd_uenv; sleep 3; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_pogo; reset'

'run bootcmd_uenv' most have gone lost, while trying to make that Transcend SSD working for boot (which never worked out, yet).



Edited 2 time(s). Last edit at 08/28/2016 01:35PM by ElMariachi.
My mtd
dev: size erasesize name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 02000000 00020000 "rootfs"
mtd3: 05b00000 00020000 "data"


Updated my PogoPlug E02 Uboot from
U-Boot 2014.07-tld-3 (Mar 31 2015 - 16:56:13)
to
U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:23:43 -0700)
Witch uboot file use to NSA320S? uboot.2016.05-tld-1.nsa320.bodhi.tar or uboot.2016.05-tld-1.nsa310s.bodhi.tar ?
when I execute flash_erase to erase mtd0
flash_erase /dev/mtd0 0 4

the output is
Erasing 128 Kibyte @ 60000 -- 100 % complete

Not
Erase Total 4 Units 
Performing Flash Erase of length 131072 at offset 0x60000 done

I don't know if it is normal, so I won't reboot the box.
SiliCAT Wrote:
-------------------------------------------------------
> when I execute flash_erase to erase mtd0
>
> flash_erase /dev/mtd0 0 4
>
>
> the output is
>
> Erasing 128 Kibyte @ 60000 -- 100 % complete
>
>
> Not
>
> Erase Total 4 Units 
> Performing Flash Erase of length 131072 at offset
> 0x60000 done
>
>
> I don't know if it is normal, so I won't reboot
> the box.

Different version of flash_erase is being used, and it seems to give misleading output. So it should be OK if you don't see any error.

As a precaution, list:

1. Which box is it
2. Output of
cat /proc/mtd

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Thank you, bodhi.
Now I will try to reboot the box.

The box is Pogoplug V4
The tools is from https://github.com/mibodhi/kirkwood/tree/kirkwood-2016-r1/tools
The output of
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 07f00000 00020000 "rootfs"
SiliCAT Wrote:
-------------------------------------------------------
> Thank you, bodhi.
> Now I will try to reboot the box.
>
> The box is Pogoplug V4
> The tools is from
> https://github.com/mibodhi/kirkwood/tree/kirkwood-
> 2016-r1/tools
> The output of
>
> dev:    size   erasesize  name
> mtd0: 00100000 00020000 "u-boot"
> mtd1: 07f00000 00020000 "rootfs"
>

Next time, please be sure you include more info such such as the log of the installation so far to point you have stopped and post questions.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Very appreciated for your help.
I see, Next time when I ask I will post more info.
Thanks again.
Hi, Bodhi.

I installed uboot using your guide but debian jessie works too slow for me. I decided to return to original firmware using environment from here:
http://www.openstora.com/wiki/index.php?title=Default_environment_of_U-Boot

U-Boot 2015.10-tld-1 (Nov 06 2015 - 16:06:22 -0800)
Netgear-MS2110

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB (ECC not enabled)
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
PHY reset timed out
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x100000, size 0x300000
 3145728 bytes read: OK
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-2.6.22.18-Netgear
   Created:      2010-06-13  23:54:53 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2788728 Bytes = 2.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux............................................................................................................................................................ done, booting the kernel.
And nothing happens.


Can I boot original FW using your U-Boot or I need to flash original mtd0.bin?
desmond Wrote:
-------------------------------------------------------
> Hi, Bodhi.
>
> I installed uboot using your guide but debian
> jessie works too slow for me. I decided to return
> to original firmware using environment from here:
> http://www.openstora.com/wiki/index.php?title=Defa
> ult_environment_of_U-Boot
>
>
> U-Boot 2015.10-tld-1 (Nov 06 2015 - 16:06:22
> -0800)
> Netgear-MS2110
> 
> SoC:   Kirkwood 88F6281_A1
> DRAM:  128 MiB (ECC not enabled)
> WARNING: Caches not enabled
> NAND:  256 MiB
> In:    serial
> Out:   serial
> Err:   serial
> Net:   egiga0
> PHY reset timed out
> 88E1116 Initialized on egiga0
> Hit any key to stop autoboot:  0
> 
> NAND read: device 0 offset 0x100000, size
> 0x300000
>  3145728 bytes read: OK
> ## Booting kernel from Legacy Image at 00800000
> ...
>    Image Name:   Linux-2.6.22.18-Netgear
>    Created:      2010-06-13  23:54:53 UTC
>    Image Type:   ARM Linux Kernel Image
> (uncompressed)
>    Data Size:    2788728 Bytes = 2.7 MiB
>    Load Address: 00008000
>    Entry Point:  00008000
>    Verifying Checksum ... OK
>    Loading Kernel Image ... OK
> 
> Starting kernel ...
> 
> Uncompressing
> Linux.............................................
> ..................................................
> ..................................................
> ........... done, booting the kernel.
>
> And nothing happens.
>
>
> Can I boot original FW using your U-Boot or I need
> to flash original mtd0.bin?

I have not looked into booting stock OS on this box. So dont know. Your best bet is restore mtd0 back to stock uboot.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
About step 10, setting netconsole on uboot.2016.05-tld-1.pogo_e02.bodhi.tar , it is not working on win7 (nothing shows in netconsole), old Jeff tutorial from http://forum.doozan.com/read.php?3,14 it is still working.
Did upgrade uboot from "2015.10 U-Boot".

Kernel used :linux-4.8.3-kirkwood-tld-1-bodhi.tar.bz2 (24 Oct 2016).



Edited 1 time(s). Last edit at 10/29/2016 02:20PM by jst818.
jst818 Wrote:
-------------------------------------------------------
> About step 10, setting netconsole on
> uboot.2016.05-tld-1.pogo_e02.bodhi.tar , it is not
> working on win7 (nothing shows in netconsole), old
> Jeff tutorial from
> http://forum.doozan.com/read.php?3,14 it is still
> working.
> Did upgrade uboot from "2015.10 U-Boot".
>
> Kernel used
> :linux-4.8.3-kirkwood-tld-1-bodhi.tar.bz2 (24 Oct
> 2016).

It is working on my Pogo E02 using another Linux box as netconsole server. What do you run on Win 7? perhaps a firewal problem.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 10/29/2016 04:25PM by bodhi.
http://www.rodneybeede.com/Compile_Netcat_on_Windows_using_MinGW.html

Not a firewal issue, because after i removed step 10 fw_setenv values from this topic and entered Jeffs one & rebooted is the same one netcat working.
jst818 Wrote:
-------------------------------------------------------
> http://www.rodneybeede.com/Compile_Netcat_on_Windo
> ws_using_MinGW.html
>
> Not a firewal issue, because after i removed step
> 10 fw_setenv values from this topic and entered
> Jeffs one & rebooted is the same one netcat
> working.

You might have a typo somewhere.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Hi, Bodhi!

I managed to restore my original uboot (and found my mtd0.bin is quite useless), but found one feature I'll miss.

After I flashed your environment variables, my Stora changed behavior on power loss. If I plugged power cable it started automaticaly.

Unfortunately, after I flashed part part of mtd0 with environment variables, Stora lost this feature.

Can I restore this behavior via some environment variables? Or I need something bigger and more low-level?
desmond,

> After I flashed your environment variables, my
> Stora changed behavior on power loss. If I plugged
> power cable it started automaticaly.
>
> Unfortunately, after I flashed part part of mtd0
> with environment variables, Stora lost this
> feature.
>
> Can I restore this behavior via some environment
> variables? Or I need something bigger and more
> low-level?

Usually, with the box that has Power button, it does not start right away until you press it. This is a normal behavior.

I'm not sure I understood, do you meant with stock u-boot, it does start right away, and now you are running my released u-boot it does not?

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
My Stora started to boot up without pressing power button right after I flashed you u-boot and environment variables from image.

I thought it's your magic :)

Some time ago (years ago) I tried to make stora boot on power restore following tutorial at openstora.com but with little success (my Stora was unable to shutdown and not boot up on power restore). Something with hwclock as I remember.

And then I flashed several u-boot images and stora powered on automatically. Still powers on with stock u-boot but several times not and I pressed power button.

It's really confusing.
desmond Wrote:
-------------------------------------------------------
> My Stora started to boot up without pressing power
> button right after I flashed you u-boot and
> environment variables from image.
>
> I thought it's your magic :)
>

Ah, that's not intentional :) perhaps some settings in that u-boot image caused this behavior.

It is really the correct behavior for not being able to do that automatically. For example, if you want to use WOL, then the box should not run when you plug in power. It would just sit there in a low power state, and then you can send a WOL from other box, or press the button.

> It's really confusing.

Sorry I can't tell you how to restore the auto power on without looking at the source code (no free time to do that). So perhaps using the button is not that bad? you have to turn on the power by hand anyway, so it's an extra push of the button.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Last post has been moved to its own thread.

Everybody, please post installation problems in a new thread. It'll be easier for me to help.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 12/07/2016 02:30PM by bodhi.
I have Pogo E02 and I installed the 2016.05 uboot / uboot environment, I also installed the davygravy's rescue system of 2.8.2 in the flash(mtd1 and mtd2). Debian on usb boots fine. However, if I remove the USB drive, the rescue system can't boot. If I hit enter, kick into uboot and "run bootcmd_rescue", rescue system boots fine. I think there's some error in the uboot environment. Could you guys help?



root@debian:~# fw_printenv
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
led_error=orange blinking
led_exit=green off
led_init=green blinking
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
load_dtb_addr=0x1c00000
load_initrd_addr=0x1100000
load_uimage_addr=0x800000
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start"; setenv scan_ide "ide reset"; setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start"; setenv init_ide "ide reset"; setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices; do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read; fi; else if $devtype part $disknum; then run uenv_read; fi; fi
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15
arcNumber=3542
machid=dd6
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
preboot=run preboot_nc
ipaddr=192.168.1.8
serverip=192.168.1.4
set_bootargs_rescue=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts
bootcmd_rescue=run set_bootargs_rescue; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
bootcmd_pogo=run bootcmd_rescue
rescue_installed=1
ethaddr=00:25:XX:XX:XX:XX


Thank you!
Never mind. Solved it myself.

fw_setenv bootcmd 'run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_rescue'


Just added run bootcmd_rescue to the boodcmd environment, so if everything fails, it will boot the rescue.
hello everybody!
I have 2 questions about this version of u-boot

1) installing this u-boot into a LG NAS N1T1 will I be able to boot the stock OS?
2)is compatible with Globalscale GuruPlug?
varma,

> 1) installing this u-boot into a LG NAS N1T1 will
> I be able to boot the stock OS?

No. The LG N1T1 and the Guruplug are not on the support list (see 1st post).

> 2)is compatible with Globalscale GuruPlug?

Possibly you can use the u-boot image for Sheevaplug to boot the Guruplug. It might work , but no guarantee.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Thank you very much again, bodhi

I tought it was a common file for all the Kirkwood platform...my mistake
varma Wrote:
-------------------------------------------------------
> Thank you very much again, bodhi
>
> I tought it was a common file for all the Kirkwood
> platform...my mistake

My pleasure! ... It does look that way because they are in the same SoC family. But each board must be built separately.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 01/26/2017 05:46AM by bodhi.
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: