Custom made Volumio-OS image gets stuck in starting kernel (u-boot)

I’m trying to port the Volumio-OS to the Rockchip’s Rockpi 3A platform. So far I’ve been able to follow the general recomendations from the documentation with the following caveats:

  1. I’m using a board-specific script based on the, my custom script can be found here.
  2. I’m using the 4.19 kernel version modified for the rock3a platform (4.19-rock3).
  3. I’m using U-Boot 2017.09 (u-boot repo).
  4. As far as I’m concerned, I’m using an uncompressed kernel image to be loaded from u-boot:
❯ file Image
Image: Linux kernel ARM64 boot executable Image, little-endian, 4K pages

The issue is that when trying to start the kernel it hangs there. According to the log, everything u-boot related seems to go fine until the kernel loading part:

U-Boot 2017.09 (May 15 2023 - 19:50:50 -0400)

Model: Radxa ROCK3 Model A
PreSerial: 2, raw, 0xfe660000
DRAM:  4 GiB
Sysmem: init
Relocation Offset: ed34a000
Relocation fdt: eb9f6bc0 - eb9fecd8
Using default environment

PCIe-0 Link Fail
no mmc device at slot 1
dwmmc@fe2b0000: 1 (SD), dwmmc@fe2c0000: 2, sdhci@fe310000: 0
Bootdev(atags): mmc 1
MMC1: Legacy, 52Mhz
PartType: EFI
No misc partition
boot mode: None
FIT: No fdt blob
No resource partition
No resource partition
Failed to load DTB, ret=-19
Failed to get kernel dtb, ret=-19
I2c0 speed: 100000Hz
vsel-gpios- not found! Error: -2
vdd_cpu init 900000 uV
PMIC:  RK8090 (on=0x40, off=0x00)
vdd_logic init 900000 uV
vdd_gpu init 900000 uV
vdd_npu init 900000 uV
io-domain: OK
Model: Radxa ROCK3 Model A
rockchip_set_serialno: could not find efuse/otp device
CLK: (sync kernel. arm: enter 816000 KHz, init 816000 KHz, kernel 0N/A)
  apll 816000 KHz
  dpll 528000 KHz
  gpll 1188000 KHz
  cpll 1000000 KHz
  npll 24000 KHz
  vpll 24000 KHz
  hpll 24000 KHz
  ppll 200000 KHz
  armclk 816000 KHz
  aclk_bus 150000 KHz
  pclk_bus 50000 KHz
  aclk_top_high 300000 KHz
  aclk_top_low 200000 KHz
  hclk_top 150000 KHz
  pclk_top 50000 KHz
  aclk_perimid 300000 KHz
  hclk_perimid 150000 KHz
  pclk_pmu 100000 KHz
No misc partition
Net:   No ethernet found.
Hit key to stop autoboot('CTRL+C'):  0 
failed to find reset-gpios property

Device 0: unknown device
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot.scr
reading /boot.scr
2154 bytes read in 2 ms (1 MiB/s)
## Executing script at 00c00000
Some debbuging information:
Unknown command 'bootdev' - try 'help'
    38405   volumio.png
 20944904   Image
     2154   boot.scr
   175638   config-4.19.193-2023.15.05-19.50
      106   vars.txt
      161   varsVolumio.txt
        0   resize-volumio-datapart
  8006839   uInitrd

8 file(s), 1 dir(s)

Setting defaults
Set the load address to 0x6000000
Importing vars.txt
reading vars.txt
106 bytes read in 1 ms (103.5 KiB/s)
Loading the fdt and kernel
reading rockchip/rk3568-rock-3a.dtb
150853 bytes read in 15 ms (9.6 MiB/s)
reading Image
20944904 bytes read in 1740 ms (11.5 MiB/s)
Setting up fdt for overlays
Importing varsVolumio.txt
reading varsVolumio.txt
161 bytes read in 1 ms (157.2 KiB/s)
Setting volumioargs
image partition: /dev/mmcblk1p2
image file: /volumio_current.sqsh
boot partition: /dev/mmcblk1p1
data partition: /dev/mmcblk1p3
hwdevice: rock3a
Setting bootargs
bootargs: console=ttyS2,1500000n8 console=tty2 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait printk.devkmsg=on printk.always_kmsg_dump=true earlyprintk=ttyS2,1500000
Loading the ramdisk
reading uInitrd
8006839 bytes read in 666 ms (11.5 MiB/s)
Booting the kernel
Fdt Ramdisk skip relocation
No misc partition
## Loading init Ramdisk from Legacy Image at 0a200000 ...
   Image Name:   uInitrd
   Image Type:   ARM Linux RAMDisk Image (uncompressed)
   Data Size:    8006775 Bytes = 7.6 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 0x0a100000
   Booting using the fdt blob at 0x0a100000
   reserving fdt memory region: addr=a100000 size=8b000
  'reserved-memory' ramoops@110000: addr=110000 size=f0000
   Using Device Tree in place at 000000000a100000, end 000000000a18dfff
Adding bank: 0x00200000 - 0x08400000 (size: 0x08200000)
Adding bank: 0x09400000 - 0xf0000000 (size: 0xe6c00000)
Adding bank: 0x1f0000000 - 0x200000000 (size: 0x10000000)
Total: 3635.186 ms

Starting kernel ...

I’m using the following boot script.

Can I have any insight on what could be happening here?

Are you asking how to setup kernel console parameters in the uInitrd image ?

Yes, but partly.
First I want to know why I cannot get any log from the kernel operation.

why are you not using this one: volumio3-os/ at master · volumio/volumio3-os · GitHub

Obviously not quite, you are using one that has debug info in it and also one that does not mention “bootdev” anywhere.
Also suppy the contents of vars.txt, you probably have insufficient loglevel and console parameters, which are disabling the log.

That is a bad example, you are using a volumio2 build script for an amlogic device.
Rock 3a has a 64-bit soc, when using uInitird in the u-boot script, make sure to add ‘-A arm64’ to your mkimage command.
And please, do not use volumio2 scripts, they are totally unsupported.

1 Like

as mentioned by @gkkpch, the Rock3A porting is already in place for Volumio3, the recipe is working and fully verified.

Images for some Radxa devices will be released soon, very soon

1 Like

Sorry for the confusion, that “bootdev” and “Some debugging information” message was me trying to print some stuff out to make sure of a couple of things, on top of that I made some other modifications and forgot to commit them - my bad. Anyway, here’s my newest commit with all these modifications. Despite that, I still have the same issue with the boot process getting stuck at starting the kernel.

Regarding the content of the environment variables I’m using in uboot, I have two separate files that I load accordingly:

#### vars.txt
#### varsVolumio.txt

This is the snippet in the boot script where I set the boot arguments and boot the kernel

echo Importing varsVolumio.txt
load mmc ${devnum} ${load_addr} varsVolumio.txt
env import -t ${load_addr} ${filesize}

echo Setting volumioargs
setenv volumioargs "imgpart=${imgpart} imgfile=${imgfile}"
echo image partition: ${imgpart}
echo image file:      ${imgfile}
echo boot partition:  ${bootpart}
echo data partition:  ${datapart}
echo bootconfig:      ${bootconfig}
echo hwdevice:        ${hwver}
echo Setting bootargs
setenv bootargs "${volumioargs} loglevel=${verbosity} ${extraargs} root=${imgpart} consoleblank=0 scandelay earlyprintk console=${console} rw rootwait"
echo "bootargs:" ${bootargs}

echo Loading the ramdisk
fatload mmc ${devnum}:${distro_bootpart} ${ramdisk_addr_r} uInitrd
echo Booting the kernel
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}

I still don’t know why you go through all the bother
a. the port is already done :man_shrugging:
b. Volumio2 is obsolete since 2020 and unsupported
c. you will hardly find anyone else here who wants to or can help

I predict a few big stumble blocks on the way. Example: running a 32-bit OS on a 64-bit needs a few specific requirements for the kernel and the build script, which you will not find in the C1 script.
Good luck with it in case you insist, you’ll need it. And even then, you will have a basic version without myVolumio. You are aware of that, right?

Anyway, this is is where my support also stops, sorry.

1 Like

Understood, I’ll go for the already existing port then. Thanks for the insight!