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)
October 14, 2014 11:17PM
@WarheadsSE,

Right, it's been so long I forgot what the CE mtd definition looks like!

@Newhope,

You have not told us what the original nanddump command used to dump NAND, so I can't say what flash_erase and nandwrite commands should be.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
morph027
SATA Boot
October 25, 2014 07:40AM
Hi all...

Just found some time for playing around with my Pogoplug V3 Classic (no pci).

What i've did so far:

- put u-boot-spl.bin (from http://pogoplug.cwsurf.de/ox820-sata-uboot.tar.gz) as stage1 to disk:

dd if=u-boot-spl.bin of="$disk" bs=512 seek=34

- created ext4 partition as rootfs containing boot files
- untared rootfs from linux-3.16.0-oxnas-tld-1-bodhi.tar.bz2 to it
- copied u-boot.env, u-boot.img from ox820-sata-uboot.tar.gz to /boot
- modified it like described (just edited the binary file with vim, is that okay):

dt_ide_bootcmd=run ide_set_bootargs; run dt_ide_boot
ide_set_bootargs=setenv bootargs root=/dev/sda1 rootfstype=ext4 console=ttyS0,115200 mem=128M

- renamed /boot/ox820-pogoplug-classic.dtb to /boot/ox820-pogoplug-pro.dtb

When starting up, LED flashes, then is solid for some seconds and starts to flash again....

Any hints?
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 25, 2014 01:31PM
Ah, ok..found the tool mkenvimage ... what is the partition size? 16384? Neccessary at all?
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 25, 2014 01:53PM
Jop...got it...working with ./mkenvimage -s 16384 -o u-boot.env u-boot-env.txt

u-boot-env.txt (mind the mac address when copying!)

dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootcmd=run dt_bootcmd_ide
bootdelay=3
console=console=ttyS0,115200n8
dt_bootcmd_ide=ide start; run dt_ide_bootcmd; ide stop; reset
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
dt_ide_boot=run dt_ide_load_uimage; run dt_ide_load_initrd; run dt_ide_load_dtb; run dt_bootm
dt_ide_bootcmd=run ide_set_bootargs; run dt_ide_boot
dt_ide_load_dtb=ext2load ide 0:1 $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb
dt_ide_load_initrd=ext2load ide 0:1 $uinitrd_addr /boot/uInitrd
dt_ide_load_uimage=ext2load ide 0:1 $uimage_addr /boot/uImage
dt_load_dtb=ext2load usb 0:1 $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb
dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boot/uInitrd
dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot/uImage
dt_sata_boot=ext2load ide 0:1 $uimage_addr /boot/uImage_2.6.31.14_OX820_1.2_shv.Pro; bootm $uimage_addr
dt_usb_boot=run dt_load_uimage; run dt_load_initrd; 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:25:31:XX:XX:XX
ide_set_bootargs=setenv bootargs root=/dev/sda1 rootfstype=ext4 console=ttyS0,115200 mem=128M
if_netconsole=ping $serverip
ipaddr=10.10.10.1
serverip=10.10.10.5
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
preboot_nc=run if_netconsole start_netconsole
sata_bootcmd=run usb_set_bootargs; run sata_boot
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_device=0:1
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10
shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 25, 2014 02:01PM
Using vim to edit the u-boot.env is not OK. I never used mkenvimage. The boot environments are written by uboot to the ext4 partition.

Can you please provide a boot log and boot env setting which you get with the serial console? But I think you don't have a serial adapter cable.

Due to the LED it seams that the kernel is loaded but a Reset occurs afterwards.

-shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 25, 2014 02:09PM
It is working now...obviously, editing a binary file is no great idea at all....never ;)

Right, i do not have a serial adapter....should get one, as it's not that useful to use the led only for debugging.

Have you tried netconsole from sata-u-boot? i don't get any output ...
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 25, 2014 02:20PM
You are using old kernel?
dt_sata_boot=ext2load ide 0:1 $uimage_addr /boot/uImage_2.6.31.14_OX820_1.2_shv.Pro; bootm $uimage_addr

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 25, 2014 02:22PM
Just copied the whole config from shv's attached file. Looks like some leftover, the actual bootcmd is dt_ide_boot
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 25, 2014 02:25PM
Ah, I see. Well done :)

And to start netconsole:
setenv preboot 'run preboot_nc'

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 10/25/2014 02:28PM by bodhi.
shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 25, 2014 02:26PM
I never used netconsole with SATA booting because I have a serial interface connected always. You can try to add the following line to your u-boot.env:

preboot = run preboot_nc
nibre
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
November 15, 2014 08:13AM
For me cat /proc/mtd returns
mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit"
mtd1: 00e00000 00020000 "boot"
mtd2: 07200000 00020000 "rootfs"

So should I change mtd0 in the commands to mtd1?
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
November 15, 2014 06:11PM
nibre Wrote:
-------------------------------------------------------
> For me cat /proc/mtd returns
> mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit"
> mtd1: 00e00000 00020000 "boot"
> mtd2: 07200000 00020000 "rootfs"
>
> So should I change mtd0 in the commands to mtd1?

No need to, but if you are running new u-boot then yes. Change it so it will be consistent because the new kernel/rootfs expect to have 2 mtds only.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
November 30, 2014 06:47PM
Hi,

I tried to upgrade from an old U-Boot (1.1.2 Jul 29 2010) by following the first post. Everything seems fine but I got the following error when rebooting (using serial cable):

U-Boot SPL 2013.10 (Apr 27 2014 - 19:08:27)
  Boot device: NAND
Attempting to set PLLA to 800 MHz ...
  plla_ctrl0 : 0000030a
  plla_ctrl1 : 00400000
  plla_ctrl2 : 007f0068
  plla_ctrl3 : 00000193

PLLA Set


U-Boot 2013.10-tld-3 (May 15 2014 - 14:54:14) for OXNAS

DRAM:  128 MiB
NAND:  128 MiB
NAND read from offset 100000 failed -74
*** Warning - readenv() failed, using default environment

In:    serial
Out:   serial
Err:   serial
Net:
Led:    GREEN
mii0
Main Loop
Hit any key to stop autoboot:  0
OX820 #

Here is the output of printenv:
OX820 # printenv
autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootcmd=run ideboot
bootdelay=3
console=console=ttyS0,115200n8
ethact=mii0
ethaddr=00:25:31:01:66:5F
ipaddr=192.168.1.3
keypressed=1
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
netcon=echo switch to net console;setenv stderr nc;setenv stdin nc;setenv stdout nc;echo switch to net console
netmask=255.255.255.0
preboot=run safeboot
safeboot=setexpr.b keypressed '*44200005' '&' 1;if test $keypressed = 0;then run netcon;fi
serialcon=echo switch to serial console;setenv stderr serial;setenv stdin serial;setenv stdout serial;echo switch to serial console
serverip=192.168.1.7
stderr=serial
stdin=serial
stdout=serial

Environment size: 752/131068 bytes

Here is my /proc/mtd:
mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit" 
mtd1: 00e00000 00020000 "boot" 
mtd2: 07200000 00020000 "rootfs"

I guess the NAND is corrupt. How do I reflash it? And reflash to factory image or U-Boot?
Thank you all for the help! Any input will be appreciated!

purespin
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
November 30, 2014 08:46PM
purespin Wrote:
-------------------------------------------------------
> Hi,
>
> I tried to upgrade from an old U-Boot (1.1.2 Jul
> 29 2010) by following the first post. Everything
> seems fine but I got the following error when
> rebooting (using serial cable):
>
>
> U-Boot SPL 2013.10 (Apr 27 2014 - 19:08:27)
>   Boot device: NAND
> Attempting to set PLLA to 800 MHz ...
>   plla_ctrl0 : 0000030a
>   plla_ctrl1 : 00400000
>   plla_ctrl2 : 007f0068
>   plla_ctrl3 : 00000193
> 
> PLLA Set
> 
> 
> U-Boot 2013.10-tld-3 (May 15 2014 - 14:54:14) for
> OXNAS
> 
> DRAM:  128 MiB
> NAND:  128 MiB
> NAND read from offset 100000 failed -74
> *** Warning - readenv() failed, using default
> environment
> 
> In:    serial
> Out:   serial
> Err:   serial
> Net:
> Led:    GREEN
> mii0
> Main Loop
> Hit any key to stop autoboot:  0
> OX820 # 
>
>
> Here is the output of printenv:
>
> OX820 # printenv
> autoload=no
> baudrate=115200
> bootargs=console=ttyS0,115200n8
> bootcmd=run ideboot
> bootdelay=3
> console=console=ttyS0,115200n8
> ethact=mii0
> ethaddr=00:25:31:01:66:5F
> ipaddr=192.168.1.3
> keypressed=1
> mtdids=nand0=41000000.nand
> mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
> netcon=echo switch to net console;setenv stderr
> nc;setenv stdin nc;setenv stdout nc;echo switch to
> net console
> netmask=255.255.255.0
> preboot=run safeboot
> safeboot=setexpr.b keypressed '*44200005' '&' 1;if
> test $keypressed = 0;then run netcon;fi
> serialcon=echo switch to serial console;setenv
> stderr serial;setenv stdin serial;setenv stdout
> serial;echo switch to serial console
> serverip=192.168.1.7
> stderr=serial
> stdin=serial
> stdout=serial
> 
> Environment size: 752/131068 bytes
>
>
> Here is my /proc/mtd:
>
> mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit" 
> mtd1: 00e00000 00020000 "boot" 
> mtd2: 07200000 00020000 "rootfs"
>
>
> I guess the NAND is corrupt. How do I reflash it?
> And reflash to factory image or U-Boot?
> Thank you all for the help! Any input will be
> appreciated!
>
> purespin

No it's not corrupted. You need to flash the default u-boot envs. See instruction in 1st post. You've just missed that step. What you see now is the default envs from u-boot internals.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
November 30, 2014 10:41PM
bodhi Wrote:
-------------------------------------------------------
> No it's not corrupted. You need to flash the
> default u-boot envs. See instruction in 1st post.
> You've just missed that step. What you see now is
> the default envs from u-boot internals.

bodhi,
Thank you for the quick reply. Are you talking about step 9 & 10 in 1st post?

9. Erase 1 block starting 0x00100000 (See caveat in step 2, do not do this step this if the kernel is not FDT) 
/usr/sbin/flash_erase /dev/mtd0 0x00100000 1

Erasing 128 Kibyte @ 100000 -- 100 % complete

10. Flash uboot environment to 0x00100000 (See caveat in step 2, do not flash this if the kernel is not FDT) 
/usr/sbin/nandwrite -s 1048576 /dev/mtd0 pogopro_uboot_env.img

Writing data to block 8 at offset 0x100000

I didn't do these as I thought this is only for FDT kernel.
Anyway, how do I run those commands when I am in the default envs in u-boot internal?
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
November 30, 2014 11:27PM
purespin,

> Thank you for the quick reply. Are you talking
> about step 9 & 10 in 1st post?

Yes step 9 and 10

> I didn't do these as I thought this is only for
> FDT kernel.

The new kernel is FDT. Stock kernel is not FDT (also some people are still running older non-FDT kernels). So if you plan to run new kernel then the new envs are needed if the DTB is not embedded inside uImage.

Did you upgraded the kernel, or did you download and use the new basic rootfs in this thread?

> Anyway, how do I run those commands when I am in
> the default envs in u-boot internal?

I really dislike flashing from U-boot console, except in situation where we have no other choice (it's very easy to brick the box doing this). So you could just copy and paste each line from the default u-boot envs to the console. These are the defaults. The idea is to reformat this list as a setenv for each line.

Everything after the first = should be in single quote. For example:
bootargs=console=ttyS0,115200n8
becomes
setenv bootargs 'console=ttyS0,115200n8'

Default envs for booting DTB separately:
autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootdelay=10
console=console=ttyS0,115200n8
ethact=mii0
ethaddr=5e:2b:15:71:ec:b6
ipaddr=192.168.0.222
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
serverip=192.168.0.220
stderr=serial
stdin=serial
stdout=serial
usb_device=0:1
if_netconsole=ping $serverip
preboot_nc=run if_netconsole start_netconsole
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10
uinitrd_addr=0x60e00000
uimage_addr=0x60500000
dtb_addr=0x62c00000
dt_load_dtb=ext2load usb 0:1 $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb
dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boot/uInitrd
dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot/uImage
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
dt_usb_boot=run dt_load_uimage; run dt_load_initrd; run dt_load_dtb; run dt_bootm
dt_usb_bootcmd=run usb_set_bootargs; run dt_usb_boot
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
bootcmd=run dt_bootcmd_usb

If you're not sure what you have on the USB rootfs, mount it on a Linux box and do (assuming it is mounted as /media/sdb1):
ls -l /media/sdb1/boot/
and please post back with the output of the ls command above.

NOTE: I think I need to revise my instruction to clarify some points further. I can see it is a little bit disjointed between the u-boot thread and the kernel thread. Also, I will probably create a u-boot script for the default envs, for the convenience of settings everything at serial or netconsole.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 11/30/2014 11:30PM by bodhi.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
December 01, 2014 12:05AM
bodhi Wrote:
-------------------------------------------------------
> purespin,
>
> If you're not sure what you have on the USB
> rootfs, mount it on a Linux box and do (assuming
> it is mounted as /media/sdb1):
>
> ls -l /media/sdb1/boot/
>
> and please post back with the output of the ls
> command above.
>
> NOTE: I think I need to revise my instruction to
> clarify some points further. I can see it is a
> little bit disjointed between the u-boot thread
> and the kernel thread. Also, I will probably
> create a u-boot script for the default envs, for
> the convenience of settings everything at serial
> or netconsole.

Here is the output of the ls command above:
ls -l /media/sdc1/boot
total 5488
-rw------- 1 root root 2805560 Jun  6  2013 uImage-3.1.10
-rw------- 1 root root 2805496 Jun  6  2013 zImage-3.1.10

I haven't upgrade the kernel yet. But I do plan to upgrade to the kernel and rootfs of 3.17.0 as the above thread. So should I use the existing rootfs or the new rootfs (3.17.0)?



Edited 1 time(s). Last edit at 12/01/2014 12:06AM by purespin.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
December 01, 2014 02:04AM
purespin,

> ls -l /media/sdc1/boot
> total 5488
> -rw------- 1 root root 2805560 Jun  6  2013
> uImage-3.1.10
> -rw------- 1 root root 2805496 Jun  6  2013
> zImage-3.1.10
> 
>

Are you running Arch or Debian? there is no uInitrd in /boot. Is this a special build by Ingmar? I recall Ingmar_k does not use Initrd.

> I haven't upgrade the kernel yet. But I do plan to
> upgrade to the kernel and rootfs of 3.17.0 as the
> above thread. So should I use the existing rootfs
> or the new rootfs (3.17.0)?

If you are running Arch then you can't use the new rootfs because it is Debian (sorry to state the obvious, just that I don't recognize this rootfs). It is fine to use your current rootfs if you have already installed packages, and don't want spend time reinstall them. In this case, just install new kernel later.

But it does seem strange to me, were you running this rootfs with the kernel in NAND before? what procedure you've used to install?

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
December 01, 2014 09:52AM
bodhi Wrote:
-------------------------------------------------------
> Are you running Arch or Debian? there is no
> uInitrd in /boot. Is this a special build by
> Ingmar? I recall Ingmar_k does not use Initrd.
>
> If you are running Arch then you can't use the new
> rootfs because it is Debian (sorry to state the
> obvious, just that I don't recognize this rootfs).
> It is fine to use your current rootfs if you have
> already installed packages, and don't want spend
> time reinstall them. In this case, just install
> new kernel later.
>
> But it does seem strange to me, were you running
> this rootfs with the kernel in NAND before? what
> procedure you've used to install?

I was running Debian Wheezy before. I don't remember exactly which guide I followed 1 years ago but I probably follow this first:
http://www.howtoforge.com/installing-debian-squeeze-on-pogoplug-v3-oxnas-cleanly

That is only for Debian Squeeze. Then I probably follow Booting Debian on Pogoplug Pro guide to upgrade to Wheezy. Attached are the screenshots of my old u-boot log.

Since I plan to use the latest rootfs and kernel from Linux Kernel 3.17.0 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree) guide, I will use a new harddisk. I will report back when I have time to do it this evening.
Attachments:
open | download - Pogoplug.Pro.U-Boot.1.jpeg (296.1 KB)
open | download - Pogoplug.Pro.U-Boot.2.jpeg (464.2 KB)
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
December 01, 2014 11:18AM
bodhi Wrote:
-------------------------------------------------------
> Default envs for booting DTB separately:
>
> autoload=no
> baudrate=115200
> bootargs=console=ttyS0,115200n8
> bootdelay=10
> console=console=ttyS0,115200n8
> ethact=mii0
> ethaddr=5e:2b:15:71:ec:b6
> ipaddr=192.168.0.222
> mtdids=nand0=41000000.nand
> mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
> serverip=192.168.0.220
> stderr=serial
> stdin=serial
> stdout=serial
> usb_device=0:1
> if_netconsole=ping $serverip
> preboot_nc=run if_netconsole start_netconsole
> start_netconsole=setenv ncip $serverip; setenv
> bootdelay 10; setenv stdin nc; setenv stdout nc;
> setenv stderr nc; version
> usb_set_bootargs=setenv bootargs
> console=ttyS0,115200 root=/dev/sda1 rootdelay=10
> uinitrd_addr=0x60e00000
> uimage_addr=0x60500000
> dtb_addr=0x62c00000
> dt_load_dtb=ext2load usb 0:1 $dtb_addr
> /boot/dts/ox820-pogoplug-pro.dtb
> dt_load_initrd=ext2load usb 0:1 $uinitrd_addr
> /boot/uInitrd
> dt_load_uimage=ext2load usb 0:1 $uimage_addr
> /boot/uImage
> dt_bootm=bootm $uimage_addr $uinitrd_addr
> $dtb_addr
> dt_usb_boot=run dt_load_uimage; run
> dt_load_initrd; run dt_load_dtb; run dt_bootm
> dt_usb_bootcmd=run usb_set_bootargs; run
> dt_usb_boot
> dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb
> stop; reset
> bootcmd=run dt_bootcmd_usb
>
>
Sorry for the stupid question, what is DTB?
As I am using ext3 for the rootfs, should I change all those ext2load to ext3load?
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
December 01, 2014 01:15PM
Here is the output when I manually set the envs and run the command:

OX820 # setenv bootargs 'console=ttyS0,115200n8'
OX820 # setenv ethaddr '00:25:31:00:ef:ed'
OX820 # setenv ipaddr '192.168.1.3'
OX820 # setenv serverip '192.168.1.7'
OX820 # setenv if_netconsole 'ping $serverip'
OX820 # setenv preboot_nc 'run if_netconsole start_netconsole'
OX820 # setenv start_netconsole 'setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version'
OX820 # setenv usb_set_bootargs 'setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10'
OX820 # setenv uinitrd_addr '0x60e00000'
OX820 # setenv uimage_addr '0x60500000'
OX820 # setenv dtb_addr '0x62c00000'
OX820 # setenv dt_load_dtb 'ext2load usb 0:1 $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb'
OX820 # setenv dt_load_initrd 'ext2load usb 0:1 $uinitrd_addr /boot/uInitrd'
OX820 # setenv dt_load_uimage 'ext2load usb 0:1 $uimage_addr /boot/uImage'
OX820 # setenv dt_bootm 'bootm $uimage_addr $uinitrd_addr $dtb_addr'
OX820 # setenv dt_usb_boot 'run dt_load_uimage; run dt_load_initrd; run dt_load_dtb; run dt_bootm'
OX820 # setenv dt_usb_bootcmd 'run usb_set_bootargs; run dt_usb_boot'
OX820 # setenv dt_bootcmd_usb 'usb start; run dt_usb_bootcmd; usb stop; reset'
OX820 # setenv bootcmd 'run dt_bootcmd_usb'
OX820 # run dt_bootcmd_usb
(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
4109733 bytes read in 374 ms (10.5 MiB/s)
1953812 bytes read in 288 ms (6.5 MiB/s)
7029 bytes read in 226 ms (30.3 KiB/s)
## Booting kernel from Legacy Image at 60500000 ...
   Image Name:   Linux-3.3.17.0-oxnas-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4109669 Bytes = 3.9 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 60e00000 ...
   Image Name:   initramfs-3.17.0-oxnas-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    1953748 Bytes = 1.9 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 67c4d000, end 67e29fd4 ... OK
   Loading Device Tree to 67c48000, end 67c4cb74 ... OK

Led:    GREEN

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

And it just stuck there. I guess this is because I haven't upgrade the kernel yet.
Maybe I should try the old rootfs? But I don't know how to set the envs with only uImage & zImage in the /boot on the old rootfs.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
December 01, 2014 04:05PM
Purespin,

Mount the new rootfs on the other Linux box and regenerate uImage:

mkimage -A arm -O linux -T kernel -C none -a 0x60008000 -e 0x60008000 -n Linux-3.17.0-oxnas-tld-1 -d /boot/vmlinuz-3.17.0-oxnas-tld-1 /boot/uImage
sync

Take it to the Pogo and power up.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
December 01, 2014 05:04PM
Wow, I can't believe that my system will boot up the rootfs after re-generating uImage!

Now I have performed the step 9 & 10. Everything seems like except one catch: I can't change the ethaddr env. I always got:
fw_setenv ethaddr '00:25:31:00:ef:ed'
Can't overwrite "ethaddr"
But I can change ipaddr and serverip env using the same fw_setenv command!

According to the 1st post, I can set it now or later. So I just reboot the machine and everything is work!!! The system is booting from the new rootfs smoothly!!!
Thank you bodhi!!! Really appreciate it!!!

Now I still have a few question :-)
- Do I need to re-generate the uImage according to the 1st post in Linux Kernel 3.17.0 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)?
- Do I still need to flash the 3.17.0 kernel following the above guide? Or the latest rootfs already contains the kernel?
- I still can't fw_setenv ethaddr after rebooting. Is this a concern?
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
December 01, 2014 07:14PM
Run into another problem but it is probably hardware related.

I have set up the hard disk using Thermaltake BlacX docking station. Now I put it back to the enclosure (Vantec NexStar CX) which I have been using before the upgrade (same hard disk/same enclosure/same pogoplug pro device running 3.1.xx). But now I got the following error in U-Boot:

OX820 # usb start
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... Sorry, protocol 2 not yet supported.
0 Storage Device(s) found

But if I put it back to the Thermaltake docking station, everything seems fine:
OX820 # usb stop
stopping USB..
OX820 # usb start
(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

I am very sure that the old U-Boot can recognize the enclosure and boot from it. Not sure what 'protocol 2' is referring to?
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
December 01, 2014 10:46PM
purespin,

Quote

> fw_setenv ethaddr '00:25:31:00:ef:ed'
> Can't overwrite "ethaddr"
>
> But I can change ipaddr and serverip env using the
> same fw_setenv command!

It should allow you to change ethaddr in Debian. You can also set it in u-boot console with setenv. What's your output of
fw_printenv mtdparts
uname -a

Quote

> - Do I still need to flash the 3.17.0 kernel
> following the above guide? Or the latest rootfs
> already contains the kernel?

The new rootfs already has the new kernel.

Quote

> - I still can't fw_setenv ethaddr after rebooting.
> Is this a concern?

Not a concern. Right now you are using randomly generated local MAC addr which is fine, too. But you should set to your real MAC addr for correctness.

Quote

I have set up the hard disk using Thermaltake BlacX docking station. Now I put it back to the enclosure (Vantec NexStar CX) which I have been using before the upgrade (same hard disk/same enclosure/same pogoplug pro device running 3.1.xx).

Different u-boot versions might behave differently with certain enclosure. You can try to plug in after booting into Debian to see if there is any problem.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
December 01, 2014 10:58PM
bodhi Wrote:
-------------------------------------------------------
> It should allow you to change ethaddr in Debian.
> You can also set it in u-boot console with setenv.
> What's your output of
>
> fw_printenv mtdparts
> uname -a
>

Here are the output:
fw_printenv mtdparts
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)

uname -a
Linux oxnas 3.17.0-oxnas-tld-1 #1 SMP PREEMPT Sat Oct 25 15:59:43 PDT 2014 armv6l GNU/Linux

Yes, I set the MAC address in /etc/network/interfaces file in Debian. Hopefully that is good enough.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
December 04, 2014 05:20PM
I'm preparing to update a Pogo P21 with the new u-boot to use the new kernel and Debian file system. The bad blocks check returns the following:

/$ dmesg | grep -i 'bad'
[    1.710000] Scanning device for bad blocks
[    1.780000] Bad eraseblock 981 at 0x000007aa0000
[    2.260000] UBI: number of bad PEBs:         1
[    2.290000] UBI: number of PEBs reserved for bad PEB handling: 9


7aa0000 seems to be way at the end of the NAND (128,581,632) and thus not in the first 1 M. Am I correct in this, and therefore the u-boot should install OK?
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
December 04, 2014 05:31PM
mikeh49 Wrote:
-------------------------------------------------------
> I'm preparing to update a Pogo P21 with the new
> u-boot to use the new kernel and Debian file
> system. The bad blocks check returns the
> following:
>
>
> /$ dmesg | grep -i 'bad'
> [    1.710000] Scanning device for bad blocks
> [    1.780000] Bad eraseblock 981 at
> 0x000007aa0000
> [    2.260000] UBI: number of bad PEBs:         1
> [    2.290000] UBI: number of PEBs reserved for
> bad PEB handling: 9
>
>
>
> 7aa0000 seems to be way at the end of the NAND
> (128,581,632) and thus not in the first 1 M. Am I
> correct in this, and therefore the u-boot should
> install OK?

Yes, it is way out, so no problem.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
December 04, 2014 06:20PM
Great, thanks!
effendi
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
December 05, 2014 03:52AM
dmesg | grep -i 'bad'
[    5.490000] Scanning device for bad blocks
[    5.540000] Bad eraseblock 379 at 0x000002f60000
[    6.170000] UBI: number of bad PEBs:         1
[    6.210000] UBI: number of PEBs reserved for bad PEB handling: 9
Hi, @bohdi. Is this error installation is successful?
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: