OpenWrt 23… Boot error on RockPro64

For all version of OpenWrt 23... on RockPro64 I have the error in boot:
"Uncompressing Kernel Image ... Unimplemented compression type 3"

Log:

Found U-Boot script /boot.scr
534 bytes read in 8 ms (64.5 KiB/s)
_## Executing script at 00500000
4159524 bytes read in 455 ms (8.7 MiB/s)
_## Loading kernel from FIT Image at 02000000 ...
Using 'config-1' configuration
Trying 'kernel-1' kernel subimage
Description: ARM64 OpenWrt Linux-5.15.150
Type: Kernel Image
Compression: lzma compressed
Data Start: 0x020000ec
Data Size: 4098943 Bytes = 3.9 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x03200000
Entry Point: 0x03200000
Hash algo: crc32
Hash value: 273d7ac5
Hash algo: sha1
Hash value: 5538f629c0968e5e7d04eb0e8d7ce9fab0fd639b
Verifying Hash Integrity ... crc32+ sha1+ OK
_## Loading fdt from FIT Image at 02000000 ...
Using 'config-1' configuration
Trying 'fdt-1' fdt subimage
Description: ARM64 OpenWrt pine64_rockpro64 device tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x023e8dac
Data Size: 58672 Bytes = 57.3 KiB
Architecture: AArch64
Hash algo: crc32
Hash value: b0f42e91
Hash algo: sha1
Hash value: 6497af46ed1a017a30104e70674fcbfcb046537d
Verifying Hash Integrity ... crc32+ sha1+ OK
Booting using the fdt blob at 0x23e8dac
Uncompressing Kernel Image ... Unimplemented compression type 3
SCRIPT FAILED: continuing...

It may be due to this change:

The U-Boot for RockPro64 doesn't seem to support LZMA decompression (type 3).
So the compression method of kernel needs to be changed to the other one that supported on the U-Boot. (gzip?)

cc: @981213

1 Like

What can I do ?

Huh. I thought an upstream u-boot is included in the final image for all rockchip devices.
@Patrice7 Could you post more serial console log before the part you provided? Specifically I want to see the u-boot version string to check if the u-boot running is from OpenWrt or not.

LZMA decompression support may not be enabled on RockPro64.
(LZMA decompression support is not enabled by default and not selected in the device's defconfig)

Complete log:

DDR Version 1.19 20190305
In
channel 0
CS = 0
MR0=0x98
MR4=0x2
MR5=0xFF
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 1
CS = 0
MR0=0x98
MR4=0x2
MR5=0xFF
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 0 training pass!
channel 1 training pass!
change freq to 400MHz 0,1
channel 0
CS = 0
MR0=0x98
MR4=0x2
MR5=0xFF
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 1
CS = 0
MR0=0x98
MR4=0x2
MR5=0xFF
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 0 training pass!
channel 1 training pass!
change freq to 800MHz 1,0
Channel 0: LPDDR4,800MHz
Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=16 Size=2048MB
Channel 1: LPDDR4,800MHz
Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=16 Size=2048MB
256B stride
ch 0 ddrconfig = 0x101, ddrsize = 0x40
ch 1 ddrconfig = 0x101, ddrsize = 0x40
pmugrf_os_reg[2] = 0x32C1F2C1, stride = 0xD
OUT
U-Boot SPL board init

U-Boot SPL 2017.09-rockchip-ayufan-1065-g95f6152134 (Apr 06 2020 - 08:10:53)
booted from SPI flash
Trying to boot from SPI
NOTICE:  BL31: v1.3(debug):370ab80
NOTICE:  BL31: Built : 09:23:41, Mar  4 2019
NOTICE:  BL31: Rockchip release version: v1.1
INFO:    GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
INFO:    Using opteed sec cpu_context!
INFO:    boot cpu mask: 0
INFO:    plat_rockchip_pmu_init(1181): pd status 3e
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9


U-Boot 2017.09-rockchip-ayufan-1065-g95f6152134 (Apr 06 2020 - 08:11:15 +0000)

Model: Pine64 RockPro64
DRAM:  3.9 GiB
DCDC_REG1@vdd_center: ; enabling
DCDC_REG2@vdd_cpu_l: ; enabling
DCDC_REG3@vcc_ddr: ; enabling (ret: -38)
DCDC_REG4@vcc_1v8: set 1800000 uV; enabling
LDO_REG1@vcc1v8_dvp: set 1800000 uV; enabling
LDO_REG2@vcc3v0_touch: set 3000000 uV; enabling
LDO_REG3@vcc1v8_pmu: set 1800000 uV; enabling
LDO_REG4@vcc_sd: set 3300000 uV; enabling
LDO_REG5@vcca3v0_codec: set 3000000 uV; enabling
LDO_REG6@vcc_1v5: set 1500000 uV; enabling
LDO_REG7@vcca1v8_codec: set 1800000 uV; enabling
LDO_REG8@vcc_3v0: set 3000000 uV; enabling
SWITCH_REG1@vcc3v3_s3: ; enabling (ret: -38)
SWITCH_REG2@vcc3v3_s0: ; enabling (ret: -38)
vcc1v8-s0@vcc1v8_s0: set 1800000 uV; enabling (ret: -38)
dc-12v@dc_12v: set 12000000 uV; enabling (ret: -38)
vcc-sys@vcc_sys: set 5000000 uV; enabling (ret: -38)
vcc3v3-sys@vcc3v3_sys: set 3300000 uV; enabling (ret: -38)
vcc-phy-regulator@vcc_phy: ; enabling (ret: -38)
vdd-log@vdd_log: ; enabling (ret: -38)
MMC:   sdhci@fe330000: 0, dwmmc@fe320000: 1
SF: Detected gd25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In:    serial@ff1a0000
Out:   serial@ff1a0000
Err:   serial@ff1a0000
Model: Pine64 RockPro64
Net:   eth0: ethernet@fe300000
Hit any key to stop autoboot:  0
Card did not respond to voltage select!
mmc_init: -95, time 19
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...

Found U-Boot script /boot.scr
534 bytes read in 8 ms (64.5 KiB/s)
## Executing script at 00500000
4159524 bytes read in 455 ms (8.7 MiB/s)
## Loading kernel from FIT Image at 02000000 ...
   Using 'config-1' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM64 OpenWrt Linux-5.15.150
     Type:         Kernel Image
     Compression:  lzma compressed
     Data Start:   0x020000ec
     Data Size:    4098943 Bytes = 3.9 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x03200000
     Entry Point:  0x03200000
     Hash algo:    crc32
     Hash value:   273d7ac5
     Hash algo:    sha1
     Hash value:   5538f629c0968e5e7d04eb0e8d7ce9fab0fd639b
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 02000000 ...
   Using 'config-1' configuration
   Trying 'fdt-1' fdt subimage
     Description:  ARM64 OpenWrt pine64_rockpro64 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x023e8dac
     Data Size:    58672 Bytes = 57.3 KiB
     Architecture: AArch64
     Hash algo:    crc32
     Hash value:   b0f42e91
     Hash algo:    sha1
     Hash value:   6497af46ed1a017a30104e70674fcbfcb046537d
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x23e8dac
   Uncompressing Kernel Image ... Unimplemented compression type 3
SCRIPT FAILED: continuing...
starting USB...

What can I do ?

The following change may resolve the issue, but not tested.

diff --git a/target/linux/rockchip/image/armv8.mk b/target/linux/rockchip/image/armv8.mk
index d8d180a214..80dff8f585 100644
--- a/target/linux/rockchip/image/armv8.mk
+++ b/target/linux/rockchip/image/armv8.mk
@@ -92,6 +92,7 @@ define Device/pine64_rockpro64
   DEVICE_VENDOR := Pine64
   DEVICE_MODEL := RockPro64
   SOC := rk3399
+  KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
 endef
 TARGET_DEVICES += pine64_rockpro64

But I don't know what to do with this?
Can you change it in the Snapshot version?

Problem is that the board is booting from the SPI and that is not supported in openwrt, try stopping u-boot and boot it manually bootm or wipe the SPI flash.