How can I learn to create custom distros/os for tiny anbernic handhelds?
Posted by vvedo@reddit | linux | View on Reddit | 19 comments
I just installed Linux on my pc for the first time today with the Linux mint xfce distro and really like the flow so far!
Another hobby of mine is retro emulation on the anbernic devices. The wiki says they built muos ( a very popular custom os) from the ground up with build boot as a lightweight aarch64 Linux system. So as it stands I have no idea what any of that is, is there a video series or some sort of wiki I can use to make sense and start to build my own from scratch?
Dr0zD@reddit
Check ROCKNIX and how they build.
ipsirc@reddit
You have to learn how to use web searching engines first.
kwyxz@reddit
Hey at least OP has not been asking ChatGPT that’s already a good start
vvedo@reddit (OP)
Light work
lwhfa@reddit
I'd suggest familiarize yourself with the components as building pieces of a Unix-like operating system (such as Linux and BSD), it's not necessary to understand deeply how each of them work, but more what they do and why they are designed the way they are. A short list of such components could be: bootloader, kernel, init system, daemons, shells, compilers and runtimes.
aarch64 refers to the hardware architecture the operating system is capable of running on, perhaps the most popular one right now is: x86_64. For now I don't think that's too important for your purpose, since somebody else normally took the time to port a kernel and other programs to make it run on it.
What you're able to use and see tends to be known as graphical interface, and it involves many other concepts as well: framebuffer, video memory, drivers, graphical servers and graphical clients.
It may feel daunting at first, but don't get discouraged, you'll learn a lot, you got this. One day with lots of effort you'll be able to understand what each of those things do and how, so you will be able to build upon them. I'm still in the same journey myself.
Take your time, avoid AI for getting answers of things new to you, and prioritize learning from more reliable sources (books and video sources), some wikipedia links are really valuable.
Contrast as many opinions as you can, do your research, ask in forums when you feel confused by something or if a concept feels hard to understand.
vvedo@reddit (OP)
Hey sorry I’ve been reasearching but I couldn’t find much sources do you have good ones?
vvedo@reddit (OP)
Thanks for the response I’ll look into it!
kopsis@reddit
Devices like that don't typically have a conventional distro. They're a minimal system built from scratch with only the software essential to how it will be used.
The best way to learn how to make something like that is the Linux From Scratch project: https://www.linuxfromscratch.org/
erwan@reddit
They're not necessarily built from scratch. A Debian based can be pretty minimalist and I'm not sure what you would gain from going through the hassle of LFS.
kopsis@reddit
I spent decades working for companies that used Linux in embedded systems and we never once found it advantageous to strip down an entire distro.
For an embedded system, whittling down a desktop distro is a lot more hassle than just building what you need. You're already going to be building a custom kernel. You probably don't want/need systemd or a packaging system and will opt for busybox (or a derivative) over individual GNU utilities. LFS (or a home-grown equivalent) is only a "hassle" when you're trying to build an entire desktop system.
And even on the off chance you would need to give the end-user the flexibility to modify the system at run-time, install packages, etc. you'll likely base it on something like Alpine. A base Debian container image is 200 - 300 MB, Alpine is about 60.
vvedo@reddit (OP)
Thanks for the link and the info I’ll check it out
AutoModerator@reddit
This submission has been removed due to receiving too many reports from users. The mods have been notified and will re-approve if this removal was inappropriate, or leave it removed.
This is most likely because:
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
DustyAsh69@reddit
You've got a LONG way to go. For example, Mint is the distro. XFCE is the Desktop Environment or DE for short. Making your own distro / OS is an extremely hard task and requires C / C++ / Rust and assembly knowledge. You also need some low level information on how CPUs work, how memory works, how disks work and pretty much how the entire computer works before even starting to create anything.
To create your own distro, you need to make Linux from Scratch or clone an already existing distro and start modifying it. There's good documentation in the book and the communities r/LFS and r/OSdev for help.
Creating LFS itself might take months to learn and a custom OS will take decades. And since you're extremely new to Linux, you should first discover and learn about it. Then slowly transition to less user friendly distros. Like from Mint to Fedora then to Arch and Finally Gentoo. Once you have enough knowledge about Linux, you can start working on your own distro. But, instead of making your own, please try and contribute to already existing distros and OSes. Otherwise, it all becomes abandonware. And welcome to the Linux community!
Puzzled-Garbage-250@reddit
Don't those handhelds tend to use OS's based on android? Might be worth looking into AOSP development. Maybe check https://www.opersys.com/
kwyxz@reddit
Not all of them do, no. Most of the cheap ones do use some customized lightweight Linux distributions.
Puzzled-Garbage-250@reddit
Weird, I would think android would be the cheaper option plus they mention using android on their website
kwyxz@reddit
What website are we talking about? The handheld on the picture is a Miyoo Mini Flip and it definitely is not using Android.
Anbernic, the manufacturer OP mentioned, does use Android on their priciest models, but every device under $90 (they have A LOT) all use some version of Linux.
pfp-disciple@reddit
(Note rule 1 of this sub - it's not a support forum. There are other subs better suited for your question)
It might be a steep learning curve, but could be doable. I think your best place to start is with the buildroot project. This is a tool that compiles the kennel, drivers, applications, etc all at once. It can build for specific hardware.
Depending on your experience, buildroot might still be a bit ahead of where you are. You could find some keywords - look for frequently repeated terms - to research and build your knowledge. Their community should be able to help.
[1] https://buildroot.org/ [2] https://en.wikipedia.org/wiki/Buildroot
tuerda@reddit
Probably a graduate degree in computer science?