Live data from Hacker News

Building Raspberry Pi Systems with Yocto

jumpnowtek.com

21–30 of 32 posts

Re: Building Raspberry Pi Systems with Yocto

#21
post #13

The Yocto package format supports a mix of inheriting BitBake package files, Bash and Python. It's over-engineered and unpleasant. Values can easily be defined 3 or 4 layers away from the file you are looking at, either in one of the many configuration files (that can be overridden by other configuration files), or in one of the files the package is inheriting from. Add clunky and unintuitive tools to the mix, and Yo…

i recommend anybody who shares this opinion should take a look at buildroot as an alternative. if you've ever configured and built the linux kernel, you'll feel right at home with buildroot's approach to configuring and building an entire filesystem image.

Re: Building Raspberry Pi Systems with Yocto

#22

Earlier quoted context omitted.

With regards to image update management, personally what I wish to do for my Yocto image is to have it be: - Small enough that it fits into RAM. - Fetched over the network on boot, PXE-style. - Configured to not write any files to the greatest extent possible, and where writing files can not be avoided one would use tmpfs. With the above three criteria satisfied, the following is achieved: a) We never write to an SD…

Be wary of some packages that expect their log folder to exist at /var/log/some_package else they won't start, I can't remember which of nginix or apache has that issue. That adafruit script is very simple and there are more robust setups out there, albeit not as well documented. Netbooting isn't 100% reliable and last time I checked there were certain network switches/hubs that caused issues. Maybe that's a non-issu…

> Netbooting isn't 100% reliable and last time I checked there were certain network switches/hubs that caused issues. Maybe that's a non-issue if you are also providing the network infrastructure.

We will be providing the network infrastructure indeed, but being aware of this will certainly be valuable if we face those sorts of problems, so thanks for that :)

Do you happen to know of any specific switches or hubs that would work reliably in this context?

Re: Building Raspberry Pi Systems with Yocto

#23
post #13

The Yocto package format supports a mix of inheriting BitBake package files, Bash and Python. It's over-engineered and unpleasant. Values can easily be defined 3 or 4 layers away from the file you are looking at, either in one of the many configuration files (that can be overridden by other configuration files), or in one of the files the package is inheriting from. Add clunky and unintuitive tools to the mix, and Yo…

Having just found Yocto yesterday and built my first custom image that I made by extending the layer in the OP, I am not yet "married to" Yocto.

Yocto initially appeared to be exactly what I was looking for. When someone else raised concerns about Yocto ITT I somewhat brushed them off, mainly because they were talking about managing the layers on a headless system. I used Yocto from the command-line on my workstation, so a) I am not on a headless system and b) even if I was doing this on a headless server, everything I have done so far would be done exactly the same way.

But, since then, multiple other people have raised concerns about Yocto. I also talked to one of the mods on /r/raspberry_pi and they said something similar. I looked through some past discussions about Yocto on /r/raspberry_pi using the search feature on Reddit, and found a couple of other similar experiences.

After looking through what has been said, I find that these concerns resonate with me rather deeply. They are all pointing to a single sentiment that seems to be rooted in similar real-world experiences; Yocto makes things complicated in a way that with time will make managing things needlessly complex and which will result in a lot of wasted time.

I was still a bit inclined to think though that perhaps these experiences were had long enough ago that Yocto has since improved, but after a little bit of further thought I realized that fundamentally Yocto is engineered in the fashion that you and others are pointing to as being a fundamental flaw of the system.

I am going to try Buildroot instead. Same guy that wrote the post I shared in the OP also made a post about using Buildroot. https://jumpnowtek.com/rpi/Raspberry-Pi-Systems-with-Buildro...

Re: Building Raspberry Pi Systems with Yocto

#24

Earlier quoted context omitted.

With regards to image update management, personally what I wish to do for my Yocto image is to have it be: - Small enough that it fits into RAM. - Fetched over the network on boot, PXE-style. - Configured to not write any files to the greatest extent possible, and where writing files can not be avoided one would use tmpfs. With the above three criteria satisfied, the following is achieved: a) We never write to an SD…

Running an OS + application entirely from memory is an interesting approach indeed. I guess the fundamental big problem you are facing is SD card corruption. In our experience, we've found the SanDisk Extreme Pro cards to be most reliable. (coupled with a good power supply). Read-only rootfs is almost a must have for any production environment. resinOS does not satisfy all your requirements (nfs boot, state in memory…

> Applications run inside a container so you can basically run rasbian on top of resinOS.

How well does that work? Do you get full access to the underlying hardware? Can you still access the GPIOs, HDMI-CEC etc? Are there any other downsides to doing this?

Re: Building Raspberry Pi Systems with Yocto

#25

Although Yocto gets more publicity, I always prefer BuildRoot myself. Yocto's 'layer' abstraction seems overly complicated and difficult to use (especially in a headless situation where you can't use a nice GUI tool to manage them). BuildRoot is much more like the Kernel Configuration... Just choose your options from a hierarchical menu. Much easier IMO. ( https://buildroot.org/ ) Also, building a minimal system is m…

I found creating a layer of my own that extended the one in the OP with a couple of things extra was “easy” (in terms of what I would expect from the HN crowd. For a beginner it would not be easy), but I will agree that removing things will probably be more complicated. Here are a couple of photos of my Raspberry Pi 3 with said Yocto image running some graphical applications without X11 (nor Wayland): gstreamer video…

In the time since I wrote the above comment I've decided to give Buildroot a shot. See https://news.ycombinator.com/item?id=18093599

Re: Building Raspberry Pi Systems with Yocto

#26

Earlier quoted context omitted.

Be wary of some packages that expect their log folder to exist at /var/log/some_package else they won't start, I can't remember which of nginix or apache has that issue. That adafruit script is very simple and there are more robust setups out there, albeit not as well documented. Netbooting isn't 100% reliable and last time I checked there were certain network switches/hubs that caused issues. Maybe that's a non-issu…

> Netbooting isn't 100% reliable and last time I checked there were certain network switches/hubs that caused issues. Maybe that's a non-issue if you are also providing the network infrastructure. We will be providing the network infrastructure indeed, but being aware of this will certainly be valuable if we face those sorts of problems, so thanks for that :) Do you happen to know of any specific switches or hubs tha…

I'm sorry I don't remember what I have but [1] suggests a Netgear GS108. That link also explains a couple of the issues and they may have even been fixed in more recent bootcode versions. The 3B+ has a later version (and also has netboot enabled by default so you don't need to mess with program_usb_boot_mode).

[1] https://www.raspberrypi.org/blog/pi-3-booting-part-ii-ethern...

Re: Building Raspberry Pi Systems with Yocto

#27

I looked into switching to yocto a while back for a rpi project I work on. However, one thing that put me off is the end user's inability to install regular debian (raspbian) packages as they will inevitably expect to. But I think that people have used yocto as a kind of docker hypervisor, the openhab project used to do something like that before moving to HassOS. Does anyone know if you can include a minimal raspbia…

https://github.com/cmhe/meta-readonly-rootfs-overlay

Users can apt-get all they want and it'll even be available next boot provided they shut down properly.

Re: Building Raspberry Pi Systems with Yocto

#28

I looked into switching to yocto a while back for a rpi project I work on. However, one thing that put me off is the end user's inability to install regular debian (raspbian) packages as they will inevitably expect to. But I think that people have used yocto as a kind of docker hypervisor, the openhab project used to do something like that before moving to HassOS. Does anyone know if you can include a minimal raspbia…

https://github.com/cmhe/meta-readonly-rootfs-overlay Users can apt-get all they want and it'll even be available next boot provided they shut down properly.

I'm not sure this layer has much to do with providing apt-get support but maybe I misunderstand.

Re: Building Raspberry Pi Systems with Yocto

#29

Earlier quoted context omitted.

"We have small and fine-tuned ghetto, but customers don't want that. What to do?" I have similar problem: we have consumer device on top of imx6. I used iMX6 SoloLite evaluation board kit (1GB of memory) with Fedora for arm as development prototype. For me, installing a package is not a problem at all: "dnf install package". I planed to use Raspbian or Fedberry on actual device, but our management blindly switched to…

ouch. That sucks. You could run Fedora in a container on your Yocto base using resinOS. I wrote more about this in another comment. https://news.ycombinator.com/item?id=18093336

I already have OS. In my case, I just use chroot script to access full Fedora distro with all development tools on Yocto. If I will be able to replace Yocto, I will replace it with major distro, like Debian, Ubuntu, CentOS, or Fedora, not by yet another toy distro with thousands of packages per maintainer.

Re: Building Raspberry Pi Systems with Yocto

#30

Earlier quoted context omitted.

I found creating a layer of my own that extended the one in the OP with a couple of things extra was “easy” (in terms of what I would expect from the HN crowd. For a beginner it would not be easy), but I will agree that removing things will probably be more complicated. Here are a couple of photos of my Raspberry Pi 3 with said Yocto image running some graphical applications without X11 (nor Wayland): gstreamer video…

In the time since I wrote the above comment I've decided to give Buildroot a shot. See https://news.ycombinator.com/item?id=18093599

Glad you tried it with an open mind....

For background, I'm a softie with over twenty years experience with embedded, desktop and server systems from microcontrollers to multi-core DSPs so I've a fair amount of experience in this area.

The last time I tried Yocto was while building a mesh router for an IoT product. When building real products, removing all cruft and only having a minimal system is very important from many viewpoints and this is crucially very difficult in Yocto. I gave up and went the BuildRoot route.

I just find that Yocto has overcomplicated something that is essentially very simple. BuildRoot on the other hand works exactly how I expect and therefore I'm much more productive using it.

Post reply on HN