summaryrefslogtreecommitdiff
path: root/README.md
blob: 4b09107ab2b2acda3f7aef3fb0102dc2fc91c10a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Welcome to FoolOS
=================

![FoolOS Logo](https://gitweb.softwarefools.com/?p=miguel/fool-os.git;a=blob_plain;f=img/logo.png;hb=HEAD)

Abstract
--------
Welcome to the Home of the worlds most useless operating system.

Quick-start
-----------
Simply boot from the __FoolOS.iso__ in your favourite emulator 
or __dd__ to an USB stick and test on real hardware. 

Features
--------

* Booting with Multiboot (e.g. GRUB 2)
* 32-bit protected mode
* Logging to COM1
* Parsing ACPI (incomplete) and Multiboot Data
* Symmetrical Multiprocessing with LAPIC and IOAPIC
* APIC and PIT Timers
* Seperate GDT and IVT for each CPU
* Paging / Virtual Memory
* Ext2 RAM Disk
* Pipes
* Standard streams (stdin/stdout/stderr)
* Mouse and Keyboard support
* Multi-threading & Multitasking
* Kernel and Userspace Tasks
* CPU Private Memory 
* Support for ELF binaries.
* IRQ Handling Framework
* Finegrained Spinlocks
* Superfast Task Scheduler
* PCI Bus scanning
* Ethernet E1000 PCI Driver
* VESA Framebuffer with fallback to a text-only terminal
* C-library for Userspace (Newlib)
* Simple Network Stack (ARP, IPv4, ICMP, UDP)
* Simple FoolShell
* Snake Game
* Ships with some useless userspace software

_Please note that most features are only very rudimentary and mostly buggy._

Multiboot
---------
The FoolOS Kernel is following the Multiboot Specification (0.6.96) 
providing a multiboot header and the entry point _start().

This in turn calls the C function kernel_main().

Building
--------

You should at least setup a gcc cross-compiler and setup newlib to
build FoolOS yourself.

GCC CROSS-COMPILER (i686-elf)

    https://wiki.osdev.org/GCC_Cross-Compiler (18 AUG 2018)
    ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-8.2.0/gcc-8.2.0.tar.gz
    https://sunsite.icm.edu.pl/pub/gnu/binutils/binutils-2.31.1.tar.gz

NEWLIB

    https://wiki.osdev.org/Porting_Newlib (18 AUG 2018)
    ftp://sourceware.org/pub/newlib/newlib-3.0.0.20180802.tar.gz
    https://ftp.gnu.org/gnu/autoconf/autoconf-2.68.tar.gz
    https://ftp.gnu.org/gnu/automake/automake-1.11.6.tar.gz

Supported Platforms
-------------------
__TODO: update/recheck__

FoolOS was/is tested/developed on the following emulators/machines

* bochs 2.6 (try compiled with: ./configure --enable-clgd54xx --enable-a20-pin --enable-debugger --enable-disasm --enable-e1000 --with-x --with-x11 --with-term --enable-smp) (add -lpthread to LIBS in the Makefile!)
* qemu 2.8.1
* qemu 3.0.0
* virtual box
* Acer Aspire 1810TZ (Notebook)
* Q6600 on Asus p5n32-e sli plus (Desktop PC)
* 4790K on Asus z97-pro gamer    (Desktop PC)

Todos
-----

* PRIO: ringbuffers (spinlock on/off, interrupts on/off, read/write blocks of data);
* PRIO: Writing to ext2 RAM-image!!!!
* PRIO: Fix scheduler. use all cpus! / accounting / queues?
* PRIO: semaphores/ mutexes
* PRIO: return value / argv / env
* PRIO: create/remove pages on demand (sbrk, stack, load prog)
* PRIO: grow kernel memory!

* PRIO: optimized Mouse & KB processing in seperate task. (Kb all chars and different layouts, arrow keys, ctrl-c etc)

* NETWORKING:   tcp/ip stack/ traceroute / arptables /  sockets! / 
                vbox E1000! (remap) / virtio / NS2000  / ipxe network drivers / laptop acer card

* TODO: check Kernel Stuff Reentrancy? multicpu? interrupt syscall processing? Cleanup syscalls
* TODO: GCC optimizations (break kernel?) / volatile keyword etc?
* TODO: gcc-foolos (Porting (ncurses, gcc, binutils, vim, apache...)

* EXTRA: switch to DMA where possible!?
* EXTRA: Unit Testing
* EXTRA: GUI / Window Manager (update\_rect, etc..) / double buffering /  physical, virtual sizE? virtio ?
* EXTRA: Crazy & Funny terminal effects while typing (idea)
* EXTRA: port to arm and berryboot / minicom?

Disclaimer
----------

THIS IS A WORK IN PROGRESS.

This is a simple and useless "operating system", with a very basic set 
of features. It is the fruit of my fundamental explorations of the x86 
architecture and operating system design.

Copyright M.Idziorek <m.i@gmx.at> unless stated otherwise.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.