Welcome! Log In Create A New Profile

Advanced

U-Boot w/ MMC/SD-card booting for Pogoplug Series 4

Posted by davygravy 
I thought it was a good idea to use to change Arch Linux u-boot installer script based on Bodhi's instruction,
so I would be able to use the original linux system that included in my Pogoplug to flash the u-boot.

I didn't work, but somehow I could still boot into Arch Linux from usb drive.

I installed uboot-env and tried to figure out what happened.
It seems that anything after flashing the uboot.environment didn't stick,
So my next step was just to continue from "Adjust MTD parts".

Well that bricked my Pogoplug,
it doesn't boot not from usb and not from sd.
The funny thing is that now it does light up the green led, I've got now idea what it means.

Next step is to try and get serial working, my soldering skills are horrible.
Re: U-Boot w/ MMC/SD-card booting for Pogoplug Series 4
February 03, 2013 02:45PM
dhead,

I installed uboot-env and tried to figure out what happened. 
It seems that anything after flashing the uboot.environment didn't stick, 
So my next step was just to continue from "Adjust MTD parts".

Arch Linux uBoot is a different version, so at this point, you can't use uboot-env tools, you would need to use blparam to change uBoot envs. The good sign is LED stays green, it likely means your uBoot is OK, just the envs are messed up so you can't start the kernel.

To avoid having to solder the serial pins, I've tried this once successfuly: Use 3 small pins (the type that was used in new shirt box) to push them in the solder buttons on the board for GND, TX, RX. Got them connect temporarily, I was able to connect the serial console and interrupt uBoot, just long enough to set up netconsole :) After that it was easy to change uBoot envs to boot Debian.
Thanks Bodhi,

I've got netconsole up, I use netcat for windows.

I flashed Davy's uBoot,
but after that I thought it be good idea trying the Arch Linux way of revert,
using fat32 usb drive with revert folder, I'm not sure if that made any changes.

Here's the output from netconsole
Quote

U-Boot 2011.12 (Apr 08 2012 - 19:03:41)
Cloud Engines-Pogoplug v4/Mobile:MMC version
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
I'm guessing from the date that no change made to the uboot.

Here's my env print http://pastebin.com/8FenMybv

I'll try setting env arguments manually, .
Re: U-Boot w/ MMC/SD-card booting for Pogoplug Series 4
February 03, 2013 03:32PM
dhead,

Looks great! you're still running davy's uBoot. Once you've flashed this uBoot version, the Arch revert won't work. It only works with Arch installation of uBoot.

Also briefly scanning your envs, it looks fine.
Maybe the culprit is that my file system is ext3 and not ext2 ?
This is the output when trying to boot from sd
http://pastebin.com/sawmkDXy

This the output when trying to boot from usb
http://pastebin.com/NZtiQESf
It look like it booting to Arch Linux,
but I can't get access to the machine and it doesn't get ip from my dhcp,
so maybe it gets some errors later which I may need serial to diagnose.

I tried changing arcNumber to 2097 but that didn't helped, maybe also need to remove machid ?

I may add that before changing the env arguments I booted successfully to Arch Linux from usb with ext3 filesystem.

I'll try next ext2 filesystem.
Re: U-Boot w/ MMC/SD-card booting for Pogoplug Series 4
February 03, 2013 04:23PM
Since your uBoot env for rootfs type is Ext2, it should boot Ext3 without problem (but the reverse is not true). Looks like the SD card was not found by uBoot, perhaps you need to repartition, reformat and put a new roofts on it. The USB drive seems to work, but I think the Arch kernel did not complete booting, so you never got to the point where dhcp is requesting ip from the router. I would do the same, puting a fresh Arch rootfs on it. Or you can put Davy's NSA320 rootfs on either the SD or USB and boot the box with it (this is what I would do but of course if you want to run Arch then it's not applicable).
Setting usb_rootfstype=ext3 fixed non booting from usb.
Now I'll try to boot from sd,

I used Win32 Disk Imager to copy my usb installation to the sd card, that didn't work.
I also tried manually creating ext3 partition and "cp -p -r" the content of the usb drive to the sd card, again this didn't work.

