Skip to contentSkip to conversation

rockchip: rk3399: expand space for decompressed kernel

PATCH In review FUKAUMI Naoki 2 participants 4 messages Dec 2, 2024 – Jan 3, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rockchip: rk3399: expand space for decompressed kernel

fix following error by using same ENV_MEM_LAYOUT_SETTINGS with rk35xx:

U-Boot 2025.01-rc3-00001-g1527c7dcdb01 (Dec 02 2024 - 22:57:18 +0000)
:
Retrieving file: /boot/extlinux/../nixos/dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-Image
Retrieving file: /boot/extlinux/../nixos/6fq8fmmab31yxdwcs7zw44p78fq9fy1s-initrd-linux-6.12.1-initrd
append: init=/nix/store/yjbxgzf1vkwbw6ab738bf4kxazhyypa1-nixos-system-rock-5b-25.05.20241201.ac35b10/init console=ttyS2,1500000n8 console=ttyAMA0,115200n8 console=tty0 loglevel=7 Retrieving file: /boot/extlinux/../nixos/dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-dtbs/rockchip/rk3399-rock-4se.dtb
Moving Image from 0x2080000 to 0x2200000, end=0x60d0000
ERROR: RD image overlaps OS image (OS=2200000..60d0000)
Boot failed (err=-14)

$ ls -lh boot/nixos/
total 84M
-r--r--r--  1 root root  24M Jan  1  1970 6fq8fmmab31yxdwcs7zw44p78fq9fy1s-initrd-linux-6.12.1-initrd
-r--r--r--  1 root root  62M Jan  1  1970 dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-Image
dr-xr-xr-x 36 root root 4.0K Jan  1  1970 dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-dtbs

similar problem was fixed for rk35xx by:

commit 69b73877f02c ("rockchip: rk35xx: expand space for decompressed kernel")

---
 include/configs/rk3399_common.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
include/configs/rk3399_common.h +8 -8
index c5bcd7dc5e8a..76f40e7cd5f8 100644
@@ -20,16 +20,16 @@
 #endif
 
 #define ENV_MEM_LAYOUT_SETTINGS		\
-	"scriptaddr=0x00500000\0"	\
+	"scriptaddr=0x00c00000\0"	\
 	"script_offset_f=0xffe000\0"	\
 	"script_size_f=0x2000\0"	\
-	"pxefile_addr_r=0x00600000\0"	\
-	"fdt_addr_r=0x01e00000\0"	\
-	"fdtoverlay_addr_r=0x01f00000\0"	\
-	"kernel_addr_r=0x02080000\0"	\
-	"ramdisk_addr_r=0x06000000\0"	\
-	"kernel_comp_addr_r=0x08000000\0"	\
-	"kernel_comp_size=0x2000000\0"
+	"pxefile_addr_r=0x00e00000\0"	\
+	"kernel_addr_r=0x02000000\0"	\
+	"kernel_comp_addr_r=0x0a000000\0"	\
+	"fdt_addr_r=0x12000000\0"	\
+	"fdtoverlay_addr_r=0x12100000\0"	\
+	"ramdisk_addr_r=0x12180000\0"	\
+	"kernel_comp_size=0x8000000\0"
 
 #define CFG_EXTRA_ENV_SETTINGS		\
 	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0"	\
Signature · 1 line
2.43.0
#1 lore raw

Hi,

I'm thinking to do same (or similar) fix for RK3328 too.

that configuration should work with 512MB RAM device, right?

Best regards,

--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.

Quoted 56 lines · FUKAUMI Naoki

fix following error by using same ENV_MEM_LAYOUT_SETTINGS with rk35xx:

U-Boot 2025.01-rc3-00001-g1527c7dcdb01 (Dec 02 2024 - 22:57:18 +0000)
:
Retrieving file: /boot/extlinux/../nixos/dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-Image
Retrieving file: /boot/extlinux/../nixos/6fq8fmmab31yxdwcs7zw44p78fq9fy1s-initrd-linux-6.12.1-initrd
append: init=/nix/store/yjbxgzf1vkwbw6ab738bf4kxazhyypa1-nixos-system-rock-5b-25.05.20241201.ac35b10/init console=ttyS2,1500000n8 console=ttyAMA0,115200n8 console=tty0 loglevel=7 Retrieving file: /boot/extlinux/../nixos/dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-dtbs/rockchip/rk3399-rock-4se.dtb
Moving Image from 0x2080000 to 0x2200000, end=0x60d0000
ERROR: RD image overlaps OS image (OS=2200000..60d0000)
Boot failed (err=-14)

$ ls -lh boot/nixos/
total 84M
(quoted diff) +0 -2
-r--r--r--  1 root root  24M Jan  1  1970 6fq8fmmab31yxdwcs7zw44p78fq9fy1s-initrd-linux-6.12.1-initrd
-r--r--r--  1 root root  62M Jan  1  1970 dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-Image

dr-xr-xr-x 36 root root 4.0K Jan 1 1970 dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-dtbs

similar problem was fixed for rk35xx by:

commit 69b73877f02c ("rockchip: rk35xx: expand space for decompressed kernel")

---
  include/configs/rk3399_common.h | 16 ++++++++--------
  1 file changed, 8 insertions(+), 8 deletions(-)
include/configs/rk3399_common.h +8 -8
index c5bcd7dc5e8a..76f40e7cd5f8 100644
@@ -20,16 +20,16 @@
  #endif
 
  #define ENV_MEM_LAYOUT_SETTINGS		\
-	"scriptaddr=0x00500000\0"	\
+	"scriptaddr=0x00c00000\0"	\
  	"script_offset_f=0xffe000\0"	\
  	"script_size_f=0x2000\0"	\
-	"pxefile_addr_r=0x00600000\0"	\
-	"fdt_addr_r=0x01e00000\0"	\
-	"fdtoverlay_addr_r=0x01f00000\0"	\
-	"kernel_addr_r=0x02080000\0"	\
-	"ramdisk_addr_r=0x06000000\0"	\
-	"kernel_comp_addr_r=0x08000000\0"	\
-	"kernel_comp_size=0x2000000\0"
+	"pxefile_addr_r=0x00e00000\0"	\
+	"kernel_addr_r=0x02000000\0"	\
+	"kernel_comp_addr_r=0x0a000000\0"	\
+	"fdt_addr_r=0x12000000\0"	\
+	"fdtoverlay_addr_r=0x12100000\0"	\
+	"ramdisk_addr_r=0x12180000\0"	\
+	"kernel_comp_size=0x8000000\0"
 
  #define CFG_EXTRA_ENV_SETTINGS		\
  	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0"	\
#2 lore raw
Quoted 5 lines · FUKAUMI Naoki

Hi,

I'm thinking to do same (or similar) fix for RK3328 too.

that configuration should work with 512MB RAM device, right?

I noticed there is 256MB RK3328 device. I need to think about it.

Best regards,

--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.

Quoted 65 lines

Best regards,

Signature · 2 lines
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.
Quoted 56 lines · FUKAUMI Naoki

fix following error by using same ENV_MEM_LAYOUT_SETTINGS with rk35xx:

U-Boot 2025.01-rc3-00001-g1527c7dcdb01 (Dec 02 2024 - 22:57:18 +0000)
   :
Retrieving file: /boot/extlinux/../nixos/ dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-Image
Retrieving file: /boot/extlinux/../ nixos/6fq8fmmab31yxdwcs7zw44p78fq9fy1s-initrd-linux-6.12.1-initrd
append: init=/nix/store/yjbxgzf1vkwbw6ab738bf4kxazhyypa1-nixos-system- rock-5b-25.05.20241201.ac35b10/init console=ttyS2,1500000n8 console=ttyAMA0,115200n8 console=tty0 loglevel=7 Retrieving file: /boot/extlinux/../nixos/ dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-dtbs/rockchip/rk3399- rock-4se.dtb
Moving Image from 0x2080000 to 0x2200000, end=0x60d0000
ERROR: RD image overlaps OS image (OS=2200000..60d0000)
Boot failed (err=-14)

$ ls -lh boot/nixos/
total 84M
-r--r--r--  1 root root  24M Jan  1  1970 
6fq8fmmab31yxdwcs7zw44p78fq9fy1s-initrd-linux-6.12.1-initrd
-r--r--r--  1 root root  62M Jan  1  1970 
dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-Image
dr-xr-xr-x 36 root root 4.0K Jan  1  1970 dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-dtbs

similar problem was fixed for rk35xx by:

commit 69b73877f02c ("rockchip: rk35xx: expand space for decompressed kernel")

---
  include/configs/rk3399_common.h | 16 ++++++++--------

  1 file changed, 8 insertions(+), 8 deletions(-)
include/configs/rk3399_common.h +8 -8
index c5bcd7dc5e8a..76f40e7cd5f8 100644
@@ -20,16 +20,16 @@
   #endif
   #define ENV_MEM_LAYOUT_SETTINGS        \
-    "scriptaddr=0x00500000\0"    \
+    "scriptaddr=0x00c00000\0"    \
       "script_offset_f=0xffe000\0"    \
       "script_size_f=0x2000\0"    \
-    "pxefile_addr_r=0x00600000\0"    \
-    "fdt_addr_r=0x01e00000\0"    \
-    "fdtoverlay_addr_r=0x01f00000\0"    \
-    "kernel_addr_r=0x02080000\0"    \
-    "ramdisk_addr_r=0x06000000\0"    \
-    "kernel_comp_addr_r=0x08000000\0"    \
-    "kernel_comp_size=0x2000000\0"
+    "pxefile_addr_r=0x00e00000\0"    \
+    "kernel_addr_r=0x02000000\0"    \
+    "kernel_comp_addr_r=0x0a000000\0"    \
+    "fdt_addr_r=0x12000000\0"    \
+    "fdtoverlay_addr_r=0x12100000\0"    \
+    "ramdisk_addr_r=0x12180000\0"    \
+    "kernel_comp_size=0x8000000\0"
   #define CFG_EXTRA_ENV_SETTINGS        \
       "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0"    \
Reviewed-by on v1 1/1
#3 lore raw
In reply to FUKAUMI Naoki
Quoted 18 lines · FUKAUMI Naoki

fix following error by using same ENV_MEM_LAYOUT_SETTINGS with rk35xx:

U-Boot 2025.01-rc3-00001-g1527c7dcdb01 (Dec 02 2024 - 22:57:18 +0000)
:
Retrieving file: /boot/extlinux/../nixos/dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-Image
Retrieving file: /boot/extlinux/../nixos/6fq8fmmab31yxdwcs7zw44p78fq9fy1s-initrd-linux-6.12.1-initrd
append: init=/nix/store/yjbxgzf1vkwbw6ab738bf4kxazhyypa1-nixos-system-rock-5b-25.05.20241201.ac35b10/init console=ttyS2,1500000n8 console=ttyAMA0,115200n8 console=tty0 loglevel=7 Retrieving file: /boot/extlinux/../nixos/dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-dtbs/rockchip/rk3399-rock-4se.dtb
Moving Image from 0x2080000 to 0x2200000, end=0x60d0000
ERROR: RD image overlaps OS image (OS=2200000..60d0000)
Boot failed (err=-14)

$ ls -lh boot/nixos/
total 84M
(quoted diff) +0 -2
-r--r--r--  1 root root  24M Jan  1  1970 6fq8fmmab31yxdwcs7zw44p78fq9fy1s-initrd-linux-6.12.1-initrd
-r--r--r--  1 root root  62M Jan  1  1970 dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-Image

dr-xr-xr-x 36 root root 4.0K Jan 1 1970 dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-dtbs

Quoted 5 lines

similar problem was fixed for rk35xx by:

commit 69b73877f02c ("rockchip: rk35xx: expand space for decompressed kernel")

Thanks,
- Kever

Quoted 33 lines
---
  include/configs/rk3399_common.h | 16 ++++++++--------
  1 file changed, 8 insertions(+), 8 deletions(-)
include/configs/rk3399_common.h +8 -8
index c5bcd7dc5e8a..76f40e7cd5f8 100644
@@ -20,16 +20,16 @@
  #endif
 
  #define ENV_MEM_LAYOUT_SETTINGS		\
-	"scriptaddr=0x00500000\0"	\
+	"scriptaddr=0x00c00000\0"	\
  	"script_offset_f=0xffe000\0"	\
  	"script_size_f=0x2000\0"	\
-	"pxefile_addr_r=0x00600000\0"	\
-	"fdt_addr_r=0x01e00000\0"	\
-	"fdtoverlay_addr_r=0x01f00000\0"	\
-	"kernel_addr_r=0x02080000\0"	\
-	"ramdisk_addr_r=0x06000000\0"	\
-	"kernel_comp_addr_r=0x08000000\0"	\
-	"kernel_comp_size=0x2000000\0"
+	"pxefile_addr_r=0x00e00000\0"	\
+	"kernel_addr_r=0x02000000\0"	\
+	"kernel_comp_addr_r=0x0a000000\0"	\
+	"fdt_addr_r=0x12000000\0"	\
+	"fdtoverlay_addr_r=0x12100000\0"	\
+	"ramdisk_addr_r=0x12180000\0"	\
+	"kernel_comp_size=0x8000000\0"
 
  #define CFG_EXTRA_ENV_SETTINGS		\
  	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0"	\