refactor: move the native devkit from 0:/usr to 0:/sdk (Montauk SDK)

0:/usr was a Unix transplant in an otherwise Montauk-native layout.
The SDK now lives at 0:/sdk/{bin,include,lib} (+ ldscripts under
0:/sdk/x86_64-montauk): Montauk-flavored, and a clean unit for a
future per-component installer tickbox. Native binutils is rebuilt
with --prefix=/sdk so ld's compiled-in search paths follow; future
ports configure with --prefix=/sdk.

Also add pathconf() with _PC_* names to the libc: now that realpath
exists, libiberty's lrealpath.c compiles its pathconf fallback path
unconditionally.

Shell command resolution and tab completion updated to 0:/sdk/bin.
Boot-verified in QEMU: setup, login, desktop on the new image with
zero usr/ remnants in the ramdisk.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
2026-07-15 09:11:05 +02:00
co-authored by Claude Fable 5
parent 1f271b3ba8
commit 54c0584b85
11 changed files with 53 additions and 29 deletions
+8 -7
View File
@@ -72,7 +72,7 @@ mkdir -p toolchain/build/binutils-native && cd toolchain/build/binutils-native
export PATH=$PWD/../../local/bin:$PATH
../../src/binutils-2.43.1/configure \
--build=x86_64-pc-linux-gnu --host=x86_64-montauk \
--target=x86_64-montauk --prefix=/usr \
--target=x86_64-montauk --prefix=/sdk \
--disable-nls --disable-werror --disable-gprofng --disable-gold \
--disable-plugins --disable-shared --enable-static
make -j$(nproc) all-gas all-ld all-binutils
@@ -92,10 +92,11 @@ Notes:
posix_spawn milestone that needs kernel support (exit codes in
SYS_WAITPID, fd redirection wiring).
- The `devkit` target in programs/GNUmakefile ships the staged tools
into the OS image at 0:/usr/bin (as.elf, ld.elf, ar.elf, ...) with a
target-side sysroot at 0:/usr/include + 0:/usr/lib (libc.a, crt
objects, empty libm/libstdc++). The kernel resolves driveless
absolute paths ("/usr/lib") against the cwd drive, so the binutils
--prefix=/usr layout works natively. The shell searches 0:/usr/bin
and tab-completes it. If toolchain/native/ has not been built the
into the OS image at 0:/sdk/bin (as.elf, ld.elf, ar.elf, ...) with a
target-side sysroot at 0:/sdk/include + 0:/sdk/lib (libc.a, crt
objects, empty libm/libstdc++) - the Montauk SDK. The kernel
resolves driveless absolute paths ("/sdk/lib") against the cwd
drive, so the --prefix=/sdk layout works natively. The shell
searches 0:/sdk/bin and tab-completes it. Future ports configure
with --prefix=/sdk. If toolchain/native/ has not been built the
devkit step is skipped and the image builds without it.