Rename Schunix to SchOS; the kernel becomes SchIFT
Removes the "-unix" element and with it any trademark exposure to The
Open Group.
The split follows the ecosystem layout: SchOS is the system, and the
kernel has its own name. Kernel-identity strings are the only places
that take SchIFT -- uname(2) sysname, /proc/version, and the two licence
sentences that say "kernel" outright. That is what every Unix does here:
`uname -s` on Linux reports the kernel, not the distribution. Everything
a user reads as the product -- panic screen, boot menu, error prefixes,
docs, LICENSE, NOTICE -- is SchOS.
schunix.img is schos.img, the logo assets and the musl TLS patch are
renamed, and __SCHUNIX__ is __SCHOS__ (the define and the patch that
consumes it moved together).
Two things the rename broke, both found by the bootcheck suite:
- shmtest wrote "SCHUNIX-MMAP-OK" with a hardcoded length of 15 and
compared it back by hand-counted offsets (m[3]=='U', m[14]=='K').
The shorter marker left the write running two bytes past the literal
and the compare reading past the data, failing a file-backed mmap
that was working correctly. Now written and compared through one
constant with sizeof.
- bootcheck asserted a 31-byte file after appending to
"hello-from-schunix"; the shorter string makes it 29.
Both are the same mistake: a string literal whose length is written out
somewhere else. Full suite green -- base, Tty, Ps, Sock, Fb, Usb, Evdev.
This commit is contained in:
parent
d0f7acf9eb
commit
e04ca28812
83 changed files with 520 additions and 601 deletions
42
Makefile
42
Makefile
|
|
@ -277,16 +277,16 @@ endif
|
|||
# -----------------------------------------------------------------------
|
||||
# Top-level targets
|
||||
# -----------------------------------------------------------------------
|
||||
all: schunix.img
|
||||
all: schos.img
|
||||
|
||||
schunix.img: $(BUILD)/boot/bootblock $(BUILD)/boot/stage2 $(BUILD)/kernel/kernel $(BUILD)/schfs.img
|
||||
dd if=/dev/zero of=schunix.img count=10000
|
||||
dd if=$(BUILD)/boot/bootblock of=schunix.img conv=notrunc
|
||||
dd if=$(BUILD)/boot/stage2 of=schunix.img seek=1 conv=notrunc
|
||||
schos.img: $(BUILD)/boot/bootblock $(BUILD)/boot/stage2 $(BUILD)/kernel/kernel $(BUILD)/schfs.img
|
||||
dd if=/dev/zero of=schos.img count=10000
|
||||
dd if=$(BUILD)/boot/bootblock of=schos.img conv=notrunc
|
||||
dd if=$(BUILD)/boot/stage2 of=schos.img seek=1 conv=notrunc
|
||||
# seek is 1 + STAGE2_SECTORS, not a literal. It was 25 against a 24-sector
|
||||
# stage2; raising STAGE2_SECTORS for the boot logo without touching it wrote
|
||||
# the kernel straight over stage2's own tail.
|
||||
dd if=$(BUILD)/kernel/kernel of=schunix.img seek=$$(( 1 + $(STAGE2_SECTORS) )) conv=notrunc
|
||||
dd if=$(BUILD)/kernel/kernel of=schos.img seek=$$(( 1 + $(STAGE2_SECTORS) )) conv=notrunc
|
||||
|
||||
kernel: $(BUILD)/kernel/kernel
|
||||
|
||||
|
|
@ -315,17 +315,17 @@ ports:
|
|||
# -----------------------------------------------------------------------
|
||||
iso:
|
||||
rm -rf $(BUILD)/kernel $(BUILD)/lib $(BUILD)/cmd
|
||||
$(MAKE) RAMROOT=1 schunix.iso
|
||||
$(MAKE) RAMROOT=1 schos.iso
|
||||
|
||||
schunix.iso: $(BUILD)/boot/cdboot $(BUILD)/boot/stage2 $(BUILD)/kernel/kernel
|
||||
schos.iso: $(BUILD)/boot/cdboot $(BUILD)/boot/stage2 $(BUILD)/kernel/kernel
|
||||
STAGE2_SECTORS=$(STAGE2_SECTORS) sh tools/mkiso.sh $@
|
||||
|
||||
# Boot the ISO the way a machine booting off a disc would: no hard disk at
|
||||
# all, so a kernel that still secretly depends on one fails here rather than
|
||||
# in someone's optical drive.
|
||||
qemu-iso: schunix.iso
|
||||
qemu-iso: schos.iso
|
||||
$(QEMU) -serial mon:stdio $(QEMU_DISPLAY) -cpu qemu64,+rdtscp \
|
||||
-cdrom schunix.iso -boot d \
|
||||
-cdrom schos.iso -boot d \
|
||||
-m 1G -smp 2 -machine pc-i440fx-9.2
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
|
|
@ -665,10 +665,10 @@ $(BUILD)/sysroot.stamp: sysroot-install
|
|||
|
||||
$(BUILD)/fs.img: $(MKFS) $(BUILD)/sysroot.stamp
|
||||
@mkdir -p $(BUILD)
|
||||
@echo "Creating Schunix File System Image..."
|
||||
@echo "Creating SchOS File System Image..."
|
||||
@# A running QEMU holds this file open, and on Windows that makes rm fail
|
||||
@# with "Device or resource busy" -- which stops the build *after* the
|
||||
@# kernel has already relinked, leaving schunix.img stale. The next test run
|
||||
@# kernel has already relinked, leaving schos.img stale. The next test run
|
||||
@# then boots the previous kernel and the change appears to have done
|
||||
@# nothing, which has cost several debugging cycles. Say so plainly.
|
||||
@rm -f $@ || { \
|
||||
|
|
@ -684,9 +684,9 @@ $(BUILD)/fs.img: $(MKFS) $(BUILD)/sysroot.stamp
|
|||
# -----------------------------------------------------------------------
|
||||
# QEMU
|
||||
# -----------------------------------------------------------------------
|
||||
qemu: schunix.img $(BUILD)/schfs.img
|
||||
qemu: schos.img $(BUILD)/schfs.img
|
||||
$(QEMU) -serial mon:stdio $(QEMU_DISPLAY) -cpu qemu64,+rdtscp \
|
||||
-hda schunix.img -hdb $(BUILD)/schfs.img \
|
||||
-hda schos.img -hdb $(BUILD)/schfs.img \
|
||||
-m 1G -smp 2 -machine pc-i440fx-9.2
|
||||
|
||||
# The root filesystem. Built from the staged sysroot; the kernel mounts it as
|
||||
|
|
@ -694,7 +694,7 @@ qemu: schunix.img $(BUILD)/schfs.img
|
|||
$(BUILD)/schfs.img: $(MKSCHFS) $(BUILD)/sysroot.stamp
|
||||
@mkdir -p $(BUILD)
|
||||
@rm -f $@
|
||||
./$(MKSCHFS) $@ --size 8000 --label schunix --sysroot $(SYSROOT)
|
||||
./$(MKSCHFS) $@ --size 8000 --label schos --sysroot $(SYSROOT)
|
||||
|
||||
# Boot with a SchFS volume attached as the second disk.
|
||||
#
|
||||
|
|
@ -705,15 +705,15 @@ $(BUILD)/schfs.img: $(MKSCHFS) $(BUILD)/sysroot.stamp
|
|||
# the live v1 root and the SchFS probe correctly finds nothing there.
|
||||
#
|
||||
# Once up: cat /proc/schfs
|
||||
qemu-schfs: schunix.img $(BUILD)/schfs.img
|
||||
qemu-schfs: schos.img $(BUILD)/schfs.img
|
||||
$(QEMU) -serial mon:stdio $(QEMU_DISPLAY) -cpu qemu64,+rdtscp \
|
||||
-hda schunix.img -hdb $(BUILD)/schfs.img \
|
||||
-hda schos.img -hdb $(BUILD)/schfs.img \
|
||||
-m 1G -smp 2 -machine pc-i440fx-9.2
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# Misc
|
||||
# -----------------------------------------------------------------------
|
||||
# schunix.img is deliberately NOT here. It is a real file with real
|
||||
# schos.img is deliberately NOT here. It is a real file with real
|
||||
# prerequisites; listing it as phony made make skip the timestamp check and
|
||||
# re-run the four dd commands -- including zeroing five megabytes -- on every
|
||||
# single invocation, including ones where nothing had changed.
|
||||
|
|
@ -721,7 +721,7 @@ qemu-schfs: schunix.img $(BUILD)/schfs.img
|
|||
# derives from art that changes about never, and making it a build dependency
|
||||
# would put Python on the critical path of every clean build for no benefit.
|
||||
# Run this by hand after changing the art.
|
||||
LOGO_SRC = Assets/Schunix Small Logo.png
|
||||
LOGO_SRC = Assets/SchOS Small Logo.png
|
||||
LOGO_PX = 128
|
||||
|
||||
logo:
|
||||
|
|
@ -729,7 +729,7 @@ logo:
|
|||
|
||||
# The USB vendor/product name database, from linux-usb.org.
|
||||
#
|
||||
# Dual-licensed GPL-2.0-or-later **or** 3-clause BSD; Schunix takes the BSD
|
||||
# Dual-licensed GPL-2.0-or-later **or** 3-clause BSD; SchOS takes the BSD
|
||||
# option, which is what makes it usable at all. See NOTICE.
|
||||
#
|
||||
# Cached in dist/ and refreshed only when you ask, NOT on every build. That was
|
||||
|
|
@ -789,7 +789,7 @@ qrcheck: $(QRTEST)
|
|||
# 'clean' removes generated output only. dist/ (upstream tarballs) survives,
|
||||
# so a rebuild never needs the network.
|
||||
clean:
|
||||
rm -rf $(BUILD) schunix.img schunix.iso kernel/arch/x86_64/vectors.S
|
||||
rm -rf $(BUILD) schos.img schos.iso kernel/arch/x86_64/vectors.S
|
||||
|
||||
distclean: clean
|
||||
rm -rf dist
|
||||
|
|
|
|||
Loading…
Reference in a new issue