I've been trying for some days to set up POGO-V4-A3-01 + 2017.07 U-Boot Kirkwood + Debian 4.12.1 rootfs + Kernel 5.2.9 without success.
The steps I followed:
Booting Debian 4.12.1 rootfs produces the following regardless of if there is only one SD-card, one USB-stick (top socket) or both SD-card and USB-stick:
I found another (older) thread suggesting to add these environment variables (which didn't change anything):
I am suspecting that possible causes for this could be:
The funny thing is that an uboot 2014.07 works, but a uboot 2017.07 doesn't, even though all steps have been carefully done:
It is quite difficult to understand what could be wrong, following the installation guide. What could the issue be?
The steps I followed:
- Executing automatic shell script which installs uboot.2014.07-tld-1.pogo_v4.bodhi and uboot.2014.07-tld-1.environment.img.
- Extracting the corresponding rootfs to a 1GB Sandisk SD-card formated as ext3 with 128MB linux-swap partition at the end. The formating was done with the linux tool gparted.
- Test result: Success
- Tried to upgrade with linux-5.2.9-kirkwood-tld-1-bodhi.tar.bz2 (18 Aug 2019) without success.
- Issue post #2 suggested that it was necessary to update to uboot.2017.07-tld-1.pogo_v4.bodhi.
- Flashed 2017.07 U-Boot Kirkwood on POGO-V4-A3-01. Result: success.
- Extracted Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (24 Jul 2017) onto the same 1GB Sandisk SD-card and also onto an old Data Traveller 2GB USB2.0-stick with only one ext3 partition.
- Extracted the environment variables as instructed from the archive uboot.2016.05-tld-1.environment.img (the default envs image to be flashed) and flashed them successfully.
- Rebooted with test result: Failed.
- Booting Debian 4.12.1 rootfs was not possible.
- The last step to update the kernel to linux-5.2.9-kirkwood-tld-1-bodhi.tar.bz2 (18 Aug 2019) was not possible to perform.
Booting Debian 4.12.1 rootfs produces the following regardless of if there is only one SD-card, one USB-stick (top socket) or both SD-card and USB-stick:
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:34:01 -0700)
Pogoplug V4
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
Initializing devices...
starting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Reset IDE: ide_preinit failed
MMC rescan: current device # 0 initialized OK
Loading envs from usb 0...
** Bad device usb 0 **
Loading envs from usb 1...
** Bad device usb 1 **
Loading envs from usb 2...
** Bad device usb 2 **
Loading envs from usb 3...
** Bad device usb 3 **
Loading envs from ide 0...
** Bad device ide 0 **
Loading envs from ide 1...
** Bad device ide 1 **
Loading envs from ide 2...
** Bad device ide 2 **
Loading envs from ide 3...
** Bad device ide 3 **
Loading envs from mmc 0...
** No partition table - mmc 0 **
Loading envs from mmc 1...
MMC Device 1 not found
MMC Device 1 not found
** Bad device mmc 1 **
Loading envs from mmc 2...
MMC Device 2 not found
MMC Device 2 not found
** Bad device mmc 2 **
Loading envs from mmc 3...
MMC Device 3 not found
MMC Device 3 not found
** Bad device mmc 3 **
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide
Reset IDE: ide_preinit failed
device ide 0:1
** Bad device ide 0 **
device ide 1:1
** Bad device ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
Scan device mmc
MMC rescan: current device # 0 initialized OK
device mmc 0:1
** No partition table - mmc 0 **
device mmc 1:1
MMC Device 1 not found
MMC Device 1 not found
** Bad device mmc 1 **
device mmc 2:1
MMC Device 2 not found
MMC Device 2 not found
** Bad device mmc 2 **
device mmc 3:1
MMC Device 3 not found
MMC Device 3 not found
** Bad device mmc 3 **
loading uImage ...
** Bad device usb 0 **
loading uInitrd ...
** Bad device usb 0 **
loading DTB /boot/dts/kirkwood-pogoplug_v4.dtb ...
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
I found another (older) thread suggesting to add these environment variables (which didn't change anything):
Pogov4> setenv usb_rootfstype 'ext3' Pogov4> setenv mmc_bootcmd 'mmc rescan; run mmc_set_bootargs; run mmc_boot' Pogov4> setenv mmc_boot 'mw 0x800000 0 1; ext2load mmc 0:1 0x00800000 /boot/uImage; if ext2load mmc 0:1 0x01100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi' Pogov4> setenv mmc_root '/dev/mmcblk0p1' Pogov4> setenv mmc_set_bootargs 'setenv bootargs console=$console root=$mmc_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params' Pogov4> saveenv
I am suspecting that possible causes for this could be:
- that there is something wrong with the environment variables in uboot.2016.05-tld-1.environment.img (the default envs image to be flashed), or
- uboot 2017.07 cannot find the partition table on neither device
- the ext3 partition that worked with uboot.2014.07-tld-1.pogo_v4.bodhi no longer works.
- I have missed to do some essential steps that could have been forgotten to be mentioned in the installation instruction, as you guys probably already are familiar with the procedure of setting up POGO-V4-A3-01, but newcomers are not aware of.
The funny thing is that an uboot 2014.07 works, but a uboot 2017.07 doesn't, even though all steps have been carefully done:
- Download uboot.2017.07-tld-1.pogo_v4.bodhi.tar
- Download uboot tools script:
#!/bin/bash
# (the pogoplug ships with busybox, so we have to use ash instead of bash.)
# see https://github.com/pepaslabs/pogoplug_mobile_uboot_installer
# file name: download_uboot_tools.sh
# parse command line args:
assume_yes=0
if [ "${1:-}" == "-y" ]
then
assume_yes=1
fi
### functions
echo_step()
{
echo
echo "* $@"
}
echo2()
{
echo "$@" >&2
}
prompt_to_proceed()
{
local message="$1"
echo -n "${message} [Y/n]: "
if [ "${assume_yes}" -eq 1 ]
then
echo "(Assuming yes...)"
return 0
fi
read yn
case $yn in
y|Y|yes|Yes|YES|'') echo "Proceeding..." ;;
*) echo2 "Exiting..." ; exit 1 ;;
esac
# thanks to http://stackoverflow.com/a/226724
}
# entering "strict" mode
set -e
set -u
set -o pipefail
# verbose
#set -x
### cache / downloads section
echo_run()
{
echo "+ $@"
eval "$@"
}
md5_step()
{
local file="$1"
local sum="$2"
echo_step "Verifying ${file}"
echo "${sum} ${file}" | md5sum -c -
}
wget_step()
{
local file="$1"
local baseurl="$2"
local sum="$3"
if [ ! -e ${file} ]
then
echo_step "Downloading ${file}"
echo_run wget "${baseurl}/${file}"
fi
if pwd | grep -q '/bin'
then
chmod +x "${file}"
fi
md5_step "${file}" "${sum}"
}
mkdir -p /tmp/bin /tmp/dev /tmp/cache /tmp/mnt
export PATH=/tmp/bin:${PATH}
# download flash utils
cd /tmp/bin
#baseurl="http://download.qnology.com/pogoplug/v4"
# Note: download.qnology.com seems to be down. Falling back to mirrored files:
baseurl="http://ssl.pepas.com/pogo/mirrored/download.qnology.com/pogoplug/v4"
wget_step nanddump ${baseurl} 770bbbbe4292747aa8f2163bb1e677bb
wget_step nandwrite ${baseurl} 47974246185ee52deae7cc6cfea5e8fc
wget_step flash_erase ${baseurl} 8b5f9961376281e30a1bd519353484b0
wget_step fw_printenv ${baseurl} 7d28314b0d2737094e57632a6fe43bbe
wget_step fw_setenv ${baseurl} 7d28314b0d2737094e57632a6fe43bbe
echo_step "Downloaded all files. Exiting." - Pogo-V4-A3-01$ chmod +x /tmp/download_uboot_tools.sh
- Pogo-V4-A3-01$ ./tmp/download_uboot_tools.sh
- Pogo-V4-A3-01$ export PATH=/tmp/bin:${PATH}
- desktop$ echo e2c2b4927dcd8189f0c97dd81b72ad7e uboot.2017.07-tld-1.pogo_v4.bodhi.tar > uboot.2017.07-tld-1.pogo_v4.bodhi.tar.md5
- desktop$ echo 18f856d2106aabe6029331358fb06f053ea9257ad896e2d382f4f096f93c46e9 uboot.2017.07-tld-1.pogo_v4.bodhi.tar > uboot.2017.07-tld-1.pogo_v4.bodhi.tar.sha256
- desktop$ md5sum -c uboot.2017.07-tld-1.pogo_v4.bodhi.tar.md5
uboot.2017.07-tld-1.pogo_v4.bodhi.tar: OK - desktop$ sha256sum -c uboot.2017.07-tld-1.pogo_v4.bodhi.tar.sha256
uboot.2017.07-tld-1.pogo_v4.bodhi.tar: OK - desktop$ scp uboot.2017.07-tld-1.pogo_v4.bodhi.* root@<pogo_ip_address>:/tmp
- Pogo-V4-A3-01$ md5sum -c uboot.2017.07-tld-1.pogo_v4.bodhi.tar.md5
uboot.2017.07-tld-1.pogo_v4.bodhi.tar: OK - Pogo-V4-A3-01$ sha256sum -c uboot.2017.07-tld-1.pogo_v4.bodhi.tar.sha256
uboot.2017.07-tld-1.pogo_v4.bodhi.tar: OK - Pogo-V4-A3-01$ cat /etc/fw_env.config
# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000 - Pogo-V4-A3-01$ cat /proc/mtd
dev: size erasesize name
mtd0: 00200000 00020000 "u-boot"
mtd1: 00300000 00020000 "uImage"
mtd2: 00300000 00020000 "uImage2"
mtd3: 00800000 00020000 "failsafe"
mtd4: 07000000 00020000 "root" - Pogo-V4-A3-01$ fw_printenv ethaddr
ethaddr=00:aa:bb:cc:dd:ee - Pogo-V4-A3-01$ nanddump --noecc --omitoob -l 0x80000 -f mtd0 /dev/mtd0
- Pogo-V4-A3-01$ fw_printenv > current_envs.txt
- desktop$ scp root@<pogo_ip_address>:/tmp/mtd0 .
- desktop$ scp root@<pogo_ip_address>:/tmp/current_envs.txt .
- Pogo-V4-A3-01$ dmesg | grep -i 'bad'
[ 2.084074] Scanning device for bad blocks
[ 2.105538] Bad eraseblock 210 at 0x000001a40000
(Comment: It's ok since it is outside block 1-8.) - Pogo-V4-A3-01$ cd /tmp
- Pogo-V4-A3-01$ tar -xf uboot.2017.07-tld-1.pogo_v4.bodhi.tar
- Pogo-V4-A3-01$ flash_erase /dev/mtd0 0 4
Erase Total 4 Units
Performing Flash Erase of length 131072 at offset 0x60000 done - Pogo-V4-A3-01$ nandwrite /dev/mtd0 uboot.2017.07-tld-1.pogo_v4.mtd0.kwb
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000 - Download the default u-boot envs:
uboot.2016.05-tld-1.environment.bodhi.tar - desktop$ echo 3823eef10011b864859d31a76470e0e3 uboot.2016.05-tld-1.environment.bodhi.tar > uboot.2016.05-tld-1.environment.bodhi.tar.md5
- desktop$ echo c8db95a4225e8d78bdaaaa372bd5a87e4b98f3448dd9c62fc96c72b2df1a997c uboot.2016.05-tld-1.environment.bodhi.tar > uboot.2016.05-tld-1.environment.bodhi.tar.sha256
- desktop$ md5sum -c uboot.2016.05-tld-1.environment.bodhi.tar.md5
uboot.2016.05-tld-1.environment.bodhi.tar: OK - desktop$ sha256sum -c uboot.2016.05-tld-1.environment.bodhi.tar.sha256
uboot.2016.05-tld-1.environment.bodhi.tar: OK - desktop$ scp uboot.2016.05-tld-1.environment.bodhi.tar* root@<pogo_ip_address>:/tmp
- Pogo-V4-A3-01$ md5sum -c uboot.2016.05-tld-1.environment.bodhi.tar.md5
uboot.2016.05-tld-1.environment.bodhi.tar: OK - Pogo-V4-A3-01$ sha256sum -c uboot.2016.05-tld-1.environment.bodhi.tar.sha256
uboot.2016.05-tld-1.environment.bodhi.tar: OK - Pogo-V4-A3-01$ cd /tmp
- Pogo-V4-A3-01$ tar -xf uboot.2016.05-tld-1.environment.bodhi.tar
- Pogo-V4-A3-01$ fw_printenv > current_envs.txt
- Pogo-V4-A3-01$ flash_erase /dev/mtd0 0xc0000 1
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0xc0000 done - Pogo-V4-A3-01$ nandwrite -s 786432 /dev/mtd0 uboot.2016.05-tld-1.environment.img
Writing data to block 6 at offset 0xc0000 - Pogo-V4-A3-01$ fw_setenv arcNumber 3960
- Pogo-V4-A3-01$ fw_setenv machid f78
- Pogo-V4-A3-01$ fw_setenv mtdparts 'mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)'
- Pogo-V4-A3-01$ fw_setenv ethaddr '00:aa:bb:cc:dd:ee' (Comment: Make sure you use your own address printed under the box!)
uEnv.txt envs correction: - Pogo-V4-A3-01$ fw_setenv uenv_init_devices 'echo Initializing 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'
- Pogo-V4-A3-01$ fw_setenv uenv_read 'echo Loading envs from $device_type $disk_number...; if load $device_type $disk_number:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; echo ... envs loaded; fi'
- Pogo-V4-A3-01$ fw_setenv uenv_load 'run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices; do for disknum in $disks; do if test $uenv_loaded -eq 0; then setenv device_type $devtype; setenv disk_number $disknum; run uenv_read; fi; done; done;'
- Pogo-V4-A3-01$ fw_setenv uenv_read_disk
And for boxes that boot with SATA as rootfs. Please make this adjustment if your boot drive is SATA. This will help the "ide reset" to work properly. There seems to be a bug in u-boot that if you do "ide reset" too quickly in succession, the SATA drive might have problem spinning up). - Pogo-V4-A3-01$ fw_setenv bootcmd_uenv 'run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3'
- Pogo-V4-A3-01$ fw_setenv dtb_file '/boot/dts/kirkwood-pogoplug_v4.dtb'
Adjust 192.168.0.xxx and 192.168.0.yyy below to the real numbers in your network configuration. 192.168.0.xxx is this plug IP address , and 192.168.0.yyy is the IP address of the netconsole server where it will monitor the output from the this plug (adjust them to the real values in your own local network settings). - Pogo-V4-A3-01$ 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'
- Pogo-V4-A3-01$ fw_setenv preboot 'run preboot_nc'
- Pogo-V4-A3-01$ fw_setenv ipaddr '192.168.0.xxx'
- Pogo-V4-A3-01$ fw_setenv serverip '192.168.0.yyy'
- Pogo-V4-A3-01$ reboot
- Extract Debian 4.12.1 rootfs to the ext3-formated 1GB SD-card (made with gparted) and the ext3-formated USB2.0-stick (made with gparted) with
tar -xvf Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 - Pogov4> printenv
arcNumber=3960
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3
bootdelay=10
bootdev=usb
device=0:1
device_type=mmc
devices=usb ide mmc
disk_number=3
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb
ethact=egiga0
ethaddr=00:aa:bb:cc:dd:ee[/b] (Comment: Make sure you use your own address printed under the box!)
if_netconsole=ping $serverip
init_ide=ide reset
init_mmc=mmc rescan
init_usb=usb start
ipaddr=192.168.10.xxx
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
machid=f78
mainlineLinux=yes
mmc_boot=mw 0x800000 0 1; ext2load mmc 0:1 0x00800000 /boot/uImage; if ext2load mmc 0:1 0x01100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_bootcmd=mmc rescan; run mmc_set_bootargs; run mmc_boot
mmc_root=/dev/mmcblk0p1
mmc_set_bootargs=setenv bootargs console=$console root=$mmc_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
nc_ready=1
ncip=192.168.10.yyy
partition=nand0,2
preboot=run preboot_nc
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 $load_uimage_addr /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
scan_ide=ide reset
scan_mmc=mmc rescan
scan_usb=usb start
serverip=192.168.10.yyy
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=nc
stdin=nc
stdout=nc
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=echo Initializing 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 $disks; do if test $uenv_loaded -eq 0; then setenv device_type $devtype; setenv disk_number $disknum; run uenv_read; fi; done; done;
uenv_loaded=0
uenv_read=echo Loading envs from $device_type $disk_number...; if load $device_type $disk_number:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; echo ... envs loaded; fi
usb_ready_retry=15
usb_rootfstype=ext3
Environment size: 3824/131068 bytes
It is quite difficult to understand what could be wrong, following the installation guide. What could the issue be?
Pogov4> mmc info mmc info Device: MVEBU_MMC Manufacturer ID: 3 OEM: 5344 Name: SD01G Tran Speed: 25000000 Rd Block Len: 512 SD version 1.10 High Capacity: No Capacity: 968.8 MiB Bus Width: 4-bit Erase Group Size: 512 Bytes Pogov4> mmc list mmc list MVEBU_MMC: 0 (SD) Pogov4> mmc dev mmc dev switch to partitions #0, OK mmc0 is current device Pogov4> mmc part mmc part ## Unknown partition table type 0 Pogov4> usb stop usb stop stopping USB.. Pogov4> usb start usb start starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Pogov4> usb storage usb storage No storage devices, perhaps not 'usb start'ed..? Pogov4> usb info usb info 1: Hub, USB Revision 2.0 - u-boot EHCI Host Controller - Class: Hub - PacketSize: 64 Configurations: 1 - Vendor: 0x0000 Product 0x0000 Version 1.0 Configuration: 1 - Interfaces: 1 Self Powered 0mA Interface: 0 - Alternate Setting 0, Endpoints: 1 - Class Hub - Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms