summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-05-08 20:19:54 +0200
committerGitHub <noreply@github.com>2024-05-08 20:19:54 +0200
commit974c232e58e9c6f9746d21a15cd71608c8e38227 (patch)
tree28db0390b993a13d9ae58e32fbb41fe57dcefc1d
parent9b3a86641e89c2df3523b86f7542089e796b1d7d (diff)
parentd9a3ce08325d84be4bcb94fece1af5ced03f76f6 (diff)
downloadvyos-build-974c232e58e9c6f9746d21a15cd71608c8e38227.tar.gz
vyos-build-974c232e58e9c6f9746d21a15cd71608c8e38227.zip
Merge pull request #604 from vyos/mergify/bp/sagitta/pr-603
build-script: T3664: Added more options to the image format (backport #603)
-rwxr-xr-xscripts/image-build/build-vyos-image6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/image-build/build-vyos-image b/scripts/image-build/build-vyos-image
index 75c9d0c6..721e743c 100755
--- a/scripts/image-build/build-vyos-image
+++ b/scripts/image-build/build-vyos-image
@@ -639,6 +639,8 @@ if __name__ == "__main__":
# Most other formats, thankfully, can be produced with just `qemu-img convert`
other_formats = filter(lambda x: x not in ["iso", "raw"], build_config["image_format"])
for f in other_formats:
- target = f"{os.path.splitext(raw_image)[0]}.{f}"
+ image_ext = build_config.get("image_ext", f)
+ image_opts = build_config.get("image_opts", "")
+ target = f"{os.path.splitext(raw_image)[0]}.{image_ext}"
print(f"I: Building {f} file {target}")
- cmd(f"qemu-img convert -f raw -O {f} {raw_image} {target}")
+ cmd(f"qemu-img convert -f raw -O {f} {image_opts} {raw_image} {target}")