Welcome! Log In Create A New Profile

Advanced

PogoPlug Mobile SD Boot Troubles

Posted by sosuke 
PogoPlug Mobile SD Boot Troubles
May 13, 2013 04:43AM
Hello, I am having some issues getting my Pogoplug mobile to boot from an SD card. I'll say up front that I am no linux expert so if there is anything unclear or additional information needed please let me know.

I followed bodhi's guide for getting this setup (http://forum.doozan.com/read.php?2,11663,page=1)
I've tried 2 different images for the SD card. One from a file called Debian.Wheezy.20130407.Pogoplug.tar (sorry I can't remember where I found this and I can't find it searching) and the other currently on the SD card from Davy's Zyxel thread here (http://forum.doozan.com/read.php?2,7806).

The SD card is fromated ext2 3gb for partition 1 and 1gb swap for partition 2.

I think the uboot install worked out ok because I get feedback from netconsole as follows
** Block device usb 3 not supported
** Block device usb 0 not supported
** Block device usb 0 not supported
Wrong Image Format for bootm command
ERROR: can't get kernel image!
stopping USB..
SDHC found. Card desciption is:
Manufacturer:       0x1b, OEM "SM"
Product name:       "FBA4B", revision 1.1
Serial number:      171337637
Manufacturing date: 11/2012
CRC:                0x00, b0 = 0
mmc1 is available
SDHC found. Card desciption is:
Manufacturer:       0x1b, OEM "SM"
Product name:       "FBA4B", revision 1.1
Serial number:      171337637
Manufacturing date: 11/2012
CRC:                0x00, b0 = 0
mmc1 is available
Loading file "/boot/uImage" from mmc device 0:1 (xxa1)
2279256 bytes read
Loading file "/boot/uInitrd" from mmc device 0:1 (xxa1)
7004538 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.3.2
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2279192 Bytes = 2.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-3.3.2-kirkwood-dg
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7004474 Bytes = 6.7 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

At this point it seems to hang and drops off my network (no longer in device table on router).

I took a look at the logs on the SD card and they all say

(Nothing has been logged yet.)

Which seems to be the default for them on a fresh install.

Here is my printenv output. Maybe I have a mistake somewhere in here?

Pogov4> printenv
arcNumber=2097
baudrate=115200
bootargs=console=ttyS0,115200 root=/dev/sda1 rootdelay=10 rootfstype=ext2 mtdpar
ts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd;
 usb stop; run mmc_bootcmd
bootdelay=10
console=ttyS0,115200
ethact=egiga0
ethaddr=02:50:43:52:d1:04
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=ping $serverip
ipaddr=192.168.10.46
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mmc_bootcmd=mmc init; mmc init; ext2load mmc 0:1 0x00800000 /boot/uImage; if ext
2load mmc 0:1 0x01100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else boot
m 0x800000; fi
mtddevname=uImage2
mtddevnum=2
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M
(root)
ncip=192.168.10.38
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; na
nd 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.10.38
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; se
tenv stdout nc; setenv stderr nc; version;
stderr=nc
stdin=nc
stdout=nc
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && u
bifsload 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 ext
2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; el
se 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=ext2
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if t
est $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; se
tenv 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

Environment size: 2955/131068 bytes

So is it my SD card? Is it my kernel? Is it my env? I'm not really sure how to proceed to fix this. Any help would be apprciated. Thank you.
Re: PogoPlug Mobile SD Boot Troubles
May 14, 2013 12:02AM
sosuke,

Looking back at Davy's thread:
The rootfs is packaged as an ext3 image (kirkwood-debian_image.img) so you'll have to mount with the loop option, and cp -a the contents onto a preformatted sda1 partition.

Did you do this to create the rootfs stick? note that the rootfs image is ext3. So your uBoot env for rootfs type should be ext3. Usually it's OK for booting ext3 even if the env is ext2, but to be sure set your rootfs type to ext3.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: PogoPlug Mobile SD Boot Troubles
May 14, 2013 05:49PM
Thanks for the response bodhi.

That didn't work. I ran

setenv usb_rootfstype 'ext3'
saveenv

Didn't see anything for the SD card so I'm assuming it's the same. But honestly I don't think this would matter. I had my card formatted as ext2. Since you're doing a cp -a I wouldn't think the origins filetype would matter? Just to be sure I reformated as ext3 and recopied everything and still a no go. I also tried another SD card (also 4GB but different maker) and formatted that ext2. It does the same thing (tried it before changing rootfstype).

I would also say that ext2 is fine because it looks like it's loading uImage off disk (at least it says it did) so I would imagine at that point it can read the card? It just seems to be hanging when it actually loads the kernel and I have no clue how to debug that since it drops off my network so no more netconsole at that point.

I also tried a USB thumbdrive but that wouldn't load anything so I either need to try a different USB stick, I have something screwed up for USB drive, or I didn't make that drive correctly. It wouldn't even find uImage.

Any other ideas what might be wrong? Am I going to need a serial cable to debug this?

Update

I tried a different USB stick and this one works (ext2). So I can boot. So now it's trying to figure out what is wrong with the SD card side of things.

Update 2
Got done with work and had more time to play with this. As I said before I got it working with a USB stick (sandisk). I tried various things with my SD cards. Formatted as ext2. Formatted as ext3. Changed the fstab to mount mmcblk0p1 instead of root. Changed fstab to ext2. To ext3. Changed the env to ext2, and ext3. Probably other things I've already forgotten.

Finally I tried a microsd card in a USB reader. That works. So at this point I know I have a working (micro) SD card. So I put it into an SD card converter and tried to boot that. Doesn't work. Hangs at "Starting kernel...".

Does anyone have any ideas?


Thanks



Edited 2 time(s). Last edit at 05/15/2013 09:02AM by sosuke.
Re: PogoPlug Mobile SD Boot Troubles
May 16, 2013 12:20AM
sosuke,

You could execute uBoot envs in netconsole and see what happen. Execute this mmc boot command in 4 steps:
mmc_bootcmd=mmc init; mmc init; ext2load mmc 0:1 0x00800000 /boot/uImage; if ext2load mmc 0:1 0x01100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi

So stop uBoot at netconsole, and do these 4 commands consecutively. If you have get error with mmc_init, then execute it again to see if you get pass it. Post the errors here if you're not sure how to proceeed.

mmc_init
ext2load mmc 0:1 0x00800000 /boot/uImage
ext2load mmc 0:1 0x01100000 /boot/uInitrd
bootm 0x800000 0x1100000


Update:
I've just noticed that you don't have this in your envs:

usb_init=run usb_scan; setenv usb_root LABEL=rootfs

If you label your rootfs as rootfs, and then have usb_init set to use the label, then you won't need to worry about much. The Initrd will find your rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 3 time(s). Last edit at 05/16/2013 01:32AM by bodhi.
Re: PogoPlug Mobile SD Boot Troubles
May 16, 2013 04:58AM
Thanks Bodhi! I did the mmc stuff but that gave me the same output as letting it run through by itself, but.. adding rootfs stuff and setting a label was what I needed. It works now! Thanks!
WhiteFang
Re: PogoPlug Mobile SD Boot Troubles
August 15, 2013 05:31PM
Hello,
sorry to bump an old thread but I have the same problem, and I have set the same parameters, but still I can't boot from SD (hangs at "Starting kernel..."), only USB. How can setting these envs:
usb_init=run usb_scan; setenv usb_root LABEL=rootfs
help booting from SD? Don't they apply only for USB?
Re: PogoPlug Mobile SD Boot Troubles
August 16, 2013 12:28AM
WhiteFang Wrote:
-------------------------------------------------------
> Hello,
> sorry to bump an old thread but I have the same
> problem, and I have set the same parameters, but
> still I can't boot from SD (hangs at "Starting
> kernel..."), only USB. How can setting these
> envs:
> usb_init=run usb_scan; setenv usb_root
> LABEL=rootfs
> help booting from SD? Don't they apply only for
> USB?

It does help. The reason is the uBoot envs originally set up for USB booting, so they were named that way. However, the bootargs is applicable to the bootcmd, in general. So the following:
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
will set the bootargs to whatever content of each the $ variables. And that will be the arguments to be passed to the kernel command line.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
WhiteFang
Re: PogoPlug Mobile SD Boot Troubles
August 24, 2013 02:05AM
These parameters:
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=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params'
allowed me to boot from SD :) I was lacking the 'root=$usb_root' (which looks for the 'rootfs' label) and some other things, I suppose.
Just one last question: is there any way I can boot the stock PP OS by setting some env parameters (or from Debian, which I have been able to boot)?

