Commit Graph

147 Commits

Author SHA1 Message Date
Jonas 'Sortie' Termansen aceb5a42a8 Add tix-upgrade(8). 2022-02-08 18:48:35 +01:00
Jonas 'Sortie' Termansen c9cf4b01ba Add display server. 2022-02-08 18:48:35 +01:00
Jonas 'Sortie' Termansen 67589d8097 Add ntpd(8) support.
TODO: /etc/ntpd.conf -> /etc/default/ntpd.conf
2022-02-08 18:48:35 +01:00
Jonas 'Sortie' Termansen b6d3ff36f8 Add httpd(8) support. 2022-02-08 18:48:35 +01:00
Jonas 'Sortie' Termansen a9ada6a7ea Add irc(1). 2022-02-08 18:48:35 +01:00
Jonas 'Sortie' Termansen 06fb1c0bfe Add host(1). 2022-02-08 18:48:35 +01:00
Jonas 'Sortie' Termansen 03777cb02e Add ping(8). 2022-02-08 18:48:35 +01:00
Jonas 'Sortie' Termansen c21d49c2d9 Add ifconfig(8).
Co-authored-by: Juhani Krekelä <juhani@krekelä.fi>
2022-02-08 18:48:35 +01:00
Jonas 'Sortie' Termansen 946b10df27 Add dhclient(8). 2022-02-08 18:48:34 +01:00
Jonas 'Sortie' Termansen 8d88bcdbf8 Add networking stack.
This commit is based on work by Meisaka Yukara <Meisaka.Yukara@gmail.com>
contributed as the commit bbf7f1e8a5238a2bd1fe8eb1d2cc5c9c2421e2c4. See the
individual file headers for which files contain remnants of this work.

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 echo of 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.
2022-02-08 18:48:34 +01:00
Jonas 'Sortie' Termansen d708a9d32b Add daemon support to init(8). 2022-02-08 18:48:34 +01:00
Jonas 'Sortie' Termansen 2628bc6ae1 Release HTML manual pages. 2022-02-08 18:48:34 +01: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ä d4528e9401 Add dnsconfig(8). 2021-10-09 21:11:56 +03:00
Jonas 'Sortie' Termansen 9a20f8cc37 Publish releases by the release name. 2021-07-20 22:11:27 +02:00
Jonas 'Sortie' Termansen 20df95f1ec Add /tix/tixinfo to the system manifest. 2021-07-20 22:08:11 +02:00
Jonas 'Sortie' Termansen bce37028f5 Store binary package repository in the release directory. 2021-06-24 22:35:39 +02:00
Jonas 'Sortie' Termansen fa5f1b826e Add sha256sum to release directory. 2021-06-24 22:35:39 +02:00
Jonas 'Sortie' Termansen cffa7fa7b7 Add manual pages to the release. 2021-06-24 22:35:39 +02:00
Jonas 'Sortie' Termansen aeb7e0ccfc Store kernel and initrds in the release directory. 2021-06-24 22:35:39 +02: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
Jonas 'Sortie' Termansen 27f81b09a6 Add /var/cache, /var/log, and /var/run. 2021-05-30 23:50:42 +02:00
Jonas 'Sortie' Termansen cb590ff205 Fix system upgrade leaking files. 2021-01-19 00:04:56 +01:00
Jonas 'Sortie' Termansen 37b1bf5e75 Fix /tmp permissions in the live environment. 2021-01-17 23:05:16 +01:00
Jonas 'Sortie' Termansen 4c089a01d6 Fix sysroot-source git clone not escaping the current directory. 2021-01-02 17:54:38 +01:00
Jonas 'Sortie' Termansen 3a874e7f40 Fix /var/empty permissions. 2021-01-02 17:54:38 +01:00
Jonas 'Sortie' Termansen 6f7162a0b1 Add checksum(1). 2020-09-27 22:15:20 +02:00
Jonas 'Sortie' Termansen 397bac9862 Add support for modifying release iso images. 2018-03-31 00:55:33 +02:00
Jonas 'Sortie' Termansen d1c3433353 Add rw(1). 2018-03-31 00:55:33 +02:00
Jonas 'Sortie' Termansen eca6246684 Use portable sort in linecount target. 2017-12-04 23:56:47 +01:00
Jonas 'Sortie' Termansen dbf4bcd6cf Add hostname(1). 2017-03-19 17:33:47 +01:00
Jonas 'Sortie' Termansen 970bf0c5e3 Major bump Sortix ABI following incompatible socket(2) change.
Commit "Add socket(2)" 4b2cf28bbf forgot to
major bump the ABI after removing /dev/net and adding a new system call.
2017-02-18 16:05:55 +01:00
Jonas 'Sortie' Termansen 987cd88472 Use git ls-files in linecount target. 2017-02-05 22:21:22 +01:00
Jonas 'Sortie' Termansen db7182ddc3 Add support for sessions.
This change refactors the process group implementation and adds support
for sessions. The setsid(2) and getsid(2) system calls were added.

psctl(2) now has PSCTL_TTYNAME, which lets you get the name of a process's
terminal, and ps(1) now uses it.

The initial terminal is now called /dev/tty1.

/dev/tty is now a factory for the current terminal.

A global lock now protects the process hierarchy which makes it safe to
access other processes. This refactor removes potential vulnerabilities
and increases system robustness.

A number of terminal ioctls have been added.

This is a compatible ABI change.
2016-11-23 22:30:47 +01:00
Jonas 'Sortie' Termansen d720f16537 Add ONLCR and OCRNL.
This is a compatible ABI change.
2016-11-05 23:38:40 +01:00
Jonas 'Sortie' Termansen 4d40dd35dd Run the existing sysmerge(8) in the make sysmerge targets.
The ABI may have changed and the current system might not be able to run the
new program.
2016-10-04 00:34:49 +02:00
Jonas 'Sortie' Termansen e69565fd15 Remove compatibility with Sortix 0.9. 2016-05-15 01:31:48 +02:00
Jonas 'Sortie' Termansen d166e58dc8 Remove repository from release directory. 2016-03-26 23:50:50 +01:00
Jonas 'Sortie' Termansen 34b5f061f9 Fix linecount target not working. 2016-03-26 16:07:22 +01:00
Jonas 'Sortie' Termansen 15ef078e9f Fix live environment tix collection platform. 2016-03-07 17:46:14 +01:00
Jonas 'Sortie' Termansen cadef6fedb Rename i486-sortix platform to i686-sortix. 2016-03-06 18:59:10 +01:00
Jonas 'Sortie' Termansen 2b72262b4f Relicense Sortix to the ISC license.
I hereby relicense all my work on Sortix under the ISC license as below.

All Sortix contributions by other people are already under this license,
are not substantial enough to be copyrightable, or have been removed.

All imported code from other projects is compatible with this license.

All GPL licensed code from other projects had previously been removed.

Copyright 2011-2016 Jonas 'Sortie' Termansen and contributors.

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2016-03-05 22:21:50 +01:00
Jonas 'Sortie' Termansen 8e988c1bf1 Convert libpthread to C and merge into libc. 2016-03-03 23:02:23 +01:00
Jonas 'Sortie' Termansen f52fb3202c Add sysinstall(8), sysmerge(8), and sysupgrade(8). 2016-02-21 18:41:11 +01:00
Jonas 'Sortie' Termansen 8af81a1864 Add disked(8). 2016-02-20 13:28:40 +01:00
Jonas 'Sortie' Termansen b15d30ea0c Fix Makefile build breakage. 2016-02-07 23:59:26 +01:00
Jonas 'Sortie' Termansen 170ccfcc89 Load ports in their own initrds. 2016-02-07 22:46:23 +01:00
Jonas 'Sortie' Termansen c10628a2e2 Remove root makefile kernel targets. 2016-02-07 22:46:23 +01:00
Jonas 'Sortie' Termansen 3648fce015 Add git repository to /src if applicable. 2016-02-07 22:46:23 +01:00