Official Raspberry Pi Zero Support and new RPi Systems

It’s official. Tim Mecklem’s Raspberry Pi Zero/Zero W system is now part of the Nerves Project. Here’s why we’re so excited about this system:

Required hardware

It only requires a MicroUSB cable, MicroSD card, and an RPi Zero for development. The MicroUSB cable provides power and access to the RPi’s IEx prompt. If you have a Zero W or a RedBear IoT pHAT, your programs have easy access to WiFi too.

To use this, see the nerves_system_rpi0 project. If you’re using the default mix.exs generated by nerves.new, you can set MIX_TARGET=rpi0 to build for the Raspberry Pi Zero. If you’ve customized any aspects of the system image, be aware that the virtual serial port is ttyGS0.

Additionally, all Raspberry Pi systems have been updated to pull in the latest bug fixes included in Raspbian. We try to follow Raspbian closely since it makes debugging issues easier. I.e., if something doesn’t work in Nerves, you can try it in Raspbian and hopefully get some hints from the very large and helpful Raspberry Pi community.

The one challenge with the Raspberry Pi platforms is that the Linux kernel and the Raspberry Pi firmware and userland applications are coupled. This means that if Buildroot or nerves_system_br update the versions of the Raspberry Pi firmware or userland applications, it is important that the Linux kernel version get updated as well. Unfortunately, the Linux kernel version is stored in the system’s nerves_defconfig. We update the official systems, but if you have a custom system, you’ll need to do it yourself when you update. You can do this by rebasing your system on top of the latest official one or by using using a merge tool (like meld) to manually compare files. The important one is the Linux commit SHA in your nerves_defconfig. You may be interested in other changes as well.

comments powered by Disqus