Thanks!
Re: PogoPlug Mobile SD Boot Troubles
August 24, 2013 08:23PM
WhiteFang Wrote:
-------------------------------------------------------
> These parameters:
>
> 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=$usb_root rootdelay=$usb_rootdelay
> rootfstype=$usb_rootfstype $mtdparts
> $usb_custom_params'
>
> allowed me to boot from SD :) I was lacking the
> 'root=$usb_root' (which looks for the 'rootfs'
> label) and some other things, I suppose.
> Just one last question: is there any way I can
> boot the stock PP OS by setting some env
> parameters (or from Debian, which I have been able
> to boot)?
>
> Thanks!

Yes. You could do that with the original uBoot envs. The Pogo OS is still on Nand. So you will need to restore the orginal uBoot envs selectively (so it will not be in conflict with the current uBoot envs) using Debian fw_setenv, set a uBoot env to load Pogo OS, and setup a command to run that during restart.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 08/24/2013 08:24PM by bodhi.
WhiteFang
Re: PogoPlug Mobile SD Boot Troubles
August 25, 2013 03:14AM
I tried setting these from netconsole:
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"
and then manually calling boot_nand, but it stops at "Starting kernel ...". Am I missing something?
Re: PogoPlug Mobile SD Boot Troubles
August 25, 2013 04:18PM
WhiteFang,

