News for hackers. Stuff that matters.
Re:Xv6 – A Simple Unix-Like Teaching Operating System by userbinator on Monday November 17, 2014 @04:50PM (#8620878)
Combine this with one of those tiny self-compiling C compilers that were the subject of a few HN articles recently (e.g. https://news.ycombinator.com/item?id=8576068, https://news.ycombinator.com/item?id=8558822) and this could be one of the more interesting minimal self-hosting OSs someone could understand the entirety of in a relatively short amount of time. I like how it supports multiprocessing too, and the entire kernel is <100 pages in the source code PDF.

However, I wish they'd use something other than GAS for the Asm parts... a minimal self-assembling assembler (and a C-subset compiler written in it, to bootstrap the whole thing) would be nice.

Re:Xv6 – A Simple Unix-Like Teaching Operating System by webkike on Monday November 17, 2014 @05:04PM (#8620963)
None of the tiny self-compiling C compilers could possibly used to compile xv6, as none of them implement structures (arguably the hardest part of compiling C code).
Re:Xv6 – A Simple Unix-Like Teaching Operating System by lamacase on Monday November 17, 2014 @05:18PM (#8621054)
The guy who did the C4 compiler also has a more fully featured one that does support structures:

https://github.com/rswier/swieros/blob/master/root/bin/c.c

It's part of an OS he's building based on xv6

Re:Xv6 – A Simple Unix-Like Teaching Operating System by webkike on Monday November 17, 2014 @09:32PM (#8622085)
Very cool, although this implementation is significantly less trivial than C4. The difference is over a thousand lines!
Re:Xv6 – A Simple Unix-Like Teaching Operating System by arto on Monday November 17, 2014 @05:39PM (#8621166)
LICE is a public-domain C99 compiler in about 10 KLOC:

http://gmqcc.qc.to/cgit/cgit.cgi/LICE.git/tree/README.md

Re:Xv6 – A Simple Unix-Like Teaching Operating System by e12e on Monday November 17, 2014 @09:30PM (#8622080)
There's also TCC which at one point was able to compile (a somewhat patched version of) the Linux kernel. Also c99, but I thibk it might be closer to 20kloc these days?
Re:Xv6 – A Simple Unix-Like Teaching Operating System by agumonkey on Tuesday November 18, 2014 @04:16AM (#8623076)
Also F.Bellard mentioned that even if the kernel can boot userspace, he never investigated if they were bugs but was pretty sure they exist.
Re:Xv6 – A Simple Unix-Like Teaching Operating System by 101914 on Monday November 17, 2014 @11:03PM (#8622311)
Perhaps Bruce Evans' C compiler, linker and assembler?

It worked well enough to compile early Linux kernels.