GPT/EFI support in Nerves

There was a recent update to fwup that adds support for GPT disk partitions. This is important since:

  • Some devices only boot EFI system partitions on GPT drives
  • GPT supports more than 4 partitions

The first point is coming up more frequently as embedded x86_64 devices are dropping support for “BIOS Boot”. The nVIDIA Jetson Nano also require GPT.

Support for >4 partitions is why I’m posting this. Over the past few years, several people have asked me about supporting things like multiple firmware slots. For example, you could build a kiosk where the main firmware partition has the embedded web browser and a second firmware partition has your app. The idea would be that all of the web browser size and complexity could be maintained and managed independently to your app. This was possible before GPT support, but the 4 partition limitation with MBR made it look like a hack.

The devil is always in the details. If you’re going down a path that might be improved by using GPT support in Nerves, please share. I’d like to get this low-level functionality bubbled up so that it’s more accessible.