More Pogoplug E02 uBoot Work

I’ve written a few times about configuring Pogoplug devices to work with uBoot and Linux.  Recently I’ve run into some problems with one of my Pogoplug E02 devices, where it would no longer boot to the attached USB drive, and didn’t seem to be booting properly to the native firmware either.  Finally got around to looking at that a little bit in the past couple of days.

Since I wasn’t able to SSH to the device, I had to open it up and connect to the internal serial console.  I had already purchased a USB to TTL serial cable adapter based on the PC-PL2303HX chipset (similar to these), so I opened up the Pogoplug and modified a CD-ROM audio cable I had laying around to connect between the TTL adapter cable and the serial port on the board (opening and serial connection documentation here).

Once I was able to get consoled in, I determined that my USB drive was only being detected properly on a soft boot.  So pulling the power cable was doing me no good as far as getting it to boot, but if I issued a reset or reboot from the failed boot environment, it would detect the USB device correctly and boot up.  While the reset command was functional, it was not practical, as it would have required a perpetual serial connection and for me to issue a reset every time it lost power before it would come up properly.  I want it to reload to normal running state automatically.

I played around with the firmware environment variables for a bit before going ahead with an upgrade of my uBoot environment (I was on a 2011 version).  I followed most of the instructions including flashing the default uBoot environment variables.  I was still having some issues with the USB drive not being detected from a cold boot, but modifying the “scan_disk” environment variable appeared to provide a resolution.  I changed the “scan_usb” portion of the command from “usb start” to “usb start; sleep 3; usb reset”, and thereafter I was able to successfully boot from both a cold start and a warm start.  The full variable after changes was as follows:

scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start; sleep 3; usb reset"; 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 ext2load $dev $disknum:1 0x800000 /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

Finally, I made some modifications to allow the default Pogo OS to load in the event a drive with a “rootfs” label was not present.  I added a “pogo_bootcmd” environment variable and modified the “bootcmd_exec” as in the following.  This appears to be allowing the device to boot the defacto Pogo OS in the event the rootfs drive is not present, though I still had difficulties SSH’ing in with my Pogo portal configured account.

pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
bootcmd_exec=mw 0x800000 0 1; run load_uimage; if run load_initrd; then if run load_dtb; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 0x1100000; fi; else if run load_dtb; then bootm 0x800000 - 0x1c00000; else if bootm 0x800000; then echo Booting; else run pogo_bootcmd; fi; fi; fi

Leave a Reply

Your email address will not be published. Required fields are marked *