Welcome! Log In Create A New Profile

Advanced

Pogoplug Pro / v3 - flashing U-Boot / running Debian when internal rootfs isn't accessable

Posted by pengu 
I've got a fiew Pogoplug v3 / pro devices which doesn't boot propery.
With serial attached I noticed that U-Boot env is modified.
The stock kernel is booting up but a rootfs cannot be found.

I think a fiew people have modified their boxes in that way because there wasn't any newer U-Boot available and accessing / booting from USB isn't possible in stock U-Boot.
So they used the stock kernel to bring up the USB.
Because I only have these boxes and no rootfs that fits this situation, I decided to go forward in another way.

As you can see, the stock U-boot is up and running:

Stage-1 Bootloader XCE_STAGE1: 1.1: Tue Feb  8 01:40:26 PST 2011
Attempting to set PLLA to 700MHz ...
  plla_ctrl0 : 0x0000000A
  plla_ctrl1 : 0x000E0000
  plla_ctrl2 : 0x001C01A0
  plla_ctrl3 : 0x00000016
PLLA Set

Setup memory, testing
Reading NAND, Image 0
  Hdr len: 0x0001C030
  Hdr CRC: 0x39F6D832
 OK


U-Boot 1.1.2 (Jul 29 2010 - 19:36:07)

U-Boot code: 60D00000 -> 60D1C030  BSS: -> 60D21800
RAM Configuration:
        Bank #0: 60000000 128 MB
SRAM Configuration:
        64KB at 0x50000000
NAND:128 MiB
In:    serial
Out:   serial
Err:   serial
Setting Linux mem= boot arg value
Hit any key to stop autoboot:  0 
CE>>

Now we need network access.
Please change this to your needs:

CE>> setenv ipaddr 192.168.10.245
CE>> setenv serverip 192.168.10.128
CE>> ping 192.168.10.128
Wait GMAC to reset
Wait for PHY reset
PHY is Realtek RTL8211D
Wait for link to come up..........Link up
Wait for auto-negotiation to complete
Link is 1000M
host 192.168.10.128 is alive
CE>>

On the "server" machine, a TFTP is running, serving a prepared uImage (DTB embedded) and uInitrd.
Let's load them:

CE>> tftp 0x60500000 ox820/uImage
Wait GMAC to reset
Wait for PHY reset
PHY is Realtek RTL8211D
Wait for link to come up...........Link up
Wait for auto-negotiation to complete
Link is 1000M
TFTP from server 192.168.10.128; our IP address is 192.168.10.245
Filename 'ox820/uImage'.
Load address: 0x60500000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##########################################################
done
Bytes transferred = 4289601 (417441 hex)
CE>>

CE>> tftp 0x60e00000 ox820/uInitrd
Wait GMAC to reset
Wait for PHY reset
PHY is Realtek RTL8211D
Wait for link to come up...........Link up
Wait for auto-negotiation to complete
Link is 1000M
TFTP from server 192.168.10.128; our IP address is 192.168.10.245
Filename 'ox820/uInitrd'.
Load address: 0x60e00000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##########################################
done
Bytes transferred = 3874326 (3b1e16 hex)
CE>>

As you cen see, the uImage is quite big but as you'll see, this will boot up.
For this to work, you need do adjust the bootargs:

CE>> setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootfstype=ext4  mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 rootwait mem=128M poweroutage=yes
CE>>

Don't forget to plug a prepared rootfs (Debian Jessie or Wheezy] with the same kernel which was used for creating uImage and uInitrd.

Now let's boot:

CE>> bootm 0x60500000 0x60e00000
CE>>

The kernel and rootfs should be up and running in a fiew time.
Now you can proceed flashing U-Boot and prepare all things to your needs.

As mentioned in another thread (STG-212) there could be some problems
accessing /boot and / or /boot/dts when using the given env file and ext4 rootfs.
On this boxes this doesn't occour only after kernel upgrade, this could happen on first boot (with new U-Boot and rootfs),
so be warned.

A solution is use a seperate (fat formatted) /boot partition.
For this to work, the env has to be changed in the following way:



setenv dtb_file '/dts/ox820-pogoplug-pro.dtb'
setenv load_dtb 'echo loading DTB $dtb_file ...; fatload $bootdev $device 0x62c00000 $dtb_file'
setenv load_initrd 'echo loading uInitrd ...; fatload $bootdev $device 0x60e00000 /uInitrd'
setenv load_uimage 'echo loading uImage ...; fatload $bootdev $device 0x60500000 /uImage'
setenv uenv_read 'echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x60500000 /uEnv.txt; then setenv uenv_loaded 1; fi'


Please note that you have to use the correct DTB for your device, otherwhise it will not boot.

- For Pogoplug v3: "ox820-pogoplug-v3.dtb"
- For Pogoplug Pro: "ox820-pogoplug-pro.dtb"



Edited 2 time(s). Last edit at 07/29/2016 03:09AM by pengu.
hi pengu,

