Hi,
I bought a pogoplug pro on ebay recently and decided to install OpenWrt on it. I played around with it for a bit but quickly realised that the current release of OpenWrt does not expose the internal sata port and I also had problems using different wifi cards in the pcie slot. So I decided to look into updating uboot to bohdi's version as released on the forum here to be able to run Debian on it. This was a bit more difficult than expected so I'll outline the process below which may be useful to others. This has worked for me but everything you do is at your own risk so please read the whole post and only continue if you understand the process. Messing up your uboot install will probably result in a brick so you have been warned.
The starting point is a pogoplug pro with OpenWrt 19.07.2 installed, a working serial connection and a 64 bit linux machine / VM.
OpenWrt on the Pogoplug Pro uses the following layout of the mtd:
To be able to flash bohdi's uboot and environment to nand you will need write access to mtd0 and mtd1. Unfortunately OpenWrt has mtd0 and mtd1 set to 'read only' by default which means it is not possible to flash uboot from the default OpenWrt install. So the first thing you need to do is to build a custom OpenWrt image which does not set mtd0 and mtd1 to 'read only'.
The following guides give a good description how to build your own custom OpenWrt image:
https://openwrt.org/docs/guide-developer/quickstart-build-images
https://openwrt.org/docs/guide-user/additional-software/beginners-build-guide
Follow these guides to setup your 64 bit linux build system / VM, download the sources and checkout branch 19.07.2
One thing to remember is that a manual / custom build of OpenWrt does not allow you to download the different prebuilt packages due to difference in 'vermagic'. The following page gives a good description how to compile a custom version of OpenWrt which still allows you to use the official openwrt package repository:
https://hamy.io/post/0015/how-to-compile-openwrt-and-still-use-the-official-repository/
It is important to do this since some additional packages are needed to be able to write uboot to nand.
Once you have setup the OpenWrt build environment and created the correct configuration a change in the OpenWrt dts file is needed to make sure mtd0 and mtd1 are writable. Open the dts file in the following folder and remove the 'read only' settings of mtd0 and mtd1 in the dts file. openwrt/target/linux/oxnas/files/arch/arm/boot/dts/ox820-cloudengines-pogoplugpro.dts Once that has been done save the dts file and continue with building your custom OpenWrt image. This may take a while depending on the speed of your build PC.
The build should complete OK and you will have a custom sysupgrade image for the pogoplug pro with the same 'vermagic' as the official builds. Now log into the luci webinterface or use ssh to connect to the device and run sysupgrade using your custom image. Once this finishes the device will reboot and you can connect via ssh / serial port again. (You may have to pull the power plug to force a reboot)
Use ssh or serial to connect to your custom OpenWrt on the pogoplug. Run the following commands to to update the openwrt package list and install the nand-utils package.
Check the output of the following commands which should say that mtd0 and mtd1 are now writable.
Copy bodhi's pogoplug pro uboot archive to the /tmp directory (RAM) on the pogoplug. Change to the /tmp directory and extract the archive:
Now it is time to erase part of the nand flash and write the new uboot files there. It is important that you do not switch off the device until you have done all the steps below or you will probably end up with a brick.
Erase 2 blocks on mtd0 and write spl file to it:
Erase 8 blocks on mtd1 and write uboot and the environment to it:
Assuming you dont get any erors the new uboot and environment have been written to nand. When you reboot the device the serial console output should show it is now running bohdi's uboot:
Now you can connect your USB or sata drive with the Debian rootfs and it should boot into debian. You can also boot back into your custom OpenWrt in nand (as a sort of rescue system) by using the following command:
Koen
I bought a pogoplug pro on ebay recently and decided to install OpenWrt on it. I played around with it for a bit but quickly realised that the current release of OpenWrt does not expose the internal sata port and I also had problems using different wifi cards in the pcie slot. So I decided to look into updating uboot to bohdi's version as released on the forum here to be able to run Debian on it. This was a bit more difficult than expected so I'll outline the process below which may be useful to others. This has worked for me but everything you do is at your own risk so please read the whole post and only continue if you understand the process. Messing up your uboot install will probably result in a brick so you have been warned.
The starting point is a pogoplug pro with OpenWrt 19.07.2 installed, a working serial connection and a 64 bit linux machine / VM.
OpenWrt on the Pogoplug Pro uses the following layout of the mtd:
0x000000000000-0x000000040000 : "stage1" 0x000000040000-0x0000003c0000 : "u-boot" 0x0000003c0000-0x000000440000 : "u-boot-env" 0x000000440000-0x000000e00000 : "kernel" 0x000000e00000-0x000008000000 : "ubi"
hex bytes eraseblocks
mtd0 40000 262144 2
mtd1 380000 3670016 28
mtd2 80000 524288 4
mtd3 9c0000 10223616 78
mtd4 7200000 119537664 912
To be able to flash bohdi's uboot and environment to nand you will need write access to mtd0 and mtd1. Unfortunately OpenWrt has mtd0 and mtd1 set to 'read only' by default which means it is not possible to flash uboot from the default OpenWrt install. So the first thing you need to do is to build a custom OpenWrt image which does not set mtd0 and mtd1 to 'read only'.
The following guides give a good description how to build your own custom OpenWrt image:
https://openwrt.org/docs/guide-developer/quickstart-build-images
https://openwrt.org/docs/guide-user/additional-software/beginners-build-guide
Follow these guides to setup your 64 bit linux build system / VM, download the sources and checkout branch 19.07.2
One thing to remember is that a manual / custom build of OpenWrt does not allow you to download the different prebuilt packages due to difference in 'vermagic'. The following page gives a good description how to compile a custom version of OpenWrt which still allows you to use the official openwrt package repository:
https://hamy.io/post/0015/how-to-compile-openwrt-and-still-use-the-official-repository/
It is important to do this since some additional packages are needed to be able to write uboot to nand.
Once you have setup the OpenWrt build environment and created the correct configuration a change in the OpenWrt dts file is needed to make sure mtd0 and mtd1 are writable. Open the dts file in the following folder and remove the 'read only' settings of mtd0 and mtd1 in the dts file. openwrt/target/linux/oxnas/files/arch/arm/boot/dts/ox820-cloudengines-pogoplugpro.dts Once that has been done save the dts file and continue with building your custom OpenWrt image. This may take a while depending on the speed of your build PC.
The build should complete OK and you will have a custom sysupgrade image for the pogoplug pro with the same 'vermagic' as the official builds. Now log into the luci webinterface or use ssh to connect to the device and run sysupgrade using your custom image. Once this finishes the device will reboot and you can connect via ssh / serial port again. (You may have to pull the power plug to force a reboot)
Use ssh or serial to connect to your custom OpenWrt on the pogoplug. Run the following commands to to update the openwrt package list and install the nand-utils package.
opkg update opkg install nand-utils
Check the output of the following commands which should say that mtd0 and mtd1 are now writable.
mtdinfo /dev/mtd0 mtdinfo /dev/mtd1
Copy bodhi's pogoplug pro uboot archive to the /tmp directory (RAM) on the pogoplug. Change to the /tmp directory and extract the archive:
cd /tmp tar xvf uboot.2015.10-tld-2.ox820.bodhi.tar
Now it is time to erase part of the nand flash and write the new uboot files there. It is important that you do not switch off the device until you have done all the steps below or you will probably end up with a brick.
Erase 2 blocks on mtd0 and write spl file to it:
flash_erase /dev/mtd0 0x0 2 nandwrite /dev/mtd0 uboot.spl.2013.10.ox820.850mhz.mtd0.img
Erase 8 blocks on mtd1 and write uboot and the environment to it:
flash_erase /dev/mtd1 0x0 8 nandwrite /dev/mtd1 uboot.2015.10-tld-2.ox820.mtd0.img nandwrite -s 786432 /dev/mtd1 uboot.2015.10-tld-2.ox820.environment.img
Assuming you dont get any erors the new uboot and environment have been written to nand. When you reboot the device the serial console output should show it is now running bohdi's uboot:
U-Boot SPL 2013.10-tld-4 (Sep 07 2014 - 14:10:12) Boot device: NAND Attempting to set PLLA to 850 MHz ... plla_ctrl0 : 0000020a plla_ctrl1 : 00330000 plla_ctrl2 : 0065008b plla_ctrl3 : 000000f1 PLLA Set U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 -0700) OXNAS OX820
Now you can connect your USB or sata drive with the Debian rootfs and it should boot into debian. You can also boot back into your custom OpenWrt in nand (as a sort of rescue system) by using the following command:
nboot 60500000 0 440000; bootm
Koen