Hacker News new | ask | show | jobs
by ubercow 3125 days ago
For me, the biggest thing with these small linux boards is the toolchain and major distro support. I prefer making my own custom images for "production" projects.

With Raspberry Pis, you can debootstrap with raspbian, but mainline debian still requires some work [1][2] to make it function 100%.

1: https://github.com/drtyhlpr/rpi23-gen-image 2: https://wiki.debian.org/RaspberryPi

Does anyone have any information about building custom images for the Beaglebone line of boards? Is it easier or better supported? Are there any boards out there HNers prefer for their toolchain?

5 comments

My preferred route is the Nerves project (http://nerves-project.org). It has had support for BeagleBone’s for a long while (https://github.com/nerves-project/nerves_system_bbb).

I haven’t had a chance to try Nerves with the new BeagleBone Pocket yet. There may be an issue with using the EEPROM and the nerves flash utility fwup, though if so I’ll likely work on adding support for it myself as the Octeva SoC is pretty awesome for a lot of applications. Especially since it has support for the onboard PRU’s which come in handy for critical timing.

As for the buildchain, Nerves has a Docker based build image (on OS X) or native Linux builds both based on buildroot which you can easily customize to include the PRU build tool chain. You can include a custome make package in buildroot or Elixir dependencies. Though this route would require writing some amount of Elixir.

So if Nerves is not your cup of tea, you could checkout Yocto or even raw Buildroot or the new Ubuntu core stuff. For buildroot it’s a matter of configuring it and putting it all in a Docker image (or similar) and using `make` and it builds the firmware blobs for you.

Your first link is to an elixir project by the same name
Yes, Nerves is an Elixir project. Essentially it’s a wrapper around Buildroot + Elixir based runtime stack + Firmware management. Extremely convenient and could be helpful for the OP as there’s good support for Beaglebone’s, but you do need to know/write some Elixir to use it.

Though it’s entirely possible to have Elixir run say python or any other scripting language via ports. Perhaps one day someone will make a general purpose runtime image from it.

I followed Olimex's instructions [1] for their AM352-SOM, which is very similar to the BBB. From those instructions it's not difficult to build a working kernel, u-boot and debian-based rootfs.

In fact, I highly recommend this route (debootstrap) if you're not interested in compiling everything (the way buildroot and OE do it) and instead rely on Debian's prebuilt ARM packages. You still get to customize exactly what is in your image; adding or removing pre-installed packages is not difficult. Plus you get apt/dpkg, for updates which IMO is superior to ipkg.

I've used both kernel v4.4 with Debian Jessie and 4.9 with stretch, both work well.

I've got a bash script which acts as a pseudo-makefile that does the whole shebang: builds kernel & u-boot with my kconfig/ DTS, calls debootstrap including my preferred list of packages, applies my rootfs customizations and spits out an image ready to burn directly to an SD card. The whole thing runs in a docker container (could also use Vagrant) from my Mac workstation. Tweaking the package list, distro or kernel version is mostly a matter of changing a few constants defined at the top of the script.

Note that BBB is slightly different from the Olimex module hardware-wise, but the process is essentially the same. Also note, the ti linux kernel is close mainline, whereas the bbOrg kernel has tons of patches for their "capes" system. If you're not interested in expanding the BBB with capes I think you can stick with the ti kernel sources.

You could also build a very minimal busybox-based distro. But from there you're pretty much on your own w/r/t additional packages.

[1] https://www.olimex.com/wiki/AM335x

You can use buildroot to create a system image, which has board-support files for Beaglebone based boards:

https://buildroot.org/

https://github.com/buildroot/buildroot/tree/master/board/bea...

TI maintains a SDK for their Sitara chips/boards, and it has mainline kernel support. There is also the Yocto Project, which TI included a BSP layer for.
Yocto and Buildroot support the BeagleBones out of the box. If you can use menuconfig, you can use Buildroot to get going in half an hour or so. Yocto takes a bit more work, but you have far more flexibility.