pengutronix / genimage

tool to generate multiple filesystem and flash images from a tree
GNU General Public License v2.0
308 stars 110 forks source link

GPT support for genimage #40

Closed lp35 closed 5 years ago

lp35 commented 6 years ago

Hi,

UEFI platform are more and more used even in embedded world. Currently using buildroot as my distro, it is actually not possible to generate a GPT compatible image.

I think it would be really useful to the community, any hope for implementing this?

http://buildroot-busybox.2317881.n4.nabble.com/genimage-with-GPT-partition-td202341.html

Have a nice day, and thank you for maintaining this project. BR

lp35 commented 6 years ago

Hi, I am bumping this. Thanks,

michaelolbrich commented 5 years ago

I would like to see support for GPT as well, but it is not very high on my TODO list right now. The problem with GPT is that it has some data at the end of the device (At least that's my current understanding). This means that:

  1. The config must contain the exact device size. Especially with SD-Cards this can be a Problem. You cannot just use another one.
  2. This means always overwriting the whole device. That's often an order of magnitude more than the actual content. Or we need some kind of sparse format and tool to write it.

All that makes it not very useful for my use-cases, so my priority is low.

If someone wants to implement this, then I'll gladly review any patches. GPT is rather complex, so I think we should use some external implementation for this. Maybe libfdisk?