Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

ToaruOS v2.1.0

Compare
Choose a tag to compare
@github-actions github-actions released this 27 Oct 00:31

Screenshot from 2022-10-27 09-26-27

What's New in v2.1.0

  • Initial architecture support for AArch64 (ARMv8) has been added:
    • Initial platform target support for the virt-2.12 machine target in qemu-system-aarch64 has been added.
    • Experimental support for Raspberry Pi 400 has been added.
      • Hardware driver support for this platform is limited and will be expanded in ToaruOS 2.2.
  • Several bugs have been fixed:
    • An issue in which the e1000 network device driver mapped pages as user-accessible has been resolved.
    • An issue in which segmentation faults were not properly delivered to processes on x86-64 has been resolved.
    • An issue in which animating windows were incorrectly rendered in the compositor has been resolved.
    • An issue in which exiting processes could be scheduled and delay cleanup has been resolved.
    • An issue in which mktime calculated incorrect dates has been resolved.
    • A number of issues related to incorrect or insufficient lock ordering around IPC primitives have been resolved.
    • An issue in which the PC serial console can cause unexpected lockups has been resolved.
    • Various issues with invalid/corrupt ELF files have been resolved in readelf.
    • An issue in which attempting to delete directories from a tmpfs would cause a kernel panic has been resolved.
    • An issue in which traced processes could exec SUID binaries as been resolved.
  • The implementation of signals has been largely replaced:
    • Signal delivery no longer induces a nested kernel execution context.
    • Signal handling occurs only during transitions to userspace.
    • Userspace signal context is now stored on the userspace stack.
    • Basic signals are now blocked on execution of their handlers.
    • Several issues related to nested signal handling have been resolved.
    • System call interfaces can now support automatic restart when interrupted by a signal.
    • Signal delivery in the debugger / ptrace interface has been improved.
    • sigaction, sigprocmask, sigwait, sigsuspend have been implemented.
    • waitpid will no longer return immediately when a candidate process is suspended and did not change state.
    • Adjustments have been made to the text printed when a signal key sequence is sent to a TTY.
  • Userspace memory management has been improved:
    • An experimental munmap system call has been added.
    • The libc malloc/free can now release memory from large allocations.
    • The fixed addresses of shared memory mappings have been relocated.
  • Some functionality of the compositor has been improved:
    • Resize events are now sent during mouse-initiated window resize.
    • When the cursor is over a rotated window, it will be rotated to match the orientation of the window during software rendering. (Hardware cursors, where supported, are not rotated.)
    • Blur effects are now available.
    • Window advertisement events are now sent when a window is resized.
  • Terminal rendering has been improved.
    • Deferred rendering has been implemented and improved.
    • A glyph cache for TrueType text provides greatly improved rendering speed.
    • Specialized rendering of some box drawing characters has been implemented, improving the appearance of lines and shaded blocks.
  • The dynamic linker has been improved:
    • Symbol resolution in some corner cases that were previously mishandled has been fixed.
    • TLS (thread-local storage) data has been relocated relative to the thread pointer.
    • Some dynamic TLS relocations are now supported.
  • Kuroko and Bim have received upstream updates.
  • Mechanisms for the setting the clock time have been added:
    • A settimeofday system call and corresponding libc function are now available.
    • The date utility can now parse some time strings and set the time when run as root.
  • Some improvements have been made to the networking stack:
    • ifconfig now supports setting IPv4 addresses and some route configuration.
    • recvfrom on UDP and ICMP sockets is now supported for obtaining source address information.
    • ICMP sockets have been made to work like other operating systems, returning only the ICMP payload.
  • The PC BIOS loader now uses BIOS calls to read keyboard input, which should allow it to work with USB keyboards.
  • The File Browser now has a context menu option to delete files.
  • The display of graphs in the System Monitor application has been improved.
  • A regex-capable grep utility has been added.
    • The regex dialect is not compatible with POSIX BREs, but this is subject to change; the current regex engine comes from Bim.
  • The output format of the ps command has been improved with additional columns.

What is ToaruOS?

ToaruOS is a hobbyist, educational operating system for x86-64 PCs, focused primarily on use in virtual machines. It provides a Unix-like environment, complete with a graphical desktop interface, shared libraries, feature-rich terminal emulator, and support for running, GCC, Quake, and several other ports. The core of ToaruOS, provided by the CD images in this release, is built completely from scratch. The bootloader, kernel, drivers, C standard library, and userspace applications are all original software created by the authors, as are the graphical assets.

Who wrote ToaruOS?

ToaruOS is primarily written by a single maintainer, with several contributions from others. A complete list of contributors is available from AUTHORS.

Running ToaruOS

It is recommended that you run ToaruOS in a virtual machine / emulator, for maximum compatibility. ToaruOS's driver support is limited, and running on real "bare metal", while possible, does not provide the most complete experience of the OS's capabilities except on very particular hardware. ToaruOS is regularly tested in VirtualBox, QEMU, and VMWare Player, and can be successfully booted (with poor performance) in Bochs. ToaruOS is intended to run from a live CD, though it is possible to install to a hard disk. Additional details on running ToaruOS in different virtual machines is available from the README.

Release Files

image.iso is the standard x86-64 build of ToaruOS, built by the Github Actions CI workflow. It uses ToaruOS's native bootloaders and should work in most virtual machines using BIOS, and in some EFI environments.

aarch64.tar.gz contains files for running QEMU ARMv8 VMs. Use the run.sh shell script to start QEMU, and adjust as needed to enable accelerated operation under KVM or HVF.

Changelog

  • aarch64: (wip) support kernel modules
  • aarch64: Actually reset kernel stack on exec
  • aarch64: Add a tty driver for the pl011 uart
  • aarch64: Load kernel symbol table
  • aarch64: ac97 driver as module
  • aarch64: add ext2, iso9660 modules; JUMP26 reloc
  • aarch64: apply e1000 permission changes
  • aarch64: atan2() by polynomial approximation
  • aarch64: basic kernel tracebacks on el1-el1 fault
  • aarch64: basic relocations, enough for test.ko
  • aarch64: be more flexible about where the kernel is physically
  • aarch64: cleanup
  • aarch64: cleanup some warnings
  • aarch64: cleanup, fix warnings
  • aarch64: clear instruction cache on new pages when forking
  • aarch64: disable lock debugging
  • aarch64: don't be so intent on running driver bringup on cpu0
  • aarch64: dospart.ko as well
  • aarch64: dump regs on unknown fatal exceptions
  • aarch64: e1000 driver as module
  • aarch64: enable userspace access to timer physical counter
  • aarch64: expose aarch64_interrupt_dispatch as a symbol
  • aarch64: expose dtb as a device file
  • aarch64: fix mmu_first_n_frames since ram moved
  • aarch64: fixup warning about discarded volatile
  • aarch64: flip smp mutex after doing init for better startup synchronization
  • aarch64: force task switch when idle gets wakeup signal
  • aarch64: idle task loops should be the same for BP and APs
  • aarch64: implement a better spinlock
  • aarch64: implement panic halting with sgis
  • aarch64: increase inital stack size for kernel startup
  • aarch64: interrupt mapping improvements, chained interrupt handlers
  • aarch64: mmu: be more paranoid about frame allocation/clearing
  • aarch64: mmu: fix up insufficient locking around mulitlevel page mapping
  • aarch64: read rtc time again on qemu
  • aarch64: remove some debug messages
  • aarch64: remove superfluous reload of TTBR1
  • aarch64: reset timer on entry into idle wait
  • aarch64: save/restore fpu status registers
  • aarch64: start work on interrupt dispatch
  • aarch64: temporary device drivers until modules are ready
  • aarch64: this seems to be necessary or hvf can occasionally throw a fault on syscall return?
  • aarch64: traceback: fix incorrect base pointer on manual traceback
  • aarch64: virtio: be even pickier about cache maintenance
  • aarch64: virtio: make sure irq handler symbols are in our table for debugging
  • about: use markup_text for rendering
  • base: Don't use large pages when building libs for x86-64
  • base: New default wallpaper.
  • base: g++ doesn't like these restricts
  • bim: Sync
  • bim: Update syntax definitions
  • bim: at least attempt to wait for forked children
  • bim: lua highlighter
  • bim: more search improvements
  • bim: regex search/replace improvements
  • bim: sync upstream
  • bim: sync with kuroko changes
  • bim: sync with upstream
  • bim: tab completion for 'import'; krk api updates
  • boot: Use BIOS calls to read keyboard, which should work for USB
  • calculator: slightly more sensible input handling
  • calculator: use markup_text for rendering
  • compositor: Implement semi-lazy window resizing
  • compositor: blur-behind windows
  • compositor: resize extended clip context when display resizes
  • compositor: rotate mouse cursor to match rotation of window under cursor
  • compositor: send window advertisements when windows are resized
  • cpu-name.krk: int() is base 10 by default now; specify 0
  • cpu-name: aarch64: 0/0 means hypverisor is hiding things
  • cpuwidget: Fancier persistent graphs
  • cpuwidget: fix permissions on netif status
  • date: add rudimentary support for setting date/time
  • e1000: restrict access to SIOCS* family, write()
  • file-browser: Add 'Delete' to context menu
  • file-browser: don't make the path input look focused when the window isn't
  • file-browser: prevent backspace from navigating up on the desktop
  • github: Attempt to add a new workflow for aarch64
  • graphics: fix bad bounds checks in draw_sprite_alpha*
  • graphics: fix bad translate in draw_sprite_rotate
  • grep: Add a basic regex-matching grep with some options
  • grep: don't print (standard input) when input is implicitly stdin
  • i965: cleanup, clear screen on initial mode set
  • ifconfig: cleanup, add commands to set addresses
  • kernel: Add sigaction
  • kernel: Don't let things clear frames without holding the frame alloc lock
  • kernel: Handle some invalid arguments in signal syscalls
  • kernel: More lock fixes around pipes...
  • kernel: Restart some signals, fix up suspend to work with new signal management
  • kernel: Return signal number that caused process to stop
  • kernel: Support SA_NODEFER
  • kernel: Update version codename
  • kernel: aarch64: initial pass at clearing upper page structures on unmap
  • kernel: add a temporary 'munmap' sysfunc
  • kernel: add missing PTRCHECK to sys_readline; fixes #250
  • kernel: add sigsuspend
  • kernel: clear signal disposition when running a handler, as we should
  • kernel: complete redesign of signal handling
  • kernel: disable some printfs
  • kernel: don't SUID traced processes
  • kernel: enable -Wstrict-prototypes
  • kernel: ensure we're saving/restoring all process state on signals
  • kernel: fix faulty lock around sleep nodes not capturing potential change in owner
  • kernel: fix waitpid() with WSTOPPED; only return on state change?
  • kernel: fixup ptrace signal delivery, again
  • kernel: improve comments in sys/ptrace.c
  • kernel: improve comments in sys/signal.c
  • kernel: more lock ordering shenanigans
  • kernel: more signal functions
  • kernel: packetfs: handle -ERESTARTSYS from underlying pipe
  • kernel: print more details when trying to alert invalid process
  • kernel: relocate some user virtual addresses
  • kernel: rudimentary sigwait
  • kernel: we have more than 31 signals...
  • kernel: x86-64: copy over unmap improvements from aarch64
  • kuroko: DYNAMIC_PROPERTY is no longer a thing
  • kuroko: Sync for bugfixes
  • kuroko: Sync with upstream
  • kuroko: add waitpid bindings (temporary; should be in 'os')
  • kuroko: apply const argument fixes to modules
  • kuroko: apply more API changes
  • kuroko: disable gc in krk_test_noise
  • kuroko: small cleanups
  • kuroko: sync for upstream 1.3.0 release
  • kuroko: sync upstream
  • kuroko: sync upstream
  • kuroko: sync upstream
  • kuroko: sync upstream
  • kuroko: sync upstream, rc1
  • kuroko: sync with upstream
  • kuroko: sync with upstream
  • kuroko: sync with upstream
  • kuroko: sync with upstream
  • kuroko: sync with upstream
  • kuroko: sync with upstream
  • kuroko: sync with upstream
  • kuroko: sync with upstream
  • kuroko: sync with upstream
  • kuroko: sync with upstream
  • kuroko: sync with upstream
  • kuroko: sync with upstream
  • kuroko: sync with upstream 1.3.0-alpha
  • kuroko: sync with upstream, again
  • kuroko: update to 1.3-beta and sync bim
  • kuroko: use sigaction for sigint handler on ToaruOS
  • kuroko: yet more upstream syncing
  • ld.so: Handle local TLSDESC entry from libstdc++?
  • ld.so: Ignore DTPMOD, DTPOFF rather than bailing
  • ld.so: Possibly incorrect dynamic TLS implementation
  • ld.so: __tlsdesc_static is potentially unused
  • libc: aarch64: tan() can be expressed as sin()/cos()
  • libc: fix conversions of negative timestamps (eg., 0 in western timezones)
  • libc: fix terribly broken mktime
  • libc: ioctl sets errno
  • libc: make pthread_t scalar
  • libc: make srand repeatable and better for seeding with time
  • libc: more useful stub pow() for aarch64 so Quake plays
  • libc: qsort_r
  • libc: strsignal
  • libc: stub tgamma for kuroko
  • libc: use munmap sysfunc in free() for 'big bins'
  • linker: rudimentary TLSDESC for aarch64; kuroko modules
  • markup_text: Implement a glyph cache and expose a more detailed API
  • meta: Add some magic to figure out what modules to build
  • meta: Fixup build-toolchain to build libgcc, crts correctly
  • meta: If a filed called '.arch' exists, use it as ARCH by default
  • meta: README typo missing word
  • meta: That may need to be defined in the individual target Makefiles...
  • meta: Update some copyright years
  • meta: Upload RPi400 kernel8.img as an artifact
  • meta: Use 'strip' from toolchain
  • meta: add 'hvf' phony target to arch makefile
  • meta: capture only up to first : when generating release notes
  • meta: fix permissions on util/build-in-docker-aarch64.sh
  • meta: replace missing host kuroko build in Makefile
  • meta: uh, where did that come from
  • mkdisk: FAT overhead is too high again... overestimate more
  • net: Cleanup headers
  • net: Make ICMP sockets more normal
  • net: Support recvfrom on udp sockets
  • package-manager: Show a message when no packages are available
  • panel: Don't crash when window buffer disappears between ad refreshes
  • panel: fixup inefficient window list redrawing
  • procfs: RUNNING processes should have state R
  • procfs: avoid crashes on empty module, filesystem tables
  • procfs: expose heap break point in /proc/{PID}/status
  • procfs: fill on open for consistent reads
  • procfs: times are reported in microseconds
  • ps: more bsd-y format for time?
  • ps: report TIME column from TotalTime
  • pthread: Remove magic thread exit; pthread_exit() is just syscall_exit
  • readelf: Add several sanity checks.
  • readelf: fix incorrect handling of RELA sections
  • readelf: missing return
  • readelf: use strings for more columns
  • rline: Merge fixes from Kuroko
  • rline: pull in cleanup from kuroko version
  • rpi400: fbterm: only do that on arm
  • rpi400: initial platform support
  • rpi400: mini uart driver
  • rpi400: request maximum clock speed at startup
  • rpi400: smp startup
  • rpi400: try to clean up rpi stuff
  • sh: Hack to fix display width when prompt contains wide characters
  • sh: tab completion for ifconfig
  • sh: that decoder is in a header...
  • sh: use strsignal, improve job list slightly
  • strace: sys_execve doesn't return on success; handle that common case better
  • sudo: bail early of euid isn't 0
  • terminal: don't need to reset mouse_ticks in draw_cursor
  • terminal: dumb glyph cache for truetype text
  • terminal: render box drawing characters specially
  • text: Add methods for rasterizing single glyphs
  • text: Allow x-adjusted glyph rendering, for better kerning in caches
  • text: faster, though not as nice, stroking method
  • tmpfs: Don't completely bomb on trying to unlink a directory
  • top: 'W' to switch sort column left
  • top: add 'S' column for state
  • top: comments
  • tty: do not print line feed after ^C, et al.
  • tty: fix permanently set EOF status on tty
  • virtio: Remove unused PCI cap parsing
  • virtio: map command to left super
  • virtio: these F keys should work too
  • x86-64: fixup serial receive loop as this one was kinda bad
  • x86_64: fix segfault not being delivered due to cow regression
  • xhci: Basic initialization
  • yutani-tty-pipe: Dumb tool to act as a keyboard over a tty
  • yutani: pex read() can return error code

Known Issues

  • AArch64 builds are not production-ready and should not be used on hardware targets.
  • Several utilities, libc functions, and hardware drivers are missing functionality.
  • There are many known security issues with ToaruOS. You should not use ToaruOS in a production environment - it is a hobby project, not a production operating system. If you find security issues in ToaruOS and would like to responsibly report them, please file a regular issue report here on GitHub.