HNHacker News
TopNewBestAskShowJobs

codyd51

1,056 karma · joined August 20, 2014

Static analysis, file formats, operating systems, oh my!
submissionscomments
codyd51··on Axle OS
Hi, author here!

Thanks for the kind words! I'll echo rajeevk's recommendation: the OSDev wiki is full of useful documentation and guides for setting up a bare-metal toolchain. There's also a community forum with a wealth of knowledge just waiting to be read.

In terms of boots on the ground, I remember once seeing a mantra from someone on the OSDev forums that went something like this: building an x86 OS is first about getting the CPU into a usable state, then about getting as far away from it as possible. This is really true! There's a lot of work to do to set up the features that any modern environment needs as a baseline: paging, segmentation, interrupt descriptors, etc, but once you're done with all that you're free to roam in the design space and build whatever you like, however you imagine, building abstractions and then abstractions on top of those.

I'd liken the early stages of OS development to a tech tree in a video game: you need serial output so that you can debug your kernel. You need to be able to allocate memory so that you can create pixel buffers, then need drawing primitives to fill them up. You need processes, and a scheduler to coordinate them. Every new feature you add opens up a myriad of possibilities that weren't there before, and although many things have a serial list of dependencies, there's always so much to do that you can just focus on whatever feels particularly inspiring to you at any given time. It's really a lot of fun.

axle also uses structured messages for making requests to the kernel, as well as everything else. Here's an example of some structured requests that can be sent to the kernel: https://github.com/codyd51/axle/blob/paging-demo/kernel/kern.... Here's some structured data that an application (in this case, the window manager) uses to interact with other apps: https://github.com/codyd51/axle/blob/paging-demo/rust_progra...

All the best, and feel free to reach out to me as well!

codyd51··on I wrote a GameBoy emulator for my hobby OS (2022)
Hi HN, author here! The GameBoy emulator written up in this post runs on axle, which is a message-passing microkernel-based OS I’ve been working on for a very long time. dang suggested that I put together a Show HN for axle, which I’d love to do once I have a bit more time to get things into a working-out-of-the-box state!

axle is a really fun project for me, and serves as the testing grounds for all kinds of technical experiments. The bore-you-with-features spiel goes something like: x86_64, SMP, UEFI bootloader, TTF rendering, compositing window manager, TCP/IP stack, AHCI driver, custom assembler/linker, and, of course, a GameBoy Emulator!

When working on axle, the level of yak shaving can get pretty extreme. For example, when I got around to writing axle’s first network card driver, I was puzzled when my driver could transmit packets fine, but failed to receive any packets. I dug around for quite a while before considering that it might be a QEMU bug, and tracked it all the way to macOS’s incomplete implementation of poll(), which QEMU was relying on! I ended up writing a patch for QEMU to work around it, and, several layers up, was finally able to progress on the network card driver and network stack. This was back in 2021, but I wrote up the journey recently here: https://axleos.com/adding-vmnet-support-to-qemu/

axle was mostly C-based for a lot of its history, which can get pretty gnarly both in kernel-space and when trying to write higher-level productivity software in userspace. Recently, I’ve been writing a lot more of in Rust, but for the past couple of years that’s been confined to userspace only. When adding SMP support to the kernel, though, I added Rust to the kernel too. It’s really nice.

One other fun thing I’ve been working on semi-recently is a homegrown IDE with an assembler/ELF-linker that runs under axle. I found the linker pretty difficult to get right, because a lot of the ELF data need to know the size and locations of other bits of data in the binary, and it’s tough to shake everything into place in a way that has serial data dependencies! It’s immensely gratifying, though, to write some assembly, generate an ELF at runtime, and execute it. I also added some process-monitoring hooks into the kernel while working on this, so the IDE application can monitor the output of the assembler/linker, and show the output of the generated program, all within the GUI. I uploaded a quick demo video of this IDE here: https://www.youtube.com/watch?v=YG9XyzSBUNg. This whole shebang (IDE + assembler + linker/ELF binary-packer) is written in Rust.

Thanks for reading — I hope you enjoy the post, and let me know if you have any questions!

codyd51··on Ask HN: Who is hiring? (April 2023)
Data Theorem | Python Backend / Automation Engineer | Remote from London, UK area | Full-time | https://www.datatheorem.com/careers/

Data Theorem is a leading application security provider, offering continuous and automated security testing of all our client’s mobile apps and backend services. We’re looking for junior, lead, and senior-level engineers to join our world-class backend services team. In these roles, you’ll be responsible for implementing web services, libraries and tools in Python, in order to automate the security analysis of mobile, cloud and web applications at scale. The model is primarily remote with proximity to London. We’re able to hire engineers that hold UK work authorization. Feel free to email me at pt@datatheorem.io.

codyd51··on Extracting the GameBoy ROM from photographs of the die
Might be of interest to folks in this thread: I wrote about the GameBoy boot ROM here: https://axleos.com/writing-axles-gameboy-emulator/
codyd51··on Ask HN: Who is hiring? (March 2023)
Data Theorem | Python Backend / Automation Engineer | Remote from London, UK area | Full-time | https://www.datatheorem.com/careers/ Data Theorem is a leading application security provider, offering continuous and automated security testing of all our client’s mobile apps and backend services. We’re looking for junior, lead, and senior-level engineers to join our world-class backend services team. In these roles, you’ll be responsible for implementing web services, libraries and tools in Python, in order to automate the security analysis of mobile, cloud and web applications at scale. The model is primarily remote with proximity to London. We’re able to hire engineers that hold UK work authorization. Feel free to email me at pt@datatheorem.io.
codyd51··on Ask HN: Who is hiring? (November 2022)
Data Theorem | Python Backend / Automation Engineer | Remote from London, UK area | Full-time | https://www.datatheorem.com/careers/

Data Theorem is a leading application security provider, offering continuous and automated security testing of all our client’s mobile apps and backend services.

We’re looking for junior, lead, and senior-level engineers to join our world-class backend services team. In these roles, you’ll be responsible for implementing web services, libraries and tools in Python, in order to automate the security analysis of mobile, cloud and web applications at scale.

The model is primarily remote with proximity to London. We’re able to hire engineers that hold UK work authorization. Feel free to email jobs@datatheorem.com with your CV to apply!

codyd51··on What's New in Python 3.11?
There are indeed exceptions when running a program. Exceptions, as a construct, are baked in at the hardware level. When a program page faults, or tries to divide by zero, or runs an invalid opcode, the CPU will jump to an exception handler in much the same way as the higher-level constructs in Python and elsewhere.
codyd51··on Exercise 'doesn't slow' progression of dementia if you already have dementia
What is ‘g’ in this context?
codyd51··on Completely Silent Computer
It sounds like you’re talking about a MacBook Air as a generic MacBook, whereas in fact the MacBook is it’s own distinct line of computer, debuted in 2015. It indeed does not contain fans.
← PreviousPage 3 of 3