Welcome! Log In Create A New Profile

Advanced

[Pogoplug Mobile/Series 4] Install uBoot/Debian

Posted by bodhi 
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
June 05, 2014 01:35PM
Ok, I'll try to use this label method.

I already tried rootfs on SD as ext2, ext3, ext4 and on USB as ext2, ext3, ext4. (I changed the setting in envs everytime)
Got always the same result. (with a bit different log output)
The strange thing is that the rescue system boots properly.
Btw. I have the Pogoplug Mobile.



Edited 1 time(s). Last edit at 06/05/2014 01:37PM by theliquid.
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
June 05, 2014 01:39PM
bodhi Wrote:
-------------------------------------------------------
> twinclouds,
>
> Probably be this typo?
>
> > auto ech0
>
bodhi:
Thanks. I corrected that but still not working.
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
June 05, 2014 02:42PM
Nvm, I got it working to go past the initial boot. The problem was that Gparted screwed up partitions. I recreated them with fdisk and now it works. But I can't ping the machine. Don't know whats wrong. How can I investigate it? With serial console?
Current netconsole output is:

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
Hit any key to stop autoboot:  0
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 1 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found
** Block device usb 0 not supported

** Invalid boot device **
incorrect device type in data
Partition data not found!
** Block device usb 0 not supported
** Block device usb 1 not supported
** Block device usb 2 not supported
** 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..
No MMC card found
SDHC found. Card desciption is:
Manufacturer:       0x03, OEM "SD"
Product name:       "SU16G", revision 8.0
Serial number:      454569302
Manufacturing date: 7/2012
CRC:                0x00, b0 = 0
mmc1 is available
Loading file "/boot/uImage" from mmc device 0:1 (xxa1)
2461416 bytes read
Loading file "/boot/uInitrd" from mmc device 0:1 (xxa1)
6362802 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.14.0-kirkwood-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2461352 Bytes = 2.3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-3.14.0-kirkwood-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6362738 Bytes = 6.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK
Using machid 0xf78 from environment

Starting kernel ...

Btw. This time I boot up with SD-Card rootfs

Edit:

Here Serial console ouput:


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
No link on egiga0
ping failed; host 192.168.145.10 is not alive
Hit any key to stop autoboot:  0
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 1 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found
** Block device usb 0 not supported

** Invalid boot device **
incorrect device type in data
Partition data not found!
** Block device usb 0 not supported
** Block device usb 1 not supported
** Block device usb 2 not supported
** 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..
No MMC card found
SDHC found. Card desciption is:
Manufacturer:       0x03, OEM "SD"
Product name:       "SU16G", revision 8.0
Serial number:      454569302
Manufacturing date: 7/2012
CRC:                0x00, b0 = 0
mmc1 is available
Loading file "/boot/uImage" from mmc device 0:1 (xxa1)
2461416 bytes read
Loading file "/boot/uInitrd" from mmc device 0:1 (xxa1)
6362802 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.14.0-kirkwood-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2461352 Bytes = 2.3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-3.14.0-kirkwood-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6362738 Bytes = 6.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK
Using machid 0xf78 from environment

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.14.0-kirkwood-tld-1 (root@tldDebian) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 PREEMPT Tue Apr 1 22:54:58 PDT 2014
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Pogoplug V4
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/sda1 rootdelay=10 rootfstype=ext3 mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 116244K/131072K available (4779K kernel code, 352K rwdata, 1644K rodata, 213K init, 424K bss, 14828K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc064df14   (6424 kB)
[    0.000000]       .init : 0xc064e000 - 0xc0683444   ( 214 kB)
[    0.000000]       .data : 0xc0684000 - 0xc06dc3c4   ( 353 kB)
[    0.000000]        .bss : 0xc06dc3c4 - 0xc074665c   ( 425 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:114
[    0.000018] sched_clock: 32 bits at 166MHz, resolution 6ns, wraps every 25769803770ns
[    4.580150] Console: colour dummy device 80x30
[    4.580197] Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
[    4.669787] pid_max: default: 32768 minimum: 301
[    4.669949] Security Framework initialized
[    4.670047] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    4.670079] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    4.670965] Initializing cgroup subsys devices
[    4.671002] Initializing cgroup subsys freezer
[    4.671021] Initializing cgroup subsys net_cls
[    4.671037] Initializing cgroup subsys blkio
[    4.671149] CPU: Testing write buffer coherency: ok
[    4.671728] Setting up static identity map for 0x485fa0 - 0x485fdc
[    4.674922] devtmpfs: initialized
[    4.678929] prandom: seed boundary self test passed
[    4.684990] prandom: 100 self tests passed
[    4.685012] pinctrl core: initialized pinctrl subsystem
[    4.685588] regulator-dummy: no parameters
[    4.686096] NET: Registered protocol family 16
[    4.686766] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    4.687950] cpuidle: using governor ladder
[    4.687976] cpuidle: using governor menu
[    4.688149] Kirkwood: MV88F6281-A1, TCLK=166666667.
[    4.688181] Feroceon L2: Enabling L2
[    4.688233] Feroceon L2: Cache support initialised.
[    4.688927] POGOPLUGV4: failed to setup USB VBUS GPIO
[    4.690114] Kirkwood PCIe port 0: link down
[    4.690129] PCI: bus0 uses PCIe port 0
[    4.690304] PCI host bridge to bus 0000:00
[    4.690334] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    4.690352] pci_bus 0000:00: root bus resource [io  0x1000-0xffff]
[    4.690371] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    4.690801] PCI: bus0: Fast back to back transfers disabled
[    4.697079] bio: create slab <bio-0> at 0
[    4.697733] vgaarb: loaded
[    4.698156] usbcore: registered new interface driver usbfs
[    4.698253] usbcore: registered new interface driver hub
[    4.698416] usbcore: registered new device driver usb
[    4.699492] Switched to clocksource orion_clocksource
[    4.734954] NET: Registered protocol family 2
[    4.735880] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    4.735917] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    4.735947] TCP: Hash tables configured (established 1024 bind 1024)
[    4.736054] TCP: reno registered
[    4.736073] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    4.736105] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    4.736388] NET: Registered protocol family 1
[    4.736843] RPC: Registered named UNIX socket transport module.
[    4.736858] RPC: Registered udp transport module.
[    4.736868] RPC: Registered tcp transport module.
[    4.736878] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    4.737252] Unpacking initramfs...
[    5.513413] Freeing initrd memory: 6208K (c1101000 - c1711000)
[    5.513578] NetWinder Floating Point Emulator V0.97 (double precision)
[    5.514377] futex hash table entries: 256 (order: -1, 3072 bytes)
[    5.514601] audit: initializing netlink subsys (disabled)
[    5.514677] audit: type=2000 audit(0.920:1): initialized
[    5.515630] bounce pool size: 64 pages
[    5.515729] zbud: loaded
[    5.515983] VFS: Disk quotas dquot_6.5.2
[    5.516061] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    5.516482] NFS: Registering the id_resolver key type
[    5.516589] Key type id_resolver registered
[    5.516603] Key type id_legacy registered
[    5.516628] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    5.516642] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    5.516871] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    5.517267] msgmni has been set to 239
[    5.517439] Key type big_key registered
[    5.520181] alg: No test for stdrng (krng)
[    5.520311] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    5.520327] io scheduler noop registered
[    5.520339] io scheduler deadline registered
[    5.520386] io scheduler cfq registered (default)
[    5.520787] mv_xor mv_xor.0: Marvell shared XOR driver
[    5.559581] mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
[    5.599573] mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
[    5.599747] mv_xor mv_xor.1: Marvell shared XOR driver
[    5.639581] mv_xor mv_xor.1: Marvell XOR: ( xor cpy )
[    5.679579] mv_xor mv_xor.1: Marvell XOR: ( xor cpy )
[    5.680011] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    5.700892] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33, base_baud = 10416666) is a 16550A
[    6.287649] console [ttyS0] enabled
[    6.292668] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    6.298997] nand: Hynix H27U1G8F2BTR-BC
[    6.302855] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[    6.308501] Scanning device for bad blocks
[    6.321501] Bad eraseblock 80 at 0x000000a00000
[    6.430192] 5 cmdlinepart partitions found on MTD device orion_nand
[    6.436434] Creating 5 MTD partitions on "orion_nand":
[    6.441578] 0x000000000000-0x000000200000 : "u-boot"
[    6.446916] 0x000000200000-0x000000500000 : "uImage"
[    6.452270] 0x000000500000-0x000000800000 : "uImage2"
[    6.457671] 0x000000800000-0x000001000000 : "failsafe"
[    6.463190] 0x000001000000-0x000008000000 : "root"
[    6.468927] m25p80 spi0.0: m25p05-nonjedec (64 Kbytes)
[    6.483740] libphy: Fixed MDIO Bus: probed
[    6.502286] libphy: orion_mdio_bus: probed
[    6.506509] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    7.587865] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:25:31:03:eb:23
[    7.596841] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    7.603370] ehci-pci: EHCI PCI platform driver
[    7.607882] ehci-orion: EHCI orion driver
[    7.612003] orion-ehci orion-ehci.0: EHCI Host Controller
[    7.617416] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[    7.625336] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
[    7.649538] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[    7.655661] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    7.662457] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    7.669671] usb usb1: Product: EHCI Host Controller
[    7.674532] usb usb1: Manufacturer: Linux 3.14.0-kirkwood-tld-1 ehci_hcd
[    7.681229] usb usb1: SerialNumber: orion-ehci.0
[    7.686676] hub 1-0:1.0: USB hub found
[    7.690499] hub 1-0:1.0: 1 port detected
[    7.695191] mousedev: PS/2 mouse device common for all mice
[    8.709696] rtc-mv rtc-mv: internal RTC not ticking
[    8.714718] i2c /dev entries driver
[    8.719094] hidraw: raw HID events driver (C) Jiri Kosina
[    8.724926] drop_monitor: Initializing network drop monitor service
[    8.731479] TCP: cubic registered
[    8.734790] NET: Registered protocol family 17
[    8.739361] Key type dns_resolver registered
[    8.744331] registered taskstats version 1
[    8.749161] regulator-dummy: incomplete constraints, leaving on
[    8.755549] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    8.764224] Freeing unused kernel memory: 212K (c064e000 - c0683000)
Loading, please wait...
[    8.859454] udevd[57]: starting version 175
[    9.103416] mvsdio mvsdio: no pins associated
[    9.128549] SCSI subsystem initialized
[    9.179730] mvsdio mvsdio: using GPIO for card detection
[    9.238170] sata_mv sata_mv.0: cannot get optional clkdev
[    9.252801] mmc0: host does not support reading read-only switch. assuming write-enable.
[    9.272016] mmc0: new high speed SDHC card at address e624
[    9.283230] sata_mv sata_mv.0: slots 32 ports 1
[    9.315010] scsi0 : sata_mv
[    9.318188] ata1: SATA max UDMA/133 irq 21
[    9.399916] mmcblk0: mmc0:e624 SU16G 14.8 GiB
[    9.408371]  mmcblk0: p1
[    9.689557] ata1: SATA link down (SStatus 0 SControl F300)
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Waiting for root file system ... done.
Gave up waiting for root device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  /dev/sda1 does not exist.  Dropping to a shell!
modprobe: module i8042 not found in modules.dep
[   30.131175] uhci_hcd: USB Universal Host Controller Interface driver
[   30.150832] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   30.171834] usbcore: registered new interface driver usbhid
[   30.177392] usbhid: USB HID core driver


BusyBox v1.20.2 (Debian 1:1.20.0-7) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
(initramfs)

Edit2:

Booting off a USB device works. SD card not,



Edited 3 time(s). Last edit at 06/05/2014 03:09PM by theliquid.
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
June 05, 2014 06:25PM
theliquid, I see this in your serial console:
ALERT!  /dev/sda1 does not exist.  Dropping to a shell!

Did you change your fw env to use the rootfs label? That's probably why it works with usb, b/c the usb drive is loaded at /dev/sda1, but the SD card is loaded at /dev/mmcblk0p1 (or p2 for the 2nd partition).

velo.



Edited 1 time(s). Last edit at 06/05/2014 06:25PM by velo.
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
June 05, 2014 11:36PM
theliquid,

[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/sda1 rootdelay=10 rootfstype=ext3 mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)

Should use rootfs label for the card, too.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
June 06, 2014 02:15PM
Ok, thanks. With the label it's working now!
Great information here. Thanks for all your work. I have failed to get my Pogoplug Mobile booting from an SD card, although it is booting fine from USB. Please forgive this very long post but I documented the entire procedure for a virgin Pogoplug Mobile so that I could automate it (I have 2 and 4 more on the way). I would greatly appreciate any insight into why I am having problems.

The following is the process I followed. Once I understand why the SD card isn't booting I will update it to reflect the correct procedure.

1) First I registered the pogoplug (my.pogoplug.com) and enabled ssh (settings->security) with the password xxxx.
2) Then I began following the instructions here as detailed below: http://forum.doozan.com/read.php?2,11663,page=1 (this thread)
3) I ssh’d into the pogo plug and pasted the follow command.

cd /tmp
wget http://download.doozan.com/uboot/nanddump
wget http://download.doozan.com/uboot/nandwrite
wget http://download.doozan.com/uboot/flash_erase
wget http://download.doozan.com/uboot/fw_printenv
wget http://download.doozan.com/uboot/fw_env.config
wget http://download.doozan.com/uboot/files/environment/uboot.environment

4) Made the binaries executable:
chmod +x *

5) Download this file: uboot.nandpogoV4-MMC-mtdparts-noSATA.kwb.tar.gz
From: https://www.dropbox.com/sh/nwt2kbvetvgvroo/AACas-aiKF0Cih-d-Zfut6wea/Kirkwood/uboot/Pogoplug4Series

After transfer and extraction:
cf56db4911a6576791e64e86831c692e uboot.nandpogoV4-MMC-mtdparts-noSATA.kwb

6) Download Jeff's uBoot envs image:
http://download.doozan.com/uboot/files/environment/uboot.environment

7) The instructions in this thread don't work exactly for me (of course) because the flash_erase isn't in my path. I now have two copies of flash_erase, one in /usr/sbin and one in /tmp. Of course the binary files differ making me extra nervous. I proceed using the downloaded files.

To my great surprise I can modify the underlying file system so I:

cp fw_env.config /etc/fw_env.config
cat /etc/fw_env.config 
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is ignored on NOR.

# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
/dev/mtd0		0xc0000		0x20000		0x20000

8) I prepare an SD card following these instructions verbatim (http://forum.doozan.com/read.php?2,12096):
See Updated 15 April 2014:

9) I insert the SD card into the pogoplug:

#df
ubi0:rootfs              99432     14572     84860  15% /
none                     59312      1388     57924   2% /tmp
/tmp/.cemnt/mmcblk0p1
                      15318484    454136  14086212   3% /tmp/.cemnt/mnt_mmcblk0p1


10) Now I flash the device (uh-oh), I use the downloaded binaries rather than the pre-existing ones in sbin.

./flash_erase /dev/mtd0 0 4
Erase Total 4 Units
Performing Flash Erase of length 131072 at offset 0x60000 done


./nandwrite /dev/mtd0 uboot.nandpogoV4-MMC-mtdparts-noSATA.kwb 
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000

11) Next step, flash Jeffs boot env (the original script alternate between flash_erase & /usr/sbin/flash_erase - sure they should be the same thing but it makes me nervous.)

./flash_erase /dev/mtd0 0xc0000 1
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0xc0000 done

./nandwrite -s 786432 /dev/mtd0 uboot.environment
Writing data to block 6 at offset 0xc0000

12) “note that fw_printenv can only be used correctly after flashing uBoot and uBoot envs (as described in the how-to steps)”

Wasn’t sure if this required a flash then reboot (which makes sense) or just a flash…
I try without the power cycle, it works:

/tmp # ./fw_printenv 
ethact=egiga0
bootdelay=3
baudrate=115200
arcNumber=2097
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_installed=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
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
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
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
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
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
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_list=1 2 3 4
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_init=run usb_scan
usb_device=0:1
usb_root=/dev/sda1
usb_rootfstype=ext2
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
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
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset

13) I didn't really need to post the whole thing as I run a diff versus the output listed at the beginning of this thread: http://forum.doozan.com/read.php?2,11663,page=1
No difference (yay).