On both cases I'm getting the exact output as I attached before
http://pastebin.com/sawmkDXy
I'm guessing that maybe the fault in my uboot arguments.
A little "success" I found out that I can manually boot from sd on uboot but no automatically,
meaning I need to manually execute the command "boot", else the uboot don't find the sd card.
I'm not sure if that something I done.

Anyway it's only a partial success, after the uboot load the kernel it does not fully boot to linux,
maybe it's the same as the issue I had before with the usb drive
and need to set somewhere that the rootfstype is ext3.
I tried different approaches but with no success.
Success, finally I can boot from sd.
Here's my custom settings (with the usb_rootfstype= ext3 from before)

Quote

mmc_bootcmd 'mmc init; run mmc_set_bootargs; run mmc_boot'
mmc_boot 'mw 0x800000 0 1; ext2load mmc 0:1 0x00800000 /boot/uImage; if ext2load mmc 0:1 0x01100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi'
mmc_root '/dev/mmcblk0p1'
mmc_set_bootargs 'setenv bootargs console=$console root=$mmc_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params'

Still something is wrong with uboot, it seems that on the first "mmc init" it doesn't find the sd card, so I need to run it again, maybe it can be fixed by adding a delay (probably on the source of the uboot, not as an argument).
Thanks Bodhi for your help.

I'm not sure if I made any other changes so I just link to an exact copy of my env arguments (except for the ethaddr)
http://pastebin.com/6bKSVPrQ
p.s.
My fix for the "mmc init" was just to run it twice.
Re: U-Boot w/ MMC/SD-card booting for Pogoplug Series 4
February 04, 2013 02:19PM
Ah! thanks for the confirmation Dhead. I saw the same behavior. MMC init does not work the first time it's called, so your work around is a nice way to get it running.
I copy dockstar original uboot to mmc and able to boot to pogpplug original software.

Pogov4> mmc init
SD found. Card desciption is:
Manufacturer:       0x02, OEM "TM"
Product name:       "SD01G", revision 4.5
Serial number:      2551669412
Manufacturing date: 11/2009
CRC:                0x00, b0 = 0
mmc1 is available
Pogov4> ext2load mmc 0:1  0x800000 dockstar.bin
Loading file "dockstar.bin" from mmc device 0:1 (xxa1)
524288 bytes read
Pogov4> go 0x800200
## Starting application at 0x00800200 ...

My uboot settings is that if it cannot boot from USB or MMC, it will read dockstar uboot from rootfs then boots to pogoplug software. I didn't able to mount ubi rootfs to load dockstar uboot. Here are logs:

mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)

Pogov4> ubi part failsafe
Creating 1 MTD partitions on "nand0":
0x000000800000-0x000001000000 : "mtd=3"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=3"
UBI: MTD device size:            8 MiB
UBI: number of good PEBs:        64
UBI: number of bad PEBs:         0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     0
UBI: available PEBs:             58
UBI: total number of reserved PEBs: 6
UBI: number of PEBs reserved for bad PEB handling: 2
UBI: max/mean erase counter: 1/1
Pogov4> ubifsmount rootfs
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:rootfs", error -19
Error reading superblock on volume 'ubi:rootfs'!

Can anyone help?
Re: U-Boot w/ MMC/SD-card booting for Pogoplug Series 4
February 23, 2013 06:31PM
I am not sure what you're trying to do? are you booting with Davy's uBoot?

To boot back to the PogoV4 stock OS, Arch Linux ARM's uBoot has these envs set up to boot back to stock:

load_nand=nboot 0x800000 0 0x200000
load_nand2=nboot 0x800000 0 0x500000
boot=bootm 0x800000
boot_nand=run load_nand boot || run load_nand2 boot
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)

So mtd1 and mtd2 are at 0x200000 and 0x500000, respectively. With Davy's uBoot, this still applies because only mtd0 was modified.

BTW, winestock has a nice Pogoplug V4 revert script (written for Arch Linux, but could be adapted to Debian easily):
http://archlinuxarm.org/forum/viewtopic.php?f=18&t=5094&p=28549#p28529
I am using Davy's uBoot. You answer my question but I face another problem. Loading dockstar uBoot and it boots to original software. When using Davy's uBoot loading the kernel, it hangs. The same behavious when loading openWRT.

U-Boot 2011.12 (Apr 08 2012 - 19:03:41)
Cloud Engines-Pogoplug v4/Mobile:MMC version

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot:  0
Pogov4> 
Pogov4> nboot 0x800000 0 0x200000

Loading from nand0, offset 0x200000
   Image Name:   Linux-2.6.31.8
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2080956 Bytes = 2 MiB
   Load Address: 00008000
   Entry Point:  00008000
Pogov4> bootm 0x800000
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-2.6.31.8
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2080956 Bytes = 2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux..................................................................................................................................... done, booting the kernel.

Loading openWRT

U-Boot 2011.12 (Apr 08 2012 - 19:03:41)
Cloud Engines-Pogoplug v4/Mobile:MMC version

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot:  0
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
1 bytes read
Found bootable drive on usb 0:1
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
1029164 bytes read
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
** File not found /boot/uInitrd
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-2.6.30.10
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1029100 Bytes = 1005 KiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Is there any way to boot openWRT kernel using this uBoot?
Quote
nguyen
I copy dockstar original uboot to mmc and able to boot to pogpplug original software.
Where can I find that? I have bricked my PP Mobile and am desperately trying to revert it to a working condition...

Thanks!
Re: U-Boot w/ MMC/SD-card booting for Pogoplug Series 4
March 20, 2013 05:21AM
@Lucky^Luke,
Are you sure your device is bricked ?
if you followed the instruction it's really hard to brick the device, you will need to flash the wrong uboot, flash uboot to the wrong address or delete some addresses which the uboot resides.

Maybe you only need to set the correct uboot params ? you could do this with serial connection (need a bit of soldering and usb-ttl adapter (not 12v logic).
Did you followed Bodhi's instructions you might could get the netconsole up and wouldn't need serial.

If your device is really bricked (meaning corrupt uboot) you can try booting from serial, I've manage to ressurect a bricked pogoplug mobile with this method, it takes a few tries though, I've found that using shorter leads helps.
http://forum.doozan.com/read.php?3,7852
And don't forget to flash the uboot after successfuly booting from serial, I've managed to do that.
Re: U-Boot w/ MMC/SD-card booting for Pogoplug Series 4
May 05, 2013 06:39PM
dhead Wrote:
-------------------------------------------------------
> I've got netconsole up, I use netcat for windows.
>
>
> Here's the output from netconsole
>
Quote

U-Boot 2011.12 (Apr 08 2012 - 19:03:41)
> Cloud Engines-Pogoplug v4/Mobile:MMC version
> arm-none-linux-gnueabi-gcc (Sourcery G++ Lite
> 2009q3-67) 4.4.1
> GNU ld (Sourcery G++ Lite 2009q3-67)
> 2.19.51.20090709

dhead,

Did you sucessfully set up netconsole on PPv4?

I'm keep trying but no success :(



Edited 1 time(s). Last edit at 05/05/2013 06:40PM by halogen.
Re: U-Boot w/ MMC/SD-card booting for Pogoplug Series 4
May 05, 2013 11:41PM
@halogen,
Tell us how you tried, and we'll help. Post the log of your steps, perhaps we will see something that you've done incorrectly?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot w/ MMC/SD-card booting for Pogoplug Series 4
May 06, 2013 07:58PM
@bodhi

Thanks ;)

I'm using Pogoplug Mobile. I just go through ArchLinux's steps to install Alarm and before reboot, I add netconsole parameters using blparam command.

I'll post specific command that I used for netconsole setup when I get home.

I just wonder if it is possible to use netconsole in PPv4 or Mobile, because I read some post said I cannot use it.

By the way, I don't have serial cable.



Edited 2 time(s). Last edit at 05/07/2013 01:04AM by halogen.
Re: U-Boot w/ MMC/SD-card booting for Pogoplug Series 4
May 07, 2013 12:11AM
@halogen,

After you've installed Arch, your uBoot is off a version that does not have netconsole support. So you blparam env settings for that will be ignored. If this is what you have then there is no need to see the log.

If you have installed Davy's version of uBoot then you do have netconsole. The uBoot in this thread is Davy's version. For a more detailed instruction, see the following thread:
http://forum.doozan.com/read.php?2,11663
Note of caution, without serial console, you will need to be extra careful.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot w/ MMC/SD-card booting for Pogoplug Series 4
May 07, 2013 10:49AM
@bodhi

I'm about to install uboot and have a quick late minute question. When I looked at flashing NAND instruction, it found something not in common. (I marked in red.)

When I look at the arm linux script - http://archlinuxarm.org/os/ppv4/ppv4-install.sh
flash_erase /dev/mtd0 0x100000 4
nandwrite -p -s 0x100000 /dev/mtd0 /tmp/uboot.bin

and davygravy's instruction - http://forum.doozan.com/read.php?3,7477,page=1
flash_erase /dev/mtd0 0 4
nandwrite /dev/mtd0 /tmp/uboot.nandpogoV4-MMC-mtdparts-noSATA.kwb

one of other instruction
flash_erase /dev/mtd0 0x180000 4
nandwrite -p -s 0x180000 /dev/mtd0 uboot-arc.bin

Why do they have different memory address(?) to erase? Can anyone explain to me?

Thank you. :)



Edited 1 time(s). Last edit at 05/07/2013 10:50AM by halogen.
Re: U-Boot w/ MMC/SD-card booting for Pogoplug Series 4
May 07, 2013 11:42PM
uBoot is on mtd0. The difference in instructions is because they are different versions of uBoot builds (the 1st one is Arch Linux ARM version of uBoot). If you run this command:
cat /proc/mtd
you will see the list of mtd partitions that your current installation has. And when look at your dmesg, the mtdparts are listed there.

So the bottom line is if you want install Davy's version, these commands will flash that uBoot image to mtd0:
flash_erase /dev/mtd0 0 4
nandwrite /dev/mtd0 /tmp/uboot.nandpogoV4-MMC-mtdparts-noSATA.kwb

And of course if you flash other versions, the appropriate instruction applies.
Re: U-Boot w/ MMC/SD-card booting for Pogoplug Series 4
May 08, 2013 06:43PM
@bodhi

First I initially successed to boot from SD card with your instruction. But after changing macadress env, it won't start anymore. Since the greed LED light up, I guess my PPMobile just mess up with network setting.

Now I have to figure out how to make serial connector. :p

By the way, netconsole isn't not working either. I once successed from my other E02 so I don't think I missed setenv.

Anyways wish me luck. ;) Thanks.

PS. Is there way I can set up IP address manually from ArchLinux SD? By mounting SD from other linux machine and changing some network settings??



Edited 1 time(s). Last edit at 05/08/2013 07:04PM by halogen.
Re: U-Boot w/ MMC/SD-card booting for Pogoplug Series 4
May 08, 2013 11:46PM
halogen,

> PS. Is there way I can set up IP address manually
> from ArchLinux SD? By mounting SD from other linux
> machine and changing some network settings??

Yes, that's how you do it. Just mount it on another box and change IP to some static number. Arch has moved on to systemd so you will need to get the instruction at Arch site as where the IP is defined (in the old days, you'd change it in /etc/rc.conf).
Re: U-Boot w/ MMC/SD-card booting for Pogoplug Series 4
May 10, 2013 03:12PM
@halogen

nano /etc/network.d/wired-eth0
and reboot

this may change in the future as arch linux (not arm specific) moved from netcfg to netctl
Re: U-Boot w/ MMC/SD-card booting for Pogoplug Series 4
May 11, 2013 12:03PM
Thanks bodhi and dhead,

I'm out of luck this time. I did change /etc/network.d/wired-eth0 as static, however, it seems my bricked PPMobile stocked somewhere before completely booting.

Anyways, I just order serial-USB adapter to bring my PPMobile alive. I will keep up posting my status. Thanks guys. :)
Have anyone able to boot original Pogoplug Linux using this uBoot?
Re: U-Boot w/ MMC/SD-card booting for Pogoplug Series 4
May 17, 2013 02:58PM
I successfully attached serial and got ready for netconsole as well.

Even though I see the green light, I'm still experiencing network problem connecting over ssh. It seems like both static and dhcp doesn't work properly.

It's very similar to john3votas' thread on Booting DHCP issues OR sosuke's thread on PogoPlug Mobile SD Boot Troubles

Now I'm researching possible causes that I made a mistake. wish me luck.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: