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:
@@ -84,8 +84,8 @@ int exec_external(const char* cmd, const char* args) {
|
||||
scat(path, name, sizeof(path));
|
||||
if (try_exec(path, finalArgs)) return 0;
|
||||
|
||||
// 5. Try 0:/usr/bin/<cmd>.elf (native dev tools: as, ld, ar, ...)
|
||||
scopy(path, "0:/usr/bin/", sizeof(path));
|
||||
// 5. Try 0:/sdk/bin/<cmd>.elf (Montauk SDK: as, ld, ar, ...)
|
||||
scopy(path, "0:/sdk/bin/", sizeof(path));
|
||||
scat(path, name, sizeof(path));
|
||||
scat(path, ".elf", sizeof(path));
|
||||
if (try_exec(path, finalArgs)) return 0;
|
||||
|
||||
@@ -148,14 +148,14 @@ int get_completions( // returns no. of results
|
||||
}
|
||||
}
|
||||
|
||||
// ---- Native dev tools (0:/usr/bin/*.elf) ----
|
||||
// ---- Montauk SDK tools (0:/sdk/bin/*.elf) ----
|
||||
|
||||
const char* usr_names[RD_MAX] = { };
|
||||
|
||||
int un = montauk::readdir("0:/usr/bin", usr_names, RD_MAX);
|
||||
int un = montauk::readdir("0:/sdk/bin", usr_names, RD_MAX);
|
||||
|
||||
for (int i = 0; i < un; i++) {
|
||||
/* Entries come back as "usr/bin/as.elf"; strip to the last
|
||||
/* Entries come back as "sdk/bin/as.elf"; strip to the last
|
||||
slash, not the first. */
|
||||
int inc = 0;
|
||||
for (int j = 0; usr_names[i][j]; j++) {
|
||||
|
||||
Reference in New Issue
Block a user