Welcome! Log In Create A New Profile

Advanced

Pogoplug V4 fails to upgrade

Posted by Eyal 
Eyal
Pogoplug V4 fails to upgrade
May 02, 2020 05:01AM
Hello Bodhi good day

After 3 days of struggling I have decided to call for help...
I am running old Debian (3.14) on pogoplug_v4 (as NAS/ftp server/dlna...) for about 4 years now; unfortunately I did not maintain it (everything was working..).
Now in quarantine I have decided to update the system. Standard apt-get fails on site not found and trying to follow your instructions for installing ver 5.2.9 did not do the job. I am currently stuck.

my system:
Pogoplug V4, running Debian version 3.14, boot from MMC (I have a backup MMC), running with no issues. I can also boot the same version from USB.
USB is normally connected to hard-disc.

I have followed the instructions as published here: https://forum.doozan.com/read.php?2,12096 and per the recommendation went to the post on 25-Aug-2019, trying to install version 5.2.9.
The system is stuck with orange led.

Checking on serial I have noticed that the process is stuck after extracting the kernel, trying to boot the kernel.

here is a print of the boot process:

//--------------------------------------------
U-Boot 2014.07-tld-2 (Sep 19 2014 - 16:13:05)
Pogoplug V4

SoC:   Kirkwood 88F6192_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  128 MiB
MMC:   kwsdio: 0
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
No link on egiga0
ping failed; host xxx.xxx.x.x is not alive  //remark - while on serial I am with no network 
Hit any key to stop autoboot:  0

MMC rescan: current device # 0 initialized OK
4973642 bytes read in 1605 ms (3 MiB/s)
9713936 bytes read in 1966 ms (4.7 MiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.2.9-kirkwood-tld-1
   Created:      2020-05-02   5:31:40 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4973578 Bytes = 4.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:50 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9713872 Bytes = 9.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0xf78 from environment

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

//-------------------------------------------
here it stops.

I have stopped the process before autoboot and printed environment parameters:

//-------------------------------------------
U-Boot 2014.07-tld-2 (Sep 19 2014 - 16:13:05)
Pogoplug V4

SoC:   Kirkwood 88F6192_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  128 MiB
MMC:   kwsdio: 0
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
No link on egiga0
ping failed; host xxx.xxx.x.x is not alive  //remark - while on serial i am with no network 
Hit any key to stop autoboot:  0
Pogov4> printenv
arcNumber=3960
baudrate=115200
bootcmd=run bootcmd_mmc; run bootcmd_usb; run bootcmd_sata; run bootcmd_pogo; reset
bootcmd_mmc=run mmc_init; run set_bootargs_mmc; run mmc_boot
bootcmd_pogo=if ubi part root 2048 && ubifsmount ubi:rootfs && ubifsload 0x800000 uboot.mtd0.dockstar.original.kwb ; then go 0x800200; fi
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
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
ethaddr=xx:xx:xx:xx:xx:xx  //remark - actual numbers hidden
if_netconsole=ping $serverip
ipaddr=xxx.xxx.x.xx  //remark - actual numbers hidden
led_error=orange blinking
led_exit=green off
led_init=green blinking
machid=f78
mainlineLinux=yes
mmc_boot=mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_init=mmc rescan
mmc_load_uimage=ext2load mmc $device 0x800000 /boot/uImage
mmc_load_uinitrd=ext2load mmc $device 0x1100000 /boot/uInitrd
mmc_root=/dev/mmcblk0p1
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
preboot=run preboot_nc
preboot_nc=run if_netconsole start_netconsole
rootdelay=10
rootfstype=ext3
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
serverip=xxx.xxx.x.x   //remark - actual numbers hidden
set_bootargs_mmc=setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
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 0x810000
uenv_load=usb start; mmc rescan; ide reset; setenv uenv_loaded 0; for devtype in usb mmc ide; 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 0x810000 /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
usb_boot=mw 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=usb start
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=/dev/sda1

Environment size: 2987/131068 bytes
Pogov4>

//--------------------------------------------

Can you please help and advise - what is the error? How can I upgrade to newer version?

Regards

Eyal
Re: Pogoplug V4 fails to upgrade
May 02, 2020 05:34AM
Eyal,

You are running the 2014 u-boot with a set of old envs.

bootcmd=run bootcmd_mmc; run bootcmd_usb; run bootcmd_sata; run bootcmd_pogo; reset
bootcmd_mmc=run mmc_init; run set_bootargs_mmc; run mmc_boot
mmc_boot=mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_init=mmc rescan
mmc_load_uimage=ext2load mmc $device 0x800000 /boot/uImage
mmc_load_uinitrd=ext2load mmc $device 0x1100000 /boot/uInitrd
mmc_root=/dev/mmcblk0p1
set_bootargs_mmc=setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts

So when you try to use Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2, you need to do step 4:


Quote

4. Create uImage with embedded DTB for booting with older u-boots (2012 or earlier). Do not do this step if you have installed the latest U-Boot for Kirkwood (or are installing this u-boot at the same time).

Please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box (see the folder /media/sdb1/boot/dts for the exact spelling of your Kirkwood box name).

Generate the uImage with DTB embedded inside:
cd /media/sdb1/boot
cp -a zImage-5.2.9-kirkwood-tld-1 zImage.fdt
cat dts/kirkwood-goflexnet.dtb >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.2.9-kirkwood-tld-1 -d zImage.fdt uImage
sync

So if you did not create the uImage with DTB appended, it will not boot (even though 2014 u-boot is relatively new, your envs are quite old).

Mount the MMC drive to another Linux box and do Step 4 above (using the Pogo V4 DTB). Bring it back and boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Eyal
Re: Pogoplug V4 fails to upgrade
May 02, 2020 10:24AM
Hello Bodhi,

Thanks for the prompt reply.
Just to be sure I have repeated everything, including step 4, with no errors.
I get the same result: kernel does not boot.
Any other thing I can check?
Re: Pogoplug V4 fails to upgrade
May 02, 2020 04:02PM
Eyal,

I kept forgoting this u-boot still had problem with reallocation.

Power up, interrupt serial console and

setenv mmc_boot 'mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x2100000; else bootm 0x800000; fi'
setenv mmc_load_uinitrd 'ext2load mmc $device 0x2100000 /boot/uInitrd'
The above change is the fix.

And while we are at it, also change the bootargs so that you can see more printed out in serial console in the future:
setenv set_bootargs_mmc 'setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts earlyprintk=serial'

and then
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Eyal
Re: Pogoplug V4 fails to upgrade
May 03, 2020 09:36AM
Hello Bodhi,

As expected - you are right. Setting those parameters enabled the boot and things work. Thanks!

Two points here:
1. When I have used 'setenv' and soft boot things were ok. Once I have unplugged from power source and cold boot, the system failed as the changed parameters were not saved. I have done that again, but this time after the soft boot I have used 'fw_setenv' with the same commands. That one saved the parameters and cold boot is possible now. I can login and work.
2. I am trying upgrade the currently running MMC (the one with ver 3.14) so I will not have to re-install and setup all the different programs that are already there (ftp server, dlna, samba...). Any recommendation on the right way to do it?

Regards,

Eyal
Re: Pogoplug V4 fails to upgrade
May 03, 2020 03:58PM
Eyal,

> 1. When I have used 'setenv' and soft boot
> things were ok. Once I have unplugged from power
> source and cold boot, the system failed as the
> changed parameters were not saved. I have done
> that again, but this time after the soft boot I
> have used 'fw_setenv' with the same commands. That
> one saved the parameters and cold boot is possible
> now. I can login and work.

That's expected. setenv does not commit the change to NAND. fw_setenv changes and commits at the same time.


> 2. I am trying upgrade the currently running MMC
> (the one with ver 3.14) so I will not have to
> re-install and setup all the different programs
> that are already there (ftp server, dlna,
> samba...). Any recommendation on the right way to
> do it?

- Back up the MMC rootfs:
https://forum.doozan.com/read.php?2,12096,24034#msg-24034

- Install the latest kernel linux-5.6.5-kirkwood-tld-1. At this point you can run the same Debian system but with the latest kernel.

- Back up the MMC rootfs again. This is very important.

- Upgrade to the latets Debian. This step cause a massive change to the rootfs, and will take hours to finish (SD card is quite slow).

apt-get update
apt-get dist-upgrade
When it finished, you will need to regenerate uInitrd in /boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Eyal
Re: Pogoplug V4 fails to upgrade
May 05, 2020 04:46AM
Hi Bodhi,

Thanks, things are much better now (almost everything is working with no need to change).
I had to go through 5.2.9 and then to 5.6.5.

Thanks!

Eyal
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: