I’ve been playing around with GRUB lately and decided to see how far I could push it. Ended up writing a custom GRUB module that runs Pong directly in the bootloader
While digging into this, I realized there’s not much out there about writing GRUB modules, most of what I found focused on theming or config customization. So I went down the rabbit hole and figured out how to:
• Build and link custom .mod files into GRUB
• Use GRUB’s graphics terminal (gfxterm) for simple 2D rendering
• Handle keyboard input directly from the GRUB environment
• Package everything into a working EFI image via grub-mkimage
It’s been a fun side project and a great excuse to explore the internals of GRUB and UEFI booting.
If anyone’s ever experimented with extending GRUB or doing weird things at the bootloader stage, I’d love to hear your thoughts or see what others have done.