-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_iso.sh
executable file
·30 lines (24 loc) · 1.05 KB
/
create_iso.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Download the latest Limine binary release for the 8.x branch.
git clone https://github.com/limine-bootloader/limine.git --branch=v8.x-binary --depth=1
# Build "limine" utility.
make -C limine
# Create a directory which will be our ISO root.
mkdir -p iso_root
# Copy the relevant files over.
mkdir -p iso_root/boot
cp -v bin/kernel iso_root/boot/
mkdir -p iso_root/boot/limine
cp -v limine.conf limine/limine-bios.sys limine/limine-bios-cd.bin \
limine/limine-uefi-cd.bin iso_root/boot/limine/
# Create the EFI boot tree and copy Limine's EFI executables over.
mkdir -p iso_root/EFI/BOOT
cp -v limine/BOOTX64.EFI iso_root/EFI/BOOT/
cp -v limine/BOOTIA32.EFI iso_root/EFI/BOOT/
# Create the bootable ISO.
xorriso -as mkisofs -b boot/limine/limine-bios-cd.bin \
-no-emul-boot -boot-load-size 4 -boot-info-table \
--efi-boot boot/limine/limine-uefi-cd.bin \
-efi-boot-part --efi-boot-image --protective-msdos-label \
iso_root -o image.iso
# Install Limine stage 1 and 2 for legacy BIOS boot.
./limine/limine bios-install image.iso