Files
Limine/INSTALL.md
Kamila Szewczyk 9c3ead9386 decompressor: gzip/tinf -> limlz
removes external dependency on tinf by replacing the compression algorithm with a simpler, faster, smaller and more auditable fixed-width LZ77 encoding purpose-tailored to x86 code mixed with data.

before: decompressor.bin 2,492 bytes (tinf dependency) with .text 0x875 and .rodata 0x13c bytes each.
after: decompressor.bin consists only of .text, 0xe6-byte decompressor; 90.8% reduction in decompressor volume.

the dependency on gzip during compile-time is replaced by host/limlzpack.c, a Lempel-Ziv encoder in 275 SLoC that uses a suffix array matchfinder (prefix-doubling in mathcal O(n log^2 n) and Storer-Szymanski backwards parse. the fixed-width formats packets as [F][LLLL][MMM], favouring a literal-skewed distribution with F switching between one-byte and two-byte offsets (favouring recent statistics).

integrity checking is done via crc32 with the polynomial 0xEDB88320, reflected.

the effective loss in compression ratio by using a tremendously simpler and less packed with edge cases algorithm causes a compression ratio hit well below 1KB, factoring in the stub sizes.

also adds new machinery for host cc detection per review.
2026-04-19 00:29:09 +02:00

52 lines
1.6 KiB
Markdown

# Build and Install Instructions
> **NOTE:** This document is about building and installing Limine.
> For information about deployment for usage, see [USAGE.md](USAGE.md).
## Prerequisites
In order to build Limine, the following programs have to be installed:
common UNIX tools (also known as `coreutils`),
`GNU make`, `grep`, `sed`, `find`, `awk`, `nasm`, `mtools`
(optional, necessary to build `limine-uefi-cd.bin`).
Furthermore, `gcc` or `llvm/clang` must also be installed, alongside
the respective binutils.
## Configure
If using a release tarball (recommended, see
https://github.com/Limine-Bootloader/Limine/releases), run `./configure`
directly.
If checking out from the repository, run `./bootstrap` first in order to
download the necessary [dependencies](3RDPARTY.md) and generate the configure
script (`GNU autoconf` required).
`./configure` takes arguments and environment variables; for more information
on these, run `./configure --help`.
> **NOTE:** `./configure` by default does not build any Limine port. Make sure
> to read the output of `./configure --help` and enable any or all ports!
Limine supports both in-tree and out-of-tree builds. Simply run the `configure`
script from the directory you wish to execute the build in. The following
`make` commands are supposed to be run inside the build directory.
## Building
To build Limine, run:
```bash
make # (or gmake where applicable)
```
## Installing
This step will install Limine files to `share`, `include`, and `bin`
directories in the specified prefix (default is `/usr/local`, see
`./configure --help`.
To install Limine, run:
```bash
make install # (or gmake where applicable)
```