You will need to get the env variables from the orginal Pogo uBoot. If you have installed Arch version of uBoot, or Davy's uBoot then the envs are no longer the same as orginal ones. And work backward from the boot cmd on that version, you will see the chain of cmds that eventually get to booting NAND.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
WhiteFang
Re: PogoPlug Mobile SD Boot Troubles
August 25, 2013 05:12PM
Thanks Bodhi, I knew that but as I do not have another PP Mobile I don't know how to get the original envs.
I followed the tutorial here, if this helps. I haven't thought of saving there somewhere before installing the modified uboot (my fault), so I suppose I cannot know them without asking.
Re: PogoPlug Mobile SD Boot Troubles
August 25, 2013 05:31PM
WhiteFang,

Indeed, most of us forgot to save the orginals, or even thought about doing that. I did look for you, but could not find mine in the archives somewhere :) you probably could get the list, probably from somebody at Arch site?

BTW, the Pogo Mobile can be reversed easily to original if installed only Arch. So if somebody is about to do the reversal to factory, it's a perfect time to get the list of the orginal envs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Ford
Re: PogoPlug Mobile SD Boot Troubles
November 15, 2016 01:05PM
Is there nobody that has made an sd image, we can just dd to a blank sd card and boot like http://nerdvittles.com/?p=10560 have made for debian/asterisk.
Re: PogoPlug Mobile SD Boot Troubles
November 15, 2016 06:44PM
Ford Wrote:
-------------------------------------------------------
> Is there nobody that has made an sd image, we can
> just dd to a blank sd card and boot like
> http://nerdvittles.com/?p=10560 have made for
> debian/asterisk.

It is easy to do but uneccessary. If one would like to learn Linux, tar command is a most useful and basic command one should learn.

Is there reason why you need such image? if there is a good use case that I would agree with and so will release the image for public consumption.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: