• v0.4.0 eeb9e16a74

    Luna July 22 release - 0.4.0 "Mercury"
    All checks were successful
    continuous-integration/drone/push Build is passing
    Stable

    apio released this 2023-07-22 11:32:40 +00:00 | 579 commits to main since this release

    This month's release features five big new features:

    1. Ext2 filesystem support (read-only)

    Having disk access is nice, but not really useful if you don't have a file system driver to actually access files on the disk.

    This release adds read-only support for the Ext2 filesystem, and uses it as the root file system (but /tmp and /home/selene are still writable, don't worry!).

    This means that we can store a lot more stuff in the root filesystem (since we're not running off an initial ramdisk), including the entire sysroot (/usr/lib, /usr/include, etc).

    This driver is missing many features (file size is limited to 4 MB, no caching, and obviously no writing), but it's fully usable!

    2. Basic POSIX signal support

    Signals are an important part of POSIX (and C) compatibility, and almost all third-party software has calls to signal() somewhere. Plus, who doesn't want to interrupt their running programs using ^C? (although that requires the fourth feature as well).

    This release adds basic POSIX signal support, although some features are still missing (alternate stack, siginfo_t, stopping and continuing, core dumps), and not all signals are defined.

    3. Enhanced termios compatibility

    Terminals are complicated, and termios.h is full of parameters. Before this release, termios support was limited to turning echoing off and on, without even using termios (using direct ioctls).

    This release adds termios.h, tcgetattr, tcsetattr, and more. The termios structure has also been enhanced with MANY more control flags for applications to control their terminal.

    4. Foreground and background process groups (basic job control)

    POSIX terminals/job control depend on process groups (and sessions, but that's not yet implemented) for a few things, namely sending terminal signals such as ^C (SIGINT) or ^Z (SIGTSTP).

    This release adds process groups to the kernel, a foreground process group to the terminal, and the shell controls this foreground process group to manage jobs.

    It also adds ^C and ^\ to send signals to the terminal's foreground process group.

    There are a few unimplemented things in process groups (orphaned process groups) for now.

    5. stdio and os::File buffering

    With the introduction of Ext2 (especially without caching), buffering has been needed in the standard library more than ever.

    This release adds read and write buffers to stdio's FILE, adds setvbuf(), and properly implements fflush() and ungetc(). os::File is also now a wrapper around stdio's FILE, to get the same benefits.

    Other features:

    • Add release names and implement them in uname (alpha releases will have the name "Mercury" from now on)
    • Improve formatting scripts
    • Add os::Process::exit()
    • Improve shell builtins and add a few (exit, set, unset)
    • Add a simple Game of Life implementation
    • Use an alternate kernel stack for exceptions
    • Run tests in a headless manner automatically on CI
    • Allow 'Description' fields in init service files
    • Implement isatty()
    • Checksum validation of GPT headers
    • Panic the kernel when init exits
    • Use the config.cmake file
    • Stop showing memory usage stats in the early boot log
    • Add a source parameter to the mount() system call
    • Add cp
    • Make the kernel filename restrictions on creation configurable
    • Add prompting functions to libos
    • Move user threads' page directories to UserVM and rename it to AddressSpace
    • More string functions

    Fixes:

    • Avoid copying and reallocation when creating Strings
    • When allocating zeroed memory, zero physical frames instead of virtual pages
    • Don't keep the first page directory it uses for the idle thread
    • Preserve temporary page directory changes across task switches
    • Make the CRC32 algorithm actually work
    • Only show kernel addresses in exception backtraces
    • Don't create a new kernel stack on exec (fixes a sizeable memory leak)
    • Check for manual modifications of environ
    • Do not use KVM when it's not supported
    • Avoid making the tests interfere with the main build directory

    ISO: pub.cloudapio.eu

    Screenshot from 2023-07-22 13-31-26.png

    Downloads