Pogo V4 uBoot + Debian install issue
March 09, 2023 10:23PM
Hi everyone.

This is my first post and first time installing the doozan uBoot and a bootable Debian image on a Pogo V4. A few years ago I installed the Arch uBoot & bootable Arch image on some V4s, but now I'm trying to flash a newer uBoot to the remaining stock devices.

I followed many posts here on how to do this, and spent a couple of days trying to document it and do it right. At some point in the middle of it all the V4 rebooted, and now I don't know what the problem is and what to focus on to solve this.

Here's the posts I based my installation attempts on:
"2017.07 U-Boot Kirkwood" (primary) - forum.doozan.com/read.php?3,12381
"UART Booting HowTo" - forum.doozan.com/read.php?3,7852,7852
"U-Boot flashing" - forum.doozan.com/read.php?3,27280
"Linux Kernel 6.1.7 Kirkwood package and Debian rootfs" - forum.doozan.com/read.php?2,12096

I have a serial connection to the V4, hardwired to a RPi's serial port, so I can watch the boot sequence. UART booting using kwboot worked really well, and I used the uboot.2017.07-tld-1.pogo_v4.mtd0.kwb upload to step through the process.

If I could figure out where I really am in the steps I would gladly post any commands and results - but I have no clue what I've missed.

When I power the V4 up with the USB in place, it seems like U-Boot 2017.07-tld-1 must be installed, but then it doesn't boot off the drive. Here's what I see when it boots, and it lights up the front green & red LEDs then locks up:
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:34:01 -0700)
Pogoplug V4

SoC:   Kirkwood 88F6192_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  128 MiB
MMC:   MVEBU_MMC: 0
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices...
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found

Reset IDE: ide_preinit failed
Card did not respond to voltage select!
mmc_init: -95, time 14

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            120162304       00000000-01     83

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **

no IDE devices available
Card did not respond to voltage select!
mmc_init: -95, time 14
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 722 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
5435888 bytes read in 1013 ms (5.1 MiB/s)
loading uInitrd ...
9671091 bytes read in 966 ms (9.5 MiB/s)
loading DTB kirkwood-pogo_v4.dtb ...
** File not found kirkwood-pogo_v4.dtb **
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   0:22:58 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5435824 Bytes = 5.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   1:06:32 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9671027 Bytes = 9.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
   Loading Ramdisk to 071d0000, end 07b09173 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Error: invalid dtb and unrecognized/unsupported machine ID
  r1=0x00000f78, r2=0x00000100
  r2[]=05 00 00 00 01 00 41 54 00 00 00 00 00 00 00 00
Available machine support:

ID (hex)        NAME
ffffffff        Generic DT based system
ffffffff        Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.

Any help making sense out of this is greatly appreciated!
Re: Pogo V4 uBoot + Debian install issue
March 09, 2023 11:06PM
dhargens,

The error is:

> loading DTB kirkwood-pogo_v4.dtb ...
> ** File not found kirkwood-pogo_v4.dtb **

Check your env in serial console

printenv dtb_file

And mount the USB rootfs on another Linu xbox and check that file. Assuming it is mounted at /media/sdb,

cd /media/sdb1/boot/dts
ls -l kirkwood-pogo_v4.dtb

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogo V4 uBoot + Debian install issue
March 09, 2023 11:20PM
There's a kirkwood-pogoplug_v4.dtb file in boot/dts, so I renamed it and retried the boot - but same problem.

Since I can't boot the V4, I don't know how to get the 'printenv dtb_file' command to work and change it. I can interrupt the autoboot, but I don't think that helps me.



Edited 2 time(s). Last edit at 03/09/2023 11:54PM by dhargens.
Re: Pogo V4 uBoot + Debian install issue
March 10, 2023 12:19AM
> Since I can't boot the V4, I don't know how to get
> the 'printenv dtb_file' command to work and change
> it. I can interrupt the autoboot, but I don't
> think that helps me.

Yes, the printenv is u-boot command which you can execute after interrupting the u-boot countdown
Quote

Hit any key to stop autoboot: 0

Let's do this.

Mount the USB rootfs on another Linux box. Assuming it is mounted at /media/sdb1,

cd /media/sdb1/
ls -l
ls -l boot
ls -l boot/dts/kirkwood-pogo*.dtb
Post this log here.

=======

And then boot with this USB rootfs, interrupt serial console countdown, and

printenv
boot

Please post the entire serial console log here (everything, from the u-boot banner).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogo V4 uBoot + Debian install issue
March 10, 2023 12:23AM
Good news - using the instructions on "2017.07 U-Boot Kirkwood" (under "section C") I added a uEnv.txt file to the /boot directory to force it to look in the boot/dts directory and now it boots normally. At this point I'm not sure where it thinks it's looking for the file without that pathing, but at least this forces it to look where I know it is.

Thanks for your help bodhi!

Onward.
Re: Pogo V4 uBoot + Debian install issue
March 10, 2023 12:28AM
Since we posted at the same time, here's some results:
# ls -l boot/dts/kirkwood-pogo*.dtb
-rw-r--r-- 1 root root 10114 Aug  1  2021 boot/dts/kirkwood-pogo_e02.dtb
-rw-r--r-- 1 root root  9970 Aug  1  2021 boot/dts/kirkwood-pogo_v4.dtb
-rw-r--r-- 1 root root  9970 Aug  1  2021 boot/dts/kirkwood-pogoplug_v4.dtb

and the interrupted boot & command:
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:34:01 -0700)
Pogoplug V4

SoC:   Kirkwood 88F6192_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  128 MiB
MMC:   MVEBU_MMC: 0
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot:  0
Pogov4> printenv
arcNumber=3960
baudrate=115200
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $loi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
console=ttyS0,115200
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=kirkwood-pogo_v4.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
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
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide ree
serverip=192.168.0.220
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 s;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc resca;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEni
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtypi
usb_ready_retry=15

Environment size: 2897/131068 bytes
Pogov4>
Since it's now fixed and finds the dtb file, it boots normally. I could show you all of that, but I suspect it's no longer needed.



Edited 2 time(s). Last edit at 03/10/2023 12:32AM by dhargens.
Re: Pogo V4 uBoot + Debian install issue
March 10, 2023 12:32AM
dhargens,

Quote

Pogov4> printenv

> dtb_file=kirkwood-pogo_v4.dtb

The correct name is kirkwood-pogoplug_v4.dtb. But I see it's all good now, congrats!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogo V4 uBoot + Debian install issue
March 10, 2023 12:40AM
Yes, I see the filename listed in the Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2 archive - I must've typed it wrong somehow when I was entering it.
Small stuff is important. Thanks again - now I can sleep.
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: