Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ianseyler/limine-c-template
https://github.com/ianseyler/limine-c-template
Last synced: about 23 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/ianseyler/limine-c-template
- Owner: IanSeyler
- License: 0bsd
- Created: 2024-10-03T20:11:57.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-10-03T20:14:06.000Z (4 months ago)
- Last Synced: 2025-01-27T15:56:44.306Z (1 day ago)
- Size: 2.94 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Limine C Template
This repository will demonstrate how to set up a basic kernel in C 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.
It is recommended to build this project using a standard UNIX-like system, using a Clang/LLVM toolchain capable of cross compilation (the default, unless `KCC` and/or `KLD` are explicitly set).
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`.
### Architectural targets
The `KARCH` make variable determines the target architecture to build the kernel and image for.
The default `KARCH` is `x86_64`. Other options include: `aarch64`, `loongarch64`, and `riscv64`.
### 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).
For x86_64, the `run-bios` and `run-hdd-bios` targets are equivalent to their non `-bios` counterparts except that they boot `qemu` using the default SeaBIOS firmware instead of OVMF.