pengutronix / genimage

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

marry genimage and swupdate #179

Open flatmax opened 2 years ago

flatmax commented 2 years ago

swupdate is a tool for building firmware update images for embedded devices.

It would be nice to marry genimage with swupdate in some way. Perhaps the first step is to be able to output the genimage.cfg file as a genimage.json file (with JSON formatting).

Is there are function in the code to dump the parsed genimage.cfg information as text ? If so then perhaps that can be adapted to generate a valide json version of genimage.cfg files for use with swupdate.

flatmax commented 2 years ago

I see the new configdump code and the cfg_print line here. I guess the cfg_print_func_t has to be setup to output json in some way.

michaelolbrich commented 2 years ago

I don't know swupdate, but I expect this needs to be a bit more intelligent than just converting the config directly into json. Probably a new image-swupdate.c that generates the config for swupdate and then calls it. We do something like that in image-rauc.c (That's also a firmware update tool).

Harvie commented 2 years ago

Genimage can already create swupdate bundles. Swupdate uses CPIO format, which can be created by genimage.