]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
imx8mq_evk: enable booting Image.gz and avoid extra memcpy
authorPeng Fan <peng.fan@nxp.com>
Fri, 19 Jun 2026 16:06:04 +0000 (00:06 +0800)
committerFabio Estevam <festevam@gmail.com>
Sat, 27 Jun 2026 02:02:46 +0000 (23:02 -0300)
Add support for booting compressed kernel Image.gz by defining
kernel_comp_addr_r and kernel_comp_size in the default environment.

Set kernel_comp_addr_r to a high memory region to provide a dedicated
decompression buffer, avoiding overlap between compressed
input and decompressed output.

Also adjust CONFIG_SYS_LOAD_ADDR from 0x40480000 to 0x40400000.

With TEXT_OFFSET=0, the kernel is relocated directly to loadaddr, so
separating decompression and execution regions is required to guarantee
safe decompression without additional copying.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
board/nxp/imx8mq_evk/imx8mq_evk.env
configs/imx8mq_evk_defconfig

index 6575dd7cb07bc57ce97cd406505187da161a59a5..dd674afac91d38cf3a81ec0002d64e446e31592f 100644 (file)
@@ -10,6 +10,8 @@ initrd_addr=0x43800000
 image=Image
 ip_dyn=yes
 kernel_addr_r=CONFIG_SYS_LOAD_ADDR
+kernel_comp_addr_r=0x80000000
+kernel_comp_size=0x2000000
 loadaddr=CONFIG_SYS_LOAD_ADDR
 mmcautodetect=yes
 mmcdev=CONFIG_ENV_MMC_DEVICE_INDEX
index d041fbd82683d8c218f76b04de6dc6d1da01d6b4..cc40e7b9bf317f82b0d11d0c5a109c9630f30137 100644 (file)
@@ -19,7 +19,7 @@ CONFIG_SPL_TEXT_BASE=0x7E1000
 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
 CONFIG_SPL_BSS_START_ADDR=0x180000
 CONFIG_SPL_BSS_MAX_SIZE=0x2000
-CONFIG_SYS_LOAD_ADDR=0x40480000
+CONFIG_SYS_LOAD_ADDR=0x40400000
 CONFIG_SPL=y
 CONFIG_ENV_OFFSET_REDUND=0x204000
 CONFIG_IMX_BOOTAUX=y