Fiwix 1.5.0

Fiwix is an operating system kernel written from scratch, based on the UNIX architecture and fully focused on being POSIX compatible. It is designed and developed mainly as a hobby OS and, since it serves also for educational purposes, the kernel code is kept as simple as possible for the benefit of readers or students. It runs on the i386 hardware platform and is compatible with a good base of existing GNU applications.

Tags operating-system kernel posix unix
License MITL
State stable

Recent Releases

1.5.015 Nov 2023 09:58 major feature: Summarized Changes: Added DMA support and 32bit I/O data transfers in the ATA driver. Overall improvements in the disk access (specially under QEMU). Improvements and bug fixes in the buffer cache and memory management. Most kernel structures are now dynamically allocated which reduces the kernel memory footprint. Added the file /proc/buddyinfo to keep track the new kernel memory allocator. New kernel process called kbdflushd that flushes dirty buffers periodically. Added support for the Bochs Graphics Adapter with the new kernel parameter bga=. Added support for multiple RAMdisk drives. Added kexec implementation. Added microsecond resolution to sys_gettimeofday. Added the magic SysRq key Alt+SysRq+m to show current memory information. Added the /proc//fd subdirectory containing symbolic links named by its file descriptor. Added support for 64bit offsets which helps to have filesystems bigger than 4GiB. Added support for the virtual memory split 2GiB(user)/2GiB(kernel). Added support for large initrd images. Added the following new system calls: sys_lchown. sys_readv. sys_writev. sys_mmap2. The kernel now mounts the root filesystem in read-only mode by default. The Minix filesystem is now optional when building the kernel. Massive kernel bug fixing. Download the FiwixOS 3.3 Installation CD-ROM!
1.4.015 Nov 2022 13:54 major feature: Summarized Changes in FiwixOS 3.2: Fiwix kernel version 1.4.0. Added support for the PCI local bus. Added support for QEMU PCI serial devices (without MMIO). Added support for the UNIX System V IPC mechanisms: semaphores, message queues and shared memory. Ported the Python language version 3.6.15. Introducing opkg as the system package manager. Newlib 4.2 ANSI C library with extra functions. Two new system devices: /dev/full and /dev/port. Debug symbols have been stripped down, reducing considerably the size of ELF binaries. Improvements in the system building process. Improvements and bug fixes in the system environment. It also comes with the new FiwixOS 3.2 Installation CDROM which includes new packages ported and improves a lot the UNIX-like experience.
1.3.010 Dec 2021 08:42 major feature: Summarized Changes in FiwixOS 3.1: Includes Fiwix kernel version 1.3.0. Newlib 3.2 C library with extra functions. Completely new installation procedure using the dialog tool. Nested interrupts are possible in this new kernel version. GRUB 0.97 has been patched to include support for VESA VBE 2.0+ compliant cards. Kernel is now capable to boot using a frame buffer console. The file /proc/meminfo now shows the amount of dirty memory. Added support to handle two ATA/ATAPI devices in the same IDE controller. Added support for the magic SysRq key combination to help to diagnose kernel's state. Massive kernel bug fixing. Man pages are now even more readable thanks to the port of mandoc. More improvements and bug fixes in the operating system environment. It also comes with the new FiwixOS 3.1 Installation CDROM which includes new packages ported and improves a lot the UNIX-like experience.
1.2.012 Dec 2020 15:36 major feature: This new release of the Fiwix kernel comes with the following changes: - Added support for serial (RS-232) devices. - Completely rewritten the way how the device table is handled. - Completely rewritten the way how the interrupt table is handled. - Added the ability to share the same IRQ between multiple devices. - Completely rewritten the way how bottom halves are managed. - Added the 'doc/devices.txt' document. - Added basic functionality of OPOST functions to tty. - Added to reschedule the keyboard bottom-half if it was busy. - Added support of O_NONBLOCK in tty_write(). - Added remote serial console support. - Added support for K_RAW and K_MEDIUMRAW keyboard modes. - Added and fixed some ECMA-48 CSI sequences in console. - Improved termios and other aspects of the tty driver to accomodate the new serial driver. - Small optimizations and bug fixes in console. - Improved the macros that build the interrupt service routines. - Fixed to force some signals that a process cannot ignore by changing their dispositions to SIG_DFL. - Fixed a bug in tty_read and tty_write that caused to send the SIGTTIN signal to the foreground process. - Fixed nanosleep() to force to 10ms any request lower than 10ms. - Fixed a signedness bug in setreuid() and setregid(). - Fixed to delimitate better the stack-related page faults in the vma region. - Fixed a NULL pointer dereference when __DEBUG__ is enabled in sys_waitpid(). - Fixed to avoid freeing an invalid page that generated PANICs in SVGAlib programs. - Fixed a bug that, under certain conditions, page_not_present() unmapped a wrong page number. - Fixed to not clone MAP_SHARED pages during fork(). - Saved twice the 'signum' value before calling the signal handler. - Small fixes and cosmetic changes. It also comes with the new FiwixOS 3 Installation CDROM which includes new packages ported and improves a lot the UNIX-like experience.
1.1.024 Mar 2020 14:48 major feature: This new release of the Fiwix kernel comes with the following changes: - Added support for an initial RAMdisk (initrd) image. - Added full support for the ext2 filesystem. - Added support to execute scripts. - Limit the number of messages on spurious interrupts. - RAMdisks initialization now shows the range of the memory addresses of each RAMdisk created. - Added VMA_REGIONS as a general configurable option (default: 150 entries). - Changed the default kernel filesystem to ext2. - Renamed the sleep addresses in tty.c. - Added the ability to pass arguments to init from the kernel's command line. - Included memory values in /proc/PID/stat and /proc/PID/status. - Included the file /proc/PID/statm to provide more information about memory usage. - Changed the ATA's SET MULTIPLE MODE command to do all I/O with 4KB block size (8 sectors) by default. - Fixed to prevent from using an unexistent floppy type, in the fdd_type structure, if CMOS returns a value bigger than 0x04. - Fixed a misplaced bitwise operator AND that was not ensuring the limitation to 1GB as the amount of physical memory supported. - Fixed some bugs in *_minix_ialloc() and minix_balloc() when they fail. - Fixed a malfunction in the job control. - Fixed in sys_getgroups() to return the number of group IDs when the argument size is zero. - Fixed the DEC Set Top and Bottom Margins (DECSTBM) sequence, which affected the scroll up mechanism in consoles. - Fixed to set properly the timestamp on every read and write in all ttys. - Fixed the start time value in /proc/PID/stat of every single process. - Fixed to use a long long variable type to be able support block devices bigger tan 4GB. - Fixed a memory corruption bug processing the VT100 'CSI n J' sequence. - Small fixes and cosmetic changes. It also comes with the new FiwixOS 2 Installation CDROM which includes new packages ported and improves a lot the UNIX-like experience.
1.0.106 Aug 2018 10:46 major feature: This new release of the Fiwix kernel comes with the following changes: - Added a basic implementation of a Pseudo-Random Number Generator using the character devices /dev/random and /dev/urandom. - Improved the mechanism in procfs_dir_readdir() to fix a memory corruption bug. - Fixed a bug in procfs_dir_readdir() that prevented from reading correctly the entire procfs root directory. - Fixed a bug in iso9660_dir_readdir() that prevented from reading correctly any directory. - Fixed to show the complete pathname in the argv 0 of the init process. - Fixed to protect INIT process from unexpected signals. It also comes with the new Fiwix Installation CDROM 1.1 which includes new packages ported and improves a lot the UNIX-like experience with full support of the System V init scripts.
1.0.023 Apr 2018 10:27 major feature: The wait is finally over! After a lot of years working on this project, I can finally offer a free UNIX-like kernel for students and OS enthusiasts out there. I really hope people will take it with the same excitement I had while writing it. The Fiwix kernel comes with a CDROM that will install a decent operating system with libraries, compilers and tools. All the user-space software in this operating system uses the Newlib C Library successfully ported to Fiwix. Since such library is not fully compatible with the GNU C Library, the amount of GNU packages ported is small. That's the reason why you'll see some tools (applets) from the Busybox. The primary file system is the Minix version 2. It's an old and feature limited file system but it's really easy to implement and is currently enough to hold all files of the operating system. It has some limitations though; the maximum size of a file system is 1GB, it can only contain 65535 inodes (files), and others. This kernel, while completely functional and self-hosting capable, is in its early stage. That is, don't expect some features you would find in the current (modern) kernels. So, no PCI devices, no USB support and no networking; to name the most impacting missing features. OK, enough reading. Download it and get your hands dirty with the Fiwix kernel. Happy hacking! ;-)
0.9.223 Mar 2018 13:05 minor bugfix: Adjusted IDE waits depending on the CPU speed. More improvements in the initialization procedure of the keyboard driver. Reorganized the IDE detection mechanism in order to a detection problem of the primary-slave device on a specific scenary. Reduced the risk of latency in timer by moving some code to bottom halves. Added clock information in the boot screen. Rewritten the iso9660_dir_readdir() function which also a long standing corruption in the dirent structure. Rewritten partially the CDROM driver ing a lot of. Rewritten reclaim_buffers() function which should improve kernel stability. Placed to check for reschedule right after checking signals. Removed the EROFS return value in sys_open() to not prevent from writting in device files on a read-only filesystem. Now such return value is in minix_create(). some while loading the BIOS memory map. some typos in send_sig() that were referencing to 'current' process. in ttys to write the escape sequences atomically. some problems in the symbolic link names of the ISO9660 filesystem. a missing buffer release in ISO9660 filesystem superblock. some in the floppy driver. Small and cosmetic changes.
0.9.111 Dec 2017 06:05 major bugfix: Added full support of Minix v2 filesystem. Improved the initialization procedure of the keyboard driver. Improved filesystem permission semantics. Improved protection checking in every single system call. Improved the hard disk ATA driver. Included the file /proc//mountinfo to support GNU coreutils. a missing acknowledgement in an spurious interrupt. a missing tty output flush at the end of console_flush_log_buf(). a in /dev/lp driver that prevented write data in parallel port. a in namei() with filenames bigger than NAME_MAX. a in namei() to return -ENOENT if filename is NULL. to include a default 0022 umask in INIT. the mask during the creation of a directory in the Minix filesystem. to not wake up a process if its pending signals are blocked. to ignore the SIGCHLD signal by default. to avoid trying to flush on disk virtual inodes (i.e. from PIPE_DEV). a missing inode_unlock() in file_read(). a bad block size assignment when sharing disk and CDROM in the same major device. to stay with 32bit addresses in bios_map_init(). a bit the buffer management. a missing inode release in sys_open() when opening an unexistent file. a missing inode release in is_pre(). in sys_open() to return ENOENT instead of ENOTDIR when O_CREAT is set. a in pipe_read() that prevented reading completely the buffer. a lot of system calls. New system calls: sys_fdatasync (as an alias of sys_fsync).
0.9.006 Aug 2017 07:05 major bugfix: Completed full support of Minix v1 filesystem. Improved the buffer cache from the new page cache. The former is now only to cache disk blocks and optimize disk I/O, and the later will cache pages of. Files to optimize file I/O. Added two new methods in the VFS (read_block and write_block) to be able to. Differentiate more elegantly between i- dev and i- rdev. Added disk change detection in floppy driver. Added the BLKFLSBUF ioctl. Added a do_sched() in the reclaim_buffers() loop to gain responsiveness. Added file locking mechanisms BSD and POSIX (whole file and advisory only). Removed an extra and useless call in some mmap()ed files. Some code in the CDROM initialization. The return value in ide_cd_read(). to be able to read a whole CDROM using direct block I/O. The number of error retries while reading IDE devices. to remember the current color attribute in consoles when erasing lines. to be able to detect the floppy drive slave only. The ioctl VT_OPENQRY to return the value according to its size. a kernel panic when reading /dev/mem and /dev/kmem. to free an inode in minix_mknod(). in elf_loader() to memcpy_b() only the blksize of the buffer instead of PAGE_SIZE. Some problems on early kernel panic. Small and cosmetic changes. New system calls: Sys_rename (write support) Sys_mmap (write support) Sys_munmap (write support) Sys_mprotect (write support) Sys_flock Sys_fsync
0.8.526 Jan 2017 15:25 minor bugfix: Rewritten some parts of the elf_load() function to be able to support up to ARG_MAX argument size. Added more protection to control the strings passed in all system calls. Improved the INIT process start up. a small in minix _dir_readdir() function. a bad offset counting in ext2 _dir_readdir() function. in printk() function to be able to print the ' ' character. a introduced in the last version while ing the infinite loops. When there are no more memory pages. The prologue and epilogue in some assembler functions. a lot of long standing problems in the namei() function which also. Forced to rewrite code in most filesystem related calls. a missing iput() of the INIT binary inode before calling sys_execve(). During the init process. a long-standing that corrupted the buffer cache when the old buffer. Was not removed (under certain circumstances) from its hash queue. Small and cosmetic changes.
0.8.403 Sep 2016 21:05 minor bugfix: Added to invalidate inodes on every sys_umount() which some. All fs _bmap() functions to return correctly the error code. to assign 'sb- dev' to 'i- rdev' during the ialloc() function. Mktime() to return correctly the current date and time. The value of st_blocks in sys_newstat(), sys_newlstat() and. Sys_newfstat() in filesystem that do not store the total blocks used by an inode (e.g. Minix). a long standing in fs _dir_readdir() functions. Infinite loops when there are no more memory pages in kernel-mode. a race condition in pipefs_write(). an uninitialized block in minix_mkdir(). to not grow the directory size when reusing directory entries. a buffer corruption during reclaim_buffers(). New system calls: Sys_creat (write support) Sys_open (write support) Sys_write (write support) Sys_truncate(write support) Sys_ftruncate(write support)
0.8.326 Jun 2016 12:45 minor bugfix: Added to include the new inode into hash in ialloc(). Sys_umount() to sync all inodes before umounting the device. to correctly write all the dirty inodes in sync_inodes(). to correctly write all the dirty buffers in sync_buffers(). in iput() to remove inode from hash if 'i_nlink == 0'. Inode counter usage in do_namei(). Some in do_namei() and get_basename(). User_syscall() assigning correctly the values to each register. Some strange behavior when compiled with -O0 flag. The file_read() function in all filesystems in order to support holes. More code cleaning. New system calls: Sys_link (write support) Sys_mknod (write support) Sys_symlink (write support) Sys_mkdir (write support)
0.8.226 Mar 2016 03:15 minor bugfix: Removed inline assembly code in the context switch mechanism. Added the ifree() method in pipefs. Reorganized more parts of the VFS code. Added a schedule check during the tty_write() loop. Included an extra argument in the bread() function. the sys_fchown() system call number. some signess comparison. the inode counter in iget(). to initialize the superblock pointer in the inode structure in iget(). sys_write() system call to prevent negative values in count. to prevent mounting a filesystem on top of another one. VFS methods for symbolic links in the procfs. a bad behavior in do_sched() caused by its call from tty_write(). More code cleaning. New system calls: sys_rmdir (write support) sys_unlink (write support).
0.8.124 Jan 2016 08:05 minor bugfix: Added support for the Minix v1 filesystem. Reorganized several parts of the filesystems code. Reorganized all kernel configurable options. Improved sys_mount() and sys_umount() system calls. The spurious interrupts treatment. Sleep() to honour uninterruptible processes. to force using get_device() in some parts of the kernel. Execution permissions in sys_execve(). a race condition in the buffer cache. More code cleaning. New system calls: Sys_chmod (write support) Sys_fchmod (write support) Sys_chown (write support) Sys_fchown (write support) Sys_utime (write support)
0.8.022 Nov 2015 15:45 major bugfix: Improved the context switch mechanism and GDT initialization. Added block level write support and buffer synchronization. Added write support to RAMDisk driver. Added write support to floppy driver. Added write support to hard disk driver. Improved floppy, hard disk and CDROM drivers. Improved the del_callout() function to compare also the argument value. a panic in do_page_fault() caused by using the V2P macro directly on a kmalloc() when running out of memory. to prevent writing on a block device beyond its size. a long standing which caused collisions in the callout table and some processes were never waked up. a race condition when using two floppy drives simultaneously. to check if kmalloc() returns NULL during ELF load interpreter. a bad calculation of free buffers in '/proc/meminfo' which confused the. 'free' command. a long standing memory corruption in proc_listdir() and proc_listfd() of the proc filesystem. the ide_delay() function which prevented detection of some IDE drives. the outport_sw() function. keyboard on certain old motherboards with Vortex86 processor. the inode count in some places. Small and cosmetic changes. New system calls: sys_ftime, sys_sync.
0.7.914 Sep 2015 03:15 minor bugfix: Improved the mechanism when kernel runs out of memory pages. Improved the ELF loader and numerous. Added support for ioctl TIOCLINUX function 12 (get console type). Removed a dollar prefrom 'need_resched' operand, treating it now as a. Direct-address operand instead of an immediate operand which caused to Continue rescheduling all the time. More improvements in the kernel panic procedure. Added numeric only left-justification capabilities to printk(). Improved and partially rewritten the system calls sys_mmap() and sys_munmap(). The expand_heap() function to be much more efficient. a bad type definition that generated a value overflow in the. Release_binary_pages() function. a lot of when kernel runs out of memory. Sys_nanosleep() system call to not block if timeout is zero. to not count the cpu quantum in the idle process. to do nothing in the default case for the SIGCHLD signal. The sys_pause system call to not return on ignored signals. to discard any pending stop signal (SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU) if SIGCONT signal is generated, and vice versa. a bad minor number generation in /dev/hd a,b,c,d devices. a kernel panic due to an offset-related in /dev/ram. a long standing memory corruption in printk() and sprintk() with. Strings longer than 1024 bytes. Some in sys_brk() system call. to not free reserved memory pages. Small and cosmetic changes.
0.7.806 Apr 2015 09:16 major bugfix: This is another release that introduces numerous bugs fixes (some of them long standing ones) and continues with memory subsystems rewrite. The buffer cache is now much more efficient and this is indeed visible on very constrained systems like an i386 with 4MB of RAM. There is still more work to do pending for the next release in the memory management, specially in the page cache and in the sys_mmap() and sys_munmap() system calls. I continue working on kernel stability to include the Minix filesystem with write support. As always, see the ChangeLog for the rest of details.