Commit 78097a7f authored by Guillaume Tucker's avatar Guillaume Tucker

Enable LZMA compression for arm64 kernel Image with Depthcharge

The arm64 kernel Image files are not compressed as part of the kernel
build.  It can be done separately and it is up to the bootloader to
handle decompression.  As Depthcharge supports LZMA for arm64 kernels,
enable this feature to significantly reduce the size of the resulting
FIT image.

This is especially useful to keep the Depthcharge TFTP buffer size
small while being able to boot kernels that would be too big if
Signed-off-by: Guillaume Tucker's avatarGuillaume Tucker <>
parent 20758fd7
......@@ -236,7 +236,7 @@ class PrepareFITAction(Action):
params.get("compression", "none"),
......@@ -259,10 +259,19 @@ class PrepareFITAction(Action):
for label in ["kernel", "dtb", "ramdisk"]
fit_path = os.path.join(os.path.dirname(params["kernel"]), "image.itb")
kernel_path = params["kernel"]
kernel_dir, kernel_image = os.path.split(kernel_path)
arch = self.deploy_params["mkimage_arch"]
if arch == "arm64":
lzma_kernel = os.path.join(kernel_dir, ".".join([kernel_image, "lzma"]))
self.run_cmd(["lzma", "--keep", kernel_path])
params.update({"kernel": lzma_kernel, "compression": "lzma"})
fit_path = os.path.join(kernel_dir, "image.itb")
"arch": self.deploy_params["mkimage_arch"],
"arch": arch,
"load_addr": self.device_params["load_address"],
"fit_path": fit_path,
......@@ -104,7 +104,7 @@ class TestDepthchargeAction(StdoutTestCase):
-A {arch} \
-O linux \
-T kernel \
-C None \
-C none \
-d {kernel} \
-a {load_addr} \
-b {dtb} \
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment