Welcome! Log In Create A New Profile

Advanced

OpenWRT for PogoPlug Pro rootfs tar

Posted by habibie 
Re: OpenWRT for PogoPlug Pro rootfs tar
May 07, 2015 06:43AM
grayman4hire Wrote:
-------------------------------------------------------
> habibie Wrote:
> --------------------------------------------------
> -----
> > What I ultimately want to achieve is to have
> > replace the stock firmware with a self-built
> > OpenWRT firmware. This way, I can have my
> device
> > to boot either from NAND storage and/or any
> > external storage, i.e. SATA or USB storage,
> etc.,
> > if they are available. I certainly will
> appreciate
> > if anyone can help.
>
> @habibie, what's wrong with my tutorial then?
>
> [url=http://blog.qnology.com/2015/04/openwrt-on-po
> goplug-v3oxnas-proclassic.html]OpenWRT on Pogoplug
> v3/Oxnas (Pro/Classic))[/url]
>
I don't see anything is wrong with your tutorial, except it is for /dev/mtd1 partition while I want to configure mine to boot off of a USB partition and leave the mtd1 intact with the stock firmware for now.

> Just replace the snapshot files
> (openwrt-oxnas-pogoplug-pro-squashfs-sysupgrade.ta
> r and zImage), with the rootfs and kernel from
> your build.
>
> Not really sure why you feel the need to build
> your own image though. Typically, the biggest
> advantage to building your own OpenWRT build is to
> save space, but since the Pogoplug has 128MB, that
> shouldn't be a concern.
>
Like I said before, I will eventually flash a self-built OpenWRT firmware to the NAND storage (/dev/mtd1). It will have only software I need with my own default settings, i.e. FreeSWITCH (and probably also FusionPBX if space allows) and among other things.
Re: OpenWRT for PogoPlug Pro rootfs tar
May 07, 2015 06:54AM
bodhi Wrote:
-------------------------------------------------------
> habibie,
>
> > storage. Remember this dt_bootm=bootm
> > $uimage_addr - $dtb_addr
. If you look at my
> > environment settings, the uimage_addr is
> > set to uimage_addr=0x60500000. Isn't
> that
> > the address on NAND storage and not on an
> external
> > USB storage?
>
> No, it is the RAM address of the region that
> you've loaded the image into. Just so happen that
> the base address is 0x60000000.
>
Yes.

> >
> > What I ultimately want to achieve is to have
> > replace the stock firmware with a self-built
> > OpenWRT firmware. This way, I can have my
> device
> > to boot either from NAND storage and/or any
> > external storage, i.e. SATA or USB storage,
> etc.,
> > if they are available. I certainly will
> appreciate
> > if anyone can help.
>
> As graymanforhire said, you could use his
> instruction, which is very well written and has
> most everything you need.
>
> You just need to adapt it to your specific set up.
> Now if you want to boot from USB, and have the
> system on USB, then you'll need to modify the
> u-boot envs to load zImage from there, and make
> sure the env point to the USB rootfs (not NAND).
>
Yes. It is time to peruse your U-Boot - Booting process in multiple drives configuration and learn how to craft a good uboot env setting that I want. I am sure I will come back to ask more questions as I go. Thank you.
Re: OpenWRT for PogoPlug Pro rootfs tar
May 07, 2015 08:31AM
Hello Bodhi,

I noticed from both Hacking the Pogoplug v3/Oxnas (Pro/Classic) with Debian tutorial and from your 2013.10 U-Boot for Pogoplug V3 (OXNAS) post referring to uboot.2013.10-tld-4.ox820.bodhi.tar. This is what I have flashed my PogoPlug Pro 02 with. Also, from your U-Boot - Booting process in multiple drives configuration, the 1st paragraph on section A.2. (New scanning script to scan all types of device looking for uImage in 1st partition) indicates it is possible to implement a more complex scanning logic for all drives using the new u-boot 2014.07-tld-2 and might work even with the old u-boot. The question I have is will the uboot.2013.10-tld-4.ox820.bodhi.tar I flashed on my device be able to support the more complex scanning logic for all drives? This way, I will focus more on the more complex scanning logic for all drives instead of the old method.
Re: OpenWRT for PogoPlug Pro rootfs tar
May 07, 2015 11:02AM
Somewhere bodhi posted a link to the tld-5 version of Oxnas uboot. Not sure why he never updated the thread for this. But this might be what you need for the multi-boot scan logic you are referring to.

Edit: Just did a search, the load link is here: uboot.2013.10-tld-5.ox820.bodhi.tar



Edited 3 time(s). Last edit at 05/07/2015 11:08AM by LeggoMyEggo.
Re: OpenWRT for PogoPlug Pro rootfs tar
May 07, 2015 11:23AM
habibie Wrote:
> What I ultimately want to achieve is to have
> replace the stock firmware with a self-built
> OpenWRT firmware. This way, I can have my device
> to boot either from NAND storage and/or any
> external storage, i.e. SATA or USB storage, etc.,
> if they are available. I certainly will appreciate
> if anyone can help.

You stated that you ultimately want to replace the stock firmware with OpenWRT (while maintaining the ability to boot Debian from USB) and the tutorial provides the exact instructions. I'm really confused as to why you're making it more difficult by trying to boot OpenWRT from your USB drive.

-grayman4hire
======================================
Pogoplug V2 and V3 Serial Connection
Tutorial - Pogoplug v4 (Series 4 and Mobile) with Linux (Debian or Arch)

OpenWRT on Pogoplug Mobile
Tutorial - Pogoplug E02/V4 with Arch Linux ARM
Hacking the Pogoplug v3/Oxnas (Pro/Classic) with Debian

OpenWRT on Pogoplug v3/Oxnas (Pro/Classic)
Re: OpenWRT for PogoPlug Pro rootfs tar
May 07, 2015 11:25AM
habibie Wrote:
> I don't see anything is wrong with your tutorial,
> except it is for /dev/mtd1 partition while I want
> to configure mine to boot off of a USB partition
> and leave the mtd1 intact with the stock firmware
> for now.

That contradicts your other statement about wanting to boot OpenWRT off the internal NAND.

-grayman4hire
======================================
Pogoplug V2 and V3 Serial Connection
Tutorial - Pogoplug v4 (Series 4 and Mobile) with Linux (Debian or Arch)

OpenWRT on Pogoplug Mobile
Tutorial - Pogoplug E02/V4 with Arch Linux ARM
Hacking the Pogoplug v3/Oxnas (Pro/Classic) with Debian

OpenWRT on Pogoplug v3/Oxnas (Pro/Classic)
Re: OpenWRT for PogoPlug Pro rootfs tar
May 07, 2015 02:34PM
LeggoMyEggo Wrote:
-------------------------------------------------------
> Somewhere bodhi posted a link to the tld-5 version
> of Oxnas uboot. Not sure why he never updated the
> thread for this. But this might be what you need
> for the multi-boot scan logic you are referring
> to.
>
> Edit: Just did a search, the load link is here:
> uboot.2013.10-tld-5
> .ox820.bodhi.tar

>
LeggoMyEggo ,

Thank you for the link. I will update my uboot with this one. Is there any gotchas in upgrading to this uboot from the current one I have?
Re: OpenWRT for PogoPlug Pro rootfs tar
May 07, 2015 02:42PM
grayman4hire Wrote:
-------------------------------------------------------
> habibie Wrote:
> > What I ultimately want to achieve is to have
> > replace the stock firmware with a self-built
> > OpenWRT firmware. This way, I can have my
> device
> > to boot either from NAND storage and/or any
> > external storage, i.e. SATA or USB storage,
> etc.,
> > if they are available. I certainly will
> appreciate
> > if anyone can help.
>
> You stated that you ultimately want to replace the
> stock firmware with OpenWRT (while maintaining the
> ability to boot Debian from USB) and the tutorial
> provides the exact instructions. I'm really
> confused as to why you're making it more difficult
> by trying to boot OpenWRT from your USB drive.
>
Hello grayman4hire,

Yes and I did say that somewhere. However, I will preserve the original firmware at the moment. The reason is I want to test OpenWRT up to the point I like and use it to replace the stock firmware.
Re: OpenWRT for PogoPlug Pro rootfs tar
May 07, 2015 03:03PM
habibie Wrote:
> Thank you for the link. I will update my uboot
> with this one. Is there any gotchas in upgrading
> to this uboot from the current one I have?

None that I am aware of or have experienced. Here is the original thread for context: http://forum.doozan.com/read.php?3,16017,20239#msg-20239
Re: OpenWRT for PogoPlug Pro rootfs tar
May 07, 2015 03:35PM
@LeggoMyEggo,

I meant to eventually, but forgot all about it :) The only difference between version tld-4 and tld-5 is the uEnv.txt loading. And it seems there is not a lot of users need it. Usually, after u-boot envs have been set up, nobody wants to mess with it anymore, which is good, not safe to play with it unless you have serial console. Even with serial console, there is a very small probability that you can still be locked out (changing preboot variable).

@habibie,

Are you planning to boot with both Debian and OpenWrt sticks plugged in? You can go ahead with flashing tld-5. It will make it easier to experiment.

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



Edited 1 time(s). Last edit at 05/07/2015 03:51PM by bodhi.
Re: OpenWRT for PogoPlug Pro rootfs tar
May 07, 2015 06:45PM
habibie Wrote:
> Yes and I did say that somewhere. However, I will
> preserve the original firmware at the moment. The
> reason is I want to test OpenWRT up to the point I
> like and use it to replace the stock firmware.

So to summarize, you want to boot OpenWRT from USB.

This is possible and I've done it before. I want to say (don't quote me), you don't need to change any uboot env. It should be the same as booting Debian, given that you have the OpenWRT uImage and the fdt in the same place - /boot/uImage and /boot/dts/xxx.fdt

-grayman4hire
======================================
Pogoplug V2 and V3 Serial Connection
Tutorial - Pogoplug v4 (Series 4 and Mobile) with Linux (Debian or Arch)

OpenWRT on Pogoplug Mobile
Tutorial - Pogoplug E02/V4 with Arch Linux ARM
Hacking the Pogoplug v3/Oxnas (Pro/Classic) with Debian

OpenWRT on Pogoplug v3/Oxnas (Pro/Classic)
Re: OpenWRT for PogoPlug Pro rootfs tar
May 07, 2015 06:50PM
grayman4hire,

> It should be the same as booting
> Debian, given that you have the OpenWRT uImage and
> the fdt in the same place - /boot/uImage and
> /boot/dts/xxx.fdt

Yes.

OTHO, habibie does need to change envs if booting with zImage as you did.

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



Edited 1 time(s). Last edit at 05/07/2015 06:50PM by bodhi.
Re: OpenWRT for PogoPlug Pro rootfs tar
May 07, 2015 06:51PM
bodhi Wrote:
-------------------------------------------------------
> habibie,
>
> To not loading and using uInitrd, these 2 envs
>
> dt_usb_boot=run dt_load_uimage; run
> dt_load_initrd; run dt_load_dtb; run dt_bootm
> dt_bootm=bootm $uimage_addr $uinitrd_addr
> $dtb_addr
>
> should be changed to
>
> dt_usb_boot=run dt_load_uimage; run dt_load_dtb;
> run dt_bootm
> dt_bootm=bootm $uimage_addr - $dtb_addr
>
>
> Note the - (minus) in dt_bootm, it tells u-boot
> that there is no uInitrd, but there is a DTB file
> at $dtb_addr.

Okay, you probably need to change the uBoot env as bodhi suggested above. Sorry, I'm not familiar with the default OXNAS uBoot env variables. I was thinking of the other Pogoplugs E02/V4 uboot that also boot ALARM which doesn't use uInitrd.

-grayman4hire
======================================
Pogoplug V2 and V3 Serial Connection
Tutorial - Pogoplug v4 (Series 4 and Mobile) with Linux (Debian or Arch)

OpenWRT on Pogoplug Mobile
Tutorial - Pogoplug E02/V4 with Arch Linux ARM
Hacking the Pogoplug v3/Oxnas (Pro/Classic) with Debian

OpenWRT on Pogoplug v3/Oxnas (Pro/Classic)
Re: OpenWRT for PogoPlug Pro rootfs tar
May 07, 2015 10:13PM
bodhi Wrote:
-------------------------------------------------------
> @habibie,
>
> Are you planning to boot with both Debian and
> OpenWrt sticks plugged in? You can go ahead with
> flashing tld-5. It will make it easier to
> experiment.
>
Bodhi,

Yes. I want to be able to switch between the OSes. I will create some 20 GB empty partitions for future use. For instance, let's say my device has been running either Debian or OpenWRT without any problem and I want to upgrade either or both of the OSes. In this case, I would prefer to use the empty partitions to install newer versions of both OSes. If the new versions run OK, then I will leave them alone until the next upgrade which will use the older partitions. yes and this is like the way Linksys WRTP54G router partitions.
Re: OpenWRT for PogoPlug Pro rootfs tar
May 07, 2015 10:17PM
grayman4hire Wrote:
-------------------------------------------------------
> habibie Wrote:
> > Yes and I did say that somewhere. However, I
> will
> > preserve the original firmware at the moment.
> The
> > reason is I want to test OpenWRT up to the point
> I
> > like and use it to replace the stock firmware.
>
> So to summarize, you want to boot OpenWRT from
> USB.
>
Yes and for testing purposes. Once the testing is done, I will move the OS to SATA drive and boot from there. If there is a problem with my SATA drive, I like my device to boot off of the NAND storage unless there is OS on the USB partition.

> This is possible and I've done it before. I want
> to say (don't quote me), you don't need to change
> any uboot env. It should be the same as booting
> Debian, given that you have the OpenWRT uImage and
> the fdt in the same place - /boot/uImage and
> /boot/dts/xxx.fdt
>
I did make some changes to my env before by removing the uInitrd.
Re: OpenWRT for PogoPlug Pro rootfs tar
May 08, 2015 10:11AM
I upgraded uboot to uboot.2013.10-tld-5.ox820.bodhi.tar and it was pretty straightforward. Right now, my env setting is a complete chaos. Since the newly flashed uboot supports uEnv.txt script, I am thinking to restore my env setting to the one from pogopro_uboot_env.img and use uEnv.txt script on the USB storage to change the env settings. This way, I don't have to keep writing the NAND storage for uboot env setting. What do you think?
Re: OpenWRT for PogoPlug Pro rootfs tar
May 08, 2015 03:03PM
habibie Wrote:
-------------------------------------------------------
> Since the newly flashed uboot
> supports uEnv.txt script, I am thinking to restore
> my env setting to the one from
> pogopro_uboot_env.img and use uEnv.txt script on
> the USB storage to change the env settings. This
> way, I don't have to keep writing the NAND storage
> for uboot env setting. What do you think?

That's what I did. You just have to make sure you set your variable using 'variable'='x' i.e. ethaddr=00:3d:32:4c:32:00 instead of fw_setenv ethaddr '00:3d:32:4c:32:00' with your entries in uEnv.txt. Below is a sample set I came up with but havent updated to include full support for netconsole and the like. Obviously it needs to be adjusted if you are going to boot OpenWRT off of USB. If you want to boot from SATA instead of USB, all you need to change is one line, bootcmd=run dt_bootcmd_ide instead of bootcmd=run dt_bootcmd_usb. That's the nice thing about the new u-boot.

Sample uEnv.txt contents:

autoload=no
baudrate=115200
bootdelay=3
rootdelay=10
rootfstype=ext3
console=console=ttyS0,115200n8
usb_root=/dev/sda1 
ide_root=/dev/sda1
ethact=mii0
ethaddr=>>>>>>>>>>>>>>>NOTHING HERE YET<<<<<<<<<<<<<<<<<<
serverip=>>>>>>>>>>>>>>>NOTHING HERE YET<<<<<<<<<<<<<<<<<<
ipaddr=>>>>>>>>>>>>>>>NOTHING HERE YET<<<<<<<<<<<<<<<<<<<
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
preboot_nc=run if_netconsole start_netconsole
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version
stdin=serial
stdout=serial
stderr=serial
uimage_addr=0x60500000
uinitrd_addr=0x60e00000
dtb_addr=0x62c00000
boot_device=0:1
bootcmd=run dt_bootcmd_usb
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
dt_bootcmd_ide=ide reset; run dt_ide_bootcmd; ide reset
dt_ide_bootcmd=run ide_set_bootargs; run dt_ide_boot
ide_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10
dt_ide_boot=run dt_ide_load_uimage; run dt_ide_load_initrd; run dt_ide_load_dtb; run dt_bootm
dt_ide_load_uimage=ext2load ide $boot_device $uimage_addr /boot/uImage
dt_ide_load_initrd=ext2load ide $boot_device $uinitrd_addr /boot/uInitrd
dt_ide_load_dtb=ext2load ide $boot_device $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
dt_usb_bootcmd=run usb_set_bootargs; run dt_usb_boot
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10
dt_usb_boot=run dt_usb_load_uimage; run dt_usb_load_initrd; run dt_usb_load_dtb; run dt_bootm
dt_usb_load_uimage=ext2load usb $boot_device $uimage_addr /boot/uImage
dt_usb_load_initrd=ext2load usb $boot_device $uinitrd_addr /boot/uInitrd
dt_usb_load_dtb=ext2load usb $boot_device $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb

A sample copy for the lazy is attached. You need to change the file name and finish filling out the entries.



Edited 2 time(s). Last edit at 05/08/2015 03:10PM by LeggoMyEggo.
Attachments:
open | download - uEnv.txt-sample (1.8 KB)
Re: OpenWRT for PogoPlug Pro rootfs tar
May 08, 2015 03:10PM
Based on LeggoMyEggo's post and Bodhi's post, I set my uboot env as well as /boot/uEnv.txt (on USB storage) settings as follows:
  1. uboot env:
    Quote

    autoload=no
    baudrate=115200
    bootargs=console=ttyS0,115200n8
    bootcmd=run bootcmd_uenv; run dt_bootcmd_usb; run dt_bootcmd_sata; reset
    bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
    bootdelay=10
    console=console=ttyS0,115200n8
    devices=usb ide
    dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
    dt_bootm=bootm $uimage_addr - $dtb_addr
    dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file
    dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boot/openwrt-oxnas-uImage-initramfs
    dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot/openwrt-oxnas-uImage
    dt_usb_boot=run dt_load_uimage; run dt_load_dtb; run dt_bootm
    dt_usb_bootcmd=run usb_set_bootargs; run dt_usb_boot
    dtb_addr=0x62c00000
    ethact=mii0
    ethaddr=00:11:22:33:44:55
    fdt_file=/boot/openwrt-oxnas-pogoplug-pro.dtb
    if_netconsole=ping $serverip
    ipaddr=10.0.0.253
    mtdids=nand0=41000000.nand
    mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
    preboot=run preboot_nc
    preboot_nc=run if_netconsole start_netconsole
    serverip=10.0.0.100
    start_netconsole=setenv ncip $serverip; setenv bootdelay 5; setenv stdin nc; setenv stdout nc; setenv stderr nc; version
    stderr=serial
    stdin=serial
    stdout=serial
    uenv_import=echo importing envs ...; env import -t 0x60500000
    uenv_init_devices=setenv init_usb "usb start"; setenv init_ide "ide reset"; for devtype in $devices; do run init_$devtype; done;
    uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices; do for disknum in 0; do run uenv_read_disk; done; done;
    uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x60500000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
    uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read; fi; else if $devtype part $disknum; then run uenv_read; fi; fi
    uimage_addr=0x60500000
    uinitrd_addr=0x60e00000
    usb_device=0:1
    usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10
  2. /boot/uEnv.txt
    Quote

    bootcmd=run bootcmd_usb; reset
    bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
    bootdelay=5
    console=ttyS0,115200
    device=0:1
    rootdelay=5
    usb_boot=run usb_load_uimage; run usb_load_dtb; if run usb_load_dtb; then bootm $uimage_addr - $dtb_addr; fi
    usb_init=usb start
    usb_load_uimage=ext2load usb $device $uimage_addr /boot/openwrt-oxnas-uImage
    usb_load_dtb=ext2load usb $device $dtb_addr /boot/openwrt-oxnas-pogoplug-pro.dtb
    usb_root=/dev/sda1
    uimage_addr=0x60500000
    uinitrd_addr=0x60e00000
    dtb_addr=0x62c00000
    set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay

Both the netconsole and linux boot dumps are as shown belows. the problem still persists. It looks like I need to change the uimage_addr on my /boot/uEnv.txt so that uboot will find my OpenWRT partition on the USB storage. However, I have no idea what will be the new uimage_addr. Does anyone here know?

U-Boot 2013.10-tld-5 (Mar 07 2015 - 16:50:17) for OXNAS
gcc (Debian 4.9.1-19) 4.9.1
GNU ld (GNU Binutils for Debian) 2.24.90.20141023
Hit any key to stop autoboot:  0 
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Reset IDE: SATA PHY not ready for device 0
ide_preinit failed

Partition Map for USB device 0  --   Partition Type: DOS

Part	Start Sector	Num Sectors	UUID		Type
  1	1         	990975    	00000000-01	83 Boot
loading envs from usb 0 ...
607 bytes read in 204 ms (2 KiB/s)

no IDE devices available
importing envs ...
## Info: input data size = 2158 = 0x86E
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
1729752 bytes read in 409 ms (4 MiB/s)
6993 bytes read in 183 ms (37.1 KiB/s)
## Booting kernel from Legacy Image at 60500000 ...
   Image Name:   ARM OpenWrt Linux-3.18.11
   Created:      2015-05-07   3:03:21 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1729688 Bytes = 1.6 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 62c00000
   Booting using the fdt blob at 0x62c00000


Starting kernel ...
and the kernel boot dump:
Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.18.11 (debian@debian) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r45621) ) #1 SMP Wed May 6 23:02:55 EDT 2015
[    0.000000] CPU: ARMv6-compatible processor [410fb025] revision 5 (ARMv7), cr=00c5787d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Pogoplug Pro
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map
[    0.000000] PERCPU: Embedded 9 pages/cpu @ce0e0001 s6679 r1928 d61567 u64646
[    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
[    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: 125032K/131072K available (3265K kernel code, 181K rwdata, 928K rodata, 180K init, 217K bss, 6040K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xffe00000   (2048 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 - 0xc042089c   (4195 kB)
[    0.000000]       .init : 0xc0421000 - 0xc044e000   ( 180 kB)
[    0.000000]       .data : 0xc044e000 - 0xc047b5b8   ( 182 kB)
[    0.000000]        .bss : 0xc047b5b8 - 0xc04b1bcc   ( 218 kB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:160
[    0.000017] sched_clock: 24 bits at 390kHz, resolution 2560ns, wraps every 42949670400ns
[    0.000268] Calibrating delay loop... 339.14 BogoMIPS (lpj=1695744)
[    0.050055] pid_max: default: 32768 minimum: 301
[    0.050304] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.050324] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.050977] CPU: Testing write buffer coherency: ok
[    0.051351] Setting up static identity map for 0x60011b28 - 0x60011b84
[    0.053521] CPU1: Booted secondary processor
[    0.110182] Brought up 2 CPUs
[    0.110205] SMP: Total of 2 processors activated (678.29 BogoMIPS).
[    0.112908] VFP support v0.3: not present
[    0.113587] pinctrl core: initialized pinctrl subsystem
[    0.116062] NET: Registered protocol family 16
[    0.116546] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.140042] cpuidle: using governor ladder
[    0.160023] cpuidle: using governor menu
[    0.166095] gpio-oxnas 44000000.gpio: at address c8848000
[    0.166479] gpio-oxnas 44100000.gpio: at address c884a000
[    0.167040] pinctrl-oxnas pinctrl: initialized OX820 pinctrl driver
[    0.322731] oxnas-pcie 47c00000.pcie-controller: PCIe version/deviceID 0x82510b5
[    0.322810] oxnas-pcie 47c00000.pcie-controller: link up
[    0.323143] oxnas-pcie 47c00000.pcie-controller: PCI host bridge to bus 0000:00
[    0.323176] pci_bus 0000:00: root bus resource [mem 0x48000000-0x49ffffff]
[    0.323192] pci_bus 0000:00: root bus resource [mem 0x4a000000-0x4bdfffff pref]
[    0.323210] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff]
[    0.323228] pci_bus 0000:00: root bus resource [bus 00-7f]
[    0.323727] PCI: bus0: Fast back to back transfers disabled
[    0.323840] pci 0000:00:00.0: BAR 0: assigned [mem 0x48000000-0x4800ffff]
[    0.324510] SCSI subsystem initialized
[    0.325731] usbcore: registered new interface driver usbfs
[    0.325852] usbcore: registered new interface driver hub
[    0.325987] usbcore: registered new device driver usb
[    0.326208] pps_core: LinuxPPS API ver. 1 registered
[    0.326223] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.326312] PTP clock support registered
[    0.327889] Switched to clocksource rps_clocksource_timer
[    0.330506] NET: Registered protocol family 2
[    0.331450] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.331499] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.331532] TCP: Hash tables configured (established 1024 bind 1024)
[    0.331640] TCP: reno registered
[    0.331673] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.331732] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.332088] NET: Registered protocol family 1
[    0.334937] futex hash table entries: 512 (order: 2, 16384 bytes)
[    0.336104] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.336151] msgmni has been set to 244
[    0.337052] io scheduler noop registered
[    0.337082] io scheduler deadline registered (default)
[    0.338081] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.339537] console [ttyS0] disabled
[    0.339640] 44200000.uart: ttyS0 at MMIO 0x44200000 (irq = 55, base_baud = 390625) is a 16550A
[    0.793687] console [ttyS0] enabled
[    0.799754] nand: Could not find valid ONFI parameter page; aborting
[    0.806164] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    0.812485] nand: Hynix NAND 128MiB 3,3V 8-bit
[    0.816952] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[    0.822592] Scanning device for bad blocks
[    0.909038] 2 ofpart partitions found on MTD device 41000000.nand
[    0.915261] Creating 2 MTD partitions on "41000000.nand":
[    0.920652] 0x000000000000-0x000000e00000 : "boot"
[    0.926945] 0x000000e00000-0x000008000000 : "ubi"
[    0.934051] stmmaceth 40400000.ethernet: no reset control found
[    0.939957] stmmac - user ID: 0x12, Synopsys ID: 0x35
[    0.945000]  Ring mode enabled
[    0.948037]  DMA HW capability register supported
[    0.952537]  Enhanced/Alternate descriptors
[    0.956879]  Enabled extended descriptors
[    0.960867]  RX Checksum Offload Engine supported (type 2)
[    0.966330]  TX Checksum insertion supported
[    0.970572]  Wake-Up On Lan supported
[    0.974282]  Enable RX Mitigation via HW Watchdog Timer
[    0.983129] libphy: stmmac: probed
[    0.986565] eth0: PHY ID 001cc914 at 0 IRQ POLL (stmmac-0:00) active
[    0.992888] eth0: PHY ID 001cc914 at 3 IRQ POLL (stmmac-0:03)
[    0.999380] TCP: cubic registered
[    1.002693] NET: Registered protocol family 17
[    1.007221] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    1.019801] 8021q: 802.1Q VLAN Support v1.8
[    1.026416] UBI: auto-attach mtd1
[    1.029734] UBI: attaching mtd1 to ubi0
[    1.178775] UBI: scanning is finished
[    1.190238] UBI warning: print_rsvd_warning: cannot reserve enough PEBs for bad PEB handling, reserved 9, need 20
[    1.201479] UBI: attached mtd1 (name "ubi", size 114 MiB) to ubi0
[    1.207580] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[    1.214353] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[    1.220933] UBI: VID header offset: 512 (aligned 512), data offset: 2048
[    1.227614] UBI: good PEBs: 912, bad PEBs: 0, corrupted PEBs: 0
[    1.233500] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
[    1.240614] UBI: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0
[    1.248849] UBI: available PEBs: 0, total reserved PEBs: 912, PEBs reserved for bad PEB handling: 9
[    1.257896] UBI: background thread "ubi_bgt0d" started, PID 273
[    1.257999] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    1.270279] Waiting 10 sec before mounting root device...
[   11.284940] UBIFS: background thread "ubifs_bgt0_0" started, PID 275
[   11.318912] UBIFS: recovery needed
[   11.422520] UBIFS: recovery completed
[   11.426967] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[   11.432949] UBIFS: LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   11.442058] UBIFS: FS size: 114573312 bytes (109 MiB, 888 LEBs), journal size 9033728 bytes (8 MiB, 71 LEBs)
[   11.451847] UBIFS: reserved for root: 0 bytes (0 KiB)
[   11.456890] UBIFS: media format: w4/r0 (latest is w4/r0), UUID FEE2A8B2-0DDE-49B4-BF18-BDDF61ACCE52, small LPT model
[   11.468001] VFS: Mounted root (ubifs filesystem) on device 0:11.
[   11.474250] Freeing unused kernel memory: 180K (c0421000 - c044e000)
Too many bit errors @ 0xa0000 -- Can't correct!
PAGE DATA:
OOB:
Too many bit errors @ 0xa0800 -- Can't correct!
PAGE DATA:
...
   -- Invalid CRC32 on parameters: 0x640660ac != 0xc39c3792
/dev/mem opened.
Memory mapped at address 0xb6fe8000.
Value at address 0x44A00000 (0xb6fe8000): 0x0
Written 0x14; readback 0x100000
/dev/mem opened.
Memory mapped at address 0xb6f6f000.
Value at address 0x44A00004 (0xb6f6f004): 0x0
Written 0x4CE10; readback 0x0
/dev/mem opened.
...
mount: mounting none on /proc/bus/usb failed: No such file or directory
[   17.075112] random: dropbear urandom read with 12 bits of entropy available
ifconfig: SIOCGIFFLAGS: No such device
modprobe: chdir(3.18.11): No such file or directory
[   17.267965] ufsd: version magic '2.6.31.6_SMP_820 SMP mod_unload ARMv6 ' should be '3.18.11 SMP mod_unload ARMv6 p2v8 '
insmod: can't insert '/usr/local/cloudengines/bin/ufsd.ko': invalid module format
Loading xce.ko:              [   17.289925] xce: version magic '2.6.31.6_SMP_820 SMP mod_unload ARMv6 ' should be '3.18.11 SMP mod_unload ARMv6 p2v8 '
insmod: can't insert '/usr/local/cloudengines/bin/xce.ko': invalid module format
Success
/etc/init.d/hbmgr.sh: line 108: can't create /dev/xce: No such device
Starting hbplug:             Success
/ #



Edited 1 time(s). Last edit at 05/09/2015 01:56PM by habibie.
Re: OpenWRT for PogoPlug Pro rootfs tar
May 08, 2015 03:54PM
habibie,

Quote

Both the netconsole and linux boot dumps are as shown belows. the problem still persists. It looks like I need to change the uimage_addr on my /boot/uEnv.txt so that uboot will find my OpenWRT partition on the USB storage. However, I have no idea what will be the new uimage_addr. Does anyone here know?

No need to change uImage address. It was loaded correctly (your kernel uImage has booted completely, note your build has the May 6 date). The problem remained is mounting rootfs. Currently looks like it still mounts mtd1, eventhough the command line says root=/dev/sda.

[    0.000000] Linux version 3.18.11 (debian@debian) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r45621) ) #1 SMP Wed May 6 23:02:55 EDT 2015
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/sda1 rootdelay=10
[    1.026416] UBI: auto-attach mtd1
[    1.029734] UBI: attaching mtd1 to ubi0
[    1.178775] UBI: scanning is finished
[   11.426967] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[   11.468001] VFS: Mounted root (ubifs filesystem) on device 0:11.

Something is not right with your build, I think. Check again to see if the OpenWrt kernel parameter was hard coded to look for "rootfs". What's the kernel parameter in the config file looks like?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: OpenWRT for PogoPlug Pro rootfs tar
May 08, 2015 07:40PM
bodhi Wrote:
-------------------------------------------------------
> Something is not right with your build, I think.
> Check again to see if the OpenWrt kernel parameter
> was hard coded to look for "rootfs". What's the
> kernel parameter in the config file looks like?
>
Hello Bodhi,

I run make kernel_menuconfig and don't know what kernel SYMBOL to look to find out what kernel parameter is. :(
Re: OpenWRT for PogoPlug Pro rootfs tar
May 08, 2015 08:55PM
habibie,

Look at CONFIG_CMDLINE

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: OpenWRT for PogoPlug Pro rootfs tar
May 08, 2015 08:57PM
Hello Bodhi,

The linux-3.18.11/.config file has the following:
CONFIG_CMDLINE="console=ttyS0,115200n8 earlyprintk=serial"



Edited 1 time(s). Last edit at 05/08/2015 08:58PM by habibie.
Re: OpenWRT for PogoPlug Pro rootfs tar
May 08, 2015 09:13PM
habibie,

What is CONFIG_CMDLINE_BOOL set to?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: OpenWRT for PogoPlug Pro rootfs tar
May 08, 2015 09:21PM
Hello Bodhi,

Here is CONFIG_CMDLINE_*:
CONFIG_CMDLINE="console=ttyS0,115200n8 earlyprintk=serial"
# CONFIG_CMDLINE_BOOL is not set
# CONFIG_CMDLINE_EXTEND is not set
# CONFIG_CMDLINE_FORCE is not set
# CONFIG_CMDLINE_FROM_BOOTLOADER is not set
# CONFIG_CMDLINE_PARTITION is not set
Re: OpenWRT for PogoPlug Pro rootfs tar
May 08, 2015 09:48PM
habibie,

I don't see anything wrong there. I'd suggest that you doublecheck your OpenWrt build procedure. Perhaps there is something specific to boot with USB that you need to do and have missed?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: OpenWRT for PogoPlug Pro rootfs tar
May 08, 2015 09:52PM
Hello Bodhi,

Thank you.

TBH, I have no idea what to look. Perhaps, the only file (<OpenWRT root source directory>/target/linux/oxnas/files/arch/arm/boot/dts/ox820-pogoplug-pro.dts) has all the information as shown below that may help you and/or anyone to identify the culprit.
/*
 * Copyright (C) 2013 Ma Haijun <mahaijuns@gmail.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

/dts-v1/;
#include "ox820.dtsi"

/ {
	model = "Pogoplug Pro";

	chosen {
		bootargs = "console=ttyS0,115200n8 earlyprintk=serial";
	};

	pcie-controller@47C00000 {
		status = "okay";
	};

	uart@44200000 {
		status = "okay";
	};

	sata@45900000 {
		status = "okay";
	};

	nand@41000000 {
		status = "okay";

		partition@0 {
			label = "boot";
			reg = <0x00000000 0x00e00000>;
			/*read-only;*/
		};

		partition@e00000 {
			label = "ubi";
			reg = <0x00e00000 0x07200000>;
		};
	};

	ethernet@40400000 {
		status = "okay";
	};

	ehci@40200100 {
		status = "okay";
	};

	pinctrl {
		leds {
			pinctrl_leds: leds-0 {
				plxtech,pins =
					<0 2 0 0	/* MF_A2 */
					 1 16 0 0	/* MF_B16 */
					 1 17 0 0>;	/* MF_B17 */
			};
		};
	};

	leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_leds>;

		blue {
			label = "pogoplug:blue:internal";
			gpios = <&GPIOA 2 0>;

		};

		orange {
			label = "pogoplug:orange:usr";
			gpios = <&GPIOB 16 1>;
		};

		green {
			label = "pogoplug:green:usr";
			gpios = <&GPIOB 17 1>;
		};
	};
};
Re: OpenWRT for PogoPlug Pro rootfs tar
May 08, 2015 10:13PM
habibie,

DTS does not affect the boot device. This DTS file is the same one we use on Debian.

