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

allow specifying an image as temporary #124

Closed Villemoes closed 3 years ago

Villemoes commented 3 years ago

When using something like

image @IMAGE@ { .... partition sysdata { image = "sysdata" in-partition-table = true partition-type-uuid = "L" } }

image sysdata { size = 200M ext4 {} empty = true }

to create a partition containing an empty file system, it's undesirable to leave such an empty file system image in the output directory (especially when building with Yocto, where it then gets copied to the shared deploy directory).

So allow specifying an image as temporary, putting it in in tmppath() rather than imagepath().

Signed-off-by: Rasmus Villemoes rasmus.villemoes@prevas.dk

michaelolbrich commented 3 years ago

Nice and simple solution. Thanks. I have this vague idea to create the filesystem directly in the full image and skip the temporary filesystem image entirely. mkfs.ext4 has options to allow that. But I've not had the time to implement this and not all filesystem types support that. So this is a first step and we can reuse the option later for more optimization.