Re:Yocto: Tools for building a custom embedded Linux distrib...
by clarry on Sunday December 01, 2019 @01:56PM
(#21677141)
Yep. What I'm doing with buildroot is maybe a couple dozen packages. Fresh build, with toolchain and all, takes around 20 minutes, and I end up with a 10MB image that contains the kernel & userland, plus another image with bootloader. It didn't take long to get there, the learning curve was very shallow.
I wanted to give yocto a chance but after a week of getting nowhere I want to be with it, I turned back to buildroot.
Re:Yocto: Tools for building a custom embedded Linux distrib...
by btashton on Monday December 02, 2019 @01:05AM
(#21680189)
I'm not going to convince you, but some of what is being built there are native packages likely for things like QEMU. You need to look at the actual manifest in the deploy folder to see what got installed. You will find that it is quite small, not even including exta kernel modules, maybe 10MB or so.
I have shipped products with both buildroot and Yocto and I have to say I have fully moved over to Yocto now. Adding things like OTA are trivial, and I can inject extra tasks for enforcing rules or extracting license meta-data. But being able to create real packages is huge when you have a larger system and just want to test the new version of an application. With buildroot I have to manually copy the files around. Same thing if I want to add gdbserver, you cannot create a package repo to pull from you have to rebuild the whole image.
> The minimal recipe provides an image with the least number of packages to be a bootable image
Here is what it is building, incomplete list, for install to the target rootfs:
- libx11, libxau, libxcb, libxcrypt, libxdmcp, libxrandr, libxrender, glib-2.0, "gnome-desktop-testing", gperf, openssl, perl, pixman, libsdl2, python3, sqlite3, various xorg-..
This isn't even the freaking desktop image! Also, no, sorry, no more Hob, that is now deprecated in favor of a django webinterface (Toaster).
If you are building a software image for an embedded device and you don't know every package that is going into it and why it is there, you need to stop. Look to the Android AOSP for what it takes - an in-depth understanding of the toolchain, strict choices for compilers and libc (none of this clang-experimental and your choice of uclibc, musl, glibc), stringent standards across the entire body of code you are compiling - no "uh this doesn't compile with PIE and hardening, just hack the CFLAGS". And there are ton more lessons there.