Upgrade Pogoplug Mobile (or Series 4) from OpenWrt to LEDE

Guys, if you need OpenWRT you could try the same steps that I follow, see: Upgrade Pogoplug Mobile (or Series 4) from OpenWrt to LEDE

If you want LEDE too but you could wait there will be official support soon on next release, don't know how, but at least there is a PR on sources in order to have image ready soon. You can also ask to Alberto @bobafetthotmail to see if he could sumbit their image somewhere with steps on how to use it in order to try some of us on our devices too.

https://github.com/openwrt/openwrt/pull/592#issuecomment-355412631

yes, i followed https://forum.doozan.com/read.php?4,42279,42279 guide.

what does not make sense ?

you need serial console and latest uboot

The PR was merged, now there is official support for pogoplug v4 in LEDE/newOpenwrt. See the install instructions in the PR https://github.com/openwrt/openwrt/commit/c19f811c4d732f634ac18f33ae95e954ac9e8c81

The images are in the development snapshot now https://downloads.lede-project.org/snapshots/targets/kirkwood/generic/ (the usual limitations of the snapshot or OpenWRT trunk applies, there is no web interface by default and installing drivers will not work after a few days when the kernel was updated in the newer snapshot. It's better if you use the Image Builder to create a firmware with all packages you need already integrated)

It will work also for upgrading from older OpenWRT. Using stock uboot and second stage uboot is not supported, you will have to replace the uboot.

For those using other uboots, here is the LEDE/newOpenWRT uboot configuration, so you can adjust yours. It is possible to make your device boot first Debian or Arch or whatever from USB/Sata/SDcard and if that fails try to boot OpenWRT/LEDE from internal flash.
Just look at the current bootcommand, I chained first an USB boot for the recovery feature, and if that fails the uboot will do the boot from LEDE/OpenWRT.
You will just need to add your bootcommand's lines before mine and it will first try booting your stuff, then if it fails it will try the next, and eventually boot from onboard flash memory where LEDE/Openwrt is.

You need a uboot that supports nand and ubi commands, and to use the "recovery" feature it must support also usb commands (to load the image from USB). Bodhi's uboot supports these things already.

bootcommand=usb reset ; fatload usb 0:1 0x2000000 initramfs.bin bootm 0x2000000 ; setenv bootargs='' ; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
mtdparts=mtdparts=orion_nand:0x1c0000(uboot),0x40000(uboot_env),0x7e00000(ubi)
mtdids=nand0=orion_nand

@markbirss

tried to install as advised newest 2017.07 uboot by bodhi on unmodified Pogoplug v4, so went to forum for uboot howto installation and this does not make sense:
"Note: for boxes such as Pogo V4 and Zyxel NSA3xx, the mtd partition definition are kept the same as stock definition, therefore is different from the one above. "
Ok different but bodhi makes references to different partition layout and have no idea how to adapt his instructions:

https://forum.doozan.com/read.php?3,12381

@bobafetthotmail

thank you for trying to help but can you tell what PR is? Where is file u-boot.kwb?
I am now lost which uboot should I install? Bodhi or yours?
Ideally I am looking for simple, clear instructions like here:

https://archlinuxarm.org/platforms/armv5/pogoplug-series-4

I would like to install original LEDE firmware from here:

https://downloads.lede-project.org/releases/17.01.4/targets/kirkwood/generic/

On wiki they say to use Pogo E02 firmware on Pogo v4:

https://lede-project.org/toh/hwdata/pogoplug/pogoplug_pogoplugmobilev4

Is wiki correct?

My understanding I should install uboot 2017.07 by bodhi and this new uboot will let me flash LEDE firmware from USB stick. Is this correct?

A PR is a PullRequest on github, is a petition to merge new code into the main codebase.

here are some comments about this: Lede on Pogoplug Pro, Bad Magic Number

I think that is not necessary to upgrade uboot, just change uboot config to boot properly, it seems that there is a way to config uboot to point to a newer uboot and config that too... (seen on that forum thread), My notes worked perfectly for OpenWrt 15.05.1, and the @bobafetthotmail worked for him using LEDE 17.01.4, I've not tried yet because of lack of complete instructions to test, and I had no time these days for compile it by myself neither, also, I never compile, the first time I've tried it takes so long, so I always build my images using precompiled packages. So I think I will wait until a proper step by step guide on how to upgrade from OpenWrt 15 to Lede 17, or for a new OpenWrt 18...

Pull request. It is a way to contribute code to LEDE/OpenWRT. I contributed support for Pogoplug v4 and an uboot based on Bodhi's uboot source code.

It is in the "u-boot-pogoplugv4" under the "Supplementary files" table from here (snapshot download page)
https://downloads.lede-project.org/snapshots/targets/kirkwood/generic/

the LEDE/Openwrt one is already configured to boot LEDE/OpenWRT.

Bodhi's uboot is not configured to boot from internal flash memory but it can do so. You just need to change its text configuration, this can be done easily if you have serial console attached to the device.

I can help you with this, answer the questions I ask below so I know what device you have.

The first link should have shown my contribution to LEDE/OpenWRT (LEDE is now merged back and will be called OpenWRT again) where I have written install instructions https://github.com/openwrt/openwrt/commit/c19f811c4d732f634ac18f33ae95e954ac9e8c81 but currently the whole github site seems to be down.
EDIT: now it is back up again.

Wait and please answer my questions first as there are two versions of Pogoplug v4, see below.

That is the link for LEDE stable release. New devices are not added to an older LEDE stable release. Pogoplug v4 (the full featured one) will surely be in next stable release.

Yes, that's the Pogoplug v4 with less features.
The device I added is the Pogoplug v4 with full features, my one has a Sata slot (on top) and USB 3.0 ports on the back. This is its page https://lede-project.org/toh/hwdata/pogoplug/pogoplug_pogoplug_v4

Please tell me what device you have, does it have usb 2.0 ports (black) or 3.0 USB ports (blue) on the back? Sata port on top?

What you did to your device before I posted here? Did you already install bodhi's uboot or your device is still on stock uboot and firmware?

Do you have serial console attached?

If you answer these questions I can write down instructions you can follow to install LEDE in it.

Yes, bodhi's uboot will allow you to load and install from USB stick, but you must use serial console to tell it to do it.

1 Like

OK, what does

cat /proc/mtd

show?

@bobafetthotmail

>Please tell me what device you have, does it have usb 2.0 ports (black) or 3.0 USB ports (blue) on the back? Sata port on top?

I have POGO-V4-A1-01, one with blue logo on front, it has no SATA, no USB 3.0. It has only one USB 2.0 and one SD Card slot. Mine is called Pogoplug Mobile, you have newer version Pogoplug V4 with SATA. Sorry about confusion.

>What you did to your device before I posted here? Did you already install bodhi’s uboot or your device is still on stock uboot and firmware?
Do you have serial console attached?

My Pogoplug is still in factory condition it has 3.2 firmware installed, I taped serial cable to get SSH access but it fell off. Over weekend I will try to solder wires and reenable SSH. I believe my device is the same LWL user has:
https://forum.doozan.com/read.php?3,47594

except mine is on 3.2 firmware, it will not update to 3.4 as his did, probably because CloudEngines turned off its services.

Thanks again for your help, if you can write instructions for different device that is great otherwise please bear with me and I will report back on my progress.

my pogo v4 has the 2 usb 3 ports and sata

it this fully supported with your build ?

See this OpenWrt article for a full explanation...

@jwoods no this was meant for @terme to actually run and share the output

Now @terme will have a full explanation of MTD...:wink:

Yes, that is the device I have added support for.

1 Like

No, wanted to help terme, he must run the command and share output

@bobafetthotmail how to generate a imagebuilder?

@terme when I get home I'll answer you.

see the documentation here https://lede-project.org/docs/user-guide/imagebuilder

@bobafetthotmail ah i forgot you find it inside "make menuconfig" as option as i mostly just build images

1 Like

Ok, my uboot and firmware should run on that device too. The Pogoplug V4 are both using the same mainboard (with same processor/flash/ram/ethernet/SD card slot), on mine they soldered more components (USB 3.0 and Sata).
I think there is a tutorial to solder a Sata port on yours and you can probably figure out what must be done by just looking at a picture of a Pogoplug V4 with Sata port soldered, although imho it's not really worth it when for like 20$ you can get the Pogoplug v4 with usb 3.0 and sata port.

My Pogoplug is still in factory condition it has 3.2 firmware installed, I taped serial cable to get SSH access but it fell off. Over weekend I will try to solder wires and reenable SSH. I believe my device is the same LWL user has:
https://forum.doozan.com/read.php?3,47594

except mine is on 3.2 firmware, it will not update to 3.4 as his did, probably because
CloudEngines turned off its services.

Ok, thanks for the information.

Small correction. If you use cables soldered/taped to contacts you are using serial connection on serial pins on the board. SSH is terminal over ethernet/Wifi.

Serial connection allows you to communicate with bootloader while it is starting, and then with the device firmware, and it always works in this device. SSH will not work to communicate with bootloader, and will not work if there is no ethernet or wifi connection.

As said above, the device is pretty much the same, it just has less optional features.

You can safely use the Uboot from the LEDE/OpenWRT link I provided above, as for uboot bootloader there is no difference at all between the two devices, and that uboot is pre-configured for LEDE. Stock uboot cannot load LEDE so it must be changed.

I think you should be able to use the Pogoplug v4 firmware I added, and I think it is better to use that instead of using Pogoplug E02 one. The main problem is that it requires more manual setup and it is not guaranteed to work, because it relies on a second stage bootloader (stock uboot loads and executes LEDE uboot that loads and executes the actual LEDE/OpenWRT firmware). I quite frankly don't know how well this works with the up-to-date uboot we are using now.

For Pogoplug v4 there is only Snapshot firmware, not "stable" release firmware, for now.
Snapshot builds like the one from link above are more annoying to use. There is no web interface in the built image so you need to connect with SSH or serial to install it every time you do a firmware upgrade. Or at least it was like this. It seems the current snapshot firmware has luci preinstalled (which is great).

Also, you can only install packages related to hardware drivers shortly after you installed the main firmware. If you try later you will probably get a dependency error due to kernel version, and you will have to upgrade firmware to latest snapshot build first, then you can install packages related to hardware drivers.

When OpenWRT makes a new release (LEDE changed name and is now called OpenWRT again, any new release will be called OpenWRT) in a few months you can upgrade to a stable release firmware and be fine.

----INSTALLATION INSTRUCTIONS----

We will start by testing that the current LEDE Pogoplug v4 firmware is working fine on your device before doing any permanent modification.

When it's time to make the choice and actually do permanent changes, I'll write a warning.

It's better if you read all the instructions and ask any questions before starting.

Download from https://downloads.lede-project.org/snapshots/targets/kirkwood/generic/

the file called cloudengines_pogoplugv4-initramfs-uImage

and from https://downloads.lede-project.org/snapshots/targets/kirkwood/generic/u-boot-pogoplugv4/

download the file called u-boot.kwb

The stock bootloader cannot read from USB so we will use TFTP (transfer over local ethernet cable from your PC to the device) to send it the firmware we want to test, and if it works fine, we will use this later to transfer the new uboot we want to write.

You will need to set up a TFTP server on your PC first, see the tutorial here https://lede-project.org/docs/user-guide/tftpserver?s[]=tftp

When the TFTP server is running, you will need to set up your PC's ethernet port to static IP address, 169.254.254.254 as this is what the uboot expects as source.

Place the file called cloudengines_pogoplugv4-initramfs-uImage in the TFTP server folder, and rename it to test.bin

Connect the ethernet cable to the PC and the pogoplug ethernet port, connect the serial console to the PC, then power up the Pogoplug v4.

As soon as you see text on the serial start pressing random letter keys to stop the boot process.

If you see something like the following line you can proceed:

CE>>

Otherwise if text is still scrolling by you missed the opportunity, pull the power plug on the pogoplug and try again.

Now write the following to start transferring the firmware in some free RAM space in the pogoplug.

tftp 0x20000 test.bin

The uboot should show transfer progress and it will state that the transfer was successful.

Then we can boot this firmware we just transferred. The firmware we are using here is supposed to boot and run from RAM, it does not touch flash memory.

bootm 0x20000

You should see text from LEDE/OpenWRT firmware as it starts up. After it is done, press Enter and you should see the OpenWRT logo.

You can now test that your USB port works, and that the ethernet port works to connect to the internet, and see if the green led works too. It should be accessible over ssh too, not just the serial console.
It has a dynamic IP, so you can either use OpenWrt.lan instead of the IP in your ssh settings, or you can write ip a in the serial console and see what IP the device was assigned.

Now do the check for bad blocks as detailed below by the other guy by writing in console:

dmesg | grep -i ‘bad’

It will print something like this

[ 0.645561] Scanning device for bad blocks
[ 0.662441] Bad eraseblock 114 at 0x000000e40000
[ 0.747850] Bad eraseblock 839 at 0x0000068e0000

This information tells us what sectors of the internal flash memory are damaged. It's normal for some of them to be damaged in new devices.

The only blocks that must NOT show as bad are the first four blocks, so 0,1,2,3,4

For example if you get something like this

[ 0.645561] Scanning device for bad blocks
[ 0.662441] Bad eraseblock 1 at 0x00000002000

you have a bad block at 1 and you cannot proceed with flashing uboot.

bad blocks beyond the first 4 ones are not an issue as the LEDE firmware can deal with occasional bad blocks in onboard flash.

Could you also post all the text it shows when booting up so I can see it too and confirm that it is all right?

Remember that this firmware is not written permanently, so all your changes will be lost on reboot.

When you are done, pull the plug from the pogoplug v4 to power it off and erase its RAM to prepare for the next step. So far we have not changed its firmware, only done temporary tests. If you power it up again it will still be the same as before, stock uboot and stock firmware.

WARNING WARNING WARNING
Now we will do permanent changes to the device. If you have any doubts please ask now.
Would also be better to show me the text you saw on console first before you proceed.
You might want to make a backup of your device's current firmware, or not, since pogoplugs have a useless firmware anyway.
WARNING WARNING WARNING

Place the u-boot.kwb file in the TFTP server folder, connect serial and ethernet cable, and change the IP address of your PC ethernet port to 169.254.254.254 as we will use tftp again to send over the new uboot.

Power up again the pogoplug and press keys to stop the autostart.

Now write

printenv ethaddr

The uboot will write something like this:

ethaddr=00:50:43:00:02:02

This is the device's MAC address, also present in the sticker
under the device.

Write this down as we will need to add it in the
new uboot configuration.

Use the following commands to load the new uboot:

tftp 0x20000 u-boot.kwb

If the uboot confirms that the transfer was successful,
then you can write it to flash with the following commands:

nand erase 0 0x200000
nand write 0x20000 0 0x1c0000

if after the last command the uboot wrote
"xxxx bytes written: OK"
then it was written correctly and we can proceed.

If it did not go well, post here the output and DO NOT shut down or reboot the pogoplug.
Shutting down or rebooting at this time will brick the device.
It's possible to unbrick it with serial console, but you will need to use the kwboot tool from a Linux PC or Virtual Machine, which is annoying.

If the above worked and there was no error, write

reset

and press enter, the device will reboot and you should see again text scrolling by.
Press a random key to stop it, and now you should see

