2018-04-02 21:49:17 +01:00
|
|
|
#!/usr/bin/env bash
|
2019-08-24 00:00:05 +00:00
|
|
|
|
2018-04-02 21:49:17 +01:00
|
|
|
# grub-pc-bin: without it, grub-mkrescue just fails, and you have no idea why!
|
|
|
|
|
# We love you, GRUB.
|
|
|
|
|
# https://superuser.com/questions/603051/grub-mkrescue-not-producing-bootable-image/973021#973021
|
|
|
|
|
# https://github.com/cirosantilli/x86-bare-metal-examples/issues/5#issuecomment-377948357
|
|
|
|
|
# https://wiki.osdev.org/Bare_Bones
|
2019-08-24 00:00:05 +00:00
|
|
|
|
|
|
|
|
if [ $# -eq 1 ]; then
|
|
|
|
|
sudo=
|
|
|
|
|
y=-y
|
|
|
|
|
else
|
|
|
|
|
sudo=sudo
|
|
|
|
|
y=
|
|
|
|
|
fi
|
|
|
|
|
$sudo apt-get install $y \
|
2018-04-02 21:49:17 +01:00
|
|
|
bochs \
|
|
|
|
|
bochs-sdl \
|
|
|
|
|
build-essential \
|
2019-08-24 00:00:05 +00:00
|
|
|
gcc \
|
2018-04-02 21:49:17 +01:00
|
|
|
gcc-multilib \
|
|
|
|
|
gdb \
|
|
|
|
|
gnu-efi \
|
|
|
|
|
grub-pc-bin \
|
2019-08-24 00:00:05 +00:00
|
|
|
make \
|
2018-04-02 21:49:17 +01:00
|
|
|
nasm \
|
|
|
|
|
qemu \
|
|
|
|
|
xorriso\
|
|
|
|
|
;
|