Closed thirtythreeforty closed 4 years ago
Actually, more sweeping changes are needed, perhaps a temp directory per rauc run. All the files from the various RAUC bundles I'm generating are piling up in the subsequent bundles. (rootfs.squashfs from bundle 1 is showing up next to rootfs.ext4 from bundle 2 in bundle 2).
Thanks very much!
If I have a config file that specifies multiple rauc images (say, update.raucb and update-developer.raucb), then generating all but the first fails.
This is because
rauc_generate
improperly usesinsert_data
to write data to a file:https://github.com/pengutronix/genimage/blob/a58a53b7fd864dbf5835b25e232c76bc0752deef/image-rauc.c#L41-L44
This manifest file is presumed not to exist, but if previous RAUC runs have been done, it does exist and the file is not replaced/truncated, but simply pasted into, leaving garbage at the end from the previous RAUC run. (In other words,
insert_data
is not the appropriate function to use here.)This creates bizarre errors when RAUC runs again and encounters the garbage data, like:
As a workaround, I'm deleting the file before continuing:
Feel free to steal this patch for a quick fix, or if you want to make more sweeping changes, you won't hurt my feelings.