3 ms·
That all sounds good! It is also possible (though tedious) to build GCC and binutils without autotools. Getting from epsilon to Debian seems a bit like follow
by bloak 7y ago
That all sounds good!
It is also possible (though tedious) to build GCC and binutils without autotools.
Getting from epsilon to Debian seems a bit like following stepping stones across a swamp. It's unclear which route is most likely to work, but whichever way you pick you end up ankle-deep, or waist-deep, in mud.
Also, it's not clear what "epsilon" should be. My feeling is that the ideal minimum prerequisites would be something like a C89 native compiler on an operating system that is much simpler than Unix. So you could read and write files and execute a subcommand, perhaps, but no pipes and no fork. So the first major goal would be to build GCC and binutils as a cross-compiler, and the second major goal would be to cross-compile those things plus the Linux kernel and some kind of shell so that you could then move to Linux.
The whole thing is a big project, but if you can describe a way of getting from stepping stone A to stepping stone B, where B is a bit closer to Debian than A was, then that may help future explorers, and that use of Heirloom Project's lex to build flex sounds like a good example of that.
- giomasce 7y agoCurrently epsilon is a Linux kernel with musl and tcc. Since tcc can be used for scripting, I believe that with a non-trivial amount of work (including patching musl), musl could be built by tcc. Therefore epsilon would become just Linux and a static build of tcc. To further reduce epsilon (or, in somewhat standard terminology, the "binary seed") I am also writing asmc (https://gitlab.com/giomasce/asmc https://gitlab.com/giomasce/asmc), which is a minimal operating system with a minimal compiler, totalling less than 6 KiB binary seed. This compiler is not for C, but for G, which is a C-inspired language that I invented for this purpose (see the project README and links for more details). The target for asmc is to be able to build and boot Linux and a static copy of tcc (the latter is more or less already there; Linux is, of course, the hard part), at which point it can bootstrap nbs. I'm not there yet, though. Also, to be fair, although asmc's seed is 6 KiB, you still need an x86 CPU (I'm not aware of free implementations), a loader and a BIOS to have a functional environment. This is not little thing, but I guess it is a reasonable target so far.