diff options
Diffstat (limited to 'elements/systems/minimal-system-image-x86_64.bst')
-rw-r--r-- | elements/systems/minimal-system-image-x86_64.bst | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/elements/systems/minimal-system-image-x86_64.bst b/elements/systems/minimal-system-image-x86_64.bst new file mode 100644 index 00000000..d92d5fd5 --- /dev/null +++ b/elements/systems/minimal-system-image-x86_64.bst @@ -0,0 +1,37 @@ +kind: buildstream-external:x86image +description: Create a deployment of the minimal system +depends: +- filename: systems/minimal-system.bst + type: build +- filename: deploy-tools.bst + type: build + +variables: + # Size of the disk to create + # + # Should be able to calculate this based on the space + # used, however it must be a multiple of (63 * 512) bytes + # as mtools wants a size that is devisable by sectors (512 bytes) + # per track (63). + # + # This is the smallest boot partition I managed to make. + boot-size: 33516K + + rootfs-size: 20M + sector-size: 512 + swap-size: 40K + + kernel-args: root=/dev/sda2 rootfstype=ext4 init=/sbin/init console=ttyS0 + +config: + base: deploy-tools.bst + input: systems/minimal-system.bst + + final-commands: + (>): + - | + cat > %{install-root}/run-in-qemu.sh << EOF + #!/bin/sh + qemu-system-x86_64 -drive file=sda.img,format=raw -nographic + EOF + chmod +x %{install-root}/run-in-qemu.sh |