0
0
mirror of https://github.com/yude/firmament synced 2024-12-22 12:10:11 +09:00

Add utils

This commit is contained in:
yude 2021-05-04 10:46:27 +09:00
parent 2c3f546842
commit 755dff4dc8
Signed by: yude
GPG Key ID: EB0FE5D925C4A968
2 changed files with 16 additions and 0 deletions

View File

@ -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

View File

@ -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