Hacker News new | past | comments | ask | show | jobs | submit login

All APE executables are also unikernels that boot from BIOS. Here's a demo video of the APE executable for SectorLISP (ANSI C version) running in the Blink emulator (which I wrote originally just to test this): https://storage.googleapis.com/justine/sectorlisp2/sectorlis... When you compile an APE program with cosmocc, the first 512 bytes are a master boot record where we embed a BIOS bootloader in the PE DOS stub section of the executable. APE is then able to tell when the BIOS is what loaded it, switch to 32-bit mode, set up the page tables, enter 64-bit long mode, and then call _start() and main().

I personally haven't been focusing on bare metal support myself the past several months, but we've got a talented member of the team (tkchia) who actively works on maintaining metal and expanding its capabilities. See also the list of supported system calls for bare metal here: https://justine.lol/cosmopolitan/functions.html As you can see, we still have a lot of work to do. But it's really cool to have, and I have high hopes for it someday as a cloud native deployment format. Hypervisors are in many ways the new OSes, so why do we need a traditional OS in-between?




There is so much to unpack in this comment alone, I am absolutely floored. I can't wait to play with this and tell anyone who will listen to play along too.


I wonder if those people using emacs as an OS by discount booting into it can now finally get their wish of directly booting into emacs lol.


What is the most complicates program in cosmos distro that can boot on bare metal?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: