build: an apk-managed root, with SchOS as a package
make aroot builds a SchFS root from Alpine's minirootfs, the packages ports/alpine/world lists, and SchOS itself as the signed apk package schos-base, in its own repository inside the root. apk add installs from Alpine; apk upgrade updates both. Booted: zsh is Alpine's, apk update sees 28669 packages, apk add htop works, and so does xorg-server. world.lock pins every package with its sha256; a build fetches only what dist/alpine/ lacks and never looks for newer versions. make alpine-lock is the one step that does. Alpine's zsh, busybox commands and hwdata replace SchOS's copies; SchOS keeps its own tools, toybox's other commands, and static mksh, which schinit's recovery shell now tries first. Also: the dependency-file include matched Alpine's usr/lib/sysctl.d, a directory, and stopped every make. See docs/plan/alpine.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
This commit is contained in:
parent
2c5a278d56
commit
406cff2ec0
9 changed files with 473 additions and 1 deletions
|
|
@ -623,7 +623,11 @@ main(int argc, char *argv[])
|
|||
ioctl(0, TIOCSCTTY, 0);
|
||||
char *sh[] = { (char *)"-zsh", 0 };
|
||||
execve((char *)"/bin/zsh", sh, 0);
|
||||
// mksh first: on an apk-managed root /bin/sh is busybox, which
|
||||
// needs musl's dynamic linker, and the recovery shell should need
|
||||
// nothing. On the ramdisk root mksh is /bin/sh and this misses.
|
||||
char *fb[] = { (char *)"sh", 0 };
|
||||
execve((char *)"/bin/mksh", fb, 0);
|
||||
execve((char *)"/bin/sh", fb, 0);
|
||||
exit();
|
||||
}
|
||||
|
|
@ -643,6 +647,7 @@ main(int argc, char *argv[])
|
|||
if (fork() == 0) {
|
||||
setsid();
|
||||
char *argv[] = { (char *)"sh", 0 };
|
||||
execve((char *)"/bin/mksh", argv, 0);
|
||||
execve((char *)"/bin/sh", argv, 0);
|
||||
exit();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue