HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
fwsGonzo
barebones
C2018–2024
fwsGonzo / barebones

barebones

Barebones multiboot kernel for beginners

2Distinct people
8Mentions
0Explicit recommenders
153GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Barebones multiboot kernel for beginners

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year8 dated mentions

Observed mentions: 2018-01-24 09:54:29 UTC to 2024-01-04 20:40:00 UTC.

012342018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 4 mentions; 3 submissions, 1 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC431
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC202
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101

What Hacker News says

8 sources
For undefined-sanitizer, you can implement your own at least. I did it here: https://github.com/fwsGonzo/barebones Undefined-sanitizer also has a minimal-run-time mode designed to be able to run in production: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#... As for ASan and MSan I think that will be quite a bit of work. I have worked in embedded a lot, and my advice here is to split off your project into static libraries, and make it so that you can run parts of it as a regular Linux program. I don't know if that's possible for you. For example, when I was fuzzing a network stack, I would just use TAP devices to fuzz almost all of it, except the actual devices. So I partially compiled the operating system as a regular Linux program.
In Sanitizing static freestanding nolibc programs?
I have made a codebase where all the C and C++ glue is already taken care of, as well as the build system: https://github.com/fwsGonzo/barebones However, nothing else. So it's a starting point for a beginner. I don't know if its the perfect starting point or not, but at least you won't be stuck with all the setup. If you are writing an OS in another language you can probably get some inspiration as well, as for example I did implement basic ubsan support. Some fun facts: There is a C++ exceptions example that shows that with the compiler runtime as well as a libunwind you can catch C++ exceptions, but only if you create the exception fully yourself, as there is no standard library. It does add a bit of bloat, so it's not really intended for OS development. There is an example of how to runtime load a library, and call into it. No runtime
Read the rest
linking, just an exchange of call table. There is very primitive backtrace functionality in the panic function simply by using compiler builtins. No way to convert the addresses to function + offset because there is no symbol table. One cool way to do this is to link the kernel, generate an ELF section that contains only the function symbols, and then append it to the end of your kernel. During initialization you can then use it for backtraces. It's also fairly architecture independent, as you will only have to distinguish between 32- and 64-bit symbols.
In Learn to write your first OS kernel (2018)
I made a barebones beginner repo as well, but with all the glue solved for C and C++ (no exceptions and rtti, although that is certainly possible too): https://github.com/fwsGonzo/barebones While writing a bootloader is fun, there is a lot of old things that you can only solve by having thousands of people use your loader. Hence, we turn to multiboot - which also allows us to boot on google cloud and many other cool places. I read the tutorial and its quite well written. One nit pick is that the stack pointer is just set to a value that a beginner won't understand - namely the end of the 8kb BSS area. Additionally, the BSS area is not zeroed, which has to be done at some point, so there is potential for problems down the road. On i386 and amd64 the stack grows downwards, so we should be setting our stack pointer to the 16-byte aligned (du
Read the rest
e to SSE) end of our stack area.
In Kernels 101 – Let’s write a Kernel (2014)
Hey, IncludeOS is mostly a work in progress, and so the answers will reflect that. 1 and 2: IncludeOS is a service where more stuff is compiled and inlined as a whole, compared to a normal kernel. The whole thing will be baked into one, in many cases inline. This gives the compiler a chance to simplify more things and optimize better, and while the size doesn't have to be smaller, we do have less code overall. Especially after the linker removes unused objects. IncludeOS is not being built with LTO at all presently (although it does have that ability on the Linux userspace platform), nor does it have any major performance work done other than making sure there are no big performance bugs around. I am working on this, but it's not a trivial thing. In a perfect world I would just enable LTO and it would just work, like I already do on the u
Read the rest
serspace Linux platform of IncludeOS. I have written a beginners-kernel project where I show that LTO reduces image size to 2/3 from 32kb to 11kb: https://github.com/fwsGonzo/barebones 2. There is a paper showing this linked to in the repo itself. You can at least build the unikernel on linux userspace, so it shouldn't be too hard to debug it while you are creating it. Other than that, debugging is not easy in production just like you say. 3. Traditional hypervisors manage access to hardware all the time, while a new type of unikernel hypervisor wouldn't. It would just sit there after the configuration/startup phase and never be exited into. The number of VMEXITs something has to do for each packet is a good estimator for how performant something is. If the number is zero, then it must be performant. See bareflank and others. I can't elaborate further because it's an area of research, and I'm not an expert. Afaik there is nothing like this running in production yet, even if we can prove that it's possible to run exitless and with no kernel privileges! Maybe next year we will know more. 4. We absolutely support threads, its just not working right now. We also have an SMP API that is quite good, and the virtual CPUs are scheduled on the host side. We also have fibres. While we do have tests, I don't know the state of things. We have so many other things going trying to make the OS stable in a production environment. I couldn't find a single thing proving my assertion when I made a quick search, so I will just retract until I can find it again. As I'm sure you know unikernels tend to have a single address space, which removes the need to do a full context switch. 5. I don't think our customers will be deploying containers. Rather, I think they will be running hundreds of instances per physical host in their private clouds. Instances will act as Internet gateways, firewalls etc. Some network function. That is the stage we are at now. I really don't see containers being used after the binaries are built, but I could be wrong.
In IncludeOS – A minimal, resource efficient unikernel for cloud services

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.