Debian on Pogoplug V4 Mobile

Debian Logo

Once I bought a dockstar, and was mightily annoyed by it. Eventually new Pogoplugs came out, and I invested a whopping nine bucks in a used pogoplug mobile. After having it deregistered by support, I tried installing ArchLinuxARM on it. This produced a brick with a flashing green light, so do not try to install Arch for ARM on this device. It's probably possible to make it work, but the default install instructions don't work. Further, the revert process didn't work either! Seems like their u-boot is broken for this device.

In my situation, I had to recover the system via a serial console. After opening the device (I used a pie server as a spudger, since I can't seem to find mine) and attaching a CA-42 cable, I had a serial console that let me see the various boot failure messages come up on the console. In short, the u-boot installed by Arch was not able to see any USB storage devices. I had planned to boot from USB because it was my understanding that MMC booting was not possible, but this spurred me to do further research which revealed that it is in fact highly possible, if not trivial.

The right u-boot for booting the Mobile from MMC is from davygravy. The specific u-boot you want is linked a little ways down the thread. It contains neither USB nor SATA support, but that's fine; once you get the kernel loaded, it does. If you want to boot the Pogoplug Mobile from an SD card, this is the one you want. Then you will either install the new u-boot as normal, or you'll follow the detailed instructions on flashing u-boot via serial. If you haven't yet bricked your device, you can use more traditional methods to do this.

I run the tweaked version of picocom (see the detailed instructions linked above) from a tiny shell script that looks like this:

drink@alexander:~$ cat bin/pogoconsole
#!/bin/sh
PICOCOM=$HOME/bin/picocom
BITRATE=115200
PORT=/dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0
if [ -x ${PICOCOM} ]
then
  echo "^A^X to exit"
  echo ""
  ${PICOCOM} -b ${BITRATE} -ir ${PORT}
fi

Add yourself to the dialout group (via adduser username dialout) on debian systems to not need sudo to run this command. Note the PORT variable provided for your convenience. Check /dev/serial/by-id/ for a likely device and use it here so that if you should plug in some other USB serial device (say, a GPS) it won't cause the script to fail. The options also disable initialization commands, which we won't need. The short, short, short form of the process is that running this picocom allows you to send a specially altered u-boot to the device for testing without flashing; once you know that it works, you use that u-boot to load the version of the u-boot intended for the "nand" (flash) via tftp, and write it to the flash memory.

I had to take a lot of cues from a later entry in the u-boot thread as well. But they missed a couple of tricks, for example setting the boot parameters. So following you'll find my complete params. Change ethaddr to whatever the sticker on the bottom of the unit says the MAC address is. If you want netconsole support, then you'll need to set netconsole to 1, and also set both ipaddr and serverip.

arcNumber=3960
baudrate=115200
bootargs=console=ttyS0,115200 root=/dev/mmcblk0p1
bootargs_console=console=ttyS0,115200
bootcmd=run ubifs_bootcmd; run mmc_bootcmd
bootcmd_mmc=mmc init; ext2load mmc 0:1 0x00800000 /uImage; ext2load mmc 0:1 0x01100000 /uInitrd
bootcmd_usb=usb start; ext2load usb 0:1 0x00800000 /uImage; ext2load usb 0:1 0x01100000 /uInitrd
bootdelay=3
console=ttyS0,115200
ethact=egiga0
ethaddr=00:00:00:00:00:01
force_rescue=0
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
if_netconsole=if test $netconsole -eq 1; then ping $serverip; fi
ipaddr=192.168.1.3
led_error=orange blinking
led_exit=green off
led_init=green blinking
machid=F78
mainlineLinux=yes
mmc_bootcmd=mmc init; sleep 2; mmc init; run mmc_set_bootargs; ext2load mmc 0:1 0x00800000 /boot/uImage; if ext2load mmc 0:1 0x01100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_set_bootargs=setenv bootargs console=$console root=/dev/mmcblk0p1
mtddevname=uImage2
mtddevnum=2
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
netconsole=0
partition=nand0,2
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
preboot=run if_netconsole start_netconsole
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_installed=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
serverip=192.168.1.23
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_device=0:1
usb_init=run usb_scan
usb_root=/dev/sda1
usb_rootdelay=10
usb_rootfstype=ext3
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_scan_list=1 2 3 4
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params

You can probably safely omit most of the usb* variables, but you might want to have them in there for posterity. The most important part is the mmc_set_bootargs part, and the change to mmc_bootcmd to use it.

Finally, you'll need an OS to go with this u-boot. We've already discussed Arch on this platform; let's avoid it and run Debian wheezy. You can get a kernel, initrd, and image from bodhi on the doozan forum as well. Just format an SD card out to ext3 and unpack the contents into it.

Notes

Here are some notes on the process.

  • The CA-42 cable had four wires. The black wire went to ground, the white to tx, and the green to rx. The green wire was the only wire with voltage on it, at 3.2V. I thought it was a 3.3V supply. It wasn't. These color codes are manufacturer-specific, so they probably mean nothing to you.
  • Some SD cards work, some don't. There is no apparent rhyme or reason. I am using a Sandisk class 4 8GB.
  • If I don't run mmc init twice in boot then I can't boot. It fails to find the MMC card the first time, but works on the second. Just sleeping first is not enough.

Comments

Add new comment

Default

  • Use [fn]...[/fn] (or <fn>...</fn>) to insert automatically numbered footnotes.
  • You may link to images on this site using a special syntax
  • Web page addresses and e-mail addresses turn into links automatically.
  • To post pieces of code, surround them with <code>...</code> tags. For PHP code, you can use <?php ... ?>, which will also colour it based on syntax.
  • Internal paths in single or double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or path. Paths to files in single or double quotes, written as "files:somefile.ext", for example, are replaced with the appropriate URL that can be used to download the file.
  • Filtered words will be replaced with the filtered version of the word.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <q>

Issue

  • Lines and paragraphs break automatically.
  • To post pieces of code, surround them with <code>...</code> tags. For PHP code, you can use <?php ... ?>, which will also colour it based on syntax.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>

Drinking Game

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <p> <br> <pre> <h2> <h3> <h4>
  • Images may be embedded like: [image:node_id align=alignment hspace=n vspace=n border=n size=label width=n height=n nolink=(0|1) class=name style=style-data node=id] Leave off any attributes you don't want.
  • [img_assist|...] tags will be displayed, maybe. Please don't make more of them.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Refresh Type the characters you see in this picture. Type the characters you see in the picture; if you can't read them, submit the form and a new image will be generated. Not case sensitive.  Switch to audio verification.