Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
July 03, 2015 07:26PM
dibbsy Wrote:
-------------------------------------------------------
> I have alarm on the pogo right now.
>
> 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 a USB rootfs that came from
> any of the above 3.
>
>
> OK so I plan to run a new rootfs/kernel from USB,
> I need a new uBoot to do this. I have a serial
> console. I get to step 12 and I do not have valid
> uBoot envs. I did not run step 9 or 10 as
> instructed as I have the stock kernel right now.
>
>
> [ 4380.990000] uncorrectable error :
> [ 4380.990000] uncorrectable error : Warning: Bad
> CRC, using default environment
> bootcmd=bootp; setenv bootargs root=/dev/nfs
> nfsroot=${serverip}:${rootpath}
> ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:$
> {hostname}::off; bootm
> bootdelay=5
> baudrate=115200
>
>
> How do I put the correct uboot environment back?
>
> Thanks!

Do you mean how to set u-boot envs to run the new u-boot as if you did step 9 and 10?

To run new rootfs/kernel, you need to do steps 9 and 10.

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



Edited 1 time(s). Last edit at 07/03/2015 07:35PM by bodhi.
dibbsy
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
July 04, 2015 12:25AM
I never ran those steps before rebooting as I had the stock kernel and alarm on usb, I ended up just interrupting uboot and manually adding the uboot envs based on your kernel thread and put the 3.17 rootfs on another usb stick.

Also to note, using a 99c ttl to usb board cut and paste too many lines at once into uboot console didn't work very well..

Thanks
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
July 04, 2015 01:02AM
dibbsy Wrote:
-------------------------------------------------------
> I never ran those steps before rebooting as I had
> the stock kernel and alarm on usb, I ended up just
> interrupting uboot and manually adding the uboot
> envs based on your kernel thread and put the 3.17
> rootfs on another usb stick.
>
> Also to note, using a 99c ttl to usb board cut and
> paste too many lines at once into uboot console
> didn't work very well..
>
> Thanks

Ah! glad you got it working. And thanks for the feedback about the instruction! Looks like I need to improve it a bit.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
July 07, 2015 03:37PM
Please see this post in Rescue System subforum for instruction on how to boot back to stock Pogo OS.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
August 28, 2015 08:21AM
Hi, I have problem booting the rootfs Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2
with this new uboot, plese help.

I flashed this new uboot over the old U-Boot (1.1.2 Jul 29 2010) under stock Pogoplug OS using the following command:


/tmp/.cemnt/mnt_sda1 # cat /proc/mtd
dev:    size   erasesize  name
mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit"
mtd1: 00e00000 00020000 "boot"
mtd2: 07200000 00020000 "rootfs"

nanddump mtd0 got 132MB, here I think I should dump the mtd1 instead?

/tmp/.cemnt/mnt_sda1 # /usr/sbin/flash_erase /dev/mtd0 0x0 6
Erase Total 6 Units
Performing Flash Erase of length 131072 at offset 0xa0000 done
erased 1 block here

/tmp/.cemnt/mnt_sda1 # /usr/sbin/nandwrite /dev/mtd0 uboot.spl.2013.10.ox820.850mhz.mtd0.img
Writing data to block 0 at offset 0x0

/tmp/.cemnt/mnt_sda1 # /usr/sbin/nandwrite -s 262144 /dev/mtd0 uboot.2013.10-tld-4.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

/tmp/.cemnt/mnt_sda1 # /usr/sbin/flash_erase /dev/mtd0 0x00100000 1
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0x100000 done

/tmp/.cemnt/mnt_sda1 # /usr/sbin/nandwrite -s 1048576 /dev/mtd0 pogopro_uboot_env.img
Writing data to block 8 at offset 0x100000

then I have made the uboot env as follows

autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootdelay=10
console=console=ttyS0,115200n8
ethact=mii0
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
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
uinitrd_addr=0x60e00000
uimage_addr=0x60500000
dtb_addr=0x62c00000
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
ipaddr=192.168.1.3
serverip=192.168.1.10
ethaddr=00:25:31:xx:xx:xx
devices=usb ide
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
uenv_import=echo importing envs ...; env import -t 0x60500000
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x60500000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
bootcmd=run bootcmd_uenv; run dt_bootcmd_usb; reset
dt_load_dtb=ext2load usb 0:1 $dtb_addr /boot/dts/ox820-pogoplug-classic.dtb
rootfstype=ext3
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootfstype=$rootfstype rootdelay=10

usb formated as ext3 with label rootfs
su and tar
Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2
cd /tmp/.cemnt/mnt_sda1/boot
cp -a zImage-3.17.0-oxnas-tld-1 zImage-3.17.0-oxnas-tld-1.fdt
cat dts/ox820-pogoplug-classic.dtb >> zImage-3.17.0-oxnas-tld-1.fdt
mkimage  -A arm -O linux -C none -T kernel -a 0x60008000 -e 0x60008000 -n 'Linux-3.3.17.0-oxnas-tld-1' -d zImage-3.17.0-oxnas-tld-1.fdt  uImage

output:
Image Name:   Linux-3.3.17.0-oxnas-tld-1
Created:      Fri Aug 28 23:18:24 2015
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    4109673 Bytes = 4013.35 kB = 3.92 MB
Load Address: 60008000
Entry Point:  60008000


sync

ls -al /mnt/usb/boot/
total 21500
drwxr-xr-x  3 root root    4096 Aug 28 21:09 .
drwxr-xr-x 23 root root    4096 Aug 28 22:10 ..
-rw-r--r--  1 root root   98866 Oct 26  2014 config-3.17.0-oxnas-tld-1
drwxr-xr-x  2 root root    4096 Nov  1  2014 dts
-rw-r--r--  1 root root 1953748 Nov  1  2014 initrd.img-3.17.0-oxnas-tld-1
-rw-r--r--  1 root root 1519590 Oct 26  2014 System.map-3.17.0-oxnas-tld-1
-rw-r--r--  1 root root     684 Aug 28 22:16 uEnv.txt
-rw-r--r--  1 root root 4109737 Aug 28 03:07 uImage
-rw-r--r--  1 root root 1953812 Nov  1  2014 uInitrd
-rwxr-xr-x  1 root root 4102640 Oct 26  2014 vmlinuz-3.17.0-oxnas-tld-1
-rwxr-xr-x  1 root root 4102640 Oct 26  2014 zImage-3.17.0-oxnas-tld-1
-rwxr-xr-x  1 root root 4109673 Aug 28 03:05 zImage-3.17.0-oxnas-tld-1.fdt

did A.6

Though the netconsole has been setup, but nothing from there.

The LED:
flashed for about 5s,
then turned solid for about 9s,
then flashing 1s, sold about 7s,
flashing 1s, solid 1s, flashing for about 7s,
then stays solid.

So have I missed anything? Do I have problem in my uboot/uenv or the rootfs files?
Does the LED behavior indicate the kernel has booted up but it troubles booting the rootfs?

ok, to answer myself, I was able to boot it up by not doing this step mentioned in the installtion thread:
cd /media/sdb1/boot
cp -a zImage-3.17.0-oxnas-tld-1 zImage-3.17.0-oxnas-tld-1.fdt
cat dts/ox820-pogoplug-pro.dtb >> zImage-3.17.0-oxnas-tld-1.fdt
mkimage  -A arm -O linux -C none -T kernel -a 0x60008000 -e 0x60008000 -n 'Linux-3.3.17.0-oxnas-tld-1' -d zImage-3.17.0-oxnas-tld-1.fdt  uImage
sync

and no netconsole information is because there's no preboot varible been set in the env, need this
preboot=run preboot_nc



Edited 5 time(s). Last edit at 08/28/2015 10:28AM by rynax.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
August 28, 2015 09:42AM
Rynax,

In my experience, netconsole will only work if everything is correctly configured. Getting the u-boot environment set up correctly can be an art, taking several attempts to get it right. The best thing you can now do is connect to the internal serial port and use a serial terminal emulator for debugging. Getting a serial terminal emulator connected is a bit of hassle, but it is well worth the effort for quick, simple debugging and testing. There are photos around on the web somewhere to show the connections required - note that a 3.3V interface is required, using a 5V one may cause hardware damage.

Regards

Peter
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
August 28, 2015 09:59AM
pmiller056 Wrote:
-------------------------------------------------------
> Rynax,
>
> In my experience, netconsole will only work if
> everything is correctly configured. Getting the
> u-boot environment set up correctly can be an art,
> taking several attempts to get it right. The best
> thing you can now do is connect to the internal
> serial port and use a serial terminal emulator for
> debugging. Getting a serial terminal emulator
> connected is a bit of hassle, but it is well worth
> the effort for quick, simple debugging and
> testing. There are photos around on the web
> somewhere to show the connections required - note
> that a 3.3V interface is required, using a 5V one
> may cause hardware damage.
>
> Regards
>
> Peter

Thanks Peter. Yep I got it boot up now without issue. See my edit above.
It could be I mixed up some FDT/DTB/embbeded/seperated files which is not compatible with the current uboot env settings.
I do have serial stuff in box, just won't use that if I can't recover it back.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
August 28, 2015 03:57PM
rynax,

> It could be I mixed up some
> FDT/DTB/embbeded/seperated files which is not
> compatible with the current uboot env settings.

Yes, that was the problem. Your u-boot envs are set up for booting separated DTB. So the uImage should not have DTB appended.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 03, 2015 12:33AM
Hi Bodhi,

Will this u-boot for Pogo/V3 work with a Pogo-p21 and/or Pogo-b01?
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 03, 2015 01:00AM
habibie Wrote:
-------------------------------------------------------
> Hi Bodhi,
>
> Will this u-boot for Pogo/V3 work with a Pogo-p21
> and/or Pogo-b01?

Yes it sure does!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 03, 2015 07:53AM
Hello Bodhi,

Thank you. Now, I can tell my friend to flash your u-boot on to this Pogo-b01.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 03, 2015 03:17PM
habibie Wrote:
-------------------------------------------------------
> Hello Bodhi,
>
> Thank you. Now, I can tell my friend to flash your
> u-boot on to this Pogo-b01.

Please make sure it is an B01 (i.e. OXNAS)!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 04, 2015 08:16AM
Hi,

I am trying to boot from SATA port. But it freezes during booting. Here is the serial output:

(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: Bus 0: OK
  Device 0: Model: WDC WD2500BEVT-00A23T0 Firm: 01.01A01 Ser#:  WD-WXB1A70X5232
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)

no USB devices available

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

Part    Start Sector    Num Sectors     UUID            Type
  1     63              7373772         65406540-01     83 Boot
  2     7374848         481021952       65406540-02     83
loading envs from ide 0 ...
652 bytes read in 48 ms (12.7 KiB/s)
importing envs ...
## Info: input data size = 2077 = 0x81D

Reset IDE: Bus 0: OK
  Device 0: Model: WDC WD2500BEVT-00A23T0 Firm: 01.01A01 Ser#:  WD-WXB1A70X5232
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)
4102704 bytes read in 1117 ms (3.5 MiB/s)
1953812 bytes read in 594 ms (3.1 MiB/s)
7033 bytes read in 20 ms (342.8 KiB/s)
7033 bytes read in 27 ms (253.9 KiB/s)
## Booting kernel from Legacy Image at 60500000 ...
   Image Name:   Linux-3.17.0-oxnas-tld-1
   Created:      2014-11-01   7:16:44 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4102640 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
   Created:      2014-11-01   7:18:53 UTC
   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 67c4b000, end 67e27fd4 ... OK
   Loading Device Tree to 67c46000, end 67c4ab78 ... OK

Led:    GREEN

Starting kernel ...

Uncompressing Linux... done, booting the kernel.<<<<<<<<<<<<<<<<<<<<<<<freeze, nothing for 5 min

The sata drive is the only drive connected. It is loaded with 3.17 rootfs on ext4 at the first partition.

If connect the sata drive with a USB adaptor to the oxnas, it can go through the 'booting the kernel', but there is error during booting:
[    3.350154] sd 1:0:0:0: [sda] Attached SCSI disk
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Waiting for root file system ... done.
Gave up waiting for root device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  /dev/disk/by-label/rootfs does not exist.  Dropping to a shell!
modprobe: module i8042 not found in modules.dep
modprobe: module atkbd not found in modules.dep
modprobe: module uhci-hcd not found in modules.dep
modprobe: module ohci-hcd not found in modules.dep


BusyBox v1.20.2 (Debian 1:1.20.0-7) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
(initramfs)

when I used a USB thumb drive, formated ext4, loaded 3.17, everything is OK.
[    3.459860] sd 1:0:0:0: [sda] Write Protect is off
[    3.465986] sd 1:0:0:0: [sda] No Caching mode page found
[    3.471354] sd 1:0:0:0: [sda] Assuming drive cache: write through
[    3.485035]  sda: sda1
[    3.494776] sd 1:0:0:0: [sda] Attached SCSI removable disk
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
[   12.149442] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
Begin: Running /scripts/local-bottom ... done.
done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
[....] Starting the hotplug events dispatcher: udevd[   13.939146] udevd[253]: starting version 175

I double check the fs on SATA drive. e2fsck comes all clean. Any clue? is this related to uboot or something else?
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 04, 2015 01:23PM
zzbao,

>
> I double check the fs on SATA drive. e2fsck comes
> all clean. Any clue? is this related to uboot or
> something else?

Yes. Make sure the rootfs partition is labeled rootfs. After checking the SATA disk, then use command such as:
tune2fs -L rootfs /dev/sdb1
Adjust the drive letter sdb1 to whichever the rootfs partition was assigned.

And you don't have to use 2 partitions on your HDD, everything can be in one partition formatted as Ext4. That will make booting much easier. Looking at your log, it seems u-boot was confused which partition was which. So If you still have problem after labeling the partition, pls interrupt serial console and get the listing of u-boot envs and post here.

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



Edited 1 time(s). Last edit at 10/04/2015 01:25PM by bodhi.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 09, 2015 07:51PM
I tried with one partition in ext4. but still not working. same problem, stop at "booting the kernel".

here is the setting:
autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootcmd=run bootcmd_uenv; run bootcmd_sata; run dt_bootcmd_usb; reset
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
console=console=ttyS0,115200n8
devices=usb ide
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
dt_load_dtb=ext2load usb 0:1 0x62c00000 /boot/dts/ox820-pogoplug-classic.dtb
dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boot/uInitrd
dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot/uImage
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:xxxxxxxxxxxxxxxx
if_netconsole=ping $serverip
ipaddr=192.168.8.19
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
preboot_nc=run if_netconsole start_netconsole
rootfstype=ext4
sata_boot=run sata_load_uimage; run sata_load_uinitrd; run sata_load_dtb; run sata_bootm
sata_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
sata_init=ide reset
sata_load_dtb=ext2load ide 0:1 0x62c00000 /boot/dts/ox820-pogoplug-pro.dtb
sata_load_uimage=ext2load ide 0:1 0x60500000 /boot/uImage
sata_load_uinitrd=ext2load ide 0:1 0x60e00000 /boot/uInitrd
serverip=192.168.0.x
set_bootargs_sata=setenv bootargs console=ttyS0,115200 root=LABEL=satarootfs rootfstype=ext4 rootdelay=10
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version
stderr=serial
stdin=serial
stdout=serial
uenv_import=echo importing envs ...; env import -t 0x60500000
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x60500000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
uimage_addr=0x60500000
uinitrd_addr=0x60e00000
usb_device=0:1
usb_ready_retry=15
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootfstype=ext4 rootdelay=10