[   11.468001] VFS: Mounted root (ubifs filesystem) on device 0:11.

At the command line, see if you can find which device is 0:11

If it was the USB drive then your system is running OK. Except that the modules were some how old.

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



Edited 1 time(s). Last edit at 05/08/2015 10:18PM by bodhi.
Re: OpenWRT for PogoPlug Pro rootfs tar
May 08, 2015 10:22PM
And check your mounts

cat /proc/mounts
df -h

Is the rootfs being mounted is the UBIFS partition on the USB drive? what type of filesystems is that partition?

And check your system

uname -a

Check your modules

ls -lart /lib/modules

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



Edited 2 time(s). Last edit at 05/08/2015 10:26PM by bodhi.
Re: OpenWRT for PogoPlug Pro rootfs tar
May 08, 2015 10:24PM
bodhi Wrote:
-------------------------------------------------------
> habibie,
>
> DTS does not affect the boot device. This DTS file
> is the same one we use on Debian.
>
>
> [   11.468001] VFS: Mounted root (ubifs
> filesystem) on device 0:11.
>
>
> At the command line, see if you can find which
> device is 0:11
>
I am not sure how to do this. I tried lsusb and it returns nothing.

> If it was the USB drive then your system is
> running OK. Except that the modules were some how
> old.
>
df spits out it is a ubi0:
/ # df
Filesystem           1K-blocks      Used Available Use% Mounted on
ubi0:rootfs             104524     11048     93476  11% /
none                     62604         4     62600   0% /tmp
/ #
Re: OpenWRT for PogoPlug Pro rootfs tar
May 08, 2015 10:35PM
Hello Bodhi,

I don't know if the following excerpt from dmesg makes any sense. Line 1.190310 says UBI: attached mtd1 (name "ubi", size 114 MiB) to ubi0 while line 11.460823 says VFS: Mounted root (ubifs filesystem) on device 0:11.
<6>[    1.008524] 8021q: 802.1Q VLAN Support v1.8
<5>[    1.015104] UBI: auto-attach mtd1
<5>[    1.018416] UBI: attaching mtd1 to ubi0
<5>[    1.167603] UBI: scanning is finished
<4>[    1.179059] UBI warning: print_rsvd_warning: cannot reserve enough PEBs f
or bad PEB handling, reserved 9, need 20
<5>[    1.190310] UBI: attached mtd1 (name "ubi", size 114 MiB) to ubi0
<5>[    1.196416] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
<5>[    1.203169] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512
<5>[    1.209771] UBI: VID header offset: 512 (aligned 512), data offset: 2048
<5>[    1.216450] UBI: good PEBs: 912, bad PEBs: 0, corrupted PEBs: 0
<5>[    1.222336] UBI: user volume: 1, internal volumes: 1, max. volumes count:
 128
<5>[    1.229447] UBI: max/mean erase counter: 2/1, WL threshold: 4096, image s
equence number: 0
<5>[    1.237683] UBI: available PEBs: 0, total reserved PEBs: 912, PEBs reserv
ed for bad PEB handling: 9
<3>[    1.246824] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
<5>[    1.250045] UBI: background thread "ubi_bgt0d" started, PID 274
<7>[    1.260157] PM: Hibernation image not present or could not be loaded.
<6>[    1.260456] Waiting 10 sec before mounting root device...
<5>[   11.274933] UBIFS: background thread "ubifs_bgt0_0" started, PID 276
<5>[   11.308856] UBIFS: recovery needed
<5>[   11.415308] UBIFS: recovery completed
<5>[   11.419066] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
<5>[   11.425100] UBIFS: LEB size: 129024 bytes (126 KiB), min./max. I/O unit s
izes: 2048 bytes/2048 bytes
<5>[   11.434209] UBIFS: FS size: 114573312 bytes (109 MiB, 888 LEBs), journal 
size 9033728 bytes (8 MiB, 71 LEBs)
<5>[   11.444674] UBIFS: reserved for root: 0 bytes (0 KiB)
<5>[   11.449704] UBIFS: media format: w4/r0 (latest is w4/r0), UUID FEE2A8B2-0
DDE-49B4-BF18-BDDF61ACCE52, small LPT model
<6>[   11.460823] VFS: Mounted root (ubifs filesystem) on device 0:11.
<6>[   11.467038] Freeing unused kernel memory: 180K (c0421000 - c044e000)
<3>[   12.989596] rt3390sta: version magic '2.6.31.6_SMP_820 SMP mod_unload ARM
v6 ' should be '3.18.11 SMP mod_unload ARMv6 p2v8 '
<6>[   15.010173] stmmaceth 40400000.ethernet eth0: Link is Up - 1Gbps/Full - f
low control rx/tx
<5>[   17.304668] random: dropbear urandom read with 13 bits of entropy availab
le
<3>[   17.500743] ufsd: version magic '2.6.31.6_SMP_820 SMP mod_unload ARMv6 ' 
should be '3.18.11 SMP mod_unload ARMv6 p2v8 '
<3>[   17.522475] xce: version magic '2.6.31.6_SMP_820 SMP mod_unload ARMv6 ' s
hould be '3.18.11 SMP mod_unload ARMv6 p2v8 '
<5>[  151.001415] random: nonblocking pool is initialized
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: