Skip to content

Commit

Permalink
Move mkvirtdisk script to tools/
Browse files Browse the repository at this point in the history
It's useful in other projects, right now it's duplicated in
libvmm as well but what we'll do is just make libvmm use
sddf/tools/mkvirtdisk.

Signed-off-by: Ivan-Velickovic <[email protected]>
  • Loading branch information
Ivan-Velickovic committed Nov 14, 2024
1 parent b3d115c commit 5e5a878
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/blk/blk.mk
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ $(IMAGE_FILE) $(REPORT_FILE): $(IMAGES) $(SYSTEM_FILE)
$(MICROKIT_TOOL) $(SYSTEM_FILE) --search-path $(BUILD_DIR) --board $(MICROKIT_BOARD) --config $(MICROKIT_CONFIG) -o $(IMAGE_FILE) -r $(REPORT_FILE)

qemu_disk:
../mkvirtdisk mydisk 1 512 16777216
$(SDDF)/tools/mkvirtdisk mydisk 1 512 16777216

qemu: ${IMAGE_FILE} qemu_disk
$(QEMU) -machine virt,virtualization=on \
Expand Down
5 changes: 3 additions & 2 deletions examples/blk/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ pub fn build(b: *std.Build) void {
const create_disk_cmd = b.addSystemCommand(&[_][]const u8{
"bash",
});
create_disk_cmd.addFileArg(b.path("mkvirtdisk"));
create_disk_cmd.addFileInput(b.path("mkvirtdisk"));
const mkvirtdisk = sddf_dep.path("tools/mkvirtdisk");
create_disk_cmd.addFileArg(mkvirtdisk);
create_disk_cmd.addFileInput(mkvirtdisk);
const disk = create_disk_cmd.addOutputFileArg("disk");
create_disk_cmd.addArgs(&[_][]const u8{
"1", "512", b.fmt("{}", .{ 1024 * 1024 * 16 }),
Expand Down
File renamed without changes.

0 comments on commit 5e5a878

Please sign in to comment.