1 unstable release
| 0.3.0 | May 12, 2025 |
|---|
#12 in #image-builder
15KB
253 lines
OIB
OS Image Builder? It is just a simple GPT+FAT image builder.
Usage
You can pass a config file:
./oib -c config.toml
Or pass your arguments directly:
./oib -o output.img -f build/kernel:kernel -d assets/static:static
# Combine config file with additional command line options
./oib -c config.toml -f additional_file.txt:extra.txt -d test/dir_name:dir_name
Available Options
-o, --output: Output image path-c, --config: Config file path-f, --file: Add a file to the image (format: source:destination)-d, --dir: Add a folder to the image (format: source:destination)
Command line arguments take precedence over configuration file settings when both are provided.
Example Config
output = "output.img"
[[files]]
source = "build/kernel"
dest = "kernel"
[[files]]
source = "assets/BOOTX64.EFI"
dest = "efi/boot/bootx64.efi"
[[files]]
source = "assets/limine.conf"
dest = "limine.conf"
[[folders]]
source = "assets/static"
dest = "static"
Acknowledgement
The code is based on bootloader, a great pure-rust x86 bootloader.
Dependencies
~3.5–9MB
~198K SLoC