I am trying to understand why tools like YOCTO, BUILDROOT, etc.. exists. What are the reason to create a custom Linux distribution? It's just matter of memory?
-
Runtime memory but also static 'disk' space (where disk will mean flash card, eprom or whatever is used these days). These tools are mostly meant for embedded devices. – Artur Biesiadowski Sep 05 '17 at 11:17
-
More generally, when building your device your design can easily conflict with the decisions made by Ubuntu (or whatever your generic distro may be). Now you are in a position where you need to make changes to the "upstream" version: are you going to use a tool designed for that situation or are you going to continue ramming a square peg into a round hole to avoid learning the new tool? The decision depends on the situation and developer... – Jussi Kukkonen Sep 05 '17 at 11:31
-
Could you kindly provide me an example of design decision that can conflict with Ubuntu? – Franconet Sep 05 '17 at 11:44
-
Don't want any GPLv3 software on the target. Want kernel support for specific machine features (on your uncommon embedded platform that Ubuntu isn't interested in). Want to use musl as libc because it's smaller. Want to drop specific codec support from gstreamer because of potential patent issues. Want to compile openssl with less features to limit the attack surface. Want to use wayland instead of Xorg. All of these are certainly possible to do with Ubuntu, and some are quite easy... but there comes a point where using a distro building tool is easier than modifying an existing distro – Jussi Kukkonen Sep 05 '17 at 12:04
-
First of all, you're probably not building a *"distro"* or *'distribution"*. Simply building a custom kernel and root filesystem does not constitute a distribution. – sawdust Sep 05 '17 at 19:00
1 Answers
I've used tools like Buildroot and Bitbake in the past for building a custom Linux distribution for use on an embedded system. These tools provide an automated way to manage a system that requires a specific kernel version with custom patches, particular tools (with custom patches), a minimal X server with drivers only for the embedded hardware, and so on. The sources have to obtained from their repositories, patched, and built. The build process often requires a specific filesystem layout, and the filesystem layout may vary between the build system and the eventual target. So we need tools for faking the filesystem. Some packages can only be properly built by a user with root permissions, so we have to fake that up. Distribution management tools have facilities (in principle) to automate and simplify all this stuff.
In practice, I gave up with these tools a long time ago, because I found it was easier to create my own than to understand all their technical complexities. But that's a different story.

- 4,092
- 1
- 11
- 15