14) “Adjust the MTD parts” - I don’t know what this does.
./fw_setenv mtdparts 'mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)'
-sh: ./fw_setenv: not found

fw_setenv wasn’t included with the download tools listed!

According to this post: http://forum.doozan.com/read.php?3,2198,2206#msg-2206
fw_setenv is just a symbolic link of fw_printenv.

I’ll recreate that symbolic link in /tmp even though I can probably call fw_printenv with fw_setenv arguments.

# ln -s fw_printenv fw_setenv
# ./fw_setenv mtdparts 'mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)'

./fw_printenv mtdparts
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
It seems to have worked.


15) Set up net console

./fw_setenv serverip 192.168.1.100
./fw_setenv ipaddr 192.168.1.56
./fw_setenv if_netconsole 'ping $serverip'
./fw_setenv start_netconsole 'setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;'
./fw_setenv preboot 'run if_netconsole start_netconsole'
Everything sets fine. I won't echo fw_printenv for the sake of brevity.

16) Now we set the uboot to boot off the SD card.

./fw_setenv bootcmd 'usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run mmc_bootcmd'
./fw_setenv 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'

This works. I can see that uboot will attempt to boot a usb/rescue device first before booting the MMC. These commands set correctly.

17) I don’t change the arch or machid because the kernel should support the defaults.

Time to reboot (fingers crossed).
 # /sbin/poweroff
Connection to pogoplugmobile closed by remote host.
Connection to pogoplugmobile closed.

Light stays on and it still responds to pings… what do I do now? Pull the cord? I pull the cord.

18) Plug the cord back in.

19) BZZZZZZ It didn’t work!! netconsole shows up in router logs so I have that recovery option.

20) I create a USB stick using the same procedure applied to my SD card (format to ext3, label=rootfs, as root extract roots linked above).

21) Start with USB stick inserted - Success!

22) Notice Twinclouds comments about modifying/adding some extra mmc related envs and modifying the existing env mmc_bootcmd. I am now making the fw_setenv commands using the fw_setenv binary in my path from the debian rootfs on the USB drive which successfully booted.

fw_setenv mmc_root /dev/mmcblk0p1
fw_setenv mmc_set_bootargs 'setenv bootargs console=$console root=$mmc_root'
fw_setenv 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'
fw_setenv mmc_bootcmd 'mmc init; mmc init; run mmc_set_bootargs; run mmc_boot'

These all set correctly (I will spare you fw_printenv output so you have to trust me for now).

23) Power cycle - still no luck booting from SD!

24) Time to debug so I fire up the netconsole:

First with I boot with USB:

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
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 "/rescueme" from usb device 0:1 (usbda1)
** File not found /rescueme
reading /rescueme.txt

** Unable to read "/rescueme.txt" from usb 0:1 **
incorrect device type in data
Partition data not 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)
2461416 bytes read
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
6362802 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.14.0-kirkwood-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:	2461352 Bytes = 2.3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-3.14.0-kirkwood-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:	6362738 Bytes = 6.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...


Then without USB (just SD):

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
Hit any key to stop autoboot:  0
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 1 USB Device(s) found
   	scanning bus for storage devices... 0 Storage Device(s) found
** Block device usb 0 not supported

** Invalid boot device **
incorrect device type in data
Partition data not found!
** Block device usb 0 not supported
** Block device usb 1 not supported
** Block device usb 2 not supported
** 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:   	0x74, OEM "JE"
Product name:   	"SDC  ", revision 0.2
Serial number:  	60825326
Manufacturing date: 8/2013
CRC:            	0x00, b0 = 0
mmc1 is available
SDHC found. Card desciption is:
Manufacturer:   	0x74, OEM "JE"
Product name:   	"SDC  ", revision 0.2
Serial number:  	60825326
Manufacturing date: 8/2013
CRC:            	0x00, b0 = 0
mmc1 is available
Loading file "/boot/uImage" from mmc device 0:1 (xxa1)
** File not found /boot/uImage
Loading file "/boot/uInitrd" from mmc device 0:1 (xxa1)
** File not found /boot/uInitrd
Wrong Image Format for bootm command
ERROR: can't get kernel image!

So, it sees my SD card and the rootfs was created in the exact same way on the USB drive and SD card. I format, partition (ext3) and (sudo) extract the rootfs on a new SD card, but I get the same result apart from the manufacturer, etc changes.

I notice that in my case it seems I do not have to call mmc_init twice? It seems to work first time, but I leave the extra mmc_init call because I don't think it can cause any harm.

25) I start browsing the forums for fixes, along the way I notice in my fw_printenv:

usb_rootfstype=ext2, so I change it to ext3, even though I am having no problems with usb.

This seems to cause instability in the USB boot as the next time I reboot it doesn’t bring up the interface, but it does after another power cycle (could be a coincidence).

26) It looks like I ought to set the usb_root as LABEL=rootfs so that it always boots the volume with that label by default. So I issue:

fw_setenv usb_init 'run usb_scan; setenv usb_root LABEL=rootfs'

USB still boots correctly, but no SD (no surprise).

27) I reread a very nice post by velo: http://forum.doozan.com/read.php?2,11663,16100#msg-16100

He has altered the line: mmc_set_bootargs=setenv bootargs console=$console root=$mmc_root
fw_setenv mmc_set_bootargs 'setenv bootargs console=$console root=$mmc_root rootfstype=$mmc_rootfstype $mtdparts'

and added:
fw_setenv mmc_rootfstype 'ext3'

Did velo save the day? No, still won't boot!

I should add that I also tried formatting the SD card as ext2 prior to step 27) and it had not effect.

28) USB booting works, SD doesn't here is my final fw_printenv:

root@debian:~# fw_printenv
ethact=egiga0
bootdelay=3
baudrate=115200
arcNumber=2097
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_installed=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
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
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
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
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
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
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_list=1 2 3 4
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_device=0:1
usb_root=/dev/sda1
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
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
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
ipaddr=192.168.1.56
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run mmc_bootcmd
mmc_root=/dev/mmcblk0p1
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_bootcmd=mmc init; mmc init; run mmc_set_bootargs; run mmc_boot
serverip=192.168.1.100
usb_rootfstype=ext3
usb_init=run usb_scan; setenv usb_root LABEL=rootfs
mmc_set_bootargs=setenv bootargs console=$console root=$mmc_root rootfstype=$mmc_rootfstype $mtdparts
mmc_rootfstype=ext3

Any insight would be greatly appreciated.
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
July 21, 2014 03:37PM
The issue is the following:

Loading file "/boot/uImage" from mmc device 0:1 (xxa1)
** File not found /boot/uImage

At the very least "/boot/uImage" should be found on the SD Card. Try reformatting your SDCard and extracting the rootfs on it again. Also, I've noticed that not all SDCard will behave the same, so try another SD Card if you have it.
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
July 21, 2014 04:09PM
@LouisV,

As grayman4hire said, the /boot/uImage and /boot/uInird must be on the SD card. You can interrupt netconsole and run u-boot command ext2ls to see if it can find the boot files

mmc init
ext2ls mmc 0:1 /boot

And by the way, I've uploaded the new U-Boot which should handle MMC a lot better:
http://forum.doozan.com/read.php?3,12381

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
I appreciate your help grayman4hire and I understood those lines were my problem, however I have reformatted and re-extracted the rootfs several times on two different cards to no avail. I have been using gparted (which worked fine with the USB stick).

I will re-format from the command line and report back.
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
July 21, 2014 04:18PM
LouisV,

> I have been using gparted (which worked fine with
> the USB stick).

Is the SD card MBR or GPT?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
July 21, 2014 05:36PM
Using a Debian USB Stick, I just use fdisk and the following commands to setup my SDCard.

mke2fs -L rootfs -j /dev/mmcblk0p1
mkdir /tmp/sdcard
mount /dev/mmcblk0p1 /tmp/sdcard
cd /tmp/sdcard

wget https://www.dropbox.com/s/16r9mv9nfh9so3j/Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2
tar -xjf Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2
You guys are great. bodhi I used MBR partition table.

Here is some diagnosis on my gparted formatted SD with the rootfs extracted. This is with the pogoplug booted off the USB stick but with the SD card inserted:

root@debian:~# fdisk -l

Disk /dev/mmcblk0: 15.9 GB, 15937306624 bytes
255 heads, 63 sectors/track, 1937 cylinders, total 31127552 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0005ff89

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            2048    31127551    15562752   83  Linux

Disk /dev/sda: 8022 MB, 8022654976 bytes
94 heads, 14 sectors/track, 11906 cylinders, total 15669248 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b0317

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    15669247     7833600   83  Linux

root@debian:~# df
Filesystem                1K-blocks   Used Available Use% Mounted on
rootfs                      7579576 299488   6888408   5% /
udev                          10240      0     10240   0% /dev
tmpfs                         12268     84     12184   1% /run
/dev/disk/by-label/rootfs   7579576 299488   6888408   5% /
tmpfs                          5120      0      5120   0% /run/lock
tmpfs                         24520      0     24520   0% /run/shm
tmpfs                         61332      0     61332   0% /tmp
/dev/mmcblk0p1             15203328 319716  14111312   3% /root/sd

root@debian:~# ls -ll /boot
total 19112
drwxr-xr-x  2 root root    4096 Apr  6 13:47 .
drwxr-xr-x 22 root root    4096 Apr  6 14:10 ..
-rw-r--r--  1 root root 1736932 Apr  2 01:25 System.map-3.14.0-kirkwood-tld-1
-rw-r--r--  1 root root  123040 Apr  1 22:19 config-3.14.0-kirkwood-tld-1
-rw-r--r--  1 root root 6362738 Apr  6 13:39 initrd.img-3.14.0-kirkwood-tld-1
-rw-r--r--  1 root root 2461416 Apr  6 13:44 uImage
-rw-r--r--  1 root root 6362802 Apr  6 13:44 uInitrd
-rw-r--r--  1 root root 2461352 Apr  2 01:25 vmlinuz-3.14.0-kirkwood-tld-1
root@debian:~# ls -ll sd/boot
total 19112
drwxr-xr-x  2 root root    4096 Apr  6 13:47 .
drwxr-xr-x 22 root root    4096 Apr  6 14:10 ..
-rw-r--r--  1 root root 1736932 Apr  2 01:25 System.map-3.14.0-kirkwood-tld-1
-rw-r--r--  1 root root  123040 Apr  1 22:19 config-3.14.0-kirkwood-tld-1
-rw-r--r--  1 root root 6362738 Apr  6 13:39 initrd.img-3.14.0-kirkwood-tld-1
-rw-r--r--  1 root root 2461416 Apr  6 13:44 uImage
-rw-r--r--  1 root root 6362802 Apr  6 13:44 uInitrd
-rw-r--r--  1 root root 2461352 Apr  2 01:25 vmlinuz-3.14.0-kirkwood-tld-1

root@debian:~# e2label /dev/sda1
rootfs
root@debian:~# e2label /dev/mmcblk0p1 
rootfs

root@debian:~# lsblk -f                                   
NAME        FSTYPE LABEL  MOUNTPOINT
sda                       
`-sda1      ext3   rootfs /
mmcblk0                   
`-mmcblk0p1 ext3   rootfs

I will follow up with the results of following grayman4hire's steps momentarily.
OK grayman4hire (on pogoplug mobile booted from USB):

root@debian:~# mke2fs -L rootfs -j /dev/mmcblk0p1 
mke2fs 1.42.5 (29-Jul-2012)
Filesystem label=rootfs
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
972944 inodes, 3890688 blocks
194534 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=3984588800
119 block groups
32768 blocks per group, 32768 fragments per group
8176 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

root@debian:~# mount /dev/mmcblk0p1 sd

root@debian:~# wget --no-check-certificate https://www.dropbox.com/s/16r9mv9nfh9so3j/Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 
[...]
HTTP request sent, awaiting response... 200 OK
Length: 99339058 (95M) [application/octet-stream]
Saving to: `Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2'

100%[===========================================================================================>] 99,339,058   324K/s   in 5m 8s   

2014-07-21 16:21:01 (314 KB/s) - `Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2' saved [99339058/99339058]

root@debian:~# md5sum Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 
3c55093a67ea6166b31c9d111d896727  ../Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2

root@debian:~# cd sd
root@debian:~/sd# ls
.  ..  lost+found
root@debian:~/sd# tar -xjf ../Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2
root@debian:~/sd# sync

Then I unmount, poweroff, unplug the USB and power on. It still fails to boot but now the error has changed:

Loading file "/boot/uImage" from mmc device 0:1 (xxa1)
 ** ext2fs_devread read outside partition sector 1639251488
** File not found /boot/uImage
Loading file "/boot/uInitrd" from mmc device 0:1 (xxa1)
 ** ext2fs_devread read outside partition sector 1639251488
** File not found /boot/uInitrd
Wrong Image Format for bootm command
ERROR: can't get kernel image!

Did I do anything wrong?

I tried interupting uboot as bodhi suggested. First with the SD card newly formatted and prepared on the command line:

Hit any key to stop autoboot:  8 
 0 
Pogov4> mmc init
mmc init
SDHC found. Card desciption is:
Manufacturer:       0x6f, OEM "\xff\xff"
Product name:       "SD   ", revision 0.0
Serial number:      268436523
Manufacturing date: 6/2011
CRC:                0x00, b0 = 0
mmc1 is available
Pogov4> ext2ls mmc 0:1 /boot
ext2ls mmc 0:1 /boot
mmc block read error
mmc block read error
mmc block read error
mmc block read error
mmc block read error
mmc block read error
 ** ext2fs_devread read outside partition sector 1639251488
Pogov4>

Next with my other SD card prepared using gparted:
Pogov4> ext2ls mmc 0:1 /boot
ext2ls mmc 0:1 /boot

I'm not sure, but shouldn't I see the boot files listed?

Pogov4> ext2ls mmc 0:1 /
ext2ls mmc 0:1 /
<DIR>       4096 .
<DIR>       4096 ..
<DIR>      16384 lost+found
<DIR>      98306 proc
<DIR>       4096 sbin
<DIR>          0 dev
<DIR>      98306 root
<SYM>         34 vmlinuz
<DIR>          0 usr
<DIR>          0 selinux
<DIR>          0 opt
<DIR>          0 boot
<DIR>          0 bin
<DIR>          0 etc
<DIR>          0 tmp
<SYM>         37 initrd.img
<DIR>          0 mnt
<DIR>       4096 var
<DIR>          0 home
<DIR>       4096 media
<DIR>          0 sys
<DIR>       4096 run
<DIR>          0 lib
<DIR>          0 srv
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
July 21, 2014 07:32PM
@LouisV,

Quote

> Pogov4> ext2ls mmc 0:1 /boot
> ext2ls mmc 0:1 /boot
> [/code]
>
> I'm not sure, but shouldn't I see the boot files
> listed?
>

> Pogov4> ext2ls mmc 0:1 /
> ext2ls mmc 0:1 /
> <DIR> 4096 .
> <DIR> 4096 ..
> <DIR> 16384 lost+found
> <DIR> 98306 proc
> <DIR> 4096 sbin
> <DIR> 0 dev
> <DIR> 98306 root
> <SYM> 34 vmlinuz
> <DIR> 0 usr
> <DIR> 0 selinux
> <DIR> 0 opt
> <DIR> 0 boot
> <DIR> 0 bin
> <DIR> 0 etc
> <DIR> 0 tmp
> <SYM> 37 initrd.img
> <DIR> 0 mnt
> <DIR> 4096 var
> <DIR> 0 home
> <DIR> 4096 media
> <DIR> 0 sys
> <DIR> 4096 run
> <DIR> 0 lib
> <DIR> 0 srv

Yes, the boot files are missing. But you have listed them OK inside Debian in previous post, right?

I would recommend installing the latest u-boot for Pogo V4 here. Remember davygravy's U-Boot image was a work-in-progress, not officially released by him. The symptom above seems to point to to either a bad SD card, or buggy MMC driver in U-Boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
OK Bodhi. I took your advice and flashed your shiny new uboot (thanks for that). I preserved the output from fw_printenv. I flashed the uboot and I flashed the environment.img because I wanted to revert as close to stock as possible.

The output from cat /proc/mtd was different to yours:

root@debian:~/uboot# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00200000 00020000 "u-boot"
mtd1: 00300000 00020000 "uImage"
mtd2: 00300000 00020000 "uImage2"
mtd3: 00800000 00020000 "failsafe"
mtd4: 07000000 00020000 "root"

As per my potentially flawed interpretation of your directions I changed
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
back to
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)

this is my full printenv:

root@debian:~# fw_printenv
arcNumber=2097
machid=0x831
baudrate=115200
bootcmd=run bootcmd_usb; bootcmd_mmc; bootcmd_sata; reset
bootcmd_mmc=run mmc_init; run set_bootargs_mmc; run mmc_boot
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot;
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mmc_boot=mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_init=mmc rescan
mmc_load_uimage=ext2load mmc $device 0x800000 /boot/uImage
mmc_load_uinitrd=ext2load mmc $device 0x1100000 /boot/uInitrd
mmc_root=/dev/mmcblk0p1
mtdids=nand0=orion_nand
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
rootdelay=10
rootfstype=ext3
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
set_bootargs_mmc=setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
usb_boot=mw 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=usb start
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=/dev/sda1
ethaddr=00:25:31:05:C6:7D
ipaddr=192.168.1.56
serverip=192.168.1.100
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)

I changed my serverip & ipadd to appropriate values. I set ethaddr to the real mac address of my pogoplug.

Unfortunately the Pogoplug still won't boot with the SD card and now the netconsole doesn't seem to work. Fortunately the device still boots from USB.

However, after I changed:
preboot_nc=run if_netconsole start_netconsole
to
preboot=run if_netconsole start_netconsole
the netconsole works again.

With no USB plugged in this is the output from the netconsole:
Unknown command 'bootcmd_mmc' - try 'help'
Unknown command 'bootcmd_sata' - try 'help'
resetting ...

Which is strange as I see those commands defined in the printenv output...
Two seconds after my last message I realised the obvious and changed:

bootcmd=run bootcmd_usb; bootcmd_mmc; bootcmd_sata; reset
to
bootcmd=run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; reset

And it started the kernel off the SD card!! (the same SD card which mysteriously didn't work before.)

U-Boot 2014.07-tld-1 (Jul 18 2014 - 00:59:45)
Pogoplug V4
gcc (Debian 4.6.3-14) 4.6.3
GNU ld (GNU Binutils for Debian) 2.22
Hit any key to stop autoboot:  0 
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
** Bad device usb 0 **
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!

MMC rescan: current device # 0 initialized OK
2461416 bytes read in 1372 ms (1.7 MiB/s)
6362802 bytes read in 1667 ms (3.6 MiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.14.0-kirkwood-tld-1
   Created:      2014-04-06  20:44:27 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2461352 Bytes = 2.3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-3.14.0-kirkwood-tld-1
   Created:      2014-04-06  20:44:41 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6362738 Bytes = 6.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK


Starting kernel ...

Thank you so much for your help.
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
July 21, 2014 10:37PM
Darn! :) Thanks for testing it! I might have an editing error in that bootcmd.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
July 21, 2014 10:41PM
LouisV,

Cool! just what I've suspected, the older MMC driver in davygravy's version might have problem with some SD cards. The kirkwood MMC driver used by ebbes is working much better.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
July 21, 2014 11:00PM
LouisV,

Quote

> As per my potentially flawed interpretation of
> your directions I changed
>
> mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage)
> ,32M(rootfs),-(data)
>
> back to
>
> mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage)
> ,3M(uImage2),8M(failsafe),112M(root)
> 

This is correct interpretation. Each box potentially has different mtdparts definition. For example iConnect, Stora, Pogo V4, all have different mtdparts definition. The default mtdparts is for other plugs.

Quote

> However, after I changed:
>
> preboot_nc=run if_netconsole start_netconsole
>
> to
>
> preboot=run if_netconsole start_netconsole
>
> the netconsole works again.

This is intentional. Preboot=run if_netconsole start_netconsole will prevent completed serial console output. So I'll let users decide to set it if they want to run netconsole. The default is serial input/output by convention.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
August 03, 2014 09:27AM
I followed below steps to install debian on my pogo V4-A1.
http://blog.qnology.com/2014/07/hacking-pogoplug-v4-series-4-and-mobile.html

But now i realize that i cannot use my pogo for my.pogoplug anymore. Blogger claims that instock firmware is present in NAND but needs change in uBoot to access it. It further suggests that i can reboot the pogo with 'revert' as a empty folder in a new USB .. but that does not work for me. It keeps on rebooting.

can someone suggest how can i coexist with Debian as well as my.pogo or if thats not possible then just use my.pogo
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
August 04, 2014 09:39AM
Hello, i just received my pogo v4 witht he intend to put an other linux on this i was in the process of installing arch linux (as decribed on their website) when i came accros this forum, and i must say, you guys seems active and support looks good. Thats why i ask, if i want to install debian and with the latest bootloader, will all the ports(sata, usb2/3, sdcard) on the pogo/V4 be usable? and will i be able to boot from an sdcard? if so, what is the best way to start and make sure i dont brick it(i do have the hw to unbrick)

I ask this because i am a bit swarmed by all the posts and information on here.
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
August 04, 2014 03:24PM
Tripleflix,

The answer to all your questions is yes. You only needs to follow 2 posts to install U-Boot and Rootfs:
http://forum.doozan.com/read.php?3,12381
http://forum.doozan.com/read.php?2,12096

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
August 04, 2014 04:30PM
saudagar,

Quote

> I followed below steps to install debian on my
> pogo V4-A1.
> http://blog.qnology.com/2014/07/hacking-pogoplug-v
> 4-series-4-and-mobile.html

