diff options
Diffstat (limited to 'NOTES.md')
| -rw-r--r-- | NOTES.md | 185 |
1 files changed, 185 insertions, 0 deletions
diff --git a/NOTES.md b/NOTES.md new file mode 100644 index 0000000..d1c82fe --- /dev/null +++ b/NOTES.md @@ -0,0 +1,185 @@ +Welcome to Fool OS +================= + +Quick-start +----------- +Simply boot from the __FoolOS.iso__ in your favourite emulator +or __dd__ to an USB stick and test on real hardware. + +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 +----- + +break out reusable parts. use typedefs + +two buffers for programms , never lock both. lock is syscall? +port as secondary user.. ? zlib libpng + + https://wiki.osdev.org/Text_Mode_Cursor +cnrom civis term +pipes! schedulig! DMA! splice (2) + +Autobuild via Jenkins (sanbboxed?) +streamline: binutils,gcc,newlib,ncurses,ncurses-examples.vim building + +SDL, mesa3d, quake,doom, netwookring tcp/ip, cairo cairo + +old rusty style os/console.. ghc/gcc/ +ata/dma +nuklear gui +optimize pipes +termios etc, vim t_co _ve _vi _vt +scheduler!! + +os level warnings: CLOSE A PROGRAMM we ARE OUT OF fifo/ram/... + +* 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/bookkeppiung x86: tsc /rdtscp? / load bareer / queues? +* PRIO: gcc toolchain +* PRIO: /dev/tty / function and arrow keys + +* 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...) +* TODO: why do we provide 2 versions of syscalls (underscore and no underscore?) for newlib (non underscore collide with standard!) +* TODO: flush open streams on exit as discussed in 7.21.3 : n1570, c11: https://port70.net/~nsz/c/c11/n1570.html#7.21.3 +* TODO: signals + +* EXTRA: fallback to pic/pit + +* EXTRA: switch to DMA where possible!? +* EXTRA: Unit Testing +* EXTRA: GUI / Window Manager (update\_rect, etc..) / double buffering / physical, virtual sizE? virtio ? / Cairo library/ xvfb? + /forum.osdev.org/viewtopic.php?t=10018&p=64358 / vsync +* EXTRA: qemu tcg , slower other cpus +* EXTRA: Crazy & Funny terminal effects while typing (idea) +* EXTRA: port to arm and berryboot / minicom? +* EXTRA: port doom/quake/mesa 3d +* EXTRA: ghc cross compiler / ghc port +* EXTRA: piper-os +* EXTRE: matrix desgin. star wars terminal etc.. + + +1.GCC & Binutils +================ + + * ref: GCC Cross Compiler + * ref: OS Specific Toolchain + * ref: Hosted GCC Cross Compiler + +2.Porting Newlib +================ + + * ref: Porting_Newlib + * Add fool-os specifics under ../newlib-foolos/newlib/libc/sys/foolos + * TODO: os specifics diff + * cd newlib-build + * ../newlib-foolos/configure --prefix=/usr --target=i686-foolos + * make all + * make DESTDIR=${SYSROOT} install (e.g. make DESTDIR=/home/miguel/temp/foolos/ install) + +3.Porting Software +=================== + + I get sources via: apt-get source zlib , etc.. + + * ref: Cross Porting Software + + * ncurses: ../ncurses-6.1/configure --host=i686-foolos --without-tests + --with-fallbacks="fool-term" --with-debug --prefix=/usr --with-termlib + + + ../ncurses-6.1/configure --host=i686-foolos --with-fallbacks="fool-term" --prefix=/usr --with-termlib --with-debug + + * ncurses-examples: ../ncurses-examples-20180127/configure --host=i686-foolos --prefix=/usr --with-ncurses + make DESTDIR=/home/miguel/temp/foolos/ install + + * vim: + vim_cv_memcpy_handles_overlap=no vim_cv_bcopy_handles_overlap=no vim_cv_memmove_handles_overlap=no vim_cv_stat_ignores_slash=no vim_cv_getcwd_broken=no vim_cv_tty_group=world vim_cv_tty_mode=0620 vim_cv_tgetent=zero vim_cv_terminfo=no vim_cv_toupper_broken=no ./configure --host=i686-foolos --prefix=/usr --with-tlib=tinfo + + set CFLAGS="-ggdb -O0" to get debug symbols + + * zlib-1.2.8 (via apt-get) + CC=i686-foolos-gcc ./configure --prefix=/usr + + * libpng1.6-1.6.28 (via apt-get) + + inside the dir: + + 1) add -foolos* to config.sub + 2) ./configure --prefix=/usr --host=i686-foolos + 3) make + 4) make DESTDIR=/home/miguel/temp/foolos/ install + + +Content +======= + +Third party software and content used some of which is: +(I have likely forgotten most of credit) + +grub (seriously?) +newlib +ncurses +ncurses-examples +vim + +envypn fonts +solarized colors + +NOTES +===== + +extract lines and comments (Does not work in all cases) + +$ pcregrep -M '(\/\*(.(?!(\*\/))|\n)*.*)|(^ *$)|(^ *\/\/)' |
