- and already running Debian from a USB drive on the Pogoplug V3.
OpenWRT will be installed on the internal flash (NAND) of the Pogoplug. You will still be able to boot Debian from USB when attached.
Known Issues:
- RT3090 (PCIE) Wi-Fi in the Pro is not working.
- LED not working
- Other known issues from OpenWRT wiki
My console installation log can be found here.
- Other known issues from OpenWRT wiki
My console installation log can be found here.
All commands below needs to be executed from Debian.
#Verify MTD partition
cat /proc/mtd
#root@debian:~# cat /proc/mtd
#dev: size erasesize name
#mtd0: 00e00000 00020000 "boot"
#mtd1: 07200000 00020000 "data"
#download firmware/nand utilities
cd /tmp
wget http://download.qnology.com/pogoplug/v4/fw_printenv
wget http://download.qnology.com/pogoplug/v4/fw_setenv
wget http://download.qnology.com/pogoplug/v4/ubiattach
wget http://download.qnology.com/pogoplug/v4/ubimkvol
wget http://download.qnology.com/pogoplug/v4/ubiformat
#make executable
chmod +x fw_printenv fw_setenv ubiattach ubimkvol ubiformat
#format mtd1 (data)
/tmp/ubiformat /dev/mtd1
#attach
/tmp/ubiattach /dev/ubi_ctrl -m 1
/tmp/ubimkvol /dev/ubi0 -m -N rootfs
#mount ubi rootfs to /tmp/ubi
mkdir /tmp/ubi
mount -t ubifs ubi0:rootfs /tmp/ubi
#We're using the snapshot trunk release.
#There is no rootfs tarball, so we'll extract
#it from the squashfs sysupgrade tar
cd /tmp
wget http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/openwrt-oxnas-pogoplug-pro-squashfs-sysupgrade.tar
#extract
tar -xvf openwrt-oxnas-pogoplug-pro-squashfs-sysupgrade.tar
#unsquashfs
apt-get install squashfs-tools
unsquashfs sysupgrade-pogoplug-pro/root
#move extracted rootfs to ubi
mv squashfs-root/* /tmp/ubi
#download kernel zImage
mkdir -p /tmp/ubi/boot
cd /tmp/ubi/boot
wget http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/openwrt-oxnas-zImage
#rename zImage file
mv openwrt-oxnas-zImage zImage
#download fdt
wget http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/openwrt-oxnas-pogoplug-pro.dtb
wget http://download.qnology.com/pogoplug/oxnas/ox820-pogoplug-classic.dtb
sync
cd /
umount /tmp/ubi
#Setup uBoot Environment
#Cut and Paste this whole section
/tmp/fw_setenv zimage '/boot/zImage'
/tmp/fw_setenv loadaddr '0x60500000'
/tmp/fw_setenv fdt_addr '0x62c00000'
/tmp/fw_setenv loadubi 'echo Trying to boot from NAND ...;if run mountubi; then run loadubizimage;run loadubifdt;ubifsumount;run bootzubi;fi'
/tmp/fw_setenv mountubi 'ubi part data; ubifsmount ubi0:rootfs'
/tmp/fw_setenv loadubizimage 'ubifsload ${loadaddr} ${zimage}'
/tmp/fw_setenv loadubifdt 'ubifsload ${fdt_addr} ${fdt_file_ubi}'
/tmp/fw_setenv bootzubi 'echo Booting from nand ...; run setargsubi; bootz ${loadaddr} - ${fdt_addr};'
/tmp/fw_setenv setargsubi 'setenv bootargs console=ttyS0,115200n8 ubi.mtd=1 root=ubi0:rootfs rw rootfstype=ubifs rootwait ${mtdparts}'
#Select the appropriate fdt - Pro (Wi-Fi) versus regular.
#Verify MTD partition
cat /proc/mtd
#root@debian:~# cat /proc/mtd
#dev: size erasesize name
#mtd0: 00e00000 00020000 "boot"
#mtd1: 07200000 00020000 "data"
#download firmware/nand utilities
cd /tmp
wget http://download.qnology.com/pogoplug/v4/fw_printenv
wget http://download.qnology.com/pogoplug/v4/fw_setenv
wget http://download.qnology.com/pogoplug/v4/ubiattach
wget http://download.qnology.com/pogoplug/v4/ubimkvol
wget http://download.qnology.com/pogoplug/v4/ubiformat
#make executable
chmod +x fw_printenv fw_setenv ubiattach ubimkvol ubiformat
#format mtd1 (data)
/tmp/ubiformat /dev/mtd1
#attach
/tmp/ubiattach /dev/ubi_ctrl -m 1
/tmp/ubimkvol /dev/ubi0 -m -N rootfs
#mount ubi rootfs to /tmp/ubi
mkdir /tmp/ubi
mount -t ubifs ubi0:rootfs /tmp/ubi
#We're using the snapshot trunk release.
#There is no rootfs tarball, so we'll extract
#it from the squashfs sysupgrade tar
cd /tmp
wget http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/openwrt-oxnas-pogoplug-pro-squashfs-sysupgrade.tar
#extract
tar -xvf openwrt-oxnas-pogoplug-pro-squashfs-sysupgrade.tar
#unsquashfs
apt-get install squashfs-tools
unsquashfs sysupgrade-pogoplug-pro/root
#move extracted rootfs to ubi
mv squashfs-root/* /tmp/ubi
#download kernel zImage
mkdir -p /tmp/ubi/boot
cd /tmp/ubi/boot
wget http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/openwrt-oxnas-zImage
#rename zImage file
mv openwrt-oxnas-zImage zImage
#download fdt
wget http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/openwrt-oxnas-pogoplug-pro.dtb
wget http://download.qnology.com/pogoplug/oxnas/ox820-pogoplug-classic.dtb
sync
cd /
umount /tmp/ubi
#Setup uBoot Environment
#Cut and Paste this whole section
/tmp/fw_setenv zimage '/boot/zImage'
/tmp/fw_setenv loadaddr '0x60500000'
/tmp/fw_setenv fdt_addr '0x62c00000'
/tmp/fw_setenv loadubi 'echo Trying to boot from NAND ...;if run mountubi; then run loadubizimage;run loadubifdt;ubifsumount;run bootzubi;fi'
/tmp/fw_setenv mountubi 'ubi part data; ubifsmount ubi0:rootfs'
/tmp/fw_setenv loadubizimage 'ubifsload ${loadaddr} ${zimage}'
/tmp/fw_setenv loadubifdt 'ubifsload ${fdt_addr} ${fdt_file_ubi}'
/tmp/fw_setenv bootzubi 'echo Booting from nand ...; run setargsubi; bootz ${loadaddr} - ${fdt_addr};'
/tmp/fw_setenv setargsubi 'setenv bootargs console=ttyS0,115200n8 ubi.mtd=1 root=ubi0:rootfs rw rootfstype=ubifs rootwait ${mtdparts}'
#Select the appropriate fdt - Pro (Wi-Fi) versus regular.
#Pogoplug Pro
/tmp/fw_setenv fdt_file_ubi '/boot/openwrt-oxnas-pogoplug-pro.dtb'
#Non-Pro (use this if unsure)
/tmp/fw_setenv fdt_file_ubi '/boot/ox820-pogoplug-classic.dtb'
#Setup boot order.
#USB first, then UBI/NAND
/tmp/fw_setenv dt_bootcmd_usb 'usb start; run dt_usb_bootcmd; usb stop'
/tmp/fw_setenv bootcmd 'run dt_bootcmd_usb; run loadubi; reset'
#poweroff Pogoplug and then remove USB flash drive.
poweroff
Note that by default, OpenWRT will default to 192.168.1.1 and will (or should) act as a DHCP Server. Plug a network cable from your computer directly into the Pogoplug and power it on (do not plug the Pogoplug into your router). You should now be able to Telnet into the Pogoplug at 192.168.1.1 (username and password not required). If you're not able to telnet into the Pogoplug try setting a static IP address of 192.168.1.2 on your computer.
Note that SSH is disabled and will automatically start after a root password is set.
#set passwd and enable ssh
passwd
#Reconfigure Network to DHCP Client
#disable dhcp server on lan
#Ignore if any error.
uci set dhcp.lan.ignore=1
uci commit dhcp
/etc/init.d/dnsmasq restart
#set wired ethernet interface to dhcp client
uci set network.lan.proto=dhcp
uci commit network
#reboot
reboot
opkg update
#Pogoplug has 128MB flash
#No need to be stingy on the packages
opkg install nano wget luci uboot-envtools pciutils usbutils htop wireless-tools kmod-rt2x00-pci kmod-usb-storage block-mount kmod-fs-ext4 kmod-fs-vfat kmod-fs-ntfs kmod-nls-cp437 kmod-nls-iso8859-1 e2fsprogs fdisk kmod-usb2 samba36-server samba36-client luci-app-samba kmod-rtl8187 wireless-tools kmod-usb-net-asix-ax88179 kmod-rt2800-lib kmod-rt2800-usb kmod-rt2x00-lib kmod-rt2x00-usb kmod-usb-serial-pl2303 kmod-usb-serial-cp210x kmod-usb-serial-ftdi picocom screen
#Assume you're using the USB RT5370 Wi-Fi below
#Regenerate Wi-Fi configuration
#Verify if Wi-Fi is working properly
rm -f /etc/config/wireless
wifi detect > /etc/config/wireless
#If wireless is working properly, you should see something
cat /etc/config/wireless
#Enable Wi-Fi
sed -i 's^option disabled 1^option disabled 0^' /etc/config/wireless
#Non-Pro (use this if unsure)
/tmp/fw_setenv fdt_file_ubi '/boot/ox820-pogoplug-classic.dtb'
#Setup boot order.
#USB first, then UBI/NAND
/tmp/fw_setenv dt_bootcmd_usb 'usb start; run dt_usb_bootcmd; usb stop'
/tmp/fw_setenv bootcmd 'run dt_bootcmd_usb; run loadubi; reset'
#poweroff Pogoplug and then remove USB flash drive.
poweroff
OpenWRT Initial Boot via Telnet
At this point, we're ready to boot into OpenWRT. During the bootup process the LED on the Pogoplug will blink. However once it successfully boots into OpenWRT the LED will be completely off.Note that by default, OpenWRT will default to 192.168.1.1 and will (or should) act as a DHCP Server. Plug a network cable from your computer directly into the Pogoplug and power it on (do not plug the Pogoplug into your router). You should now be able to Telnet into the Pogoplug at 192.168.1.1 (username and password not required). If you're not able to telnet into the Pogoplug try setting a static IP address of 192.168.1.2 on your computer.
Note that SSH is disabled and will automatically start after a root password is set.
#set passwd and enable ssh
passwd
#Reconfigure Network to DHCP Client
#disable dhcp server on lan
#Ignore if any error.
uci set dhcp.lan.ignore=1
uci commit dhcp
/etc/init.d/dnsmasq restart
#set wired ethernet interface to dhcp client
uci set network.lan.proto=dhcp
uci commit network
#reboot
reboot
OpenWRT SSH and Initial Package Installation
Plug the Pogoplug and your computer back into your network/router. Check your router for the IP Address assigned to your Pogoplug. You should now be able to SSH into the Pogoplug.
Note that since we're using the daily snapshot trunk build of OpenWRT, you'll need to install your kernel packages right away (kmod-xxx), otherwise it will get out of sync.
Note that since we're using the daily snapshot trunk build of OpenWRT, you'll need to install your kernel packages right away (kmod-xxx), otherwise it will get out of sync.
#Pogoplug has 128MB flash
#No need to be stingy on the packages
opkg install nano wget luci uboot-envtools pciutils usbutils htop wireless-tools kmod-rt2x00-pci kmod-usb-storage block-mount kmod-fs-ext4 kmod-fs-vfat kmod-fs-ntfs kmod-nls-cp437 kmod-nls-iso8859-1 e2fsprogs fdisk kmod-usb2 samba36-server samba36-client luci-app-samba kmod-rtl8187 wireless-tools kmod-usb-net-asix-ax88179 kmod-rt2800-lib kmod-rt2800-usb kmod-rt2x00-lib kmod-rt2x00-usb kmod-usb-serial-pl2303 kmod-usb-serial-cp210x kmod-usb-serial-ftdi picocom screen
#Assume you're using the USB RT5370 Wi-Fi below
#Regenerate Wi-Fi configuration
rm -f /etc/config/wireless
wifi detect > /etc/config/wireless
#If wireless is working properly, you should see something
cat /etc/config/wireless
#Enable Wi-Fi
sed -i 's^option disabled 1^option disabled 0^' /etc/config/wireless
/etc/init.d/network restart
Note that the built in Wi-Fi (PCIE) on the Pogoplug Pro is not working.
If you need wireless, I would highly recommend a USB Wi-Fi card based on the RT5730 chipset for less than $8.
Mini Wireless 150Mbs USB Ralink RT5370 (or from Ebay)
Note that the built in Wi-Fi (PCIE) on the Pogoplug Pro is not working.
If you need wireless, I would highly recommend a USB Wi-Fi card based on the RT5730 chipset for less than $8.