Welcome! Log In Create A New Profile

Advanced

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

Posted by bodhi 
Hi bodhi,

my 2nd dockstar seems not working by following the way to fix 1st one. I tried to change the env by following what I did from the 1st one still not working. This is what I got from serial cable.

DockStar> printenv
arcNumber=2998
baudrate=115200
bootcmd=run bootcmd_uenv; run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; reset
bootcmd_mmc=run mmc_init; run set_bootargs_mmc; run mmc_boot
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot;
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:3A:D2
if_netconsole=ping $serverip
ipaddr=192.168.2.113
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mmc_boot=mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_init=mmc rescan
mmc_load_uimage=ext2load mmc $device 0x800000 /boot/uImage
mmc_load_uinitrd=ext2load mmc $device 0x1100000 /boot/uInitrd
mmc_root=/dev/mmcblk0p1
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
preboot=run if_netconsole start_netconsole
preboot_nc=run if_netconsole start_netconsole
rootdelay=10
rootfstype=ext3
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
serverip=192.168.2.106
set_bootargs_mmc=setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_import=echo importing envs ...; env import -t 0x810000
uenv_load=usb start; mmc rescan; ide reset; setenv uenv_loaded 0; for devtype in usb mmc ide; 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 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_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: 2857/131068 bytes



Edited 1 time(s). Last edit at 02/12/2015 11:38PM by codier.
It keep doing the following. I got it from nc

USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Unknown command 'mmc' - try 'help'
Unknown command 'ide' - try 'help'

no USB devices available
Unknown command 'mmc' - try 'help'
Unknown command 'ide' - try 'help'
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
** Bad device usb 0 **
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Unknown command 'mmc' - try 'help'
** Bad device mmc 0 **
** Bad device mmc 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Unknown command 'ide' - try 'help'
** Bad device ide 0 **
** Bad device ide 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
resetting ...
codier,

scanning usb for storage devices... 0 Storage Device(s) found

This means your USB was not detected. Try plug it in the port in the back, right next to the Ethernet port. Power up.

OTOH, if you intended to boot rescue system without the USB attached, then your envs are not set up for that.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
bodhi Wrote:
-------------------------------------------------------
> codier,
>
>
> scanning usb for storage devices... 0 Storage
> Device(s) found
>
>
> This means your USB was not detected. Try plug it
> in the port in the back, right next to the
> Ethernet port. Power up.
>
> OTOH, if you intended to boot rescue system
> without the USB attached, then your envs are not
> set up for that.

I intended to boot rescue system because I want to test it. I thought when USB attached then it boot from USB otherwise it will boot from rescue. Isn't it?
codler
The env you posted doesn't look correct for a dockstar. Here's an example of a line from your posted env that doesn't appear in my dockstar uboot enviroment
bootcmd=run bootcmd_uenv; run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; reset
Also there are no rescue env lines in your uboot enviroment.
@laprjns,

It's because codier has flashed new u-boot and new default envs images. The original settings for the old u-boot can be used as is with the new u-boot, but the new defaults envs can also be flashed to start anew.

@codier,

Replicate what you did for the 1st Dockstar. You can compare the the 1st Dockstar envs and the 2nd one. Recall you have to add the rescue envs setting back after you flashed the default envs?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
laprjns Wrote:
-------------------------------------------------------
> codler
> The env you posted doesn't look correct for a
> dockstar. Here's an example of a line from your
> posted env that doesn't appear in my dockstar
> uboot enviroment
>
> bootcmd=run bootcmd_uenv; run bootcmd_usb; run
> bootcmd_mmc; run bootcmd_sata; reset
>
> Also there are no rescue env lines in your uboot
> enviroment.

Thanks for the info but didn't work. >_<
bodhi Wrote:
-------------------------------------------------------
> @laprjns,
>
> It's because codier has flashed new u-boot and new
> default envs images. The original settings for the
> old u-boot can be used as is with the new u-boot,
> but the new defaults envs can also be flashed to
> start anew.
>
> @codier,
>
> Replicate what you did for the 1st Dockstar. You
> can compare the the 1st Dockstar envs and the 2nd
> one. Recall you have to add the rescue envs
> setting back after you flashed the default envs?