pogoplugv4>

We now add the MAC address back, write (with the address you saw before):

setenv ethaddr '00:50:43:00:02:02'

Confirm that the uboot has understood by writing

printenv ethaddr

If all looks ok, save the setting with

saveenv

At this point the uboot is installed and configured, and you will be able to use USB flash drive to load a new firmware.

Take the cloudengines_pogoplugv4-initramfs-uImage file and rename it to initramfs.bin, then place it in a USB flash drive formatted with FAT32 (most thumb drives less than 32GB are like that by default).

Insert the USB flash drive in the USB 2.0 port of the device, connect the ethernet cable to your router (so it can access the internet later), and power on the pogoplug.

At this point it should boot automatically from the USB drive, and again you will end in the same RAM firmware as before. Remove the USB drive as now it is not needed anymore.

To write this to the internal flash memory, you must do a normal sysupgrade (firmware upgrade)

So, if it was connected to the Internet, you can download the firmware upgrade package:

wget http://downloads.lede-project.org/snapshots/targets/kirkwood/generic/openwrt-kirkwood-cloudengines_pogoplugv4-squashfs-sysupgrade.bin

and then start the upgrade with

sysupgrade openwrt-kirkwood-cloudengines_pogoplugv4-squashfs-sysupgrade.bin

This will reformat the internal flash memory and write the firmware in the device, and then reboot.

On reboot it should start up correctly and will be again accessible over serial console or ssh at OpenWrt.lan or whatever is the IP it gets assigned from your router.

If you want to install luci web interface, you can install it now by writing
opkg update
opkg install luci

1 Like

Also just some words of caution before you do this as i found out last night

CHECK FOR BAD BLOCK first
CHECK FOR BAD USB first

If you have any bad block you will have issues with this procedure !!!

if you have bad blocks in the u-boot area flashing it via tftp it will cause issues

if you have bad block in the data or ubi area where lede will be installed the kernel wont boot with a checksum error (especially if you have written a boot image via tftp)
e.g
dmesg | grep -i 'bad'

root@LEDE:/# dmesg | grep -i 'bad'
[ 0.645561] Scanning device for bad blocks
[ 0.662441] Bad eraseblock 114 at 0x000000e40000
[ 0.747850] Bad eraseblock 839 at 0x0000068e0000

or

dmesg | grep "bad PEBs"
[ 2.281770] ubi0: good PEBs: 1014, bad PEBs: 2, corrupted PEBs: 0

If your USB reports as bad find one that does not it will not boot

I will try also bobafetthotmail suggested LEDE for the Pogo4 as i have the 1 with USB3 and SATA, im still running the E02 build as of now

but i have bad block in my data/ubi area and had to do a tftp flash and then also boot from usb and do sysupgrade

I bricked my Pogo4's with bad uboot flash but it can be recovered with kwboot (the notes say the E02 does not support it- i will still verify)

Here is a simple tftp server setup on ubuntu with dnsmasq:
sudo apt install dnsmasq
sudo dnsmasq -i eno1 --enable-tftp --tftp-root=/home/user/tftp/ -d -u user -p0 -K

and here was the kwboot recovery command:
http://forum.doozan.com/file.php?3,file=160,filename=kwboot-tool.tar.gz,download=1

wait a good whilte for it to actually work load then press any key to stop uboot
./kwboot -t -B 115200 /dev/ttyUSB0 -b ~/tftp/u-boot.kwb -p

Oh most helpful i also came across some notes and stuff by LoetZimmer
credits to him

some useful scripts to create ubi files,etc

https://loetzimmer.de/openwrt/
https://loetzimmer.de/openwrt/lede-make_ubifs.txt
https://loetzimmer.de/openwrt/lede-kirkwood-pogo_e02-root.ubifs.conf
https://loetzimmer.de/openwrt/lede-kirkwood-pogo_02-uboot_config.txt

1 Like