Welcome! Log In Create A New Profile

Advanced

2015.10 U-Boot for Pogoplug V3 (OXNAS OX820)

Posted by bodhi 
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 08, 2014 01:45AM
@shv,

I've uploaded the 850MHz u-boot-spl image. Please test and report.

Download at Dropbox:
uboot.spl.2013.10.ox820.850mhz.bodhi.tar
md5sum
69375902be22774f4216b92224c5ae1e

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 08, 2014 02:52AM
@bodhi,
I used WarheadsSE stage1 loader with 850MHz for a long time. Now I am using my own 2013.10 u-boot-spl.bin file with 850MHz which is prepared for SATA booting on HD drive. No I did'nt run the new NAND u-boot with 800Mhz stage1 yet. In NAND I currently have WarheadsSEs kernel.

Will try the 850MHz u-boot-spl Flash image later.

-shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 08, 2014 03:05AM
@shv,

I've flashed this 850MHz u-boot-spl image to NAND and running it currently. I recalled you did performance tests before so it'll be good to see the before and after numbers!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 08, 2014 03:07AM
@bodhi:
what performace tests should I do before I flash the new u-boot-spl.bin?

You can find some performance data for 700/850MHz in the followin topic: http://pogoplug.square7.de/forum/viewtopic.php?f=4&t=13#p14

-shv



Edited 2 time(s). Last edit at 02/19/2017 12:42PM by shv.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 08, 2014 03:55AM
@shv,

I found the link to your post from way back! But now I realized that was HDD performance test. However, if you did compile something big like a kernel then it would show the CPU performance increase clearly. I can't remember the CPU benchmark that I've seen. Perhaps Phoronix has something like that.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 08, 2014 06:17AM
@bodhi,

CPU Benchmark

2.6.31.6@700MHz with USB Stick
sysbench --test=cpu --cpu-max-prime=2000 --num-threads=2 run
sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 2

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 2000

Test execution summary:
    total time:                          73.8397s
    total number of events:              10000
    total time taken by event execution: 147.6396
    per-request statistics:
         min:                                 14.47ms
         avg:                                 14.76ms
         max:                                196.55ms
         approx.  95 percentile:              15.64ms

Threads fairness:
    events (avg/stddev):           5000.0000/44.00
    execution time (avg/stddev):   73.8198/0.00
2.6.31.14@850MHz with SATA HDD
sysbench --test=cpu --cpu-max-prime=2000 --num-threads=2 run
sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 2

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 2000

Test execution summary:
    total time:                          62.3376s
    total number of events:              10000
    total time taken by event execution: 124.6242
    per-request statistics:
         min:                                 11.90ms
         avg:                                 12.46ms
         max:                                 68.36ms
         approx.  95 percentile:              12.84ms

Threads fairness:
    events (avg/stddev):           5000.0000/77.00
    execution time (avg/stddev):   62.3121/0.00

-shv



Edited 1 time(s). Last edit at 09/08/2014 06:17AM by shv.
shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 08, 2014 02:20PM
I have successfully flashed the uboot. It seams to be not possible to keep the old uboot environment. It might be overwriten or located at a different address. fw_printenv is working with the new uboot and its environment. blparam does not work anymore. I tried to change the ethaddr with fw_setenv without success.
~# fw_setenv ethaddr
Can't overwrite "ethaddr"
In the boot console the change of ethaddr is possible.

-shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 08, 2014 03:13PM
@shv,

That's a nice 19% performance improvement!!!

Which kernel are you running? can you change other u-boot envs? This u-boot uses the same env location as the stock env, so it should not change any of the envs. However, steps 8 and 9 flashes a default set of envs, did you do these steps?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 08, 2014 03:19PM
The CPU and RAM clocks are stepped together by default (without a good amount of jackassery) so you get a bonus of the RAM clock as well. That is, by the way, why 950 is unstable.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 08, 2014 04:20PM
WarheadsSE Wrote:
-------------------------------------------------------
> The CPU and RAM clocks are stepped together by
> default (without a good amount of jackassery) so
> you get a bonus of the RAM clock as well. That is,
> by the way, why 950 is unstable.

Thanks Warhead! I was wondering about that. I remember distincly you mentioned about you've tried 950MHz.

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



Edited 1 time(s). Last edit at 09/08/2014 04:33PM by bodhi.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 08, 2014 04:37PM
BTW, I am working on adding new feature to this u-boot: SNTP, bootz, large GPT HDD, load envs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 08, 2014 10:30PM
CPU benchmarks

Linux version 3.16.0-oxnas-tld-2
850MHz
USB stick

sysbench --test=cpu --cpu-max-prime=2000 --num-threads=2 run
sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 2

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 2000


Test execution summary:
    total time:                          59.6182s
    total number of events:              10000
    total time taken by event execution: 119.2075
    per-request statistics:
         min:                                 11.70ms
         avg:                                 11.92ms
         max:                                 25.16ms
         approx.  95 percentile:              12.44ms

Threads fairness:
    events (avg/stddev):           5000.0000/11.00
    execution time (avg/stddev):   59.6038/0.00

Slightly better than kernel 2.6.31!

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



Edited 1 time(s). Last edit at 09/08/2014 10:34PM by bodhi.
shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 09, 2014 04:16AM
bodhi Wrote:
-------------------------------------------------------
> @shv,
>
> That's a nice 19% performance improvement!!!
>
> Which kernel are you running? can you change other
> u-boot envs? This u-boot uses the same env
> location as the stock env, so it should not change
> any of the envs. However, steps 8 and 9 flashes a
> default set of envs, did you do these steps?

The kernel is 2.6.31.14 booted from SATA with SATA u-boot. Yes I can change other u-boot envs. I think the u-boot envs were set by u-boot to some default. As I recognized this I flashed your default set according to steps 8 and 9. I think the format of environment area is different. With the old u-boot fw_printenv couldn't be used due to some CRC error and with the new u-boot blparam can't be used.

-shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 09, 2014 04:32AM
@shv,

Quote

I think the format of environment area is different. With the old u-boot fw_printenv couldn't be used due to some CRC error and with the new u-boot blparam can't be used.

It is different. blparam's checksum is different from one used by fw_setenv. Thus fw_setenv can not be used with old u-boot and blparam can not be used with new u-boot.

This is the reason I've provided the env image (default envs is not enough to set the checksum) so users can flash it.

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



Edited 1 time(s). Last edit at 09/09/2014 04:34AM by bodhi.
shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 12, 2014 11:27AM
@bodhi,

I am trying to make the boot environment more flexible with the following goals:

1. boot chain: (ide), usb, flash -> ide booting not available yet
2. booting of different kernels a) uImage, b) uImage and uInitrd, c) uImage, uInitrd, dtb

Can you please have a look at my boot env for possible improvements?
autoload=no
baudrate=115200
boot=bootm 60500000
boot_stock=run load_nand boot || run load_nand2 boot
bootargs=console=ttyS0,115200n8
bootcmd=usb start; run usb_bootcmd; usb stop; run pogo_bootcmd; reset
bootcmd_usb=usb start; run usb_bootcmd; usb stop; reset
bootdelay=3
console=console=ttyS0,115200n8
dtb_addr=0x62c00000
ethact=mii0
ethaddr=xx:xx:xx:xx:xx:xx
if_netconsole=ping $serverip
ipaddr=192.168.0.222
load_nand=nboot 60500000 0 200000
load_nand2=nboot 60500000 0 800000
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
pogo_bootcmd=run set_bootargs_stock; run boot_stock
preboot_nc=run if_netconsole start_netconsole
serverip=192.168.0.220
set_bootargs_stock=setenv bootargs root=ubi0:rootfs ubi.mtd=2,512 rootfstype=ubifs console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M poweroutage=yes
set_bootargs_usb=setenv bootargs console=ttyS0,115200 root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version
stderr=serial
stdin=serial
stdout=serial
uimage_addr=0x60500000
uinitrd_addr=0x60e00000
usb_boot=ext2load usb $usb_device 0x60500000 /boot/uImage; if ext2load usb $usb_device 0x60e00000 /boot/uInitrd; then if ext2load usb $usb_device 0x62c00000 /boot/dts/ox820-pogoplug-pro.dtb; then bootm 0x60500000 0x60e00000 0x62c00000; else bootm 0x60500000 0x60e000; fi; else bootm 0x60500000; fi
usb_bootcmd=run set_bootargs_usb; run usb_boot
usb_custom_params=ubi.mtd=2,512 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M poweroutage=yes rootwait
usb_device=0:1
usb_root=/dev/sda1
usb_rootdelay=10
usb_rootfstype=ext3
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_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_scan_list=1 2 3 4

It works so far but I am not sure if the bootargs are completly right.

-shv



Edited 9 time(s). Last edit at 12/16/2014 02:46PM by shv.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 12, 2014 03:57PM
@shv,

Possible improvements:

1. When you try to boot either the FDT kernel or non-FDT kernel, it is best to have 2 separate set of boot envs. It'll make it easier to code and debug.

2. To ensure booting the correct rootfs when multiple drives connected, the USB rootfs should have partition label rootfs, and:
usb_root=LABEL=rootfs

3. And this is not completed:
usb_boot=ext2load usb $usb_device 0x60500000 /boot/uImage; if ext2load usb $usb_device 0x60e00000 /boot/uInitrd; then if ext2load usb $usb_device 0x62c00000 /boot/dts/ox820-pogoplug-pro.dtb; then bootm 0x60500000 0x60e00000 0x62c00000; else bootm 0x60500000 0x60e000; fi; else bootm 0x60500000; fi

If you're combining non-FDT kernel and FDT kernel booting in one statement like above, you will need the below path somewhere in the env (for booting Arch with DTB):
bootm 0x60500000 - 0x62c00000

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 12, 2014 05:03PM
@bodhi,

tanks for your answer.

1. To seperate sets of boot envs: I want to prevent switching between seperate boot env sets.

2. label rootfs: good proposal - will try to use this

3. Not completed - I don't understand why: I tried booting ftd kernel and this works well - bootm 0x60500000 0x60e00000 0x62c00000 is included. Isn't it complete?

I am not sure with bootargs because I combined them from different bootenvs and they are different to yours. But I can boot just uImage kernels as well as fdt kernels. Therefore the bootargs might not be so bad.

-shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 12, 2014 05:50PM
@shv,

Your set_bootargs_usb looks OK.

3. Incomplete because these are possibe variations of bootm command:

bootm command for booting with the uInitrd and DTB:
bootm 0x60500000 0x60e00000 0x62c00000

booting command for booting without the uInitrd and DTB:
bootm 0x60500000 - 0x62c00000

booting command for booting with the uInitrd and embedded DTB:
bootm 0x60500000 0x60e00000

booting command for booting without the uInitrd and embedded DTB:
bootm 0x60500000

Since your intent is to enable booting with or without DTB, and to enable booting with or without uInitrd, there are 4 possible ways to boot. So your usb_boot env lacks the option to boot without uInitrd, but with DTB.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 13, 2014 03:51AM
@bodhi,

thank you for the explanation. I wasn't aware of this.

A possible solution:
usb_boot=
ext2load usb $usb_device 0x60500000 /boot/uImage; 
if ext2load usb $usb_device 0x60e00000 /boot/uInitrd; 
then if ext2load usb $usb_device 0x62c00000 /boot/dts/ox820-pogoplug-pro.dtb; 
     then bootm 0x60500000 0x60e00000 0x62c00000; 
     else bootm 0x60500000 0x60e00000; 
     fi; 
else if ext2load usb $usb_device 0x62c00000 /boot/dts/ox820-pogoplug-pro.dtb;
     then bootm 0x60500000 - 0x62c00000;
     else bootm 0x60500000;
     fi; 
fi
I am not sure if the length of one line is limited because all of the code above would be in one line.

-shv
shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 14, 2014 07:30AM
It seams that using root=LABEL=rootfs in bootargs doesn't work for the old 2.6.31.x kernels where just uImage is available. Does this behavior belongs to the missing uInitrd? Is there any way to solve this somehow with changes in bootenv? Otherwise booting from USB with IDE drive present doesn't work.

The follwoing skript can be used to deactivate SATA booting without any damage of partition table:
#!/bin/sh

# uncomment line below and set to the correct disk
#disk=/dev/sdb

if [ -z "${disk}" ] ; then
   echo "You must uncomment/set the 'disk' variable"
   exit -1
fi

perl <<EOF | dd of="$disk" bs=512
    print "\x00" x 0x1bc;
EOF

-shv



Edited 5 time(s). Last edit at 09/14/2014 07:42AM by shv.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 14, 2014 04:20PM
@shv,

Yes, the root=LABEL=rootfs argument only works with initrd. So if you boot either stock, or Arch kernel, you would have to create this ramdisk file separately and use it for booting.

There is just no generic way to boot correctly on Pogo V3 to boot with several USB and SATA drives attached. However, in a specific case, you can set u-boot env to boot correctly. For example, booting USB rootfs with with one USB and one SATA:

- Ensure the SATA drive does not contain rootfs or boot files (i.e. no /boot/uImage)
- Ensure USB rootfs is on the 1st partition
- Set u-boot env root=/dev/sdb1

But as soon as you plug in additional disk (USB or SATA), all bets are off! So I'd say that creating the initrd is the best solution, you'll never have this problem again.

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



Edited 1 time(s). Last edit at 09/14/2014 04:22PM by bodhi.
shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 21, 2014 06:53AM
@bodhi,
I created a kernel with ramdisk. But it doesn't start somehow. It stops after veryfying the checksum of uImage.
Reset IDE: Bus 0: OK
  Device 0: Model: ST9500325AS  Firm: 0002BSM1 Ser#: 5VEKYXGQ
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
2346684 bytes read in 520 ms (4.3 MiB/s)
2567509 bytes read in 583 ms (4.2 MiB/s)
** File not found /boot/dts/ox820-pogoplug-pro.dtb **
## Booting kernel from Legacy Image at 60500000 ...
   Image Name:   Linux-2.6.31.14-oxnas-shv
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2346620 Bytes = 2.2 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK

If I tried to load the kernel with dtb even unused the result is as follows:
Reset IDE: Bus 0: OK
  Device 0: Model: ST9500325AS  Firm: 0002BSM1 Ser#: 5VEKYXGQ
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
2346684 bytes read in 520 ms (4.3 MiB/s)
2567509 bytes read in 583 ms (4.2 MiB/s)
7029 bytes read in 55 ms (124 KiB/s)
## Booting kernel from Legacy Image at 60500000 ...
   Image Name:   Linux-2.6.31.14-oxnas-shv
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2346620 Bytes = 2.2 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 60e00000 ...
   Image Name:   initramfs-2.6.31.14-oxnas-shv
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    2567445 Bytes = 2.4 MiB
   Load Address: 60000000
   Entry Point:  60000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 62c00000
   Booting using the fdt blob at 0x62c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 67bb7000, end 67e29d15 ... OK
   Loading Device Tree to 67bb2000, end 67bb6b74 ... OK

Led:    GREEN

Starting kernel ...

Uncompressing Linux.............................................................................................................................................. done, booting the kernel.
Even the ramdisk is loaded in this case the kernel doesn't start.

bootenv:
autoload=no
baudrate=115200
boot=bootm 60500000
boot_stock=run load_nand boot || run load_nand2 boot
bootargs=console=ttyS0,115200n8
bootcmd=ide reset; run ide_bootcmd; usb start; run usb_bootcmd; usb stop; irun pogo_bootcmd; reset
bootcmd_usb=usb start; run usb_bootcmd; usb stop; reset
bootdelay=3
console=console=ttyS0,115200n8
dtb_addr=0x62c00000
ethact=mii0
ethaddr=00:01:02:03:04:05
ide_boot=ext2load ide 0:1 0x60500000 /boot/uImage; if ext2load ide 0:1 0x60e00000 /boot/uInitrd; then if ext2load ide 0:1 0x62c00000 /boot/dts/ox820-pogoplug-pro.dtb; then bootm 0x60500000 0x60e00000 0x62c00000; else bootm 0x60500000 0x60e000; fi; else bootm 0x60500000; fi
ide_bootcmd=run set_bootargs_ide; run ide_boot
ide_rootfstype=ext4
if_netconsole=ping $serverip
ipaddr=192.168.0.222
load_nand=nboot 60500000 0 200000
load_nand2=nboot 60500000 0 800000
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
pogo_bootcmd=run set_bootargs_stock; run boot_stock
preboot_nc=run if_netconsole start_netconsole
serverip=192.168.0.220
set_bootargs_ide=setenv bootargs console=ttyS0,115200 root=$usb_root rootdelay=$usb_rootdelay rootfstype=$ide_rootfstype $mtdparts $usb_custom_params
set_bootargs_stock=setenv bootargs root=ubi0:rootfs ubi.mtd=2,512 rootfstype=ubifs console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M poweroutage=yes
set_bootargs_usb=setenv bootargs console=ttyS0,115200 root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version
stderr=serial
stdin=serial
stdout=serial
uimage_addr=0x60500000
uinitrd_addr=0x60e00000
usb_boot=ext2load usb $usb_device 0x60500000 /boot/uImage; if ext2load usb $usb_device 0x60e00000 /boot/uInitrd; then if ext2load usb $usb_device 0x62c00000 /boot/dts/ox820-pogoplug-pro.dtb; then bootm 0x60500000 0x60e00000 0x62c00000; else bootm 0x60500000 0x60e000; fi; else bootm 0x60500000; fi
usb_bootcmd=run set_bootargs_usb; run usb_boot
usb_custom_param=ubi.mtd=2,512 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M poweroutage=yes
usb_custom_params=ubi.mtd=2,512 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M poweroutage=yes rootwait
usb_custom_params_=ubi.mtd=2,512 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M poweroutage=yes rootwait
usb_device=0:1
usb_root=/dev/sda1
usb_rootdelay=10
usb_rootfstype=ext3
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_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_scan_list=1 2 3 4

- shv



Edited 5 time(s). Last edit at 09/22/2014 12:54PM by shv.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 21, 2014 03:20PM
@shv,

Kernel 2.6.3x does not have supports for Device Tree. If you happen to have the DTB embedded in uImage, then it won't boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 22, 2014 11:10AM
@shv,

Also,keep in mind that this u-boot supports non-FDT and FDT automatically, so when you boot with 2.6.3x, you can't have anything in the bootm command that triggers the FDT path:

Quote

** File not found /boot/dts/ox820-pogoplug-pro.dtb **

Quote

## Flattened Device Tree blob at 62c00000

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
September 22, 2014 11:17AM
bodhi Wrote:
-------------------------------------------------------
Quote

** File not found /boot/dts/ox820-pogoplug-pro.dtb **

This is no problem just an output of the if condition. In this case bootm 0x60500000 0x60e000 is executed but the 2nd address is wrong. It must be bootm 0x60500000 0x60e00000 instead. I will try what occurs if I change this...

With this little change the 2.6.31.14 kernel with uImage and uInitrd is booting. Thanks bodhi for putting me into the right direction.

Now I am able to setup a boot environment with a boot chain USB, IDE, Flash. In case USB and IDE drives contain kernel and rootfs the device will boot from USB. Thats why I intend to use different rootfs names for USB and IDE. If no boot drive is connected it boots into Pogo OS.

Just tested: It works as intended.

-shv

bootenv:
autoload=no
baudrate=115200
boot=bootm 60500000
boot_stock=run load_nand boot || run load_nand2 boot
bootargs=console=ttyS0,115200n8
bootcmd=usb start; run usb_bootcmd; usb stop; ide reset; run ide_bootcmd; run pogo_bootcmd; reset
bootcmd_usb=usb start; run usb_bootcmd; usb stop; reset
bootdelay=3
console=console=ttyS0,115200n8
ethact=mii0
ethaddr=00:01:02:03:04:05
ide_boot=ext2load ide 0:1 0x60500000 /boot/uImage; if ext2load ide 0:1 0x60e00000 /boot/uInitrd; then if ext2load ide 0:1 0x62c00000 /boot/dts/ox820-pogoplug-pro.dtb; then bootm 0x60500000 0x60e00000 0x62c00000; else bootm 0x60500000 0x60e00000; fi; else bootm 0x60500000; fi
ide_bootcmd=run set_bootargs_ide; run ide_boot
ide_rootfstype=ext4
if_netconsole=ping $serverip
ipaddr=192.168.0.222
load_nand=nboot 60500000 0 200000
load_nand2=nboot 60500000 0 800000
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
pogo_bootcmd=run set_bootargs_stock; run boot_stock
preboot_nc=run if_netconsole start_netconsole
serverip=192.168.0.220
set_bootargs_ide=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs-ide rootdelay=$usb_rootdelay rootfstype=$ide_rootfstype $mtdparts $usb_custom_params
set_bootargs_stock=setenv bootargs root=ubi0:rootfs ubi.mtd=2,512 rootfstype=ubifs console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M poweroutage=yes
set_bootargs_usb=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
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=ext2load usb $usb_device 0x60500000 /boot/uImage; if ext2load usb $usb_device 0x60e00000 /boot/uInitrd; then if ext2load usb $usb_device 0x62c00000 /boot/dts/ox820-pogoplug-pro.dtb; then bootm 0x60500000 0x60e00000 0x62c00000; else bootm 0x60500000 0x60e00000; fi; else bootm 0x60500000; fi
usb_bootcmd=run set_bootargs_usb; run usb_boot
usb_custom_params=ubi.mtd=2,512 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M poweroutage=yes rootwait
usb_device=0:1
usb_root=/dev/sda1
usb_rootdelay=10
usb_rootfstype=ext3
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_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_scan_list=1 2 3 4



Edited 15 time(s). Last edit at 09/24/2014 12:53PM by shv.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 09, 2014 08:43PM
Thank you for all this postings. I have gotten a big help.

I have two questions. I want to use pogoplug-pro's wireless. Is there any postings?
and, I dumped original mtd0 and I got a file occuping 132mb. How can I rewrite to nand?

Thank you in advance.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 10, 2014 02:19AM
newhope,

> I dumped original mtd0 and I got a file
> occuping 132mb. How can I rewrite to nand?

The mtd0 dump must be restored using the same option as the dump command. See this thread for example:
http://forum.doozan.com/read.php?3,16789,16789#msg-16789

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



Edited 1 time(s). Last edit at 10/10/2014 02:21AM by bodhi.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 10, 2014 07:04AM
Thank you, Bodhi, you are my savior.

but, I need an exact command, #flash_erase /dev/mtd0 0 *value*
Dumped size of mtd0 is 138,412,032 bytes. How much blocks need to be erased?
and is it enough to type #nandwrite -on /dev/mtd0 mtd0?
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 11, 2014 02:30AM
Newhope,

It does not seem right: 138,412,032 / 1024 = 135168 K = 132M (mtd0 is only 1M total).

This number is about the entire NAND.

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



Edited 1 time(s). Last edit at 10/11/2014 02:34AM by bodhi.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 13, 2014 09:05AM
Depending on which kernel he has, mtd0 might not be the entire nand, as it is with the definitions from CE @ the PPV3/Pro
Sorry, you can't reply to this topic. It has been closed.