X on the console: /dev/tty0, a palette, and startx that works

Xorg finds its VT through /dev/tty0, and without one ran on none: the
console went on drawing into the framebuffer over the X screen. tty0 is
the terminal on screen, as on Linux. FBIOPUTCMAP succeeds, as it does on
a true-colour Linux framebuffer, instead of 256 logged errors per start.

schos-base gives root a .xserverrc with -dumbSched, Xorg's switch for
input on the main loop: SchOS has no threads, and Xorg crashed in
pthread_join on its input thread when the first client left. It adds
the hostname to /etc/hosts, so xauth can resolve schos:0.

zsh loses PROMPT_SP: on a serial terminal narrower than the console its
padding wrapped and left a # above every prompt. bootcheck knows zsh's
prompt and matches without colour codes, so busybox's ls reads as text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
This commit is contained in:
Nexoniarz 2026-10-24 19:44:10 +02:00
commit 906318f2b6
6 changed files with 51 additions and 4 deletions

View file

@ -495,8 +495,11 @@ try {
Start-Sleep -Milliseconds 150
$t = Read-Log
if ($null -eq $t -or $t.Length -le $Since) { continue }
# A prompt at the very end, with nothing typed after it.
if ($t.Substring($Since) -match '(?s)#[ ]?$') { return $true }
# A prompt at the very end, with nothing typed after it: mksh's `#`,
# or zsh's `»`, which root's shell has been since the root became
# Alpine's. zsh follows it with erase-to-end-of-line and turns
# bracketed paste on, so both escapes may trail the prompt.
if ($t.Substring($Since) -match '(?s)(#|\u00bb)(\e\[[0-9;]*m)*[ ]?(\e\[K)?(\e\[\?2004h)?$') { return $true }
}
return $false
}
@ -629,6 +632,12 @@ if ($null -eq $text) { $text = '' }
Write-Host "==> serial transcript ($($text.Length) bytes) -> $log" -ForegroundColor Cyan
Write-Host $text
# Matched without terminal escapes. busybox's ls, which is the Alpine root's,
# colours what it lists -- `copy.txt` arrives as ESC[1;32mcopy.txt -- and zsh
# wraps every prompt in them, so a pattern anchored at a line start found
# nothing in output that was perfectly right. Shown raw above, matched clean.
$text = $text -replace '\e\[[0-9;?]*[A-Za-z]', '' -replace '\e[()][0-9A-Za-z]', '' -replace '[\x0e\x0f]', ''
$script:fail = $false
function Expect($pattern, $what) {
if ($script:text -match $pattern) {
@ -697,7 +706,10 @@ Expect 'schfs: mounted' 'the kernel mounted SchFS as the root filesystem'
Expect 'init: ready' 'init came up on a SchFS root'
Expect 'label:\s*schos' '/proc/schfs reports the volume label'
Expect 'root_objectid:\s*16' '/proc/schfs reports the root object id'
Expect 'dir\s+bin' 'the root directory really contains bin/'
# /proc/schfs lists the first 16 entries, in the tree's order, and on the
# Alpine root bin/ is the seventeenth: any of the top-level directories proves
# the same thing.
Expect '(?m)^\s*dir\s+(bin|etc|usr)\s' 'the root directory really contains bin/, etc/ or usr/'
# / is the mounted volume, so mounting that same device again must be
# refused. Without this a kernel that had quietly fallen back to some other
# root would still pass everything else here.