0

I would like to create a lightweight Linux distribution for my Raspberry Pi 400 (for educational purposes). I have looked at Buildroot and Gentoo Linux, but both require compiling OS components from scratch.

How should I go about building a ROOTFS? I don't have much experience with bare-metal Linux...

Ideally, I would:

Related: How to easily build your own Linux Distro?

  • 2
    OK, what's the question? Also why? Start thinking about dependencies and maintenance from the get go. These are very non-trivial and critical things. – Artem S. Tashkinov Mar 10 '23 at 16:07
  • But your 4 steps, that's literally what any Linux distro does (not in that order, usually, but it's the exact same steps)… what's the point? Your distro with an init system, and a package manager, will not be slimmer than a debian or an alpine Linux. Also, your RPi 400 doesn't call for anything slimmer – quite the opposite, that's just a desktop or laptop computer in a strange case, and probably serves quite similar use cases, so it'd be quite sensible to have a relatively rich environment on there. – Marcus Müller Mar 10 '23 at 16:10
  • I'd suggest taking a look at DietPi(https://dietpi.com). I've got that running on 2 RasPi B:s now. Unless, of course, the point of the exercise is to learn how to create a Linux distro :-) – Peregrino69 Mar 10 '23 at 16:11
  • @MarcusMüller To my knowledge, Alpine Linux doesn't run on Raspberry Pi. In the past, I tried using an image from their Downloads Page, but I only got a Rainbow Screen – GooseDeveloper Mar 10 '23 at 17:20
  • @ArtemS.Tashkinov I updated the question: I want to see what's inside a distribution like Alpine Linux by installing the Init System and kernel manually – GooseDeveloper Mar 10 '23 at 17:22
  • @GooseDeveloper I'm a bit confused: you can't get a popular distro to run on currently unsupported hardware, but expect to be able to do it all from scratch? – Marcus Müller Mar 10 '23 at 17:56
  • @GooseDeveloper "seeing what's inside" isn't seen by doing that… – Marcus Müller Mar 10 '23 at 17:56
  • 1
    You could start with LFS. – Artem S. Tashkinov Mar 10 '23 at 18:03
  • @MarcusMüller From components; not from scratch – GooseDeveloper Mar 10 '23 at 18:10
  • 1
    So, yeah, that's what a distro installer does. You can just read through the documentation of that one of your choice. But it really boils down to: Partition and format the storage medium, install a basic system from packages into that storage, install a bootloader, reboot. – Marcus Müller Mar 10 '23 at 18:16

0 Answers0