diff --git a/.devcontainer/make_disk.sh b/.devcontainer/make_disk.sh new file mode 100644 index 0000000..42611d7 --- /dev/null +++ b/.devcontainer/make_disk.sh @@ -0,0 +1,11 @@ +#!/bin/bash +if [ -e /home/vscode/disk.img ]; then + rm /home/vscode/disk.img +fi +qemu-img create -f raw disk.img 200M +mkfs.fat -n 'FIRMAMENT' -s 2 -f 2 -R 32 -F 32 disk.img +mkdir -p /home/vscode/mnt +sudo mount -o loop disk.img /home/vscode/mnt +sudo mkdir -p /home/vscode/mnt/EFI/BOOT +sudo cp /home/vscode/BOOTX64.EFI /home/vscode/mnt/EFI/BOOT/BOOTX64.EFI +sudo umount /home/vscode/mnt \ No newline at end of file diff --git a/.devcontainer/run_qemu.sh b/.devcontainer/run_qemu.sh new file mode 100644 index 0000000..c64e9a5 --- /dev/null +++ b/.devcontainer/run_qemu.sh @@ -0,0 +1,5 @@ +#!/bin/bash +qemu-system-x86_64 \ + -drive if=pflash,file=/home/vscode/osbook/devenv/OVMF_CODE.fd \ + -drive if=pflash,file=/home/vscode/osbook/devenv/OVMF_VARS.fd \ + -hda disk.img \ No newline at end of file