Tilck – A Tiny Linux-Compatible Kernel
github.com
github.com
Jokes aside, this looks great as an educational project, because you can run real Linux software on this kernel, from Vim to Doom.
Things will become really interesting once this gets ported to ARM. There is a serious amount of MCUs with 4 MB of RAM where Tilck should run fine, but even Yocto or OpenWRT won't fit.
I mean, in all seriousness, NetBSD and FreeBSD both have binary compatibility layers to run Linux programs
But maybe it's just there because it's fun...and that's absolutely ok.
Thanks Sherlock.
It says right there on the homepage in the link:
« What is Tilck?
Tilck is an educational monolithic x86 kernel »
That answers both your points.
As if you know what fun is ;)
:-(
Be happy and have a great day.
You:
[1] apparently didn't read the link and asked foolish questions about it.
[2] I answered your questions.
[3] You attacked me and questioned its usefulness.
[4] I answered that too.
[5] You attacked me again and mocked me.
[6] And now, it's not really clear to me, but you are blaming me for being unhappy that you attacked me?
I don't know if it is possible to block people on HN, but for you, I will try to find out, because you personally have both wasted my time and made my weekend noticeably less pleasant, and now you are mocking me.
Much RAM is not needed if most of your code resides on the flash and runs directly from there.
[1]: https://github.com/espressif/esp-idf/tree/master/examples/pr...
Porting to ARM is not a priority, and ARM could fund it if they cared.
> Jokes aside
If you just were. That project uses indeed a BSD license. Isn't that making it unnecessarily hard on oneself as one then cannot 'borrow' Linux kernel code, including drivers?
There's also Kerla: https://github.com/nuta/kerla
Tilck – Tiny Linux-Compatible Kernel - https://news.ycombinator.com/item?id=28040210 - Aug 2021 (7 comments)
What is really annoying with linux (and *BSD), it is their dependence on gcc/clang. It is not C, it is a dialect of C using too many bazillions gcc extensions. It means in the long run, we are hit straight in the face with planned obsolescence from C syntax, as ISO tantrums(c11/c17/c7489374893749387) or some ultra-recent gcc extensions ("sorry, you need THIS extension only available in gcc from 2 weeks ago").
I have been coding assembly lately, and being independent of those compilers gives me an exhilarating feeling of freedom.
Who said 64Bits RISC-V assembly written (with a conservative usage of a preprocessor) linux compatible enough kernel which runs the steam client, dota2/csgo and those horrible "modern" javascripted web browsers (I personnaly use only noscript/basic (x)html browsers)? Would even be fine for a self-hosted mini server (email, personal web/git(mirrors) site, p2p, all ipv6 to avoid that disgusting ipv4 NAT, etc).
To stay real, I would go incrementaly: I would start slowly by moving back some linux code to real C (namely _NOT_ compiling only with gcc/clang, and this will be hard), port some code paths to assembly, probably x86_64 at first then 64bits RISC-V would follow (and why not ARM64).
I am more than fine with linux GPLv2, actually, I would provide the "new" code under affero GPLv3 with a similar linux "normal" program exception (but more accurately defined, to target drivers in userspace and stay explicitely ok with closed source userspace programs using those drivers) _and_ as linux GPLv2(and more based on their author wishes) to be legal with re-used linux code.
>>OpenMandriva Lx is a unique and independent linux distribution, a direct descendant of Mandriva Linux and the first Linux distribution utilise the LLVM compiler
I feel like I read a post saying all patches for clang have been merged but my Google-fu seems to be lacking.
All that is a very strong case for RISC-V.
Since RISC-V should be an international standard for assembly level interoperability, that removes in a reasonable way this "compiler/language" issue ... until no technically very expensive code generators/code preprocessors are used since those would not be that less worse than an optimizing compiler.
Write RISC-V assembly once, run anywhere.
The cherry on top, RISC-V ISAs do not have toxic IP tied to them, like x86_64 or ARM, and that at a worldwide level.
I would be ready to pay the price of losing some speed on C code paths until I can compile them with "toy"/small/alternative compilers which are not gcc/clang, BUT I cannot even do that since linux code is hard dependent on gcc extensions.
OT: I always felt the synchronous system call model is very dated. All high performance systems I know of (say, GPUs, NVMe, NFSv4, etc) all use a similar async command list model. Each exchange package up as much as possible and more work is done per context switch. Instead in Linux we just get an ever growing list of compound system calls (like pwritev, pwrite64, renameat). There's some hope with io_uring and ebpf, but it really should just be general mechanism. There's no need for a context switch outside of exceptions (like page fault) or blocking on completions for commands.
One could probably implement a Linux-compatible kernel that only implements io_uring (and only whatever sync calls are required to set it up). May not run many precompiled executables at the moment but maybe an interesting research direction.
https://kernel-recipes.org/en/2022/talks/developing-tilck-a-...
I wrote a few words live during this talk: https://kernel-recipes.org/en/2022/live-blog-day-2-morning/#...
There are many many small hobby OSes in all kinds of languages: https://wiki.osdev.org/Projects
There is Oberon:
http://ignorethecode.net/blog/2009/04/22/oberon/
That's a whole family of OSes, from tiny text-mode up to SMP, TCP/IP-capable GUI OSes, in the language that followed Modula-2 (which in turn was the successor to Pascal.)
There was TUNIS, a UNIX implemented in a Pascal derivative:
https://en.wikipedia.org/wiki/TUNIS
Here's a whole article on them I wrote last year:
https://www.theregister.com/2022/03/29/non_c_operating_syste...
Linus Torvalds had said a similar thing about Linux: "just a hobby, won't be big and professional like gnu"
Install any python starting from 3.9
Write a function to sum the first 50_000_000 integers, run it on both.
I'm using FreeBSD for 20+ years on real hardware and never seen huge performance differences for all common software, which is not using CUDA or alike.
FreeBSD is consistently slower. Between 20-50% across the board. I must admit I'm amazed that Python spends enough time calling into the OS to make a difference this big. Perhaps it's a problem with libc? Maybe there's something going on with memory barriers? My "fist unix" was FreeBSD so I'm amazed and just a bit gutted.