Ahh. you are right. forgot that part. everything is working now. Thanks a lot bodhi



Edited 1 time(s). Last edit at 02/15/2015 09:40PM by codier.
Hello,

So i have successfully booted into debian on my NSA320S with lan and updated, now i need to figure out how to update uboot so it boots into debian instead if the ZyXel distro

Thanks
jochar Wrote:
-------------------------------------------------------
> Hello,
>
> So i have successfully booted into debian on my
> NSA320S with lan and updated, now i need to figure
> out how to update uboot so it boots into debian
> instead if the ZyXel distro
>
> Thanks

I have not been looked atthe difference between the 320 and 320s.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
bodhi Wrote:
> I have not been looked atthe difference between
> the 320 and 320s.

Anything i can help with?
Hey Bodhi (or someone else),

Have you changed the power button behaviour with the updated U-boot for NSA325? I'm pretty sure that before updating, I had to press the power button for a couple of seconds before the poweroff signal was sent. That would be the preferrable behaviour for me, instead of the instant poweroff signal. If you have changed it, is there any way to change the behaviour with an environment variable or something?

I'm not sure if the power button is handeled by U-boot or Linux though, but I guess it's u-boot.
Power button is handled as GPIO from Linux, uboot handles it a bit more abruptly
I have installed the latest release on one of my Pogoplug E02 devices, but it appears that I've hosed up the environment variables. I'm able to boot in Arch Linux, but Netconsole/Rescue isn't working. I'm wondering if I should go back to Jeff's old release and start over again. Here are the variables I have configured:

baudrate=115200
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mtdids=nand0=orion_nand
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
rootdelay=10
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
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
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
uenv_import=echo importing envs ...; env import -t 0x810000
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 test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
arcNumber=3542
machid=dd6
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
rootfstype=ext4
usb_rootfstype=ext4
ethaddr=00:25:31:00:34:19
ipaddr=192.168.123.80
bootcmd=run bootcmd_uenv; run bootcmd_usb; reset
devices=usb
uenv_init_devices=setenv init_usb "usb start"; for devtype in $devices; do run init_$devtype; done;
serverip=192.168.123.54
uenv_load=usb start; setenv uenv_loaded 0; for devtype in usb; do for disknum in 0; do run uenv_read_disk; done; done
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
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_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params

If you see an easy fix to these variables, I'll try it. Otherwise, would it be safe to flash back to Jeff's old u-boot and start over?
woody,

To avoid mistake that could lock out users, I've set netconsole to this default:

preboot_nc=run if_netconsole start_netconsole

To activate netconsole, set the preboot env in Arch:

fw_setenv preboot 'run preboot_nc'

Be careful doing this (copy and paste is best). Preboot is the first thing that runs, even before other boot envs are to take effect.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
So, can 'fw_setenv preboot 'run preboot_nc'' be called from a uEnv.txt file? Because I think that's working in my setup.
No it can't. Because uEnv.txt is processed after preboot.

I could set it up a little differently to allow that. But I need to document it very clearly, in another release of the default u-boot envs.

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



Edited 1 time(s). Last edit at 02/27/2015 03:09PM by bodhi.
OK, setting the preboot variable fixed it. I'm now able to use Netconsole and normal booting up to Arch Linux is working too. The only thing that does not appear to be working is that I'm not able to ssh into rescue, as I was able to do with the old u-boot/rescue. Is that function supposed to be working with this release? Is there something I need to do to enable it?
woody,

You need to restore your old rescue envs. The bold parts are missing.

For example:
bootcmd=run bootcmd_uenv; run bootcmd_usb; run rescue_bootcmd; reset

force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
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_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params

So look at your old log for u-boot envs settings, and reset the envs that are related to rescue system. The above in code are just what I can see missing from your current envs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Thanks much for your help!

I made the changes you recommended and it appears that I'm now booting into rescue, however, I don't see the Pogo getting an IP address and it does not allow me to ssh into the IP address that's set in the environment variable.

Here's what showed up in the boot log:
NAND read: device 0 offset 0x100000, size 0x400000
 4194304 bytes read: OK
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-2.6.22.18
   Created:      2010-10-19  23:05:02 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1979140 Bytes = 1.9 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK


Starting kernel ...

Seems like it booted up, but didn't get the network up and running.
It does not look like the rescue system. Perhaps it's an old version...

What is your envs

rescue_installed
force_rescue

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



Edited 1 time(s). Last edit at 02/27/2015 05:03PM by bodhi.
OK,

rescue_installed=1
force_rescue is not defined
woody,

Then it should work. The resuce system is a little old, but should be OK.

You can either:

- mount the rescue system rootfs in Arch and examine the rootfs content for /etc/network/interfaces, /lib/udev/rules.d/xx-persistent-net-rules, /etc/udev/rules.d/xxpersistent-net-xx for clues as why the network is not working.
- reinstall the Jeff or davygravy's rescue system (this is probably too drastic).
- install Arch rescue system (moonman has a new release for Arch now).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
I'll look at moonman's rescue system. Thanks much for all your help!

By the way, once I get this Pogo set up correctly, is there an easy way to clone the environment settings from one Pogo to a different one?
I got a good rescue system working by copying mtd1 and mtd2 partitions from another Pogo that had a working rescue system, so the new Pogo is all set.

Sorry if this is a dumb question, but can I safely clone the updated U-boot from my new Pogo to my older ones by using nandwrite to mtd0? Will this transfer the environment variables, also?
woody,

> Sorry if this is a dumb question, but can I safely
> clone the updated U-boot from my new Pogo to my
> older ones by using nandwrite to mtd0? Will this
> transfer the environment variables, also?

In fact, that's a really good question! because when you flash u-boot to mtd0, it only uses 512K, the remaining 512K is where the stock envs from old u-boot and new envs from new u-boot are. So yes, if you dump the entire mtd0 (1M) and write it back to the other Pogo, it will carry everything. You'll need to adjust the MAC address, IP addresses. And stock Pogo envs that are specific to that Pogo also needed to be restored if you wish to use Pogo OS (which I guess you don't care about).

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



Edited 1 time(s). Last edit at 02/28/2015 06:56PM by bodhi.
Zyxel Nsa325 & 320 users,

Here are the latest NSA325 and NSA320 U-Boot-2014.07 for testing before release. These u-boot images incorporated all of the latest features as in other Kirkwood u-boots in the first post.

Successful UART booting with serial console is required as a recovery path, since you're going to need to flash these to NAND. So please try these only if you have booted successfully with UART using these images or any previous version that I've uploaded for testing.

Download at Dropbox:

uboot.2014.07-tld-3.nsa325.bodhi.tar
md5:
5cf872a47d62d01d5a4a021d6f419cdd

uboot.2014.07-tld-3.nsa320.bodhi.tar
md5:
55b2423c02580afe9f265f4887067c87


References:
Small NSA325 UART u-boot
Previous NSA325 test u-boot
Previous NSA320 test u-boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
bodhi Wrote:
-------------------------------------------------------
> Zyxel Nsa325 & 320 users,
>
> Here are the latest NSA325 and NSA320
> U-Boot-2014.07 for testing before release. These
> u-boot images incorporated all of the latest
> features as in other Kirkwood u-boots in the first
> post.

Anybody have run this on NSA320? I'd like to have feedbacks before pushing out to GitHub. I've tested the NSA325 version, but I don't have the NSA320.

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

I come to you after a long time, but I did some tests with files you gave me there for almost a year.

So the "uboot.2014.01-tld-1.d2net_v2.mtd0.kwb" file does not work on my machine.

I can now do some tests that I want, can you make me a new file?

I have a dirrect access to the serial port and I have already tested a *.bin file that works but is outdated.

So for the moment I do not want a "flashable" file but a bin file that I could load into launch via TFTP.

Cordially.
Val532,

> So the "uboot.2014.01-tld-1.d2net_v2.mtd0.kwb"
> file does not work on my machine.

In what way that it did not work? does UART booting work at all on this box? or did you try tftp or ext2load?

> So for the moment I do not want a "flashable" file
> but a bin file that I could load into launch via
> TFTP.

Not a problem rebuilding it, but I'd like to know what did you see in trying the previous version.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Sorry, you can't reply to this topic. It has been closed.