Trying to build a GUI Linux distro with Buildroot. Just Buildroot. No Debian, no Arch. Just pain 🫩

Xorg? Black screen. Wayland? Sounds like a fantasy novel. Kernel panic? Oh yeah, got that too 🫨

But I will make this work, because minimalism deserves a desktop 🤟🏻

#Linux #Buildroot #KernelPanic #WaylandOrWhatever #DIYDistro #WhyAmIDoingThis

@nickbearded

The only reliable way I've found to boot linux is with the root filesystem as an initrd, and a custom init to handle loading modules and then switching to the main system. With a cmdline containing 'rootfstype=ramfs rdinit=/custom_init' the downside being you always have to include an initrd with the kernel.

@2rad0 Thinking about your suggestion again, I might have been going in the wrong direction 🤔🤷🏻‍♂️
Turns out my main issue is hardware: modern laptop, Intel + NVIDIA (Optimus), which makes things messy on Buildroot.
I’m starting to see the bigger picture now: it’s not just booting, it’s building for a specific machine.
I’ll probably try on simpler hardware (or maybe a Raspberry Pi) and go from there 🤞🏻

@nickbearded

I've heard those laptops with nvidia dual GPU are notoriously difficult to configure correctly, if at all. It's a good idea you've come up with to start on a well known piece of hardware like the rpi. I started my own distro on an odroid C1 and learned the basics on that. Just creating the .config file is hard enough, then you have to worry about how to debug it with a black screen or instantly crashes on bootup. This is why I moved to doing pretty much everything in initrd, to minimize failure points and get actionable debug information.

If you're just trying to build a system for dedicated hardware you probably don't *need* modules. For the longest time I was just building everything into the kernel with modules disabled but this approach had problems when I installed the x86 build onto a macbook. Then moved to a dumb shell script to parse /sys and load modules with 'insmod' (but it had to be run multiple times if there were other module dependencies!). Eventually realized my problem with modprobe was because I didn't run 'depmod' afer building the kernel which modprobe uses to load modules in the correct order.

Now the big issue I've been having recently is certain GPU's requiring firmware to work correctly. Anyway, sorry for the long winded anecdote here, if you run into any issues feel free to send me a message I may have spent days or even weeks on the same problems.

@2rad0 That’s actually super helpful, thanks for sharing all that. I’ll go step by step on simpler hardware and learn it properly. Really appreciate your insights!