Commit Graph

95 Commits

Author SHA1 Message Date
Jonas 'Sortie' Termansen 2465f9b5dc Package the system as a tix binary package. 2023-12-24 12:58:53 +01:00
Jonas 'Sortie' Termansen 95cf3fba98 Save kernel options upon installation. 2023-12-19 00:05:42 +01:00
Jonas 'Sortie' Termansen 4aadc182a6 Fix broken manual references. 2023-12-19 00:05:42 +01:00
Jonas 'Sortie' Termansen 938f2390dd Support system upgrades and configuration in GRUB.
Move /etc/default/grub to /etc/grub as it's owned by the sysadmin.

Move /etc/grub.d to /etc/default/grub.d as it's owned by the system.

Support /etc/grub's GRUB_CMDLINE_SORTIX in 10_sortix.

Remove the old /etc/grub.d/10_sortix.cache with a compatibility hook as it
has moved to /etc/default/grub.d/10_sortix.cache.
2023-09-03 14:47:08 +02:00
Jonas 'Sortie' Termansen 4533a2ade2 Remove mkinitrd(8). 2023-08-26 14:15:12 +02:00
Jonas 'Sortie' Termansen d189183900 Third generation Tix.
The .tix.tar.xz binary package format now stores the contents in the root
rather than the data/ subdirectory and the tix metadata now has the same
layout as the loose files in /tix, such that a .tix.tar.xz package can
simply be directly extracted into the filesystem. The /tix/manifest/ is now
included in the binary package rather than being generated on installation.

The /tix/collection.conf and /tix/tixinfo metadata files are now in the
tix-vars(1) format in the style of port(5).

The /tix/installed.list file has been removed since it isn't loose file
compatible and one can list the /tix/tixinfo directory instead.

The /tix/repository.list file has been removed since the feature is unused
and doesn't match the future direction of tix.

The kernel support for tix binary packages has been removed since it will
simply install by extracting the tar archive into the root filesystem.

Add the post-install sha256sum to the port version stamp.
2023-07-15 16:43:27 +02:00
Jonas 'Sortie' Termansen b819428bd2 Remove outdated statement that ports can't be built natively. 2023-07-12 23:10:39 +02:00
Jonas 'Sortie' Termansen e933eb5a1c Replace mkinitrd(1) with tar(1).
The custom initrd format was originally useful when it was mounted,
however it has been extracted into the ramfs for a very long time and
has no advantages over the standard tar format which can be readily
created and modified using standard tools. The kernel initrd(7) support
already supports tar, so this change simply switches the format.
2023-07-12 21:45:11 +02:00
Jonas 'Sortie' Termansen 917722cf70 Add display server.
This change adds the display(1) graphical user interface and desktop
environment with basic windowing support and the graphical terminal(1)
emulator along with integrations in chkblayout(1), chvideomode(1),
sysinstall(8), sysupgrade(8), as well as the games and ports.

Adopt the Aurora procedural wallpaper in display(1) and login(8).

Remove the obsolete dispd.

Juhani contributed keyboard and video mode APIs to the display protocol
and other miscellaneous changes.

dzwdz contributed the initial functioning window buttons, improved title
bar, window tiling, and minor bug fixes

Co-authored-by: Juhani Krekelä <juhani@krekelä.fi>
Co-authored-by: dzwdz <kg67199@gmail.com>
2023-06-24 00:43:36 +02:00
Jonas 'Sortie' Termansen 9d4eec4267 Add reinit support to init(8). 2023-06-08 22:50:03 +02:00
Jonas 'Sortie' Termansen 1e17e7fab7 Add automatic installer and upgrader. 2023-05-15 23:25:19 +02:00
Jonas 'Sortie' Termansen e9e57dc9af Add ntpd port. 2023-03-27 00:06:33 +02:00
Jonas 'Sortie' Termansen 9033153c47 Add sub_leap_seconds(3) and add_leap_seconds(3).
Advertise leap seconds being counted via CLOCK_REALTIME_HAS_LEAP_SECONDS.
2023-03-27 00:06:33 +02:00
Jonas 'Sortie' Termansen 97c57ca604 Add strptime(3). 2023-03-22 00:16:15 +01:00
Jonas 'Sortie' Termansen c57ff050e9 Add include and comment support to passwd(5) and group(5). 2023-03-19 21:53:21 +01:00
Jonas 'Sortie' Termansen da86ca1873 Fix typo in ssh instructions in installation(7). 2023-03-19 11:08:01 +01:00
Jonas 'Sortie' Termansen 8a4548db7d Add memory statistics to struct psctl_stat.
This is an incompatible ABI change.
2023-03-09 20:27:18 +01:00
Jonas 'Sortie' Termansen 2cd7361294 Add memusage(2).
Switch xz to memusage(2) and fix native self-cross issue.

This is a compatible ABI change.
2023-03-09 20:27:17 +01:00
Jonas 'Sortie' Termansen b9a72bbfbc Add ssh port. 2023-02-26 15:13:19 +01:00
Jonas 'Sortie' Termansen f884034e21 Add ping(8). 2023-02-23 00:43:11 +01:00
Jonas 'Sortie' Termansen 4379ca962a Add dhclient(8).
Co-authored-by: Juhani Krekelä <juhani@krekelä.fi>
2023-02-21 23:24:06 +01:00
Jonas 'Sortie' Termansen 384218d787 Fix the the. 2023-02-17 23:25:40 +01:00
Jonas 'Sortie' Termansen c839ad3ea3 Fix TEST-NET-3 documentation. 2023-02-17 23:22:21 +01:00
Jonas 'Sortie' Termansen 2edaf130fa Add ifconfig(8).
Co-authored-by: Juhani Krekelä <juhani@krekelä.fi>
2023-01-11 00:42:20 +01:00
Jonas 'Sortie' Termansen 3da0728fd5 Add network interface support to init(8). 2023-01-10 23:31:50 +01:00
Jonas 'Sortie' Termansen 580b71ae89 Add getifaddrs(3) and freeifaddrs(3). 2023-01-10 22:31:48 +01:00
Jonas 'Sortie' Termansen f291054465 Add em(4) driver.
Co-authored-by: Meisaka Yukara <Meisaka.Yukara@gmail.com>
2023-01-09 23:58:19 +01:00
Jonas 'Sortie' Termansen 3997116656 Add if_nameindex(3). 2022-12-16 23:44:50 +01:00
Jonas 'Sortie' Termansen 2ef6804ead Add networking stack.
This change adds all the kernel parts of a network stack. The network stack
is partial but implements many of the important parts.

Add if(4) network interface abstraction. Network interfaces are registered
in a global list that can be iterated and each assigned an unique integer
identifier.

Add reference counted packets with a cache that recycles recent packets.

Add support for lo(4) loopback and ether(4) ethernet network interfaces.
The /dev/lo0 loopback device is created automatically on boot.

Add arp(4) address resolution protocol driver for translation of inet(4)
network layer addresses into ether(4) link layer addresses. arp(4) entries
are cached and evicted from the cache when needed or when the entry has not
been used for a while. The cache is limited to 256 entries for now.

Add ip(4) internet protocol version 4 support. IP fragmentation and options
are not implemented yet.

Add tcp(4) transmission control protocol sockets for a reliable transport
layer protocol that provides a reliable byte stream connection between two
hosts. The implementation is incomplete and does not yet implement out of
band data, options, and high performance extensions.

Add udp(4) user datagram protocol sockets for a connectionless transport
layer that provides best-effort delivery of datagrams.

Add ping(4) sockets for a best-effort delivery of echo datagrams.

Change type of sa_family_t from unsigned short to uint16_t.

Add --disable-network-drivers to the kernel(7) options and expose it with a
bootloader menu. tix-iso-bootconfig can set this option by default.

Import CRC32 code from libz for the Ethernet checksum.

This is a compatible ABI change that adds features to socket(2) (AF_INET,
IPPROTO_TCP, IPPROTO_UDP, IPPROTO_PING), the ioctls for if(4), socket
options, and the lo0 loopback interface.

This commit is based on work by Meisaka Yukara contributed as the commit
bbf7f1e8a5238a2bd1fe8eb1d2cc5c9c2421e2c4. Almost no lines of this work
remains in this final commit as it has been rewritten or refactored away
over the years, see the individual file headers for which files contain
remnants of this work.

Co-authored-by: Meisaka Yukara <Meisaka.Yukara@gmail.com>
2022-12-11 13:40:34 +01:00
Jonas 'Sortie' Termansen 159415c3b1 Implement profile(5) and shrc(5) in sh(1). 2022-11-19 18:01:30 +01:00
Jonas 'Sortie' Termansen b1b9fdc2d8 Fix READYFD example in daemon(7). 2022-10-21 22:51:25 +02:00
Jonas 'Sortie' Termansen 64e23ccb22 Fix init(5) example saying a non-virtual daemon is virtual. 2022-10-21 21:05:58 +02:00
Jonas 'Sortie' Termansen 71edc766e7 Add halt(8), poweroff(8), and reboot(8). 2022-10-20 23:28:48 +02:00
Jonas 'Sortie' Termansen f2d50bbf9c Add daemon support to init(8).
This change implements a dependency tracking daemon(7) system in init with
overridable init(5) configuration, parallel startup, readiness signaling,
rotating logs, reliable stopping, and handling of leaked processes.

The /etc/init/target file is replaced by the new /etc/init/default per the
new init(5) format. The old configuration is migrated upon upgrade using an
upgrade hook.

extfs(8) now signals readiness using READYFD for fast mounting.

Filesystems that fail to be repaired are now mounted read-only.

The mounting and filesystem checking code is synchronized with sysinstall.

The duplicated array_add utility function now protects against overflows.

tix-iso-bootconfig(8) gains the --init-target option.

tix-iso-liveconfig(8) gains the --daemons option.
2022-10-20 23:26:03 +02:00
Jonas 'Sortie' Termansen 875030f3f3 Add session(5). 2022-09-18 23:21:04 +02:00
Jonas 'Sortie' Termansen 0e119b8480 Fix bad example for picking basic ports in release-iso-modification(7). 2022-09-18 23:21:04 +02:00
Jonas 'Sortie' Termansen cabfa4e4f7 Document /etc/default and /etc/examples. 2022-09-10 20:54:32 +02:00
Jonas 'Sortie' Termansen 23b3271fca Release HTML manual pages.
Add python3 to the basic set of ports in order to build releases.
2022-07-10 23:10:14 +02:00
Jonas 'Sortie' Termansen 3ae81f08b3 Add install-cross-toolchain Makefile target. 2022-07-09 20:51:13 +02:00
Jonas 'Sortie' Termansen 802b0ef1d1 Add verify-ports presubmit. 2022-07-09 20:51:13 +02:00
Jonas 'Sortie' Termansen 5679b74675 Use SPDX license identifiers for LICENSE. 2022-06-16 00:07:48 +02:00
Jonas 'Sortie' Termansen 9588b0d3db Add ports to the Sortix repository.
This change imports the ports collection from the former porttix and srctix
repositories and converts them to port(5) files with metadata pointing to
the upstream release tarballs with patches checked into this repository.
Ports are now developed and versioned along with the operating system and
are automatically built per the PACKAGES environment variable. The patches
are licensed under the same license as the relevant ports.

Tix has gained support for the new port(5) format. tix-port(8) is the new
high level ports build even point that handles downloading pstream releases
into the new mirror cache directory, applying the patches, building the port
with the lower-level tix-build(8), and finally installing the binary
package. The new tix-vars(8) program parses port(5) files and the new
tix-rmdiff(8) program produces input for tix-rmpatch(8).

The old doc/ directory is discontinued in favor of manual pages documenting
the new ports system.

The obsolete porttix-create(8) and srctix-create(8) programs are removed.
2022-06-13 22:29:53 +02:00
Jonas 'Sortie' Termansen 81978ae938 Fix missing 'and' typo in installation(7) confirmation. 2022-06-11 21:33:59 +02:00
Jonas 'Sortie' Termansen 432e5ddeaf Add bootloader setting for not loading the src initrd. 2022-01-12 21:34:26 +01:00
Juhani Krekelä ffc3751713 Fix typos in hier(7), installation(7), and upgrade(7). 2022-01-10 15:20:30 +02:00
Juhani Krekelä 4e72c78dc1 Support i686 without SSE.
Previously Sortix would initialize SSE unconditionally as part of the
boot process. Since earlier i686 CPUs like Pentium 2 did not include
SSE, Sortix would not run on them. With this SSE is only enabled for
CPUs that include it, which should theoretically allow Sortix to boot on
all i686 CPUs. Additionally, this removes -msse -msse2 compiler flags
from trianglix/Makefile.
2022-01-09 23:38:16 +02:00
Jonas 'Sortie' Termansen 3c43f71084 Implement file descriptor passing.
This change refactors the Unix socket / pipe backend to have a ring buffer
containing segments, where each segment has an optional leading ancillary
buffer containing control messages followed by a normal data buffer.

The SCM_RIGHTS control message has been implemented which transfers file
descriptors to the receiving process. File descriptors are reference counted
and cycles are prevented using the following restrictions:

1) Unix sockets cannot be sent on themselves (on either end).
2) Unix sockets themselves being sent cannot be sent on.
3) Unix sockets cannot send a Unix socket being sent on.

This is a compatible ABI change.
2021-12-31 22:24:11 +01:00
Jonas 'Sortie' Termansen 3048fdf7a1 Add presubmit. 2021-10-10 00:07:06 +02:00
Juhani Krekelä 89b02af091 Fix release-iso-modification(7) to use modern tail(1) syntax.
Historically tail(1) used `tail -1` style syntax, but this has been
obsoleted by the modern conventional-style `tail -n 1`.
2021-08-16 21:49:00 +03:00
Jonas 'Sortie' Termansen 5e7605fad2 Implement threading primitives that truly sleep.
The idle thread is now actually run when the system is idle because it
truly goes idle. The idle thread is made power efficient by using the hlt
instruction rather than a busy loop.

The new futex(2) system call is used to implement fast user-space mutexes,
condition variables, and semaphores. The same backend and design is used as
kutexes for truly sleeping kernel mutexes and condition variables.

The new exit_thread(2) flag EXIT_THREAD_FUTEX_WAKE wakes a futex.

Sleeping on clocks in the kernel now uses timers for true sleep.

The interrupt worker thread now truly sleeps when idle.

Kernel threads are now named.

This is a compatible ABI change.
2021-06-23 22:10:47 +02:00