dusk os fork
git clone git://git.alexwennerberg.com/duskos
Log | Files | Refs | README | LICENSE

commit 41c116f3651872b38b633cdd02a67e3913504c53
parent 5b9bc7a9e28d56e6ee12522f95f8bcd81fb6e727
Author: Virgil Dupras <hsoft@hardcoded.net>
Date:   Tue, 21 Feb 2023 22:21:07 -0500

README: mention live-bootstrap and M2-Planet

MREADME.md | 48+++++++++++++++++++++++++++---------------------
1 file changed, 27 insertions(+), 21 deletions(-)

diff --git a/README.md b/README.md @@ -83,27 +83,29 @@ that POSIX system in addition to the C compiler. So even if you pick a small C compiler such as tcc, you still need a POSIX system to build it, which is usually in the millions of LOCs. -One of your best pick, should you try this path, would be [Fiwix][fiwix], a -minimal POSIX i386 kernel weighting less than 50K lines of C+asm. If you run -tcc on top of it, that brings your total LOC to 80K. Not bad. But as is, the -kernel is not usable, you need userspace. To be minimalist, your best bet would -be busybox at 190K LOC (bash+coreutils are 400K). To build Fiwix itself, you'll -also need GNU Make at 25K LOC. So, not millions, but still a lot more than -Dusk. - -In your search for competitors to DuskCC, you can go back in time and look for -simpler systems that have a C compiler. There's plenty of them, some of them -open source. For example, there is FreeDOS, an open source implementation -compatible with MS-DOS. It can certainly run a C compiler, but its kernel is -26K lines of C and assembler and building it requires Open Watcom, which clocks -at more than 2M lines of code (since it's an IDE, it's probably only a subset -of it that is actually needed for compilation, but I haven't looked closely -enough to have a precise figure), and NASM which is 15K lines of C code for its -"juicy" part (the assembler). - -You can try to dive further down the history lane for even simpler systems such -as CP/M and BDS C. But even then, you're still looking at 25K lines of -assembler for BDS C and it's going to lack backends for modern CPUs. +To be fair, Dusk OS is not the first project thinking of optimizing that path. +[Efforts at making our modern software world bootstrappable][livebootstrap] +lead to an "almost C", [M2-Planet][m2planet] with a feature set comparable to +DuskCC with very few lines of code. M2-Planet itself is about 5K lines of code +and the various stages that lead to it are generally a few hundred lines each. +The project initially ran on top of regular kernels (as in "fat kernels with +lots of code"), but some bare metal stages ([1][builder-hex0], +[2][stage0-uefi]) were created and now this little chain end up being +comparable to Dusk in terms of lines of code. Still more than Dusk, but in the +same ballpark. + +Although this path is short and technically leads you to an "almost C" +compiler, you can hardly use it because it has no "real kernel" (those bare +metal stages mentioned above are enough to compile M2-Planet, but really not +much else, they're extremely limited) and no shell. You'll need those if you +want to use your shiny compiler. + +One of your best picks, should you try this path, would be [Fiwix][fiwix], a +minimal POSIX i386 kernel weighting less than 50K lines of C+asm. But then, +M2-Planet is not enough. You need to compile tcc (which M2-Planet can compile +after having applied a few patches) which weights 80K. Userspace is worse. +Bash+coreutils are 400K, even busybox is 190K. We still end up with a pretty +minimal and simple system, but it's still a lot more code than Dusk. So, unless someone tells me about some option I don't know about, DuskCC is quite innovative on the aspect of self-hosting path length. @@ -267,6 +269,10 @@ Press Escape to return to prompt. You can try the same thing with: [shproj]: https://sr.ht/~vdupras/duskos [mailinglist]: https://sr.ht/~vdupras/duskos/lists [duskcc]: fs/doc/cc/index.txt +[livebootstrap]: https://github.com/fosslinux/live-bootstrap +[m2planet]: https://git.sr.ht/~oriansj/M2-Planet +[builder-hex0]: https://github.com/ironmeld/builder-hex0 +[stage0-uefi]: https://git.stikonas.eu/andrius/stage0-uefi [fiwix]: https://www.fiwix.org [uxn]: https://wiki.xxiivv.com/site/uxn.html [varvara]: https://wiki.xxiivv.com/site/varvara.html