Commit graph

5 commits

Author SHA1 Message Date
Daniel Barlow
0693cf23d8 preinit: improve error logging for fork_exec 2023-10-12 19:00:57 +01:00
Daniel Barlow
1a369ff3bf preinit: remove no-longer-used mips assembly 2023-10-12 18:57:54 +01:00
Daniel Barlow
6bc45c2b55 preinit: null-terminate argv array for execve 2023-06-22 09:29:44 +01:00
Daniel Barlow
a7e7146887 preinit: disable nolibc
- it stopped working with 22.11->23.05
- linking statically against musl is about 17k, so
  this is costing us 11k or so
2023-06-18 23:04:26 +01:00
Daniel Barlow
5dd0c6e3c0 rewrite preinit as very small C program
By using the kernel "nolibc" header to avoid requiring a C library, we
can bring the initramfs size to around 4k

This does involve a tiny bit of inline mips assembly which I'm not
sure about. gcc seems unwilling to generate the code to load $gp at
function entry of main(), so we do it by hand - but I'd rather find
out why gcc doesn't.
2023-04-15 18:27:39 +01:00