Limine Bare Bones: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
mNo edit summary
No edit summary
Line 39: Line 39:
// See specification for further info.
// See specification for further info.


LIMINE_BASE_REVISION(1)
static volatile LIMINE_BASE_REVISION(1);


// The Limine requests can be placed anywhere, but it is important that
// The Limine requests can be placed anywhere, but it is important that
// the compiler does not optimise them away, so, in C, they should
// the compiler does not optimise them away, so, usually, they should
// be made volatile or equivalent, _and_ they should be accessed at least
// NOT be made "static".
// once.


struct limine_framebuffer_request framebuffer_request = {
static volatile struct limine_framebuffer_request framebuffer_request = {
.id = LIMINE_FRAMEBUFFER_REQUEST,
.id = LIMINE_FRAMEBUFFER_REQUEST,
.revision = 0
.revision = 0
Line 364: Line 365:


# Path to the kernel to boot. boot:/// represents the partition on which limine.cfg is located.
# Path to the kernel to boot. boot:/// represents the partition on which limine.cfg is located.
KERNEL_PATH=boot:///myos
KERNEL_PATH=boot:///boot/myos


# Same thing, but without KASLR.
# Same thing, but without KASLR.
Line 373: Line 374:
KASLR=no
KASLR=no


KERNEL_PATH=boot:///myos
KERNEL_PATH=boot:///boot/myos
</source>
</source>


Line 402: Line 403:
git clone https://github.com/limine-bootloader/limine.git --branch=v7.x-binary --depth=1
git clone https://github.com/limine-bootloader/limine.git --branch=v7.x-binary --depth=1


# Build limine utility.
# Build "limine" utility.
make -C limine
make -C limine


Line 409: Line 410:


# Copy the relevant files over.
# Copy the relevant files over.
mkdir -p iso_root/boot
cp -v bin/myos limine.cfg limine/limine-bios.sys \
limine/limine-bios-cd.bin limine/limine-uefi-cd.bin iso_root/
cp -v bin/myos iso_root/boot/
mkdir -p iso_root/boot/limine
cp -v limine.cfg 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.
# Create the EFI boot tree and copy Limine's EFI executables over.
Line 418: Line 422:


# Create the bootable ISO.
# Create the bootable ISO.
xorriso -as mkisofs -b limine-bios-cd.bin \
xorriso -as mkisofs -b boot/limine/limine-bios-cd.bin \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-no-emul-boot -boot-load-size 4 -boot-info-table \
--efi-boot limine-uefi-cd.bin \
--efi-boot boot/limine/limine-uefi-cd.bin \
-efi-boot-part --efi-boot-image --protective-msdos-label \
-efi-boot-part --efi-boot-image --protective-msdos-label \
iso_root -o image.iso
iso_root -o image.iso
Line 446: Line 450:
git clone https://github.com/limine-bootloader/limine.git --branch=v7.x-binary --depth=1
git clone https://github.com/limine-bootloader/limine.git --branch=v7.x-binary --depth=1


# Build limine utility.
# Build "limine" utility.
make -C limine
make -C limine


Line 455: Line 459:
mformat -i image.hdd@@1M
mformat -i image.hdd@@1M


# Make relevant subdirectories.
# Make /EFI and /EFI/BOOT an MSDOS subdirectory.
mmd -i image.hdd@@1M ::/EFI ::/EFI/BOOT
mmd -i image.hdd@@1M ::/EFI ::/EFI/BOOT ::/boot ::/boot/limine


# Copy over the relevant files
# Copy over the relevant files.
mcopy -i image.hdd@@1M bin/myos limine.cfg limine/limine-bios.sys ::/
mcopy -i image.hdd@@1M bin/myos ::/boot
mcopy -i image.hdd@@1M limine.cfg limine/limine-bios.sys ::/boot/limine
mcopy -i image.hdd@@1M limine/BOOTX64.EFI ::/EFI/BOOT
mcopy -i image.hdd@@1M limine/BOOTX64.EFI ::/EFI/BOOT
mcopy -i image.hdd@@1M limine/BOOTIA32.EFI ::/EFI/BOOT
mcopy -i image.hdd@@1M limine/BOOTIA32.EFI ::/EFI/BOOT