mirror of
https://github.com/yude/firmament
synced 2024-12-22 12:10:11 +09:00
Add utils
This commit is contained in:
parent
2c3f546842
commit
755dff4dc8
11
.devcontainer/make_disk.sh
Normal file
11
.devcontainer/make_disk.sh
Normal 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
|
5
.devcontainer/run_qemu.sh
Normal file
5
.devcontainer/run_qemu.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user