Commit Graph

66 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 9ec9ebcd44 Add sshd(8) support.
TODO: Pasting more than 1025 bytes into a Sortix ssh session disconnects it.
TODO: ssh to localhost from tty is corrupted
TODO: /etc/ssh*_config should be in /etc/default/
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 fb6ab7fb1d Add getifaddrs(3) and freeifaddrs(3). 2022-02-08 18:48:34 +01:00
Jonas 'Sortie' Termansen 62df107e60 Add if_nameindex(3). 2022-02-08 18:48:34 +01:00
Jonas 'Sortie' Termansen 4d7831da89 Add em(4) driver.
This commit is joint work by Meisaka Yukara <Meisaka.Yukara@gmail.com> and
Jonas 'Sortie' Termansen <sortie@maxsi.org>.
2022-02-08 18:48:34 +01:00
Jonas 'Sortie' Termansen e9cac68ef3 fixup! Add bootloader setting for not loading the src initrd. 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 87db1f52a4 Add halt(8), poweroff(8), and reboot(8). 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 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
Jonas 'Sortie' Termansen 27f81b09a6 Add /var/cache, /var/log, and /var/run. 2021-05-30 23:50:42 +02:00
Jonas 'Sortie' Termansen 18ba2d2fe3 Use example domain in serial-transfer(7). 2021-05-28 22:59:18 +02:00
Jonas 'Sortie' Termansen a83072bc3e Fix username/password typo in release-iso-modification(7).
Thanks to jjuran for spotting this error.
2021-04-21 22:30:22 +02:00
Jonas 'Sortie' Termansen cb590ff205 Fix system upgrade leaking files. 2021-01-19 00:04:56 +01:00
Jonas 'Sortie' Termansen 29598b4fde Fix /tix/manifest permissions in installations. 2021-01-17 23:14:54 +01:00
Jonas 'Sortie' Termansen 5f84c38bc8 Fix sysinstall hook markers not being installed and prefix logic.
Document the compatibility hooks behavior while here.
2021-01-17 23:14:52 +01:00
Jonas 'Sortie' Termansen 9993a1c0fc Add --append-to kernel(7) multiboot module option. 2018-12-08 22:54:28 +01:00
Jonas 'Sortie' Termansen d0ab651fbd Document the options for the kernel(7) multiboot modules. 2018-12-08 22:54:28 +01:00
Jonas 'Sortie' Termansen 494ae2dc09 Recommend rw(1) in installation(7). 2018-12-08 22:38:29 +01:00
Jonas 'Sortie' Termansen bc8093f4ff Fix typos in release-iso-bootconfig(7). 2018-12-08 22:34:49 +01:00
Jonas 'Sortie' Termansen 918160450f Use /share/sysinstall/hooks to keep of whether hooks have run. 2018-08-15 22:51:22 +02:00
Jonas 'Sortie' Termansen 4baa7b5409 Remove superfluous 'the' in upgrade.conf(5). 2018-08-15 22:44:46 +02:00
Jonas 'Sortie' Termansen 397bac9862 Add support for modifying release iso images. 2018-03-31 00:55:33 +02:00
Troy Martin 4335c7f001 Fix typos in initrd(7). 2018-02-04 13:39:37 +01:00
Jonas 'Sortie' Termansen 7df3f9308a The man program in the mdocml port can now handle non-installed manuals. 2017-12-04 23:56:47 +01:00
Jonas 'Sortie' Termansen 1759f690b6 Fix chvideomode(5) usable/used typo. 2017-07-02 22:09:53 +02:00
Jonas 'Sortie' Termansen 723f8e964c Fix date format in manual pages. 2017-07-02 22:07:39 +02:00
Pedro Falcato f32baac73f
Fix mountpoint typo in user-guide(7). 2017-06-04 22:59:46 +01:00
Jonas 'Sortie' Termansen 9f9f4d4e3f Print an kernel error rather than panicing if init(8) exits abnormally.
This avoids the misimpression that a kernel bug happened and it avoids
clearing the screen of potentially useful information about an init(8)
crash.
2017-05-21 23:28:12 +02:00
Jonas 'Sortie' Termansen d45417651f Refactor kernel command line parsing. 2017-04-08 22:20:03 +02:00
Jonas 'Sortie' Termansen 9613d47496 Fix comma punctuation bugs in manual lists. 2017-03-19 17:34:19 +01:00
Jonas 'Sortie' Termansen dbf4bcd6cf Add hostname(1). 2017-03-19 17:33:47 +01:00
Nicholas De Nova d217621649 Correct manpage spacing per roff(7) convention.
roff(7) dictates that "Each sentence should terminate at the end of an
input line." Instead of doing this, Sortix manpages (incorrectly) used
double-spaces to separate sentences.

Additionally, fix a few small typos.
2017-02-16 14:42:28 -06:00
Jonas 'Sortie' Termansen 4b2cf28bbf Add socket(2).
This removes the /dev/net socket interface.

This is an incompatible ABI change.
2017-02-14 20:43:31 +01:00
Jonas 'Sortie' Termansen 7d59575921 Fix videomode(5) mentioning fixed bugs. 2017-02-12 13:11:07 +01:00
Jonas 'Sortie' Termansen 442b139cc3 Fix following-development(7) typos. 2016-12-28 23:08:29 +01:00
Jonas 'Sortie' Termansen 9bbdb791af Add split packages and cross-bootstrapping support to tix-build(8).
pkg.use-bootstrap can now be set to true to add a bootstrap phase to
cross-builds. I.e. the package is built for the native platform and
installed to a temporary location, which is in the PATH during the
actual cross-compilation. This feature is useful for some misbehaving
ports that can cross-compile, but require the exact same version of the
software installed locally. The bootstrap build is controlled with the
bootstrap.foo variables rather than the normal pkg.foo variables.

pkg.source-package can now be set to the name of another package, whose
source code is built using the current tixbuildinfo. This feature allows
providing multiple packages using the same source code package. By
default, the source code of the source package is assumed to be in
../${pkg.source-package}, but this can be overridden with the option
--source-directory.

pkg.alias-of can now be set to the name of another package to specify
that this package is an alias of the other package, creating an empty
binary package depending on the real package.

pkg.subdir support has been fixed in the clean and post-install phases.

pkg-config support has been improved and PKG_CONFIG is now set to
$HOST-pkg-config and PKG_CONFIG_FOR_BUILD is set to pkg-config.

tix-build has been refactored as needed and generally cleaned up. Error
handling, such as on allocations, have been added in a lot of cases. The
support for FOO_FOR_BUILD variables have been unified and simplified.
Appending to PATH now correctly handles the empty PATH.
2016-12-27 23:14:00 +01:00
Dennis Wölfing 1b3dcad03c Add German keyboard layout. 2016-11-14 20:35:54 +01:00
Jonas 'Sortie' Termansen 5585303365 Add following-development(7). 2016-11-05 23:39:26 +01:00