summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2022-08-22 13:46:58 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2023-02-09 13:25:15 +0100
commitf88e4c50e64ca144a7a15bd50c92a13d325f6780 (patch)
tree603c0eeea18209246c5b2b5d4b582ac32d1e876b
parent029a663150449a5e71b84dd4000476754d525c8c (diff)
u-boot: distro-boot-script: support booti automatic decompression
Support booti automatic decompression with the following memory layout: - loadaddr=0x48200000 allows for 128MB area for uncompressing (ie FIT images, kernel_comp_addr_r, kernel_comp_size) - fdt_addr_r = loadaddr + 128MB - allows for 128MB kernel - scriptaddr = fdt_addr_r + 512KB - allows for 512KB fdt - ramdisk_addr_r = scriptaddr + 512KB - allows for 512KB script Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in20
1 files changed, 13 insertions, 7 deletions
diff --git a/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in b/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in
index b929afb..65542ee 100644
--- a/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in
+++ b/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in
@@ -73,17 +73,23 @@ else
env set setupargs 'console=tty1 console=${console},${baudrate} consoleblank=0'
fi
-if test ${kernel_image} = "Image.gz"
-then
+if test -n ${kernel_comp_addr_r}; then
+ # use booti automatic decompression
env set kernel_addr_load ${loadaddr}
- env set bootcmd_unzip 'unzip ${kernel_addr_load} ${kernel_addr_r}'
-else
env set bootcmd_unzip ';'
- if test ${kernel_image} = "fitImage"
+else
+ if test ${kernel_image} = "Image.gz"
then
- env set kernel_addr_load ${ramdisk_addr_r}
+ env set kernel_addr_load ${loadaddr}
+ env set bootcmd_unzip 'unzip ${kernel_addr_load} ${kernel_addr_r}'
else
- env set kernel_addr_load ${kernel_addr_r}
+ env set bootcmd_unzip ';'
+ if test ${kernel_image} = "fitImage"
+ then
+ env set kernel_addr_load ${ramdisk_addr_r}
+ else
+ env set kernel_addr_load ${kernel_addr_r}
+ fi
fi
fi