limine-bootloader / limine-d-template

A simple template for building a Limine-compliant kernel in D.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Limine D Template

This repository will demonstrate how to set up a basic x86-64 kernel in D using Limine.

How to use this?

Dependencies

Any make command depends on GNU make (gmake) and is expected to be run using it. This usually means using make on most GNU/Linux distros, or gmake on other non-GNU systems.

All make all* targets depend on a relatively recent GNU-compatible C and D (GDC) toolchain capable of generating x86-64 ELF objects. Usually gcc and gdc (sometimes packaged as gcc-d) plus binutils or llvm/lld provided by any recent x86-64 UNIX like (including Linux) distribution will suffice.

Additionally, building an ISO with make all requires xorriso, and building a HDD/USB image with make all-hdd requires sgdisk (usually from gdisk or gptfdisk packages) and mtools.

Makefile targets

Running make all will compile the kernel (from the kernel/ directory) and then generate a bootable ISO image.

Running make all-hdd will compile the kernel and then generate a raw image suitable to be flashed onto a USB stick or hard drive/SSD.

Running make run will build the kernel and a bootable ISO (equivalent to make all) and then run it using qemu (if installed).

Running make run-hdd will build the kernel and a raw HDD image (equivalent to make all-hdd) and then run it using qemu (if installed).

The run-uefi and run-hdd-uefi targets are equivalent to their non -uefi counterparts except that they boot qemu using a UEFI-compatible firmware.

About

A simple template for building a Limine-compliant kernel in D.

License:BSD Zero Clause License


Languages

Language:Makefile 78.5%Language:C 14.1%Language:D 7.4%