Welcome! Log In Create A New Profile

Advanced

Installing new U-Boot for Pogoplug V3 - from Arch u-boot

Posted by huge 
Installing new U-Boot for Pogoplug V3 - from Arch u-boot
November 03, 2017 02:35AM
I hope this is the right place to post this - I'm mostly concerned about U-Boot issues...

I have an old Pogo-Classic (B01) running ArchLinux that I installed years ago. It was my first Pogoplug (almost my first linux experience) - I installed Samba, got it booting from a 3TB SATA drive, and used the rest of the drive as a server for my home network (mostly without problems, kind of miraculous given all the hoops I had to stumble through with all the Oxnas/Arch/Deprecated stuff). I pretty much never touched it out of fear it would break down on me, hence:

[root@alarm hd-sda4]# uname -a
Linux alarm 2.6.31.6_SMP_820 #6 SMP Thu Jun 14 19:49:57 CDT 2012 armv6l GNU/Linux

(No idea what version of U-Boot it's running)

Now I have a Pogo V4 running Debian and serving my network and am in the process of getting 4(!) other Pogos up and running, and I thought it might be time to update the old Pogo Classic and switch it to Debian. I don't currently have either Serial access or Netconsole running, so I want to be careful about how I do things so that I don't reboot and immediately end up with a brick.

Is this the right order in which I should proceed?:

1. Try to get NetConsole working (I've started working on this - is there any way to test nc without rebooting?)

2. Update U-boot as instructed in this thread, maintaining boot-from-SATA

3. Install the Debian rootfs & kernel onto the SATA drive boot partition (same version and process as with a Mobile or V4 or E02, right?)

Thanks for any guidance...



Edited 1 time(s). Last edit at 11/03/2017 03:06AM by bodhi.
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot
November 03, 2017 03:18AM
huge,

> I have an old Pogo-Classic (B01) running ArchLinux
> that I installed years ago. It was my first
> Pogoplug (almost my first linux experience) - I
> [root@alarm hd-sda4]# uname -a
> Linux alarm 2.6.31.6_SMP_820 #6 SMP Thu Jun 14
> 19:49:57 CDT 2012 armv6l GNU/Linux
> [/code]
>
> (No idea what version of U-Boot it's running)

It is running stock u-boot.

> Is this the right order in which I should
> proceed?:
>
> 1. Try to get NetConsole working (I've started
> working on this - is there any way to test nc
> without rebooting?)

No, not possible with stock u-boot.


> 2. Update U-boot as instructed in this thread,
> maintaining boot-from-SATA
>

Don't boot with SATA right away. Install to boot with USB rootfs, and later if desired, switch to SATA rootfs.


> 3. Install the Debian rootfs & kernel onto the
> SATA drive boot partition (same version and
> process as with a Mobile or V4 or E02, right?)

No, those are different SoC (Kirkwood). This Pogo V3 is OXNAS SoC.

-----

Summary of what to be done:

- Boot into Arch rootfs as shown

[root@alarm hd-sda4]# uname -a
Linux alarm 2.6.31.6_SMP_820 #6 SMP Thu Jun 14 19:49:57 CDT 2012 armv6l GNU/Linux

- Create USB Debian rootfs:
https://forum.doozan.com/read.php?2,16044

- Install new u-boot:
https://forum.doozan.com/read.php?3,16017

In one session you will have both Debian and u-boot installed. And then ready to reboot.

So read the first post of those 2 threads, and if you want, list your steps here for confirmation. Or if you are comfortable, do those installation and ask questions along the way.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot
November 03, 2017 05:42PM
Great, thank you. I installed the USB rootfs on another Pogo (log posted below, but all seemed fine). I went to start the u-boot install on my Pogo Classic, but I got different contents in /proc/mtd than your instructions called for. I'm guessing this is a function of my particular setup, but I don't know whether it makes any difference in the following steps.

Your instructions:
cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00e00000 00020000 "boot"
mtd1: 07200000 00020000 "data"

My system:
[root@alarm /]# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit"
mtd1: 00e00000 00020000 "boot"
mtd2: 07200000 00020000 "rootfs"
[root@alarm /]#

Let me know if I can ignore this discrepancy.




Here's the log from installing the rootfs:
root@debian:~#
root@debian:~# mkfs.ext3 -L rootfs /dev/sdb1
mke2fs 1.42.12 (29-Aug-2014)
/dev/sdb1 contains a exfat file system
Proceed anyway? (y,n) y
Creating filesystem with 978688 4k blocks and 244800 inodes
Filesystem UUID: 0d34295e-6aec-4c16-a92d-3f5697ef2ce6
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

root@debian:~# mkdir /media/sdb1
root@debian:~# mount /dev/sdb1 /media/sdb1
root@debian:~#
root@debian:~#
root@debian:~# cd /media/sdb1
root@debian:/media/sdb1#
root@debian:/media/sdb1#
root@debian:/media/sdb1# tar -xjf Debian-4.4.54-oxnas-tld-1-rootfs-bodhi.tar.bz2
root@debian:/media/sdb1# cat etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
LABEL=rootfs    /               ext3    noatime,errors=remount-ro 0 1
tmpfs          /tmp            tmpfs   defaults          0       0
root@debian:/media/sdb1# cd boot
root@debian:/media/sdb1/boot# ls dts/*classic*
dts/ox820-pogoplug-classic.dtb
root@debian:/media/sdb1/boot# cp -a zImage-4.4.54-oxnas-tld-1 zImage.fdt
root@debian:/media/sdb1/boot# cat dts/ox820-pogoplug-classic.dtb >> zImage.fdt
root@debian:/media/sdb1/boot# mkimage  -A arm -O linux -C none -T kernel -a 0x60008000 -e 0x60008000 -n 'Linux-4.4.54-oxnas-tld-1' -d zImage.fdt  uImage
Image Name:   Linux-4.4.54-oxnas-tld-1
Created:      Fri Nov  3 15:16:21 2017
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    4628835 Bytes = 4520.35 kB = 4.41 MB
Load Address: 60008000
Entry Point:  60008000
root@debian:/media/sdb1/boot# sync
root@debian:/media/sdb1/boot#

Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot
November 03, 2017 09:00PM
huge,

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

This is stock mtds definition. It is basically the same layout. However, when you flash u-boot, you will need to use mtd1. The flashing instruction is written with mtd0. So if you replace that with mtd1, then it will be correct.

With that said, it is best that you list your flashing commands, that you are about to execute, here for confirmation.


> root@debian:/media/sdb1/boot# cp -a
> zImage-4.4.54-oxnas-tld-1 zImage.fdt
> root@debian:/media/sdb1/boot# cat
> dts/ox820-pogoplug-classic.dtb >> zImage.fdt
> root@debian:/media/sdb1/boot# mkimage -A arm -O
> linux -C none -T kernel -a 0x60008000 -e
> 0x60008000 -n 'Linux-4.4.54-oxnas-tld-1' -d
> zImage.fdt uImage

The above is wrong. Because you are installing the new u-boot at the same time. The original uImage is the correct kernel boot file. So you need to reverse this step.

Quote

4. Create uImage with embedded DTB for booting with stock u-boot. Skip this step if you have installed the latest released uboot for OXNAS, or are installing this u-boot at the same time.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot
November 04, 2017 02:28AM
bodhi Wrote:
-------------------------------------------------------
> huge,
>
> > [root@alarm /]# cat /proc/mtd
> > dev: size erasesize name
> > mtd0: 08000000 00020000 "NAND 128MiB 3,3V
> 8-bit"
> > mtd1: 00e00000 00020000 "boot"
> > mtd2: 07200000 00020000 "rootfs"
>
> This is stock mtds definition. It is basically the
> same layout. However, when you flash u-boot, you
> will need to use mtd1. The flashing instruction
> is written with mtd0. So if you replace that with
> mtd1, then it will be correct.
>
> With that said, it is best that you list your
> flashing commands, that you are about to execute,
> here for confirmation.
>


Got it (and I'm glad I asked). Will substitute mtd1 for mtd0. And I will post what I'm planning to do below, before I do it...


>
> > [The uImage change that I shouldn't have made]
>
> The above is wrong. Because you are installing the
> new u-boot at the same time. The original uImage
> is the correct kernel boot file. So you need to
> reverse this step.
>
>
Quote

4. Create uImage with embedded DTB for
> booting with stock u-boot. Skip
> this step if you have installed the latest
> released uboot for OXNAS, or are installing this
> u-boot at the same time
.

Understood, I think. I'll start the posting of plans with this. I need to re-re-generate uImage using the original zImage-4.4... file without the .dtb file cat'd onto it. So I should enter the following...
mkimage -A arm -O  linux -C none -T kernel -a 0x60008000 -e  0x60008000 -n 'Linux-4.4.54-oxnas-tld-1' -d  zImage-4.4.54-oxnas-tld-1 uImage
Is that right?

After that I will *NOT* follow your instruction to "Take this USB rootfs to your plug and cold start" because I'm going to install the new u-Boot first...


[Actually I'm going to split this into two posts, hopefully for clarity. In the next post I'll list your "Flashing Instruction" steps and any questions or confusion I have about them]
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot
November 04, 2017 02:42AM
I'll list the steps as you have them numbered under "Flashing Instruction"...

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

cat /etc/fw_env.config 

[root@alarm /]# cat /etc/fw_env.config
/dev/mtd0 0x00100000 0x20000 0x20000

My fw_env.config file looks as you expect, but I'm assuming I need to edit it on my USB stick, changing mtd0 to mtd1, correct?

I'm more guessing than assuming that I should *not* change the size/offset numbers.

cat /proc/mtd 

[root@alarm /]# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit"
mtd1: 00e00000 00020000 "boot"
mtd2: 07200000 00020000 "rootfs"

[That file is on the root of my running Classic running ARM (i.e. on my SATA boot drive). On my USB stick the proc directory exists but is empty. So I'm assuming I need to copy the desired file to /media/sda1/proc to get it in the right place]

As stated, my mtd file looks different, but I'm guessing I don't have to edit/change this file. The size & erasesize numbers for "boot" are the same as in your instructions, just at a different device name (mtd1). I don't know if I need to do anything about the fact that your suggested file has the line...

mtd1: 07200000 00020000 "data"


...while mine has...

mtd2: 07200000 00020000 "rootfs"


Do I just leave it as is?




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

--Understood. I'll backup these files, again replacing mtd0 with mtd1.
--I assume I should perform the same backup on the other mtd device names just to be paranoid



4. Be sure there is no bad block in the first 2M of your NAND

--Understood (haven't run into any bad blocks yet, knock wood)



5. Extract the archive to /tmp

cd /tmp
tar -xf uboot.2015.10-tld-2.ox820.bodhi.tar


--Understood, and I'll remain in /tmp for the remainder


Be extra careful with the next 5 commands
--Roger that



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

--I should enter
/usr/sbin/flash_erase /dev/mtd1 0x0 6
instead.



7. Flash encoded spl stage1 to 0x0

--Again, replace mtd0 with mtd1


Steps 8,9,10: Enter your commands but with mtd1 instead of mtd0. Stop if any output looks wrong.


11. Required setup for default envs (only 1 kernel/rootfs partition, etc)

--I believe I meet all of these requirements. I'm going to build a USB stick to boot from now, and then hopefully get it working again to boot from SATA, where partition 1 will have the kernel files and will be labeled rootfs, and where there will not be any other partitions that might confuse u-Boot.


12. Set up netconsole. --Understood


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.

--Understood. I'll probably just post them here even if there isn't an error.


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).

--Understood, I think. I assume I just (might) have to reset the ethaddr to the MAC address on the case, using fw_setenv.


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-2 (Oct 21 2017 - 22:00:02 -0700)
OXNAS OX820



--Understood. Fingers crossed



16. Done.

--Toes crossed.



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

--Understood. Don't think I need this as long as my envs are set right to befin with, right?




Thank you again for going through all this. Feel free to respond to steps one at a time if that's more convenient - if you say "in Step 7 do XYZ" I'll know what you mean. Or all at once - whatever's easier.
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot
November 04, 2017 03:27AM
The correct command to regenerate uImage is

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


Note:

I forgot to revise the instruction for this OXNAS rootfs, step 4 should have included the command to save the original uImage:
cd /media/sdb1/boot
cp -a uImage uImage.orig
cp -a zImage-4.4.54-oxnas-tld-1 zImage.fdt
cat dts/ox820-pogoplug-pro.dtb >> zImage.fdt
mkimage  -A arm -O linux -C none -T kernel -a 0x60008000 -e 0x60008000 -n 'Linux-4.4.54-oxnas-tld-1' -d zImage.fdt  uImage
sync

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot
November 04, 2017 05:38AM
huge Wrote:
-------------------------------------------------------
Quote

> I'll list the steps as you have them numbered
> under "Flashing Instruction"...
>
> 1. uBoot envs config and mtd partitions must be
> defined as followed in your rootfs
>
>
> cat /etc/fw_env.config 
> 
> [root@alarm /]# cat /etc/fw_env.config
> /dev/mtd0 0x00100000 0x20000 0x20000
>
>
> My fw_env.config file looks as you expect, but I'm
> assuming I need to edit it on my USB stick,
> changing mtd0 to mtd1, correct?
>

No. Leave it the same. It does not affect how you can access the u-boot envs.

After you've flashed the new u-boot and its default envs and rebooted, the mtdparts will have only 2 mtds (mtd0 and mtd1). But the location of each is still exactly the same as stock.

Quote

> I'm more guessing than assuming that I should
> *not* change the size/offset numbers.
>
>
> cat /proc/mtd 
> 
> [root@alarm /]# cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit"
> mtd1: 00e00000 00020000 "boot"
> mtd2: 07200000 00020000 "rootfs"
>
>
> [That file is on the root of my running Classic
> running ARM (i.e. on my SATA boot drive). On my
> USB stick the proc directory exists but is empty.
> So I'm assuming I need to copy the desired file to
> /media/sda1/proc to get it in the right place]

No need to copy /proc.

Quote

>
> As stated, my mtd file looks different, but I'm
> guessing I don't have to edit/change this file.
> The size & erasesize numbers for "boot" are the
> same as in your instructions, just at a different
> device name (mtd1). I don't know if I need to do
> anything about the fact that your suggested file
> has the line...
>
>
> mtd1: 07200000 00020000 "data"
>
>
>
> ...while mine has...
>
>
> mtd2: 07200000 00020000 "rootfs"
>
>
>
> Do I just leave it as is?


Correct. No need to change anything in the rootfs.

Quote

> 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
>
>
> --Understood. I'll backup these files, again
> replacing mtd0 with mtd1.
> --I assume I should perform the same backup on the
> other mtd device names just to be paranoid

Yes, even better to name the uboot mtd backup differently in your case, so that it describes the mtd that was backed up.

nanddump --noecc --omitoob -f mtd.uboot  /dev/mtd1


Quote

> 4. Be sure there is no bad block in the first 2M
> of your NAND
>
> --Understood (haven't run into any bad blocks yet,
> knock wood)
>
>
>
> 5. Extract the archive to /tmp
>
>
> cd /tmp
> tar -xf uboot.2015.10-tld-2.ox820.bodhi.tar
>
>
>
> --Understood, and I'll remain in /tmp for the
> remainder
>
>
>
> Be extra careful with the next 5 commands
>
> --Roger that
>
>
>
> 6. Erase 6 blocks on mtd0
>
> /usr/sbin/flash_erase /dev/mtd0 0x0 6
>
>
> --I should enter
>
> /usr/sbin/flash_erase /dev/mtd1 0x0 6
>
> instead.


Yes. That would be:
/usr/sbin/flash_erase /dev/mtd1 0x0 6


Quote

> 7. Flash encoded spl stage1 to 0x0
>
> --Again, replace mtd0 with mtd1

Yes.

Quote

>
>
> Steps 8,9,10: Enter your commands but with mtd1
> instead of mtd0. Stop if any output looks wrong.
>

Yes.


Quote

>
> 11. Required setup for default envs (only 1
> kernel/rootfs partition, etc)
>
> --I believe I meet all of these requirements. I'm
> going to build a USB stick to boot from now, and
> then hopefully get it working again to boot from
> SATA, where partition 1 will have the kernel files
> and will be labeled rootfs, and where there will
> not be any other partitions that might confuse
> u-Boot.
>
>
> 12. Set up netconsole. --Understood
>
>
> 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.
>
> --Understood. I'll probably just post them here
> even if there isn't an error.
>
>
> 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).
>
> --Understood, I think. I assume I just (might)
> have to reset the ethaddr to the MAC address on
> the case, using fw_setenv.
>

Yes. MAC address can be set in Debian with fw_setenv.


Quote

> 
> 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-2 (Oct 21 2017 - 22:00:02
> -0700)
> OXNAS OX820
>
>
> --Understood. Fingers crossed
>
> 16. Done.
>
> --Toes crossed.
>
> A. How to use the uEnv.txt script (Optional)
>
> --Understood. Don't think I need this as long as
> my envs are set right to befin with, right?
>


Right. No need to use uEnv.txt. It's good for playing with the envs and avoid messing up u-boot envs permanently. Or in some cases, good to use it to reset to a good default set of of u-boot envs when they are messed up too much.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot
November 04, 2017 06:44AM
Thank you thank you thank you...

I've gone through most of the process without apparent problem or too much confusion.

I'm just up to "12. Set up netconsole". I've looked at my env's & found several that needed changing (dtb_file, ipaddr, serverip, ethaddr, others)

So I'm going to post my env's now before I go to bed. Tomorrow I'll set up nc, do the last couple of checks, and then reboot unless you tell me there's something wrong/missing:

[EDIT: Haha as I was falling asleep in my chair at 4:30AM I didn't realize that setting up Netconsole would consist exactly of typing "fw_setenv preboot 'run preboot_nc'" since I had already changed ethaddr, ipaddr & serverip. So that's the only change to the envs below before I shutdown, unplug power, unplug SATA, leave USB stick in back slot next to ethernet, start netconsole, & power up.]


[root@alarm tmp]# /usr/sbin/fw_printenv
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=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset
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 ...; load $bootdev $device 0x62c00000 $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device 0x60e00000 /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device 0x60500000 /boot/uImage
mainlineLinux=yes
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
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
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 load $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
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_import=echo importing envs ...; env import -t 0x60510000  $filesize
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
ipaddr=192.168.222.160
serverip=192.168.222.164
dtb_file=/boot/dts/ox820-pogoplug-classic.dtb
[root@alarm tmp]#



Edited 1 time(s). Last edit at 11/04/2017 12:57PM by huge.
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot
November 04, 2017 03:47PM
huge,

You have serial console, so there is no need to set up netconsole now. You can always wait until after the system has been up and running well.

Quote

10. 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 8 then activate netconsole with the following envs:

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot
November 04, 2017 06:42PM
bodhi Wrote:
-------------------------------------------------------
> huge,
>
> You have serial console, so there is no need to
> set up netconsole now. You can always wait until
> after the system has been up and running well.
>
>
Quote

10. 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 8 then activate
> netconsole with the following envs:

My luck with Serial console has been fading - the last couple of times I tried to use it with my E02 I couldn't get it to work, but I'll just hold my breath and fire away...

Success! Thought it had failed but I must have neglected to set ethaddr correctly so my router gave it an unexpected IP address. Was still able to listen on netconsole - here's the log though I don't see anything problematic:

root@PogoV4Debian:/boot# nc.traditional -l -u -p 6666 &
[1] 23395
root@PogoV4Debian:/boot# nc.traditional -u  -p 6666 192.168.222.160   6666

U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 -0700)
OXNAS OX820
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

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

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            7829504         2b44e28e-01     83 Boot
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **

no IDE devices available
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 189 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
4621824 bytes read in 478 ms (9.2 MiB/s)
loading uInitrd ...
4594376 bytes read in 444 ms (9.9 MiB/s)
loading DTB /boot/dts/ox820-pogoplug-classic.dtb ...
7075 bytes read in 183 ms (37.1 KiB/s)
## Booting kernel from Legacy Image at 60500000 ...
   Image Name:   Linux-4.4.54-oxnas-tld-1
   Created:      2017-11-04  10:50:28 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4621760 Bytes = 4.4 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 60e00000 ...
   Image Name:   initramfs-4.4.54-oxnas-tld-1
   Created:      2017-08-01   7:51:04 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    4594312 Bytes = 4.4 MiB
   Load Address: 60000000
   Entry Point:  60000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 62c00000
   Booting using the fdt blob at 0x62c00000


Starting kernel ...


In fact it looks like it's checking for a SATA boot drive along with USB, which is what I want.

Next steps: install latest kernel on USB stick, generate new SSH keys, update/upgrade, find the thread about booting with SATA & get that working again, put away USB stick for emergencies...

Thank you for the 732nd time.



Edited 1 time(s). Last edit at 11/04/2017 07:12PM by huge.
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot
November 05, 2017 06:09AM
huge Wrote:
-------------------------------------------------------
> bodhi Wrote:
> -------------------------------------------------------
> > huge,
> >
> > You have serial console, so there is no need to
> > set up netconsole now. You can always wait
> until
> > after the system has been up and running well.
> >
> >
Quote

10. 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 8 then
> activate
> > netconsole with the following envs:
>
> My luck with Serial console has been fading - the
> last couple of times I tried to use it with my E02
> I couldn't get it to work, but I'll just hold my
> breath and fire away...
>
> Success! Thought it had failed but I must have
> neglected to set ethaddr correctly so my router
> gave it an unexpected IP address. Was still able
> to listen on netconsole - here's the log though I
> don't see anything problematic:
>
>
> root@PogoV4Debian:/boot# nc.traditional -l -u -p
> 6666 &
> [1] 23395
> root@PogoV4Debian:/boot# nc.traditional -u  -p
> 6666 192.168.222.160   6666
> 
> U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02
> -0700)
> OXNAS OX820
> gcc (Debian 6.3.0-18) 6.3.0 20170516
> GNU ld (GNU Binutils for Debian) 2.28
> Hit any key to stop autoboot:  0
> starting USB...
> USB0:   USB EHCI 1.00
> scanning bus 0 for devices... 3 USB Device(s)
> found
>        scanning usb for storage devices... 1
> Storage Device(s) found
> 
> Reset IDE: SATA PHY not ready for device 0
> ide_preinit failed
> 
> Partition Map for USB device 0  --   Partition
> Type: DOS
> 
> Part    Start Sector    Num Sectors     UUID      
>      Type
>   1     2048            7829504        
> 2b44e28e-01     83 Boot
> loading envs from usb 0 ...
> ** File not found /boot/uEnv.txt **
> 
> no IDE devices available
> running scan_disk ...
> Scan device usb
> device usb 0:1
> 1 bytes read in 189 ms (0 Bytes/s)
> Found bootable drive on usb 0
> loading uImage ...
> 4621824 bytes read in 478 ms (9.2 MiB/s)
> loading uInitrd ...
> 4594376 bytes read in 444 ms (9.9 MiB/s)
> loading DTB /boot/dts/ox820-pogoplug-classic.dtb
> ...
> 7075 bytes read in 183 ms (37.1 KiB/s)
> ## Booting kernel from Legacy Image at 60500000
> ...
>    Image Name:   Linux-4.4.54-oxnas-tld-1
>    Created:      2017-11-04  10:50:28 UTC
>    Image Type:   ARM Linux Kernel Image
> (uncompressed)
>    Data Size:    4621760 Bytes = 4.4 MiB
>    Load Address: 60008000
>    Entry Point:  60008000
>    Verifying Checksum ... OK
> ## Loading init Ramdisk from Legacy Image at
> 60e00000 ...
>    Image Name:   initramfs-4.4.54-oxnas-tld-1
>    Created:      2017-08-01   7:51:04 UTC
>    Image Type:   ARM Linux RAMDisk Image (gzip
> compressed)
>    Data Size:    4594312 Bytes = 4.4 MiB
>    Load Address: 60000000
>    Entry Point:  60000000
>    Verifying Checksum ... OK
> ## Flattened Device Tree blob at 62c00000
>    Booting using the fdt blob at 0x62c00000
> 
> 
> Starting kernel ...
> 
> 
>
>
>
> In fact it looks like it's checking for a SATA
> boot drive along with USB, which is what I want.
>
>
> Next steps: install latest kernel on USB stick,
> generate new SSH keys, update/upgrade, find the
> thread about booting with SATA & get that working
> again, put away USB stick for emergencies...
>
> Thank you for the 732nd time.

Cool! this is success story we all like to see :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
epk
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot
November 07, 2017 02:59PM
Hi,
I'm hoping to update my u-boot and kernel on my Pogoplug Pro, and I got to the u-boot step where I check for bad blocks, and while I think I know the answer, just to be totally safe, I'm going ask the professionals. This is the output I got:
[    1.224471] Scanning device for bad blocks
[    1.293665] Bad eraseblock 806 at 0x0000064c0000
Am I correct in thinking that since the eraseblock is 806, it's way out the range to worry about? Or is it the 1.293665 that's the number to be afraid of?

Thanks!
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot
November 07, 2017 03:54PM
epk,

> [ 1.224471] Scanning device for bad blocks
> [ 1.293665] Bad eraseblock 806 at
> 0x0000064c0000

> Am I correct in thinking that since the
> eraseblock is 806, it's way out the range to worry
> about?

Correct. Block 806 is way out. No need to worry!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot
November 07, 2017 03:55PM
epk Wrote:
-------------------------------------------------------
> Hi,
> I'm hoping to update my u-boot and kernel on my
> Pogoplug Pro, and I got to the u-boot step where I
> check for bad blocks, and while I think I know the
> answer, just to be totally safe, I'm going ask the
> professionals. This is the output I got:
>
> [    1.224471] Scanning device for bad blocks
> [    1.293665] Bad eraseblock 806 at
> 0x0000064c0000
>
> Am I correct in thinking that since the
> eraseblock is 806, it's way out the range to worry
> about? Or is it the 1.293665 that's the number to
> be afraid of?
>
> Thanks!

While I am NOT a professional you are correct in your thinking. The 1.293665 is the time from starting. Checking is always better! After all is done and you login to your running system if you are curious you can type "sudo dmesg" and it will show you all of the information you system went thru while booting and as it is running.

edit:

lol Bodhi (the professional) beat me while I was typing.



Edited 1 time(s). Last edit at 11/07/2017 03:57PM by feas.
epk
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot
November 07, 2017 04:19PM
Awesome, thanks guys!
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: