SchOS/ports/Makefile
Nexoniarz b1323e193a input, fb, vt, sysfs: the kernel calls Xorg makes
Xorg on a framebuffer -- the fbdev video driver, the evdev input driver,
libpciaccess -- asks the kernel a fixed set of questions before it draws
anything, and gives up on the first wrong answer. These are those
answers.

evdev: EVIOCGVERSION, GID, GNAME, GPHYS, GUNIQ, GPROP, GBIT, GKEY, GABS,
GREP and the accepted setters. Xorg and libinput decide what a device
*is* from the capability bitmaps; /dev/input/eventN answered only
EVIOCGRAB, which reads as no device at all. Each device's bitmaps are
its defaults plus whatever it has reported, so a USB tablet makes the
pointer absolute.

fbdev: FBIOPUT_VSCREENINFO succeeds for the mode already set, as on
Linux -- the fbdev driver sets it every time it starts -- and still
refuses any other. FBIOPAN_DISPLAY to the origin; FBIOBLANK.

The console: KDSETMODE(KD_GRAPHICS) stops it drawing on a terminal,
KDSKBMODE(K_OFF) stops keys reaching its tty, and VT_PROCESS now does
the switch handshake: leaving the terminal sends relsig and waits for
VT_RELDISP, arriving sends acqsig. A terminal whose owner has died goes
back to the kernel whole, so a crashed X cannot leave the console dead.

/sys: boot_vga, a writable enable, and graphics/fb0 under the display
device, which is how the fbdev driver pairs a card with /dev/fb0.

ports/linux-headers: <linux/*.h> into musl's prefix, from sabotage-
linux's kernel-headers 4.19.88-2. Its checksum is recorded from the
first download; upstream publishes none.

cmd/xready makes each call and checks the answer, including the switch
handshake on tty2 and an owner that dies holding it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
2026-10-24 12:06:04 +02:00

43 lines
1.7 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0-or-later
# SchOS ports — third-party software, one directory per port.
# Every port's licence must combine with GPL-2.0-or-later; see docs/licensing.md.
#
# ports/musl/ libc — installs headers/libs to build/ports/musl/prefix
# ports/mksh/ MirBSD Korn Shell — installed as sysroot/bin/sh
# ports/toybox/ core utilities — installed as sysroot/bin/<applet>
# ports/kilo/ the text editor — installed as sysroot/bin/{kilo,edit}
# ports/ncurses/ terminfo + screen library — link-time only, ships nothing
# ports/zsh/ the Z shell — installed as sysroot/bin/zsh, beside /bin/sh
# ports/linux-headers/ <linux/*.h> for the ioctls -- link-time only, ships nothing
#
# A port directory holds only a Makefile and optional patches/. Everything
# generated lives in build/ports/<name>/ — see mk/port.mk for the contract.
# Tarballs are cached in dist/ and are never removed by 'clean'.
#
# Order matters: musl must be built before anything that links against it.
# Ports that live in this directory but are deliberately not built by `make`.
# Empty for now; the filter stays because the reason it existed will recur --
# a port whose licence cannot be combined with GPL-2.0-or-later can be kept here for
# local testing but must never be built into a SchOS image.
NOTPORTS :=
PORTS := $(filter-out $(NOTPORTS), \
$(patsubst %/,%,$(sort $(dir $(wildcard */Makefile)))))
.PHONY: all $(PORTS) clean distclean
all: $(PORTS)
mksh: musl
toybox: musl
kilo: musl
fastfetch: musl
ncurses: musl
zsh: musl ncurses
linux-headers: musl
$(PORTS):
$(MAKE) -C $@
clean distclean:
for p in $(PORTS); do $(MAKE) -C $$p $@; done