Live data from Hacker News

Yocto, RockPi and SBOMs: Building modern embedded Linux images

vpetersson.com

61–70 of 125 posts

Re: Yocto, RockPi and SBOMs: Building modern embedded Linux images

#61

Last time I tried Yocto, some people here on HN suggested that I try Buildroot instead. I don’t see so many mentions of Buildroot in this thread yet. If you are interested in Yocto it might be worth having a look at Buildroot as well. I liked it a lot when I tried it. My thread from years ago, where people told me about Buildroot: https://news.ycombinator.com/item?id=18083506 The website of Buildroot: https://buildro…

There’s also SkiffOS ( https://github.com/skiffos/SkiffOS ). It’s a project that uses buildroot to create a small Linux for a specific device that’s only used to start a container. I’ve wanted to try it sometime after getting headaches with both Buildroot and Yocto. Particular adding more libraries tends to break things.

That doesn't sound very performant.

Re: Yocto, RockPi and SBOMs: Building modern embedded Linux images

#63
post #62

What I would really like is something like Docker to build images for my raspberry pis. Just a single file, shell commands, that's it. I feel that Yocto is already too complicated if you want a reproducable setup for you raspberry pi at home.

Maybe https://github.com/RPi-Distro/pi-gen works for you.

Re: Yocto, RockPi and SBOMs: Building modern embedded Linux images

#64

Q: How do you guys centrally update field devices? I am working on professionalizing our IOT setup that currently consists of a few dozen raspberries which run docker containers. They are individually updated by sshing into them and running apt update manually. Docker containers are deployed with a commercial solution. I want to have a centralized way to update the OSes, but it does not really make sense for our smal…

Not what you're looking for, but https://sbabic.github.io/swupdate/swupdate.html

It's meant (I think?) for immutable style distros like Yocto. You basically create a cpio archive and a manifest of what file goes in which partition (plus bells and whistles like cryptography). It's a good idea to have double buffering, so that if boot fails to come to a reasonable state, the device will revert after a few tries.

IMO the mutable distro model is way too fragile for long term automated updated. Errors and irregularities accumulate with each change. Besides, the whole "update while the system is running" is actually not well defined behaviour even for Linux, it just happens to work most of the time.

Re: Yocto, RockPi and SBOMs: Building modern embedded Linux images

#66

Q: How do you guys centrally update field devices? I am working on professionalizing our IOT setup that currently consists of a few dozen raspberries which run docker containers. They are individually updated by sshing into them and running apt update manually. Docker containers are deployed with a commercial solution. I want to have a centralized way to update the OSes, but it does not really make sense for our smal…

I would look at Balena if you are already using Raspberry Pi’s and docker. Alternatively maybe look into ROAC but don’t know if it supports docker. The SD cards will be your biggest failure point, so select them wisely.

I’ve deployed Ubuntu Core at scale. It’s great but does have its learning curve. Theirs is also somewhat of a lock in, even if you can run everting yourself. However, their security is really good.

Re: Yocto, RockPi and SBOMs: Building modern embedded Linux images

#67
post #26
post #5

Earlier quoted context omitted.

Yeah that’s true. But if these are embedded devices, you probably want an A/B partition scheme with full transactional updates and rollback.

I once built a Yocto system that had both... We'd use our package index for quick hotfixes, and push a full OS image to the A/B partition for larger, riskier changes. It was nice to have options.

That’s neat!

Re: Yocto, RockPi and SBOMs: Building modern embedded Linux images

#68

I am actually scared of switching jobs in case my next job doesn't involve yocto. How would I make use of the countless hours I have already invested in this piece of software? Countless keywords and the dark magic of the ever changing syntax. But when it works it works..

Your ability to learn and apply such dark magic is the more general skill. If you can wrangle To to, you can wrangle Buildroot. Or Android SDK or whatever else.

Re: Yocto, RockPi and SBOMs: Building modern embedded Linux images

#69

Ah BitBake and OpenEmbedded. That’s what Palm used for WebOS. It was simultaneously amazing and a nightmare. In 2024 you should not be using it. There are better alternatives.

> There are better alternatives. Such as?

Nix, Bazel, Buck come immediately to mind

Re: Yocto, RockPi and SBOMs: Building modern embedded Linux images

#70
> One limitation of the current disk image for Rock Pi is that you don’t have a functional TTY.

I believe on systemd-based systems these are service-units you need to enable, and with yocto, possibly install?

    systemctl enable -now getty@tty0 (etc) 
Or something like that. I’ve experienced similar issues while working on a x86 based NAS and also on the RPi when enabling serial-consoles.
Post reply on HN