where can I got uImage/uInitrd if I dont have a environment to build them?
My Pogoplug Pro were install with an official openwrt version.
You can use the oxnas rootfs + kernel from here
Another way is described here.
It's possible to use the Kirkwood rootfs, build a Oxnas kernel (what I've done) and install it to that rootfs.
Atm I'm using vanilla 4.4.16 + patches from OpenWrt + modified config from the Oxnas Rootfs + Kernel thread.

The only thing you have to keep in mind is that you have to embed the DTS when (re)create uImage and uInitrd.



oxnas pogoplug rootfs Debian Jessie, Kernel 4.4.11
Kernel 4.4.16



Edited 1 time(s). Last edit at 07/31/2016 06:45AM by pengu.
it's appreciated!

I was struggling with the egg-chicken problems for many days and cannot found the valid Arch Arm URL int the stick list.
I already flashed the latest Uboot according bodhi's post in offical openwrt, but cannot boot any debian system to install latest kernel and rootfs.

Thanks again.
Re: Pogoplug Pro / v3 - flashing U-Boot / running Debian when internal rootfs isn't accessable
July 31, 2016 01:58PM
Laris Wrote:
-------------------------------------------------------
> it's appreciated!
>
> I was struggling with the egg-chicken problems for
> many days and cannot found the valid Arch Arm URL
> int the stick list.
> I already flashed the latest Uboot according
> bodhi's post in offical openwrt, but cannot boot
> any debian system to install latest kernel and
> rootfs.
>
> Thanks again.

So can you run the rootfs from here yet?

http://forum.doozan.com/read.php?2,16044

Quote

Updated 02 Nov 2014:

Rootfs Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2 was uploaded. This rootfs is to keep in sync with kernel Linux-3.17.0-oxnas-tld-1.

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

yes, i thought the steps complex in the past.
I think I should boot with the kernel/initrd firstly and boot into the usb/hdd rootfs and then update the kernel.
But after your rootfs url, I extracted them into usb stick and boot with your latest uboot and it smoothly boot into the debian7.0 syste.

Thanks again!
Hello Pengu,

Your post is very clear, but I didn't find " ox820/uImage" and "ox820/uInitrd", could you direct me where to download these two files?

Your help would be appreciated!
Re: Pogoplug Pro / v3 - flashing U-Boot / running Debian when internal rootfs isn't accessable
November 08, 2016 12:58PM
asterix ,

Do you still have problem installing?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
bodhi Wrote:
-------------------------------------------------------
> asterix ,
>
> Do you still have problem installing?

My B01 bricked, bought a serial to USB cable, connected, but don't know which file I should use to flash nand, frustrated!
Re: Pogoplug Pro / v3 - flashing U-Boot / running Debian when internal rootfs isn't accessable
November 09, 2016 12:42AM
asterix Wrote:
-------------------------------------------------------
> bodhi Wrote:
> --------------------------------------------------
> -----
> > asterix ,
> >
> > Do you still have problem installing?
>
> My B01 bricked, bought a serial to USB cable,
> connected, but don't know which file I should use
> to flash nand, frustrated!

You only need to flash u-boot to NAND. Not kernel files (uImage and uInitrd).

- Create USB rootfs:
http://forum.doozan.com/read.php?2,16044

Quote

Updated 02 Nov 2014:

Rootfs Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2 was uploaded. This rootfs is to keep in sync with kernel Linux-3.17.0-oxnas-tld-1.

- Plug in this USB rootfs,
- power up, interrupt serial console, and
version
printenv
boot

And post the entire serial console log. This is so I can see what's you have installed, or whether your u-boot on NAND is still good.

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



Edited 1 time(s). Last edit at 11/09/2016 12:43AM by bodhi.
Thanks Bodhi,

I flashed openwrt uboot, but pogo didn't boot up, so I am looking for a way to flash by debian......


Stage-1 Bootloader XCE_STAGE1: 1.1: Tue Feb  8 01:40:26 PST 2011
Attempting to set PLLA to 700MHz ...
  plla_ctrl0 : 0x0000000A
  plla_ctrl1 : 0x000E0000
  plla_ctrl2 : 0x001C01A0
  plla_ctrl3 : 0x00000016
PLLA Set

Setup memory, testing
Reading NAND, Image 0
  Hdr len: 0x0001C030
  Hdr CRC: 0x39F6D832
 OK


U-Boot 1.1.2 (Jul 29 2010 - 19:36:07)

U-Boot code: 60D00000 -> 60D1C030  BSS: -> 60D21800
RAM Configuration:
	Bank #0: 60000000 128 MB
SRAM Configuration:
	64KB at 0x50000000
NAND:128 MiB
In:    serial
Out:   serial
Err:   serial
Setting Linux mem= boot arg value
Hit any key to stop autoboot:  0 
CE>> 

onnection closed.

Disconnected from remote host(pogpoplug) at 00:31:22.

Type `help' to learn how to use Xshell prompt.
[c:\~]$ 

Connecting to COM3...
Connected.


  Hdr len: 0x0001C030
  Hdr CRC: 0x39F6D832
 OK


U-Boot 1.1.2 (Jul 29 2010 - 19:36:07)

U-Boot code: 60D00000 -> 60D1C030  BSS: -> 60D21800
RAM Configuration:
	Bank #0: 60000000 128 MB
SRAM Configuration:
	64KB at 0x50000000
NAND:128 MiB
In:    serial
Out:   serial
Err:   serial
Setting Linux mem= boot arg value
Hit any key to stop autoboot:  0 
CE>>



Edited 7 time(s). Last edit at 11/15/2016 02:32AM by asterix.
Hit any key to stop autoboot:  0 

NAND read: device 0 offset 0x440000, size 0x90000
 589824 bytes read: OK
## Starting application at 0x64000000 ...


U-Boot 2014.04 (Jul 01 2014 - 00:52:16) for OXNAS

DRAM:  128 MiB
NAND:  128 MiB
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=1"
UBI: MTD device size:            114 MiB
UBI: number of good PEBs:        909
UBI: number of bad PEBs:         3
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 909
UBI: number of PEBs reserved for bad PEB handling: 9
UBI: max/mean erase counter: 2/1
Volume ubootenv not found!

** Unable to read env from ubi:ubootenv **
Volume ubootenv2 not found!

** Unable to read redundant env from ubi:ubootenv2 **
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   dwmac.40400000
Hit any key to stop autoboot:  0 
Read 0 bytes from volume kernel to 62000000
Volume kernel not found!
UBI: mtd1 is detached from ubi0
incorrect device type in data
Partition data not found!
ubifsumount - unmount UBIFS volume

Usage:
ubifsumount     - unmount current volume

NAND read: device 0 offset 0x4e0000, size 0x400000
 4194304 bytes read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!
<NULL> Waiting for PHY auto negotiation to complete......... TIMEOUT !
Waiting for PHY realtime link...... TIMEOUT !
 done
<NULL>: No link.
OX820 # 
<NULL>: No link.
OX820 # version

U-Boot 2014.04 (Jul 01 2014 - 00:52:16) for OXNAS
arm-openwrt-linux-uclibcgnueabi-gcc (OpenWrt/Linaro GCC 4.8-2014.04 20140629) 4.8.3
GNU ld (GNU Binutils) 2.22
OX820 # printenv
autoload=no
baudrate=115200
boot_dhcp=run load_kernel_dhcp && run boot_kernel;
boot_kernel=bootm 0x62000000;
boot_rescue=run load_kernel_rescue && run boot_kernel;
boot_ubi=run load_kernel_ubi && run boot_kernel;
boot_ubifs=run load_kernel_ubifs && run boot_kernel; ubifsumount ubi0;
bootargs=console=ttyS0,115200n8 earlyprintk=serial
bootcmd=run normalboot; 
bootdelay=1
console=console=ttyS0,115200n8 earlyprintk=serial
ethact=dwmac.40400000
ethaddr=00:25:31:01:66:5F
ipaddr=192.168.1.1
load_kernel_dhcp=dhcp 0x62000000 oxnas-rescue.bin;
load_kernel_rescue=nand read 0x62000000 0x4e0000 0x400000;
load_kernel_ubi=ubi readvol 0x62000000 kernel;
load_kernel_ubifs=ubi part data &&ubifsmount ubi0 &&ubifsload 62000000 /boot/uImage.itb;
mtddevname=boot
mtddevnum=0
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(ubi)
normalboot=run boot_ubi; run boot_ubifs; run boot_rescue; run boot_dhcp;
partition=nand0,0
serverip=192.168.1.100
stderr=serial
stdin=serial
stdout=serial

Environment size: 1051/16379 bytes
OX820 # boot
Read 0 bytes from volume kernel to 62000000
Volume kernel not found!
incorrect device type in data
Partition data not found!
ubifsumount - unmount UBIFS volume

Usage:
ubifsumount     - unmount current volume

NAND read: device 0 offset 0x4e0000, size 0x400000
 4194304 bytes read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!
<NULL> Waiting for PHY auto negotiation to complete......... TIMEOUT !
Waiting for PHY realtime link...... TIMEOUT !
 done
<NULL>: No link.
OX820 #
Sorry Bodhi, I am new on embedded device, don't have more idea about uboot or bootloader , this is why I am looking for step by step process to flash pogoplug b01
Re: Pogoplug Pro / v3 - flashing U-Boot / running Debian when internal rootfs isn't accessable
November 16, 2016 12:34AM
asterix,

These are summaried steps.

1. Create Debian rootfs on USB. You can do this using any Linux box (Ubuntu, Virtualbox,...):

http://forum.doozan.com/read.php?2,16044

2. Boot into stock OS, and then flash new u-boot from there:

http://forum.doozan.com/read.php?3,16017

3. Plug in the USB Debian rootfs, and reboot.

If you have question along the way then stop and post that question.

-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: