diff options
author | Daniil Baturin <daniil@vyos.io> | 2024-05-08 20:14:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-08 20:14:30 +0200 |
commit | 24a320e337aaa9b065a21c9cff34a95f2ca3096d (patch) | |
tree | afd0256c64a8cf090e5e076187a5105002d85a78 | |
parent | 01d79fb3eb7c4a5d7945e7322aa3c1448116b8ad (diff) | |
parent | d144519a53d0b9c696159a51906685db88d5d9ed (diff) | |
download | vyos-build-24a320e337aaa9b065a21c9cff34a95f2ca3096d.tar.gz vyos-build-24a320e337aaa9b065a21c9cff34a95f2ca3096d.zip |
Merge pull request #603 from zdc/T3664-circinus
build-script: T3664: Added more options to the image format
-rwxr-xr-x | scripts/image-build/build-vyos-image | 6 |
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}") |