[COMMIT osv master] build: create ramfs images with empty partition table

6 views
Skip to first unread message

Commit Bot

unread,
Nov 30, 2023, 12:39:47 AM11/30/23
to osv...@googlegroups.com, Waldemar Kozaczuk
From: Waldemar Kozaczuk <jwkoz...@gmail.com>
Committer: Waldemar Kozaczuk <jwkoz...@gmail.com>
Branch: master

build: create ramfs images with empty partition table

Signed-off-by: Waldemar Kozaczuk <jwkoz...@gmail.com>

---
diff --git a/scripts/build b/scripts/build
--- a/scripts/build
+++ b/scripts/build
@@ -401,7 +401,11 @@ rofs_with_zfs)
ramfs|virtiofs)
# No need to create extra fs like above: ramfs is already created (as the
# bootfs) and virtio-fs is specified with virtiofsd at run time
- qemu-img convert -f raw -O qcow2 loader.img usr.img ;;
+ image_size=$((partition_offset))
+ cp $bare $raw_disk.raw
+ "$SRC"/scripts/imgedit.py setpartition "-f raw ${raw_disk}.raw" 2 $partition_offset 0
+ qemu-img resize ${raw_disk}.raw ${image_size}b >/dev/null 2>&1
+ qemu-img convert -f raw -O qcow2 $raw_disk.raw $qcow2_disk.img ;;
esac
# Prepend the root fs type option to the command line (preserved by run.py)
cmdline=$(cat cmdline)
Reply all
Reply to author
Forward
0 new messages