Skip to content

Commit

Permalink
Merge pull request #603 from zdc/T3664-circinus
Browse files Browse the repository at this point in the history
build-script: T3664: Added more options to the image format
  • Loading branch information
dmbaturin authored May 8, 2024
2 parents 01d79fb + d144519 commit 24a320e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/image-build/build-vyos-image
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

0 comments on commit 24a320e

Please sign in to comment.