News for hackers. Stuff that matters.
Re:Yocto: Tools for building a custom embedded Linux distrib... by stefan_ on Sunday December 01, 2019 @10:23AM (#21675856)
At one point I was trying to build a completely minimal system for an already embedded architecture and instead of building a toolchain, target kernel and essentially empty userland I got 4000 build tasks, it was downloading the entire compendium of all imaginable open source software packages out there and projected a finish time of some 3 hours.

At least buildroot isn't that stupid, although of course it is still stuck in "recursive Makefile" hell.

Re:Yocto: Tools for building a custom embedded Linux distrib... by btashton on Sunday December 01, 2019 @12:20PM (#21676516)
For what's it's worth if you use the public shared state cache you can do a full build of core-image-minimal in 5min. Also I'm not sure how Yocto is being stupid by generating 4000 tasks, if you target something with a GUI like core-image-sato you are easily going to get there because there really is that much software involved. Also remember task does not match 1:1 to recipe, you are looking at 5-6 tasks per recipe usually. Hob can help you explore the dependency graph if you really are not sure why the build got so complex.
Re:Yocto: Tools for building a custom embedded Linux distrib... by stefan_ on Sunday December 01, 2019 @12:55PM (#21676746)
Hey, just for kicks, I did it once more! Here is what they say about core-image-minimal:

> 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.

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.

Re:Yocto: Tools for building a custom embedded Linux distrib... by Data_Junkie on Monday December 02, 2019 @01:08PM (#21684985)
Well you know the computer only does what you tell it to do.