More recently, qemu supports uftrace on the more popular architectures. That’s how you answer the pro’s question, “but how do I debug this?”
I have a similar little project https://github.com/LevitatingBusinessMan/azathos
I have my own toy init, shell and other utilities. The GNU coreutils are included for debugging.
My current focus is on drawing windows onto the framebuffer.
This is pretty neat. I remember making floppy-based "distributions" back in '98 to do utility tasks (imaging Windows PCs over UDP broadcast being one I spent a long time on). So many memories of "make bzimage", hanging init scripts, reboots. So many reboots.
Charmingly, the "modern" process doesn't seem wholly dissimilar. I would echo the comments of one of the sibling comments here: Targeting this to RPi would be fun and educational. Maybe I'll give it a try.
This entire, beautiful blog post scales wrong on my phone because of this one line of code near the bottom doesn't get wrapped or get its own overflow box: -device virtio-net-device,netdev=usernet -netdev user,id=usernet,hostfwd=tcp::10000-:22
I wonder what the level of difficulty getting this to run as a cloud image (e.g. on Vultr or Digitalocean) would be. Or getting it to boot a GUI and run firefox.
A version of this that targeted RPi would be neat!
I wonder why this instead of using Gentoo to explore Linux.
Thanks a lot for this awesome informative post, I genuinely learned a ton from it!
great for learning, to get one done fast, buildroot is a good candidate
Obligatory reference
micro-distro?? just need one that installs easily on any 10year old hardware and can replace Windows for the most part.
this is kinda cool. Does that mean you can use u-root to embed as a UEFI image? or to boot a u-root image over PXE netboot?
Ilove
I've been working on a micro Linux distro for a couple of months now. User mode is just a single static binary (and a few files to support confidential microVM containers). The initramfs is such an interesting feature, the kernel knows how to unpack cpio archives and just magically drops you into a tmpfs and executes /init. You can have multiple concatenated cpio archives, and each can be compressed, and they all just overlay in sequence. There's an elegance to the design. I also had to write some code to unpack them and learned more than I wanted to.