Welcome! Log In Create A New Profile

Advanced

HowTo: OpenWrt on Kirkwood boxes

Posted by chessplayer 
Re: HowTo: OpenWrt on Kirkwood boxes
June 11, 2022 07:20PM
This is my existing E02 env
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
set_bootargs_lede=
bootcmd_lede=

Comparing the new envs
fw_setenv mtdparts 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)'
fw_setenv partition 'nand0,0'
fw_setenv set_bootargs_lede 'setenv bootargs console=ttyS0,115200 $mtdparts'
fw_setenv bootcmd_lede 'run set_bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000'

Do I have to change the two mtdparts & partition?

Has anyone tried Pogoplug V4?
If yes, are they the same steps?

Thanks
Re: HowTo: OpenWrt on Kirkwood boxes
June 11, 2022 08:11PM
happydiy,

> Comparing the new envs
> fw_setenv mtdparts
> 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)'
> fw_setenv partition 'nand0,0'
> fw_setenv set_bootargs_lede 'setenv bootargs
> console=ttyS0,115200 $mtdparts'
> fw_setenv bootcmd_lede 'run set_bootargs_lede; ubi
> part ubi; ubi read 0x800000 kernel; bootm
> 0x800000'
>
> Do I have to change the two mtdparts & partition?

Yes, it is required to reformat the mtd1. For Pogo E02 it is the same mtd0 definition (1MB ) so it is OK. Use the exisiting Pogo E02 u-boot that you have.

> Has anyone tried Pogoplug V4?
> If yes, are they the same steps?

However, for the Pogo V4, mtd0 is 2MB so I need to check chessplayer's instruction to see if it is consistent. Don't try it yet.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: HowTo: OpenWrt on Kirkwood boxes
June 11, 2022 08:58PM
bodhi Wrote:
-------------------------------------------------------
> happydiy,
>
> > Comparing the new envs
> > fw_setenv mtdparts
> >
> 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)'
> > fw_setenv partition 'nand0,0'
> > fw_setenv set_bootargs_lede 'setenv bootargs
> > console=ttyS0,115200 $mtdparts'
> > fw_setenv bootcmd_lede 'run set_bootargs_lede;
> ubi
> > part ubi; ubi read 0x800000 kernel; bootm
> > 0x800000'
> >
> > Do I have to change the two mtdparts &
> partition?
>
> Yes, it is required to reformat the mtd1. For Pogo
> E02 it is the same mtd0 definition (1MB ) so it is
> OK. Use the exisiting Pogo E02 u-boot that you
> have.
>
> > Has anyone tried Pogoplug V4?
> > If yes, are they the same steps?
>
> However, for the Pogo V4, mtd0 is 2MB so
> I need to check chessplayer's
> instruction to see if it is consistent
.
> Don't try it yet.

Hi Bodhi,

To confirm, for E02, the following has to be the exact same

fw_setenv mtdparts 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)'
fw_setenv partition 'nand0,0'
fw_setenv set_bootargs_lede 'setenv bootargs console=ttyS0,115200 $mtdparts'
fw_setenv bootcmd_lede 'run set_bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000'
Re: HowTo: OpenWrt on Kirkwood boxes
June 11, 2022 10:11PM
happydiy,

> To confirm, for E02, the following has to be the
> exact same
>
> fw_setenv mtdparts
> 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)'
> fw_setenv partition 'nand0,0'
> fw_setenv set_bootargs_lede 'setenv bootargs
> console=ttyS0,115200 $mtdparts'
> fw_setenv bootcmd_lede 'run set_bootargs_lede; ubi
> part ubi; ubi read 0x800000 kernel; bootm
> 0x800000'

Correct.

And you'll need OpenWrt image for the Pogo E02. As mentioned in step2.

Quote

2. Download an OpenWrt/LEDE image

Next, we need the appropriate image. Start on the release page of OpenWrt and choose the one you like best and then navigate to
targets/kirkwood/generic
Then, download the uImage appropriate for your box. Rename it to uImage and place it in the root of a FAT32 formatted USD device.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: HowTo: OpenWrt on Kirkwood boxes
June 11, 2022 10:26PM
For Pogo V4 the following change should be done for the instruction in the 1st post.


Quote

1. Modify uBoot variables

First, we need to boot the box to debian, log in and then do the following:

fw_setenv mtdparts 'mtdparts=orion_nand:0x200000@0x0(u-boot),-@0x100000(ubi)'

This is needed for future u-boot upgrade. Since my released u-boot defines the mtd0 as 2MB (same as stock u-boot), best to use the same definition.

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



Edited 1 time(s). Last edit at 06/14/2022 04:35PM by bodhi.
Re: HowTo: OpenWrt on Kirkwood boxes
June 12, 2022 01:03PM
bodhi Wrote:
-------------------------------------------------------
> happydiy,
>
> > To confirm, for E02, the following has to be
> the
> > exact same
> >
> > fw_setenv mtdparts
> >
> 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)'
> > fw_setenv partition 'nand0,0'
> > fw_setenv set_bootargs_lede 'setenv bootargs
> > console=ttyS0,115200 $mtdparts'
> > fw_setenv bootcmd_lede 'run set_bootargs_lede;
> ubi
> > part ubi; ubi read 0x800000 kernel; bootm
> > 0x800000'
>
> Correct.
>
> And you'll need OpenWrt image for the Pogo E02. As
> mentioned in step2.
>
>
Quote

2. Download an OpenWrt/LEDE image
>
> Next, we need the appropriate image. Start on the
> release page of OpenWrt and choose the one you
> like best and then navigate to
> targets/kirkwood/generic
> Then, download the uImage appropriate for your
> box
. Rename it to uImage and place it in the
> root of a FAT32 formatted USD device.

Work perfect for Pogoplug E02 and Openwrt 21.02.3

Thanks Bodhi
Re: HowTo: OpenWrt on Kirkwood boxes
June 12, 2022 01:06PM
bodhi Wrote:
-------------------------------------------------------
> For Pogo V4 the following
> change
should be done for the instruction
> in the 1st post.
>
>
>
Quote

1. Modify uBoot variables
>
> First, we need to boot the box to debian, log in
> and then do the following:
>
> fw_setenv mtdparts
> 'mtdparts=orion_nand:0x200000@0x0(u-boot),-@0x100000(ubi)'
>
> This is needed for furture upgrade of u-boot.
> Since release my u-boot defines the mtd0 as 2MB
> (same as stock u-boot).


At step
sysupgrade openwrt-21.02.3-kirkwood-cloudengines_pogoplugv4-squashfs-sysupgrade.bin

Got the following error, somehow, messed up with Pogoplug E02 env setup

Sun Jun 12 17:49:29 UTC 2022 upgrade: Device cloudengines,pogoe02 not supported by this image
Sun Jun 12 17:49:29 UTC 2022 upgrade: Supported devices: cloudengines,pogoplugv4
Image check failed.

Would you please help to resolve this issue?

Thanks
Re: HowTo: OpenWrt on Kirkwood boxes
June 12, 2022 03:15PM
happydiy,


> Got the following error, somehow, messed up with
> Pogoplug E02 env setup
>
> Sun Jun 12 17:49:29 UTC 2022 upgrade: Device
> cloudengines,pogoe02 not supported by this image
> Sun Jun 12 17:49:29 UTC 2022 upgrade: Supported
> devices: cloudengines,pogoplugv4
> Image check failed.
>

Power up, interrupt serial console and

ver
printenv

And post the entire serial console log here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: HowTo: OpenWrt on Kirkwood boxes
June 12, 2022 03:56PM
bodhi Wrote:
-------------------------------------------------------
> happydiy,
>
>
> > Got the following error, somehow, messed up
> with
> > Pogoplug E02 env setup
> >
> > Sun Jun 12 17:49:29 UTC 2022 upgrade: Device
> > cloudengines,pogoe02 not supported by this
> image
> > Sun Jun 12 17:49:29 UTC 2022 upgrade: Supported
> > devices: cloudengines,pogoplugv4
> > Image check failed.
> >
>
> Power up, interrupt serial console and
>
>
> ver
> printenv
>
>
> And post the entire serial console log here.

ver

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:34:01 -0700)
Pogoplug V4
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28

printenv

arcNumber=2097
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_lede
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_lede=run set_bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 10
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb
ethact=egiga0
ethaddr=00:25:31:05:24:99
if_netconsole=ping $serverip
ipaddr=192.168.1.11
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=0x2c00000
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
machid=0x831
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x200000@0x0(u-boot),-@0x100000(ubi)
ncip=192.168.1.177
partition=nand0,0
preboot=run if_netconsole start_netconsole
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
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.177
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
set_bootargs_lede=setenv bootargs console=ttyS0,115200 $mtdparts
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

======
moderator edit: please use code tags (Formated code button) to post log.



Edited 1 time(s). Last edit at 06/12/2022 04:01PM by bodhi.
Re: HowTo: OpenWrt on Kirkwood boxes
June 12, 2022 04:07PM
Everything looks OK for Debian, but perhaps OpenWrt still relies on archNumber.

Interupt serial/net console at count down, and

setenv arcNumber 3960
setenv machid f78

And continue installation. If it works, I'll need to revise the u-boot installation instruction to remind users of this.

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



Edited 1 time(s). Last edit at 06/12/2022 04:09PM by bodhi.
Re: HowTo: OpenWrt on Kirkwood boxes
June 12, 2022 04:14PM
This is also suspected. Will get to that if the setenv's did not work.

Sun Jun 12 17:49:29 UTC 2022 upgrade: Device cloudengines,pogoe02 not supported by this image

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: HowTo: OpenWrt on Kirkwood boxes
June 12, 2022 04:50PM
bodhi Wrote:
-------------------------------------------------------
> This is also suspected. Will get to that if the
> setenv's did not work.
>
>
> Sun Jun 12 17:49:29 UTC 2022 upgrade: Device
> cloudengines,pogoe02 not supported by this image
>

Sorry, false alert!
I made a mistake, lol, after I installed Openwrt on Pogoplug E02, I continued to install Openwrt on Pogoploug V4, but I re-used the same uImage from E02!

After I realized and used correct V4 uImage, everything goes well according your instruction for V4
fw_setenv mtdparts 'mtdparts=orion_nand:0x200000@0x0(u-boot),-@0x100000(ubi)'

Thanks Bodhi!



Edited 1 time(s). Last edit at 06/12/2022 04:51PM by happydiy.
Re: HowTo: OpenWrt on Kirkwood boxes
June 12, 2022 06:05PM
OK cool!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: HowTo: OpenWrt on Kirkwood boxes
July 29, 2022 10:46PM
I've made this a sticky thread so people can find it easier.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: HowTo: OpenWrt on Kirkwood boxes
August 10, 2022 06:33PM
FYI,

I've tried reinstalling OpenWrt today on my NSA310S and having quite a bit of problem. Perhaps something has changed in sysupgrade process.

Update:

This image works

https://downloads.openwrt.org/releases/22.03.0-rc6/targets/kirkwood/generic/openwrt-22.03.0-rc6-kirkwood-zyxel_nsa310s-squashfs-sysupgrade.bin

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



Edited 1 time(s). Last edit at 08/10/2022 06:57PM by bodhi.
andy_help
Re: HowTo: OpenWrt on Kirkwood boxes
August 27, 2022 04:30AM
Hello i flash u-boot and the ubi image to the nand, but openwrt didnt start.
What is the correct u-boot variable mtdparts?

I have use the tutorial on this site to create a ubi image file.
Re: HowTo: OpenWrt on Kirkwood boxes
August 27, 2022 06:43PM
andy_help,

Please post the log of how you install, and also the serial boot log. I might be able to see some step missing.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: HowTo: OpenWrt on Kirkwood boxes
September 10, 2022 08:39AM
happydiy Wrote:
-------------------------------------------------------
> pm4888 Wrote:
> -------------------------------------------------------
> > Just want to add that OpenWrt 21.02 works on
> E02
> > just follow the top post.
> >
> > Thanks a lot.
>
> Do you mean the first post from chessplayer / How
> to install OpenWrt on Kirkwood boxes & just use
> the image from latest 21.02.3 or do you upgrade
> from openwrt version 19 or 18?

No it was not upgrade from 18/19 to 21. It was archlinux to openwrt in NAND. USB HDD is debian.



Edited 1 time(s). Last edit at 09/10/2022 08:40AM by pm4888.
Re: HowTo: OpenWrt on Kirkwood boxes
January 05, 2024 06:35PM
Greetings, installing rescue system on Pink Pogoplug E02 and am getting errors right out of the gate.
Ran command:
fw_printenv mtdparts

Got this error:
## Error: "mtdparts" not defined
Any help appreciated.
Re: HowTo: OpenWrt on Kirkwood boxes
January 05, 2024 06:45PM
bowent@encorecsl.com Wrote:
-------------------------------------------------------
> Greetings, installing rescue system on Pink
> Pogoplug E02 and am getting errors right out of
> the gate.
> Ran command:
> fw_printenv mtdparts
>
>
> Got this error:
> ## Error: "mtdparts" not defined
>
> Any help appreciated.

mtdparts is defined in U-Boot, so that indicates it has not been set. Please provide the entire output of the fw_printenv command.
Re: HowTo: OpenWrt on Kirkwood boxes
January 05, 2024 09:31PM
> it has not been set. Please provide the entire
> output of the fw_printenv command.

+1

And @bowent, when asking question please show context like this

Quote

1. Modify uBoot variables

First, we need to boot the box to debian and log in. Then, we perform some checks and add to the environment.

1.a Check mtdparts definition

fw_printenv mtdparts

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: HowTo: OpenWrt on Kirkwood boxes
January 16, 2024 01:59AM
Closing this as I think I've started it in the wrong place.
Before continuing into the technical (of how to do this) I'd like to verify what I am trying to accomplish regarding a rescue system.
I'll start a new topic Under "Rescue System".
Sorry for the confusion.
Author:

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: