Commit Graph

57 Commits

Author SHA1 Message Date
Mintsuki
37701de02b build: Simplify BIOS stage1 decompressor build system
It is now a single assembly file so it can be simplified.
2026-04-19 00:35:14 +02:00
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
Mintsuki
17ce3d7538 build: Use -malign-double for IA-32 UEFI to match UEFI spec struct alignment 2026-04-02 22:21:54 +02:00
Mintsuki
3a98a4bfbd protos/limine: Update limine-protocol dependency
Also: do not install limine.h and PROTOCOL.md anymore on "make install".
2025-11-01 14:09:33 +01:00
Mintsuki
80c82d9772 protos/limine: Initial implementation of base revision 4 2025-10-25 02:31:49 +02:00
Mintsuki
4243f0fcc4 build: Remove workaround for LLVM <=16 that does not understand _zicsr_zifencei 2025-10-03 09:16:25 +02:00
Mintsuki
dde0bce0ba build: Update repository links and adjustments for PicoEFI rebrand 2025-08-20 08:00:14 +02:00
Mintsuki
32e3de15b0 misc: It is not needed to disable linker relaxations with la64 2025-08-16 03:50:04 +02:00
Mintsuki
d6ce05b5ff build: Miscellaneous makefile maintenance and improvements 2025-08-13 07:05:30 +02:00
Mintsuki
9d04242490 build: Redirect dd output for EFI file padding to /dev/null 2025-08-07 18:44:38 +02:00
Mintsuki
cb304d05cf build: Get rid of freestanding-toolchain
And some other miscellaneous improvements.
2025-08-07 18:22:05 +02:00
Mintsuki
e3f7e6f4c9 build: Do not replace -g for -gdwarf for cc commands 2025-08-06 18:54:56 +02:00
Mintsuki
3b5b1c1203 build: Minor makefile changes (2) 2025-08-04 16:45:40 +02:00
Mintsuki
03e3853541 build: Minor makefile changes 2025-08-03 07:24:31 +02:00
Mintsuki
1bb1b14f52 Revert "build: Many makefile improvements (hopefully, includes bodging)"
This reverts commit 10514f5557.
2025-08-02 22:25:12 +02:00
Mintsuki
f35962794a build: nasm: Auto-add '-F dwarf' when passing '-g' 2025-07-31 03:32:01 +02:00
Mintsuki
b8d4a54e64 build: Many makefile improvements (hopefully, includes bodging) 2025-07-31 03:30:51 +02:00
Mintsuki
a9d9394e03 Revert "build: Use nm instead of objdump for generating symbol table"
This reverts commit 44ca9b3588.
2025-07-31 02:10:42 +02:00
Mintsuki
7a0f938a36 Revert "build: Workaround to more explicitly specify output section types"
This reverts commit b87ac911d9.
2025-07-28 04:29:28 +02:00
Mintsuki
b87ac911d9 build: Workaround to more explicitly specify output section types
This unbreaks ld.gold.
2025-07-28 03:56:07 +02:00
Mintsuki
ce923a75ab build: Add extra ABI/architecture-related flags for aarch64 and loongarch64 2025-07-26 15:41:12 +02:00
Mintsuki
0c23810427 Revert "build: Drop -mabi=sysv for x86 for clang 16"
This reverts commit e207c03f69.
2025-07-25 18:50:03 +02:00
Mintsuki
7ff750a047 build: Remove --no-dynamic-linker and -static flags for compat 2025-07-24 04:15:43 +02:00
Mintsuki
75d7f372bf build: Explicitly break ld.gold
ld.gold has sadly bitrotted and cannot reliably be used to link Limine.
2025-07-24 01:37:44 +02:00
Mintsuki
05b1a75fde misc: Update Flanterm to latest 2025-07-14 15:36:58 +02:00
Mintsuki
2d959e0d02 build: Work around issue with argument ordering in old nasm 2025-07-13 23:06:41 +02:00
Mintsuki
ed6150998c build: Update freestnd-c-hdrs commit 2025-07-13 18:43:06 +02:00
Mintsuki
9ab400583d build: Update Nyu-EFI to latest and fix up build system accordingly 2025-07-12 13:05:19 +02:00
Mintsuki
996a0c1801 misc: Move to using separate libfdt repository 2025-07-12 12:08:05 +02:00
Mintsuki
b532faea1f misc: Move to using separate limine-protocol repository 2025-07-12 09:25:05 +02:00
Mintsuki
44ca9b3588 build: Use nm instead of objdump for generating symbol table 2025-07-10 16:32:19 +02:00
Mintsuki
4f2c724903 -gc-sections -> --gc-sections 2025-07-09 13:17:31 +02:00
Mintsuki
cb463226b9 misc: Update to latest, packed, cc-runtime 2025-04-06 22:38:15 +02:00
Mintsuki
97db4ca4ca build: Drop -0bsd suffix from in-tree copy of freestnd-c-hdrs-0bsd 2025-03-13 04:18:36 +01:00
mintsuki
6858bbf41c protos/limine: Introduce API revision 3; rename cmdline to string in file struct 2025-02-15 14:22:06 +01:00
mintsuki
da43c70a2d protos: Reduce or remove mentions of 'kernel' where unnecessary
This also introduces limine.h API revision 2
2024-12-05 09:31:59 +01:00
mintsuki
02704f1b5c protos/limine: Introduce limine.h API revisions to avoid API breaks 2024-11-30 13:24:10 +01:00
mintsuki
375360f4b9 build: Misc improvements wrt variable passing 2024-11-28 00:42:36 +01:00
mintsuki
c844c61363 build: Get rid of ?= usage and USER_VARIABLE 2024-11-22 20:29:16 +01:00
mintsuki
51bae5d60a build: Remove redundant -nostdinc flags for cc-runtime 2024-11-08 08:33:41 +01:00
mintsuki
a3d16e00f9 build: Fix library order at link time 2024-11-06 11:35:28 +01:00
mintsuki
855c52a030 build: Use new, non-packed, cc-runtime revisions 2024-11-05 23:47:33 +01:00
mintsuki
b67d07a5ba build: Bump Flanterm 2024-10-26 23:52:39 +02:00
mintsuki
f0ae2a42ce misc: Update libfdt to 1.7.1 upstream 2024-10-12 02:33:12 +02:00
mintsuki
c97d55bbc0 misc: Introduce libc-compat headers to avoid the ugly libfdt patch 2024-10-12 02:19:17 +02:00
mintsuki
b6be98a0f6 build: Rebrand limine-efi to nyu-efi 2024-09-13 08:07:53 +02:00
mintsuki
5517cb2824 build: freestanding-headers -> freestnd-c-hdrs-0bsd 2024-09-13 07:44:23 +02:00
mintsuki
a0a39575b1 Revert "build: freestanding-headers -> freestnd-c-hdrs"
This reverts commit 91b7ef85ab.
2024-09-09 11:59:10 +02:00
mintsuki
91b7ef85ab build: freestanding-headers -> freestnd-c-hdrs 2024-09-08 15:39:32 +02:00
mintsuki
a6732f817a build: Pass -w-unknown-warning to nasm to suppress warnings if -w-reloc isn't supported 2024-09-03 04:21:19 +02:00