> Blogger claims that instock
> firmware is present in NAND but needs change in
> uBoot to access it. It further suggests that i can
> reboot the pogo with 'revert' as a empty folder in
> a new USB .. but that does not work for me. It
> keeps on rebooting.

You probably followed a different instruction somewhere. I did look at Qui's Pogo V4 tutorial in the link and it was very well written, and did not advise what you mentioned above :)

So now, do you have serial console? if you keep the log of what you've done, then you could post it here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
August 04, 2014 06:07PM
Thanks Bodhi.. every one is using your installs to get best of this device. Thanks!!

At comments section. it was mentioned about 'revert' trick, but i think that works with a different version of s/w, unfortunately this version will not work with my.pogoplug

I will now buy a new device since they are still 7bucks at Amazon and use it.
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
August 04, 2014 08:19PM
Hi @saudagar,

Did you really have issue with your Pogoplug Mobile following the tutorial or did you only wanted to revert because you actually want to use the my.pogoplug.com service?

Getting another Pogoplug is the quickest and easiest solution. If you want to use the my.pogoplug.com (which I actually recommend). It's best to buy two Pogoplug Mobiles.

On Pogoplug 1#, keep the default OS and install Optware and SAMBA following this tutorial: http://blog.qnology.com/2013/11/how-to-install-optware-and-samba-on.html

On Pogoplug #2 (the one you already modified), install Debian and whatever else you want to use it for and point it at Pogoplug #1 for storage. For instance, install your Torrent Client (if that's what you're into on Pogoplug #2, but have the downloaded files stored on Pogoplug #1. Same for webcam; attach the webcam to Pogoplug #2 but have the photo and videos stored on Pogoplug #1.

gray


saudagar Wrote:
-------------------------------------------------------
> Thanks Bodhi.. every one is using your installs to
> get best of this device. Thanks!!
>
> At comments section. it was mentioned about
> 'revert' trick, but i think that works with a
> different version of s/w, unfortunately this
> version will not work with my.pogoplug
>
> I will now buy a new device since they are still
> 7bucks at Amazon and use it.
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
August 05, 2014 06:27AM
bodhi Wrote:
-------------------------------------------------------
> Tripleflix,
>
> The answer to all your questions is yes. You only
> needs to follow 2 posts to install U-Boot and
> Rootfs:
> http://forum.doozan.com/read.php?3,12381
> http://forum.doozan.com/read.php?2,12096


Thanks for your reply, im not sure where to start thou.

do i first install the uboot files or do i have to prepare a usb/sdcard with debian first,, i tried to use jeffs script for this but it seems to be broken.

i am still on a stock atm.
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
August 05, 2014 07:35AM
grayman4hire Wrote:
-------------------------------------------------------
> Hi @saudagar,
>
> Did you really have issue with your Pogoplug
> Mobile following the tutorial or did you only
> wanted to revert because you actually want to use
> the my.pogoplug.com service?
>
> Getting another Pogoplug is the quickest and
> easiest solution. If you want to use the
> my.pogoplug.com (which I actually recommend). It's
> best to buy two Pogoplug Mobiles.
>
> On Pogoplug 1#, keep the default OS and install
> Optware and SAMBA following this tutorial:
> http://blog.qnology.com/2013/11/how-to-install-opt
> ware-and-samba-on.html
>
> On Pogoplug #2 (the one you already modified),
> install Debian and whatever else you want to use
> it for and point it at Pogoplug #1 for storage.
> For instance, install your Torrent Client (if
> that's what you're into on Pogoplug #2, but have
> the downloaded files stored on Pogoplug #1. Same
> for webcam; attach the webcam to Pogoplug #2 but
> have the photo and videos stored on Pogoplug #1.
>
> gray
>
>
> saudagar Wrote:
> --------------------------------------------------
> -----
> > Thanks Bodhi.. every one is using your installs
> to
> > get best of this device. Thanks!!
> >
> > At comments section. it was mentioned about
> > 'revert' trick, but i think that works with a
> > different version of s/w, unfortunately this
> > version will not work with my.pogoplug
> >
> > I will now buy a new device since they are
> still
> > 7bucks at Amazon and use it.


@grayman4hire Thanks!! Yes i will be buying anotherone and going to point as you mentioned. That is easiest and cleanest solution in present scenario.
And 'Yes' i want to use my.pogo and didnt realize that with the tutorial i followed i wouldnt be able to use it.

I will follow the different tutorial through which my.pogo and samba gets enabled for the new pogo.

Can you point me how to enable the webcam/Airprint etc with my present pogoplug? or i will search the forums
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
August 05, 2014 02:55PM
Tripleflix,

Quote

do i first install the uboot files or do i have to prepare a usb/sdcard with debian first,, i tried to use jeffs script for this but it seems to be broken.

i am still on a stock atm.

Jeff's script does not have support for the Pogo V4/Mobile. I meant to modify it to do installation, but it is a time consuming task (changing script is easy, but a lots of testing needed) so never find the time to do it.

You can do both at the same time. Just prepare the rootfs on USB using a different Linux Box (2nd link). And then on the Pogo, install U-Boot from stock OS (1st link). Plug in the rootfs and reboot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [Pogoplug Mobile/Series 4] Install uBoot/Debian
August 05, 2014 03:07PM
bodhi Wrote:
-------------------------------------------------------
> Tripleflix,
>
>
> You can do both at the same time. Just prepare the
> rootfs on USB using a different Linux Box (2nd
> link). And then on the Pogo, install U-Boot from
> stock OS (1st link). Plug in the rootfs and
> reboot.

Do i simply copy the files on a ext2 usb stick?
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: