2015.10 U-Boot for Pogoplug V3 (OXNAS OX820)
May 07, 2014 04:36AM
2015.10 U-Boot for Pogoplug V3 (OXNAS OX820)

This U-Boot supports OX820 boxes such as Pogoplug Pro V3, Pogoplug V3 Classic, MEDION® LIFE® P89626 , and possibly many other OXNAS boxes such as Silverstone DC01, and Akitio Mycloud mini.

If you install this u-boot on Silverstone DC01, and Akitio Mycloud mini or other OX820 boxes, please post your finding so it can be added to the supported list.

References:

1. U-Boot source code at GitHub (branch 2015.10-oxnas, sync to released 2015.10-tld-1 u-boot in this thread).
Note 1: The source code in GitHub only work for NAND version. SATA (Ext4, FAT) version will be updated in the future.
Note 2: For building SPL, please use 2013.10 (oxnas branch)

2. Latest Debian kernel and rootfs for Oxnas OX820

3. SATA direct booting tarball.

Requirements:

The starting point could be one of of the following:

1 .Your Pogo V3 is already running Debian rootfs with Arch kernel
2. Your Pogo V3 is already running Arch rootfs with Arch kernel
3. Your Pogo V3 is already running the latest Debian rootfs from Latest Linux Kernel 3.xx and rootfs Pogo V3 thread (or you plan to run this rootfs after installing U-Boot)
4. You are running stock kernel, and have gained SHH access to the box, and have downloaded u-boot-tools and mtd-utils (fw_setenv, flash_erase, nandwrite …) to work with NAND mtds. And plan to run with a new rootfs that came from any of the above 3.

See NAND and U-Boot tools binaries in this thread for links to download these tools binaries so you can run them in stock kernel.

Warning:

After flashing this U-Boot, it still will be possible to boot back to stock OS (see this thread). However, it will not be possible to fully restore to the original FW out of the box (flashing SPL and U-boot images in this procedure will overwrite part of the NAND area where stock FW u-boot envs are located). And the default u-boot envs needed to be adjusted for this. So the bottom line is this u-boot will not work with stock OS out of the box.


=====================================================

Updated 23 Oct 2017

uboot.2015.10-tld-2 u-Boot image for Pogoplug V3 Oxnas has been uploaded.

Updated in this u-boot version:

- Fixed preboot missing in previous version. As a result, netconsole is now starting automatically if set up.
- A more robust new default envs image.

- Note: There is a typo in the default envs that caused problem with the uEnv.txt capability (loading envs does not work). If you use this capabilty, see this post for temporary fix. Thanks hkguy for reporting this problem!.

Disclaimer
Quote

Flashing uBoot to mtd0 could potentially brick your box! please have serial console, or JTAG set up before hand to recover from any mistake or bad flash. The instruction to flash uBoot image to mtd0 is included here. But please proceed only at your own risk. However, there is a recovery path if any thing goes wrong. But it will require the box to be opened and then a SATA HDD attached to the hidden SATA port inside.


Download U-Boot image at Dropbox:

uboot.2015.10-tld-2.ox820.bodhi.tar

md5sum
c8d52236f906fd7fc8c84d15562331b0
sha256sum
d9e034f70a3c40d6a970084c858e8890989e0d40d11699dc488e3dd852092aad

This archive contains the following 4 files:

uboot.2015.10-tld-2.ox820.mtd0.img
uboot.spl.2013.10.ox820.850mhz.mtd0.img
uboot.2015.10-tld-2.ox820.environment
uboot.2015.10-tld-2.ox820.environment.img


And please check the hash of what you've download, as always!

Flashing Instruction:

1. uBoot envs config and mtd partitions must be defined as followed in your rootfs

cat /etc/fw_env.config
# pogoplug v3
  /dev/mtd0               0x00100000      0x20000         0x20000
cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00e00000 00020000 "boot"
mtd1: 07200000 00020000 "data"

If you don't have /etc/fw_env.config file in your system, then you are running either stock Pogo OS, or earlier version of Arch Linux ARM. Go ahead and create this file with the above content.

2. This u-boot and the default envs image supports both modern FDT and non-FDT kernel. It will not work with stock kernel. So do not install this u-boot if you plan to run stock kernel.

3. Be sure to save your current uBoot image in mtd0, or have a backup image saved somewhere as precaution.

Dumping NAND mtd0:
nanddump --noecc --omitoob -f mtd0  /dev/mtd0
Save envs:

Debian command:
fw_printenv > current_envs.txt

or stock OS command:
blparam >  current_envs.txt

4. Be sure there is no bad block in the first 2M of your NAND (check dmesg for bad block 0 to 15). This is very important, if there is bad block in the first 2M, don't flash u-boot, because you will almost certainly brick your box. Please post your question here (there is a work around for it).

Example of bad block in mtd0:
dmesg | grep -i 'bad'

[    2.413231] Scanning device for bad blocks
[    2.417731] Bad eraseblock 3 at 0x000000060000

This bad block resides within first 2MB in mtd0 (block 0 to block 15). So u-boot should not be flashed.


5. Extract the archive to /tmp
cd /tmp
tar -xf uboot.2015.10-tld-2.ox820.bodhi.tar

Be extra careful with the next 5 commands, you should copy/paste the commands to the shell prompt, and should see output that look like below in steps 6 through 10. If there is error, then do not reboot, post your problem here so we can help.

6. Erase 6 blocks on mtd0
/usr/sbin/flash_erase /dev/mtd0 0x0 6
Expected output
Erasing 128 Kibyte @ a0000 -- 100 % complete


7. Flash encoded spl stage1 to 0x0
/usr/sbin/nandwrite /dev/mtd0 uboot.spl.2013.10.ox820.850mhz.mtd0.img
Expected output
Writing data to block 0 at offset 0x0

8. Flash u-boot to 0x40000
/usr/sbin/nandwrite -s 262144 /dev/mtd0 uboot.2015.10-tld-2.ox820.mtd0.img
Expected output
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000
Writing data to block 5 at offset 0xa0000


9. Erase 1 block starting 0x00100000
/usr/sbin/flash_erase /dev/mtd0 0x00100000 1
Expected output
Erasing 128 Kibyte @ 100000 -- 100 % complete

10. Flash uboot environment to 0x00100000
/usr/sbin/nandwrite -s 1048576 /dev/mtd0 uboot.2015.10-tld-2.ox820.environment.img
Expected output
Writing data to block 8 at offset 0x100000

11. Required setup for default envs

This default envs image supports booting with multiple disk drives (and hubs) attached. The disk drives could be type (usb or sata). The scanning logic and default envs were set to automatically boot the box with the following required configuration:

r1. There must be only one partition among all partitions from all drives that contains the kernel files. The 2 kernel files are /boot/uImage and /boot/uInitrd.
r2. The partition that contains the 2 kernel files must be partition 1 in a disk drive
r3. The partition that contains the rootfs must be labeled rootfs
r4. The rootfs partition is recommended to be type Ext3 (this is not a hard requirement, ext4 should boot OK, but Ext3 will ensure no problem).

So the bottom line is if you have only one rootfs in a single Ext3 partition, which is labeled as rootfs, then you're all set.

12. Set up netconsole. It's important to set up neconsole if you don't already have serial console connected. If you have serial console, don't set up netconsole at this moment, because it will interfere with serial console.

If you've flashed the default environments in step 10 then activate netconsole with the following envs:
fw_setenv preboot 'run preboot_nc'
fw_setenv ipaddr    '192.168.0.xxx'
fw_setenv serverip '192.168.0.yyy'
where the 192.168.0.xxx is the Pogo V3 IP address, and 192.168.0.yyy is the IP address of the netconsole server where it will monitor the output from the Pogo V3 (adjust them to the real values in your own local network settings).

13. For sanity check, print out uBoot envs to see if they were flashed OK. If there is error in listing the envs, do not reboot and post your problem here.

14. Make sure ethaddr is set in uBoot env. Note that the ethaddr in the default envs image was generated randomly as a local MAC address. It should allow the Pogo V3 to boot into Debian without problem. But you should set it to the correct one after the system running to avoid conflicts (in case you have 2 or more Pogo Pro/Classic boxes).

fw_printenv ethaddr

15. Adjust the DTB name to boot with the other variant of Pogoplug V3 (after flashing the envs image in Step 10 above, the default is set to the Pogoplug V3 Pro).

If you have the Pogplug V3 classic (without Wifi) then
fw_setenv dtb_file '/boot/dts/ox820-pogoplug-classic.dtb'
For other OXNAS boxes that migh work with this u-boot see the rootfs installation Step 4, or kernel upgrade Step 6.

16. Reboot. Upon reboot, in either serial console or netconsole, uBoot banner should show the SPL and U-Boot versions as:
U-Boot SPL 2013.10-tld-4 (Sep 07 2014 - 14:10:12)

U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 -0700)
OXNAS OX820

DONE Installation.

A. How to use the uEnv.txt script (Optional)

This uEnv.txt script can be used to further customizing u-boot envs without saving to NAND or to boot with a completely different set of u-boot envs.

Create a text file in /boot directory with the content in the format that u-boot envs are listed.

Example:

This example is only to demonstrate the syntax in uEnv.txt (they might or might not apply to your current settings):

- Load appropriate DTB file for the kernel to run the Pogo Classic box.
- Use USB and SATA for booting. The kernel and rootfs search order is as they are appeared on the list: usb, ide.
- Define that there are 8 storage devices (i.e. disk partitions).

cat /boot/uEnv.txt
dtb_file=/boot/dts/ox820-pogoplug-classic.dtb
devices=usb ide
disks=0 1 2 3 4 5 6 7


=====================================================

Updated 22 Nov 2015

I've uploaded the uboot.2015.10-tld-1 u-Boot image for Pogoplug V3 Oxnas.

Warning: netconsole does not start automatically in this version. If you don't have serial console and therefore need netconsole to see the boot progress, please use previous u-boot version (uboot.2013.10-tld-3.ox820.bodhi.tar - Updated 16 May 2014). And follow the instruction in that section.


There are only minor changes in functionality from 2013.10 version. The major change in this version is to modernize and this code base now is back to tracking the mainline branch.

This u-boot supports the following latest U-Boot features (among others):

- Ability to customize u-boot envs in a script (uEnv.txt) during boot, without committing changes to NAND (see section A below for instruction). This feature also can be used for rescue purpose where the u-boot envs were messed up, or when the NAND envs block is bad.
- both FDT and non-FDT kernel booting
- supports EFI/GPT partition > 2TB (SATA and USB) either for booting or just attached.
- boot Ext4 rootfs
- SNTP (Simple NTP to set date time during U-Boot booting)
- bootz (boot with zImage).
- Run the Pogo V3 at 850mhz (for whatever reason, if you wish to run at 700Mhz as previous version did, then use the old u-boot SPL version uboot.spl.2013.10.ox820.mtd0.img in previous version). U-boot image proper is independent of the SPL, so it can still be updated to uboot.2015.10-tld-1.

Disclaimer

Flashing uBoot to mtd0 could potentially brick your box! please have serial console, or JTAG set up before hand to recover from any mistake or bad flash. The instruction to flash uBoot image to mtd0 is included here. But please proceed only at your own risk. However, there is a recovery path if any thing goes wrong. But it will require the box to be opened and then a SATA HDD attached to the hidden SATA port inside.

Download U-Boot image at Dropbox:

uboot.2015.10-tld-1.ox820.bodhi.tar
md5
90afc75a29601cdb60adc7afd8bbda26

This archive contains the following 4 files:

uboot.2015.10-tld-1.ox820.mtd0.img
uboot.spl.2013.10.ox820.850mhz.mtd0.img
uboot.2013.10-tld-5.ox820.environment
uboot.2013.10-tld-5.ox820.environment.img


Flashing Instruction:

1. uBoot envs config and mtd partitions must be defined as followed in your rootfs

cat /etc/fw_env.config
# pogoplug v3
  /dev/mtd0               0x00100000      0x20000         0x20000
cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00e00000 00020000 "boot"
mtd1: 07200000 00020000 "data"

If you don't have /etc/fw_env.config file in your system, then you are running either stock Pogo OS, or earlier version of Arch Linux ARM. Go ahead and create this file with the above content. MTD parts are not importan for booting and it can be adjusted later.

2. This u-boot and the default envs image supports both modern FDT and non-FDT kernel. It will not work with stock kernel. So do not install this u-boot if you plan to run stock kernel.

3. Be sure to save your current uBoot image in mtd0, or have a backup image saved somewhere as precaution.

Dumping NAND mtd0:
nanddump --noecc --omitoob -f mtd0  /dev/mtd0
Save envs:
fw_printenv > current_envs.txt
or
blparam >  current_envs.txt


4. Be sure there is no bad block in the first 2M of your NAND (check dmesg for bad block 0 to 16). This is very important, if there is bad block in the first 2M, don't flash u-boot, because you will almost certainly brick your box. Please post your question here (there is a work around for it).

Example of bad block in mtd0:
dmesg | grep -i 'bad'

[    2.413231] Scanning device for bad blocks
[    2.417731] Bad eraseblock 3 at 0x000000060000

This bad block resides within first 2MB in mtd0 (block 0 to block 15). So u-boot should not be flashed.


5. Extract the archive to /tmp
cd /tmp
tar -xf uboot.2015.10-tld-1.ox820.bodhi.tar

Be extra careful with the next 5 commands, you should see output that look like below in steps 6 through 10. If there is error, then do not reboot, post your problem here so we can help.

6. Erase 6 blocks on mtd0
/usr/sbin/flash_erase /dev/mtd0 0x0 6
Expected output
Erasing 128 Kibyte @ a0000 -- 100 % complete


7. Flash encoded spl stage1 to 0x0
/usr/sbin/nandwrite /dev/mtd0 uboot.spl.2013.10.ox820.850mhz.mtd0.img
Expected output
Writing data to block 0 at offset 0x0

8. Flash u-boot to 0x40000
/usr/sbin/nandwrite -s 262144 /dev/mtd0 uboot.2015.10-tld-1.ox820.mtd0.img
Expected output
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000
Writing data to block 5 at offset 0xa0000


9. Erase 1 block starting 0x00100000
/usr/sbin/flash_erase /dev/mtd0 0x00100000 1
Expected output
Erasing 128 Kibyte @ 100000 -- 100 % complete

10. Flash uboot environment to 0x00100000
/usr/sbin/nandwrite -s 1048576 /dev/mtd0 uboot.2013.10-tld-5.ox820.environment.img
Expected output
Writing data to block 8 at offset 0x100000

11. Required setup for default envs

This default envs image supports booting with multiple disk drives (and hubs) attached. The disk drives could be type (usb or sata). The scanning logic and default envs were set to automatically boot the box with the following required configuration:

r1. There must be only one partition among all partitions from all drives that contains the kernel files. The 2 kernel files are /boot/uImage and /boot/uInitrd.
r2. The partition that contains the 2 kernel files must be partition 1 in a disk drive
r3. The partition that contains the rootfs must be labeled rootfs
r4. The rootfs partition is recommended to be type Ext3 (this is not a hard requirement, ext4 should boot OK, but Ext3 will ensure no problem).

So the bottom line is if you have only one rootfs in a single Ext3 partition, which is labeled as rootfs, then you're all set.

12. Set up netconsole. It's important to set up neconsole if you don't already have serial console connected. If you've flashed the default environments in step 10 then activate netconsole with the following envs:
fw_setenv preboot_nc 'setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi'
fw_setenv preboot 'run preboot_nc'
fw_setenv ipaddr    '192.168.0.xxx'
fw_setenv serverip '192.168.0.yyy'
where the 192.168.0.xxx is the Pogo V3 IP address, and 192.168.0.yyy is the IP address of the netconsole server where it will monitor the output from the Pogo V3 (adjust them to the real values in your own local network settings).

13. For sanity check, print out uBoot envs to see if they were flashed OK. If there is error in listing the envs, do not reboot and post your problem here.

14. Make sure ethaddr is set in uBoot env. Note that the ethaddr in the default envs image was generated randomly as a local MAC address. It should allow the Pogo V3 to boot into Debian without problem. But you should set it to the correct one either now or after the system running.

fw_printenv ethaddr


15. Reboot. Upon reboot, in either serial console or netconsole, uBoot banner should show the SPL and U-Boot versions as:
U-Boot SPL 2013.10-tld-4 (Sep 07 2014 - 14:10:12)

U-Boot 2015.10-tld-1 (Nov 21 2015 - 01:17:59 -0800)
OXNAS OX820

16. Done.

A. How to use the uEnv.txt script

This uEnv.txt script can be used to further customizing u-boot envs without saving to NAND or to boot with a completely different set of u-boot envs.

Create a text file in /boot directory with the content in the format that u-boot envs are listed.

Examples:

These 4 examples are only to demonstrate the syntax in uEnv.txt (they might or might not apply to your current settings):

- Load appropriate DTB file for the kernel to run the Pogo Classic box.
- Use only USB drives for kernel and rootfs during booting
- Use USB and SATA for booting. The kernel and rootfs search order is as they are appeared on the list: usb, ide.
- Define that there are 8 storage devices (i.e. disk partitions).

cat /boot/uEnv.txt
dtb_file=/boot/dts/ox820-pogoplug-classic.dtb
devices=usb
devices=usb ide
disks=0 1 2 3 4 5 6 7


====== Below are old posts, kept for reference =================

=====================================================

Updated 04 Mar 2015

I've uploaded the uboot.2013.10-tld-4 u-Boot image for Pogoplug V3 Oxnas. But mistakely deleted the download link :) I will resotre this from old notes.



This u-boot supports the following latest U-Boot features (among others):

- Ability to customize u-boot envs in a script (uEnv.txt) during boot, without committing changes to NAND. This feature also can be used for rescue purpose where the u-boot envs were messed up, or when the NAND envs block is bad.
- both FDT and non-FDT kernel booting
- supports EFI/GPT partition > 2TB (SATA and USB) either for booting or just attached.
- boot Ext4 rootfs
- SNTP (Simple NTP to set date time during U-Boot booting)
- bootz (boot with zImage).
- Run the Pogo V3 at 850mhz (for whatever reason, if you wish to run at 700Mhz as previous version did, then use the old u-boot SPL version uboot.spl.2013.10.ox820.mtd0.img). U-boot image proper is independent of the SPL, so it can still be updated to uboot.2013.10-tld-4.

Note: this version does not have NAND jffs2 file system supports (it is gotten quite big, so this was removed to save space, ubifs is preferred anyway).



=====================================================

Updated 16 May 2014

I've uploaded the 2013.10 u-Boot image for Pogoplug V3 Oxnas

Usual Disclaimer

Flashing uBoot to mtd0 could potentially brick your box! please have serial console, or JTAG set up before hand to recover from any mistake or bad flash. The instruction to flash uBoot image to mtd0 is included here. But please proceed only at your own risk. However, there is a recovery path if any thing goes wrong. But it will require the box to be opened and then a SATA HDD attached to the hidden SATA port inside.

Recovery

Unlike the Kirkwood boxes, there is no option to boot with UART that we know of. Should you mess up your NAND mtds while flashing U-Boot, the recovery path for Pogo V3 is to boot with a SATA hardisk that was specially prepared to have all necessary files: Stage1 SPL, U-Boot, and rootfs in the HDD. This is possible because the Pogo V3 Oxnas ROM always tries to find the boot loader in SATA first if there is one attached. See this A new kernel for OXNAS thread (at Arch site) for how to do that in case you have to recover, or just want to follow that approach and avoid flashing U-Boot to NAND.

Download U-Boot image at Dropbox:

uboot.2013.10-tld-3.ox820.bodhi.tar
md5
c916498ff7396cc81c9c9aa0a2d714d3

This archive contains the following 3 files:

uboot.spl.2013.10.ox820.mtd0.img
uboot.2013.10-tld-3.ox820.mtd0.img
pogopro_uboot_env.img

Flashing Instruction:

1. uBoot envs config and mtd partitions must be defined as followed in your rootfs
cat /etc/fw_env.config 

# pogoplug v3
  /dev/mtd0               0x00100000      0x20000         0x20000

cat /proc/mtd 

dev:    size   erasesize  name
mtd0: 00e00000 00020000 "boot"
mtd1: 07200000 00020000 "data"

If you don't have /etc/fw_env.config file in your system, then you are running either stock Pogo OS, or earlier version of Arch Linux ARM. Go ahead and create this file with the above content. MTD parts are not importan for booting and it can be adjusted later.

2. The env image pogopro_uboot_env.img should only be flashed if your rootfs has FDT kernel. If your kernel is an older non-FDT kernel then do not flash this env image.

3. Be sure to save your current uBoot image in mtd0, or have a backup image saved somewhere as precaution.

Dumping NAND mtd0:
nanddump -nf mtd0 /dev/mtd0

4. Be sure there is no bad block in the first 1M of your NAND (check dmesg). This is very important, if there is bad block in the first 1M, don't flash u-boot, because you will almost certainly brick your box. Please post your question here (there is a work around for it).

Example of bad block in mtd0:
dmesg | grep -i 'bad'

[    2.413231] Scanning device for bad blocks
[    2.417731] Bad eraseblock 3 at 0x000000060000

5. Extract the archive to /tmp
cd /tmp
tar -xf uboot.2013.10-tld-3.ox820.bodhi.tar

Be extra careful with the next 5 commands, you should see output that look like below in steps 6 through 10. If there is error, then do not reboot, post your problem here so we can help.

6. Erase 6 blocks on mtd0
/usr/sbin/flash_erase /dev/mtd0 0x0 6

Erasing 128 Kibyte @ a0000 -- 100 % complete


7. Flash encoded spl stage1 to 0x0
/usr/sbin/nandwrite /dev/mtd0 uboot.spl.2013.10.ox820.mtd0.img

Writing data to block 0 at offset 0x0

8. Flash u-boot to 0x40000
/usr/sbin/nandwrite -s 262144 /dev/mtd0 uboot.2013.10-tld-3.ox820.mtd0.img

Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000
Writing data to block 5 at offset 0xa0000

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

11. Set up netconsole. It's important to set up neconsole if you don't already have serial console connected. If you've flashed the default environments in step 10 then activate netconsole with the following envs:
fw_setenv preboot 'run preboot_nc'
fw_setenv ipaddr    '192.168.0.xxx'
fw_setenv serverip '192.168.0.yyy'
where the 192.168.0.xxx is the Pogo V3 IP address, and 192.168.0.yyy is the IP address of the netconsole server where it will monitor the output from the Pogo V3 (adjust them to the real values in your own local network settings).

12. For sanity check, print out uBoot envs to see if they were flashed OK. If there is error in listing the envs, do not reboot and post your problem here.
fw_printenv

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

13. Make sure ethaddr is set in uBoot env and in /etc/network/interfaces. It must be set before rebooting the system. Note that the ethaddr in the pogopro_uboot_env.img image was generated randomly as a local MAC address. It should allow the Pogo V3 to boot into Debian without problem. But you should set it to the correct one either now or after the system running.

fw_printenv ethaddr
cat /etc/network/interfaces | grep -i hwaddress

14. Reboot. Upon reboot, in either serial console or netconsole, uBoot banner should show the SPL and U-Boot versions as:
U-Boot SPL 2013.10 (Apr 27 2014 - 19:08:27)
U-Boot 2013.10-tld-3 (May 15 2014 - 14:54:14) for OXNAS

Done.

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



Edited 34 time(s). Last edit at 02/01/2021 04:01PM by bodhi.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
May 16, 2014 04:30PM
U-Boot 2013.10 image was uploaded. Please see 1st post for download link and instruction.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
gulizi
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
June 11, 2014 10:21PM
I have stock pogoplug p21, as in starting point 4, and there is no /etc/fw_env.config file under original stock rootfs, can I still update uboot? Also, how i can install new kernel with nothing installed because i can't run "dpkg -i linux-image-3.12.13-oxnas-tld-5_5_armel.deb" and mkimage etc?
Do i have to install alarm first then change to debian rootfs then update kernel and rootfs?
Thanks a lot!
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
June 11, 2014 10:27PM
this is my /proc/mtd:

mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit"
mtd1: 00e00000 00020000 "boot"
mtd2: 07200000 00020000 "rootfs"
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
June 11, 2014 11:53PM
gulizi,

Easiest way to install is try to run new Debian rootfs first:
http://forum.doozan.com/read.php?2,16044

and then install new u-boot from there.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
June 12, 2014 09:34AM
@gulizi

That's what the stock definitions of the mtd are. I am not *entirely* sure why they are being altered
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
June 13, 2014 12:19AM
Thanks for the replys guys.
Another silly question, can I just use the existing uImage in your debian rootfs? what is the purpse of running mkimage ourselves?
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
June 13, 2014 01:23AM
gulizi Wrote:
-------------------------------------------------------
> Thanks for the replys guys.
> Another silly question, can I just use the
> existing uImage in your debian rootfs? what is the
> purpse of running mkimage ourselves?

Reread the instructions, it's really 2 different types of installations.

1. Using pre-prepared rootfs, there is no need to generate uImage.
2. When installing kernel on top of a running kernel, then new uImage needs to be generated.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
June 13, 2014 09:45AM
I see it now, thanks! However my mtd partition looks different:
mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit"
mtd1: 00e00000 00020000 "boot"
mtd2: 07200000 00020000 "rootfs"
Is it safe for me to repartition it to look like this and flash uboot, if yes how can I do it?
dev: size erasesize name
mtd0: 00e00000 00020000 "boot"
mtd1: 07200000 00020000 "data"
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
June 13, 2014 10:09AM
gulizi,

This is what was defined by kref (the orginal author), so I kept it the same:
mtd0: 00e00000 00020000 "boot"
mtd1: 07200000 00020000 "data"

It could have been kept as the orginal layout
mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit" 
mtd1: 00e00000 00020000 "boot" 
mtd2: 07200000 00020000 "rootfs"

If you don't intend to use the orginal FW again, or if you only boot from USB or SATA rootfs, then mtds definition is really irrelevant to the kernel.

Only in the future, when you start thinking/playing with storing kernel/rootfs in NAND then, it will be relevant. However, in the mean time the only thing that's important is SPL image is flashed to the correct location, and u-boot image is flashed to the correct location.

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



Edited 1 time(s). Last edit at 06/13/2014 10:11AM by bodhi.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
June 13, 2014 10:35AM
I understood now, thanks for prompt reply. However when i try to backup my mtd0, i get:

[root@alarm tmp]# /usr/sbin/nanddump -o -f mtd0.dump /dev/mtd0
ECC failed: 12253
ECC corrected: 20
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x08000000...
ECC: 8 uncorrectable bitflip(s) at offset 0x00040000
ECC: 8 uncorrectable bitflip(s) at offset 0x00040800
ECC: 8 uncorrectable bitflip(s) at offset 0x00041000
ECC: 8 uncorrectable bitflip(s) at offset 0x00041800
ECC: 8 uncorrectable bitflip(s) at offset 0x00042000
ECC: 8 uncorrectable bitflip(s) at offset 0x00042800
ECC: 8 uncorrectable bitflip(s) at offset 0x00043000
etc.

Is there something wrong? I am tempted to ignore this and go ahead and flash it..
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
June 13, 2014 04:00PM
I think the kernel probably use different ECC checking. so it doesn't matter. The new uboot is working with your latest rootfs.
Thanks for the hard work and patient help!



Edited 1 time(s). Last edit at 06/13/2014 08:18PM by gulizi.
Brom
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
June 21, 2014 11:02AM
Hi,
thanks for this awesome work. I've a question to step two. You say "2. The env image pogopro_uboot_env.img should only be flashed if your rootfs has FDT kernel. If your kernel is an older non-FDT kernel then do not flash this env image. ". Does that mean that I can skip step 9 and 10 with an older kernel or do I need a different file to flash?

Brom
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
June 21, 2014 11:40AM
Brom,

Quote

Does that mean that I can skip step 9 and 10 with an older kernel or do I need a different file to flash?

No, it means that you will need to make sure your current u-boot envs can boot old kernel. And change them if necessary.

So if you're not sure how, then I would recommend to use the latest rootfs so that it conforms to requirement 3 in first post:
3. Your Pogo V3 is already running the latest Debian rootfs from Linux Kernel 3.14 Pogo V3 thread (or you plan to run this rootfs after installing U-Boot)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Brom
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
June 21, 2014 11:56AM
Thanks for the fast reply. That's now my plan. I upgrade uBoot and rootfs(+kernel) in one step now.
shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
July 13, 2014 10:35AM
Are there any stage1 and uboot files available for the SATA disk or shall I still use the fieles from WarheadsSE?
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
July 13, 2014 01:42PM
@shv,

I've not yet built the SATA version. It's on my Todo list, but lower priority than the next item (Kirkwood U-boot). I think you could use WarheadsSE files to boot new kernel uImage with embedded DTB. In the OXNAS kernel thread, I've shown how we can boot it with stock U-Boot using tftp.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
July 23, 2014 10:46PM
I'm a little confused regarding the mtd partitions. So can we leave the mtd partition as stock?

bodhi Wrote:
-------------------------------------------------------
> gulizi,
>
> This is what was defined by kref (the orginal
> author), so I kept it the same:
>
> mtd0: 00e00000 00020000 "boot"
> mtd1: 07200000 00020000 "data"
>
>
> It could have been kept as the orginal layout
>
> mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit" 
> mtd1: 00e00000 00020000 "boot" 
> mtd2: 07200000 00020000 "rootfs"
>
>
> If you don't intend to use the orginal FW again,
> or if you only boot from USB or SATA rootfs, then
> mtds definition is really irrelevant to the
> kernel.
>
> Only in the future, when you start
> thinking/playing with storing kernel/rootfs in
> NAND then, it will be relevant. However, in the
> mean time the only thing that's important is SPL
> image is flashed to the correct location, and
> u-boot image is flashed to the correct location.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
July 25, 2014 12:27AM
grayman4hire,

> I'm a little confused regarding the mtd
> partitions. So can we leave the mtd partition as
> stock?

You could set them back to stock, I don't see any problem with doing that.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
July 26, 2014 03:35AM
This is the reply to bodhis message: http://forum.doozan.com/read.php?2,16044,16830#msg-16830

@bodhi,
I have compiled the uboot with ext4 configuration successfully. The u-boot-spl.bin file can be loaded. Until now I don't have the right partition structure so that the primary loader can't load the u-boot.img. I just wanted to get you a fast feedback for the new ox820.c file.
U-Boot SPL 2013.10-g3a0f380-dirty (Jul 26 2014 - 10:18:57)
  Boot device: SATA
Attempting to set PLLA to 800 MHz ...
  plla_ctrl0 : 0000030a
  plla_ctrl1 : 00400000
  plla_ctrl2 : 007f0068
  plla_ctrl3 : 00000193

PLLA Set
Bus 0: OK
  Device 0:
Failed to mount ext2 filesystem...
-shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
July 26, 2014 03:53AM
@shv,

Awesome! thanks for letting me now. So either my eSATA enclosure is not recognized, or the u-boot-spl.bin was not dd correctly (which I'd doubt to be the case because I used WarheadsSE's disk_create script to do that).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
July 26, 2014 04:27AM
@bodhi,
I chanaged in all dt_... variable as mentioned above usb to ide. This works to boot the system with new uboot and new kernel from ide.

Is is also possible to boot a single file old kernel image, e.g. the 2.6.31.14 kernel?

-shv



Edited 6 time(s). Last edit at 07/26/2014 06:16AM by shv.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
July 26, 2014 02:35PM
@shv,

Not at the moment. We can boot 2.6.3xx Arch Linux ARM kernel but not Debian.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
July 26, 2014 04:17PM
@bodhi,
it is working using the following line in boot.env:
dt_sata_boot=ext2load ide 0:1 $uimage_addr /boot/uImage_2.6.31.14_OX820_1.2_shv.Pro; bootm $uimage_addr
-shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
July 26, 2014 04:53PM
@shv,

Cool! did you compile that kernel? i.e. the modules in /lib/modules are Debian modules ?

> /boot/uImage_2.6.31.14_OX820_1.2_shv.Pro;

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



Edited 1 time(s). Last edit at 07/26/2014 04:54PM by bodhi.
shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
July 27, 2014 02:01AM
@bodhi,

Is there anything special for Debian modules? I compiled that kernel and installed it on my debian system. This means that the modules are also available.

The 1.0 version of this kernel is available from there: http://pogoplug.square7.de/forum/viewtopic.php?f=5&t=98#p418

-shv



Edited 3 time(s). Last edit at 03/11/2017 11:49AM by shv.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
July 27, 2014 03:24AM
shv,

> Is there anything special for Debian modules?

Not really. I was just curious and not aware about your build (since I put the Pogo Pro on the back burner for a while).

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

the uboot is working well. I just tried to boot the original Pogoplug OS and it works well. It seams to be possible to write a default uboot.env which boots into Pogoplug OS if no drive is connected to it. I didn't try netconsole yet.

-shv
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
July 27, 2014 02:38PM
@shv,

Thanks. I will give it a try when my direct connect 22pin-eSATA cable arrive.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
jman
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
July 31, 2014 09:50PM
Hi,

I'm trying to update my u-boot on my pogo pro. I previously had archlinux modifed u-boot. So i was able to get it to boot 3.12.13 over tftp and your latest rootfs, but i don't have any of the commands for reading/writing nand in my /usr/sbin folder.

Also when i do a fw_printenv i get alot of these:

28.420162] libphy: stmmac-0:00 - Link is Up - 1000/Full
[   83.255096] __nand_correct_data: uncorrectable ECC error
[   83.260364] __nand_correct_data: uncorrectable ECC error__nand_correct_data: uncorrectable ECC error


Any advice?
Sorry, you can't reply to this topic. It has been closed.