lable on the HD is "satarootfs". I changed it in uboot too. will this be a problem?
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 09, 2015 09:47PM
zzbao,


- The previous error in USB rootfs indicated that your u-boot envs and the rootfs did not set up to correctly
- The error now wih the HDD indicated that the kernel did not start.

Let's boot with HDD attached only. And do the following steps:

1. Make sure the HDD has only one Ext4 partition.

2. Check rootfs label, it must be satarootfs
el2label /dev/sda1

3. Check what is in rootfs fstab, if it says rootfs, change it to satarootfs
cat /etc/fstab


4. Plug in the HDD. Power up. Interrupt serial console and:
setenv set_bootargs_sata 'setenv bootargs console=ttyS0,115200 root=LABEL=satarootfs rootfstype=ext4 rootdelay=10 earlyprintk=serial'
setenv sata_load_dtb 'ext4load ide 0:1 0x62c00000 /boot/dts/ox820-pogoplug-pro.dtb'
setenv sata_load_uimage 'ext4load ide 0:1 0x60500000 /boot/uImage
setenv sata_load_uinitrd 'ext4load ide 0:1 0x60e00000 /boot/uInitrd'
boot

Pls post entire serial console log here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 11, 2015 07:50AM
It worked! Thank you very much bodhi!

I just followed your step by step instruction and it worked right away.
nohud
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 17, 2015 05:31PM
@bodahi

What if OXNAS uboot loaded it's environment from the same place in flash as the kirkwook U-boot (0x0c0000)?

What do you think? Other than backwards compatibility is there any reason we wouldn't want to try that?

I was trying to standardize some of the uboot env and rescue systems between the two. I was planning to post it when I was done. I thought I would get your feedback before wasting time on pursuing it.


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"

cat /etc/fw_env.config 

# U-Boot Kirkwood 
  /dev/mtd0               0x0c0000       0x20000    0x20000 

cat /proc/mtd 

dev: size erasesize name 
mtd0: 00100000 00020000 "u-boot" 
mtd1: 00400000 00020000 "uImage" 
mtd2: 02000000 00020000 "rootfs" 
mtd3: 0db00000 00020000 "data"


I'm currently testing the layout for OXNAS running a rescue system from rootfs UBIFS, and openwrt on data UBIFS.
Just thinking through it...

cat /etc/fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
# pogoplug pro
  /dev/mtd1               0x0000000      0x20000         0x20000


cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00020000 00020000 "env"
mtd2: 00ce0000 00020000 "rootfs"
mtd3: 07200000 00020000 "data"

Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 17, 2015 06:16PM
nohud Wrote:
-------------------------------------------------------
> @bodahi
>
> What if OXNAS uboot loaded it's environment from
> the same place in flash as the kirkwook U-boot
> (0x0c0000)?
>
> What do you think? Other than backwards
> compatibility is there any reason we wouldn't want
> to try that?
>
> I was trying to standardize some of the uboot env
> and rescue systems between the two. I was planning
> to post it when I was done. I thought I would get
> your feedback before wasting time on pursuing it.
>
>
>
> 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"
>
>
>
> cat /etc/fw_env.config 
> 
> # U-Boot Kirkwood 
>   /dev/mtd0               0x0c0000       0x20000  
>  0x20000 
> 
> cat /proc/mtd 
> 
> dev: size erasesize name 
> mtd0: 00100000 00020000 "u-boot" 
> mtd1: 00400000 00020000 "uImage" 
> mtd2: 02000000 00020000 "rootfs" 
> mtd3: 0db00000 00020000 "data"
>
>
>
> I'm currently testing the layout for OXNAS running
> a rescue system from rootfs UBIFS, and openwrt on
> data UBIFS.
> Just thinking through it...
>
>
> cat /etc/fw_env.config
> # MTD device name       Device offset   Env. size 
>      Flash sector size       Number of sectors
> # pogoplug pro
>   /dev/mtd1               0x0000000      0x20000  
>       0x20000
> 
> 
> cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 00100000 00020000 "u-boot"
> mtd1: 00020000 00020000 "env"
> mtd2: 00ce0000 00020000 "rootfs"
> mtd3: 07200000 00020000 "data"
> 
>

Not a good jdea! They are 2 different u-boots using 2 different mtd layouts schemes.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
October 25, 2015 05:10PM
I've uploaded a new u-boot envs image for Oxnas. Please see here for download link and instruction.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
November 07, 2015 09:27PM
bodhi Wrote:
-------------------------------------------------------
> I've uploaded a new u-boot envs image for Oxnas.
> Please see
> here
>
for download link and instruction.

Bodhi,
I Originally installed Debian following grayman4hire's tutorial (blog.qnology.com/2015/04/hacking-pogoplug-v3oxnas-proclassic.html). I then followed your instructions and download link located at the link you listed (http://forum.doozan.com/read.php?3,24213). Aside from the wireless issue with no ehternet (which I appreciate you already looking into), My Pogoplug Pro now will not boot unless I disconnect the two external hard drives prior to powering the device. I followed the tutorials to the "T".
FYI, I'm using a microSD card via a USB adapter for rootfs. Two external hard drives only used for file storage.
I noticed that the download link in this post, and the one in "Oxnas U-Boot default environment image" have different MD5 values. are they compiled differently? I used the link in "Oxnas U-Boot default environment image", and not the one in this post.
Any thoughts on why the standard boot procedure is not picking up the rootfs from the microSD card when the external hard drives are plugged in?
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
November 08, 2015 03:10AM
cbalde04,

> I noticed that the download link in this post, and
> the one in "Oxnas U-Boot default environment
> image" have different MD5 values. are they
> compiled differently?

Of course, they are different images.

> I used the link in "Oxnas
> U-Boot default environment image", and not the one
> in this post.

That's not right. When you install u-boot in this thread, you must use the env image in this thread (the instruction was written for that envs image). The new image in the other thread was an improved version and released mainly for users who has already installed this u-boot, and wish to update. Note that I did not release the new version in this thread.

However, it is OK to use the new env image, providing you follow the instruction in the new env image thread, too:

Quote

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

a. 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.
b. The partition that contains the 2 kernel files must be partition 1 in a disk drive
c. The partition that contains the rootfs must be labeled rootfs

So with the new envs image installed, in your configuration, your SD card must have the rootfs in the 1st partition (best to have only one partition in the rootfs drive), and then the partition label must be rootfs. And the other disk drives must be regular data drive (i.e. does not contain any rootfs).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2015.10 U-Boot for Pogoplug V3 (OXNAS OX820)
November 22, 2015 02:51PM
I've uploaded the uboot.2015.10-tld-1 U-Boot image for Pogoplug V3 OX820. Please see 1st post for download link.

Given the interest showing that there are more OX820 boxes out there, I thought this should be tracking mainline U-Boot.

It has been a bit of a challenge for me to modernize this code base to track the mainline branch! so enjoy :)

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



Edited 1 time(s). Last edit at 11/22/2015 02:58PM by bodhi.
Thang
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
December 17, 2015 01:53PM
Ryanx,
I had the same issue but figured it out. Your mtdX is offset by one. You have to go with what your cat /proc/mtd display because that is your configuring environment. You need to replace mtd0 in the guide with mdt1.
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
December 19, 2015 04:18AM
FYI,

The stock partition scheme and new partition scheme are the same physically. In stock scheme, mtd0 is overlay the whole NAND. So mtd0 is at the same location at mtd1. This provides a chance for a careless mistake in that you could wipe out the 2nd partition if not careful.

The new partion scheme is saner. For example, if you mistakenly erase more blocks than the mtd0 holds, it will not overwrite mtd1. But with stock, you will need to avoid using mtd0, and must remember to use mtd1 and mtd2.

However, when dealing with NAND, we are suppose to double check, triple check,... the commands. So this is just academic.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
January 03, 2016 09:25AM
Hi bodhi,

once again, thanks for all the work you put into these boxes. In the sense of "triple checking", let me do this here.

As in rynax's case, I get
$ cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit"
mtd1: 00e00000 00020000 "boot"
mtd2: 07200000 00020000 "rootfs"

In addition, I am not quite certain anymore what system I have. I believe it is based on Warhead's ARCH kernel, but to make sure, here is a little more info:
$ uname -a
Linux pogo-oxnas 2.6.31.6_SMP_820 #6 SMP Thu Jun 14 19:49:57 CDT 2012 armv6l GNU/Linux
$ cat /etc/debian_version 
6.0.6

So, if I understand you and Thang correctly, all I need to do is replace mtd0 with mtd1 in the guide. Does that also mean, that cat /etc/fw_env.config should result in
# pogoplug v3
  /dev/mtd1               0x00100000      0x20000         0x20000

Currently, I get
$ cat /etc/fw_env.config
# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000

So, I should overwrite this with the one above?

Next, I do not like what I get when I run fw_printenv:
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200

So, hopefully, this is just due to the fact that my current system is from the stone age and I can still proceed with flashing the new uboot?

Cheers,

chessplayer

---
Standart ist der Standardfehler
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
January 03, 2016 10:30AM
chessplayer,

Good to see you posting again :)

> $ cat /proc/mtd
> dev: size erasesize name
> mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit"
> mtd1: 00e00000 00020000 "boot"
> mtd2: 07200000 00020000 "rootfs"

It is simpler to use the new mtdparts definition with only mtd0 and mtd1. The above is stock mtdparts definition (they are physically the same). After you flashed new u-boot and new env image, mtdparts should show only 2 mtds.

> Linux pogo-oxnas 2.6.31.6_SMP_820 #6 SMP Thu Jun

Yes it is WarheadsSE's kernel.

> So, if I understand you and Thang correctly, all I
> need to do is replace mtd0 with mtd1
> in the guide. Does that also mean, that cat
> /etc/fw_env.config should result in

> # pogoplug v3
> /dev/mtd1 0x00100000 0x20000
> 0x20000

> So, I should overwrite this with the one above?

As I mentioned, if you redefine mtdparts, then the guide can be followed as is. But if you want to keep 3 mtds then yes, it would work replacing mtd1 where mtd0 is in the guide, including the /etc/fw_env.config file as above.

>
> Next, I do not like what I get when I run
> fw_printenv:
> Warning: Bad CRC, using default environment

> So, hopefully, this is just due to the fact that
> my current system is from the stone age and I can
> still proceed with flashing the new uboot?

Yes it is true, proceed with flashing new u-boot, and boot with new rootfs. This CRC error is expected when you run fw_printenv in old rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2013.10 U-Boot for Pogoplug V3 (OXNAS)
January 03, 2016 01:47PM
bodhi,

thanks for getting back so quickly. One question (since this is beginning to look a bit like a hen and egg problem): after flashing new uboot, will it still be possible at all to boot the old system (WarheadsSE kernel + Debian Squeeze)? Or do I have to do more or less everything in one step:

a1) flash new uBoot
a2) install new kernel + rootfs
a3) reboot

Not quite sure at the moment ...

Update: Tried it anyway and it worked. Then I saw that on the very first page someone already said to do just that ...

---
Standart ist der Standardfehler



Edited 1 time(s). Last edit at 01/03/2016 06:04PM by chessplayer.
Re: 2015.10 U-Boot for Pogoplug V3 (OXNAS OX820)
January 04, 2016 07:26PM
Some Issues + Stupidity

So, I got both my B04 and my Pro boxes working with one and the same USB drive. Then I ran into the problem of not being able to set the ethaddr with fw_setenv as reported earlier. Unfortunately, netconsole is not working either for those two boxes (although it is for the Kirkwoods I have ...; why???).

At first, it seemed that using uEnv.txt I was able to get around the problem. At least for the Pro it seemed to be able to override the setting in NAND, but not for the Classic B04. So, I tried to make the environments as similar as possible to check this out. I believe that as soon as I added the dtb-part as suggested in step 6 of the Kernel thread, the override stopped working, but I will have to check this again.

Because, now for the stupid part: in the course of assimilating the environments, I managed to tell the Classic box that it should use the Pro's dtb! Therefore, now I do not get an IP-address anymore for the Classic box.

So, here is my question: is there a way to get to the box other than using a serial cable (which I would like to avoid ...)? Maybe by activating a WiFi-dongle using the Pro box and then using that with the Classic?

--- EDIT ---
And here is the answer: the question is stupid, as it already proposes a kind of solution. What really helped was to just rename the classic-file to the pro-file (having saved that one before) and just booting the box up with that. Then the variable dtb_file is changed back, the renaming reverted and all is well, except for the uEnv.txt not having an effect ..
---------------

Also, getting back to the original problem of the MAC address, I now use an alternative for setting it, namely by inserting the following line into /etc/network/interfaces:
hwaddress ether 00:25:31:XX:YY:ZZ


Anyway, for reference, here is my uBoot environment (sadly for both boxes ...):
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm 0x60500000 0x60e00000 0x62c00000; else bootm 0x60500000 0x60e00000; fi; else if run load_dtb; then bootm 0x60500000 - 0x62c00000; else bootm 0x60500000; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
usb_custom_params=zswap.enabled=1
device=0:1
devices=usb ide
disks=0 1 2 3
ethaddr=52:3b:20:9c:11:51
ethact=mii0
if_netconsole=ping $serverip
load_dtb=echo loading DTB $dtb_file ...; ext2load $bootdev $device 0x62c00000 $dtb_file
load_initrd=echo loading uInitrd ...; ext2load $bootdev $device 0x60e00000 /boot/uInitrd
load_uimage=echo loading uImage ...; ext2load $bootdev $device 0x60500000 /boot/uImage
mainlineLinux=yes
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if ext2load $dev $disknum:1 0x60500000 /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
uenv_import=echo importing envs ...; env import -t 0x60500000
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x60500000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15
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
preboot=run preboot_nc
ipaddr=192.168.xxx.yyy
serverip=192.168.xxx.zzz
dtb_file=/boot/dts/ox820-pogoplug-pro.dtb
uinitrd_addr=0x60e00000
uimage_addr=0x60500000
dtb_addr=0x62c00000
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
dt_load_dtb=ext2load usb 0:1 $dtb_addr $dtb_file
dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boot/uInitrd
dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot/uImage
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

Cheers,

chessplayer

Update: Obviously, with this setup, uEnv.txt has no effect ...

---
Standart ist der Standardfehler



Edited 2 time(s). Last edit at 01/04/2016 08:13PM by chessplayer.
Re: 2015.10 U-Boot for Pogoplug V3 (OXNAS OX820)
January 04, 2016 07:57PM
Copy the working flash drive to another flash drive (same size or bigger) using dd and on the copied fd rename the classic dtb in /boot/dts to the same name as u-boot is expecting it to be named, ie ox820-pogoplug-pro.dtb.

Edit: IIRC, the Pro can use the Classics dtb but not vice versa. If someone can confirm this, you could rename the file as I mentioned above without having to make a copy disk. Once your envs are fixed rename everything back to stock and you should be able to use one disk. Make backups of both dtb in a separate directory with their original name so you have pristine copies you can copy back.



Edited 3 time(s). Last edit at 01/04/2016 08:12PM by LeggoMyEggo.
Sorry, you can't reply to this topic. It has been closed.