A completely-from-scratch hobby operating system: bootloader, kernel, drivers, C library, and userspace including a composited graphical UI, dynamic linker, syntax-highlighting text editor, network stack, etc.
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: mmu: be more paranoid about frame allocation/clearing
aarch64: mmu: fix up insufficient locking around mulitlevel page mapping
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.
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