-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] rimage: Add support for multiple toml file #179
Conversation
We are either signing or verifying an image, not both or neither. Signed-off-by: Chao Song <[email protected]>
This patch adds support for multiple toml configuration file. In this patch, the multiple input toml files will be merged into a single toml file, and the merged file will be stored in the same folder of the firmware to be signing or verifying. Signed-off-by: Chao Song <[email protected]>
/* make sure we have an outfile if not verifying */ | ||
if ((!image.out_file && !image.verify_file)) { | ||
/* We are either signing or verifying an image, not both or neither */ | ||
if (!(!!image.out_file ^ !!image.verify_file)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possible to figure out a more easier expression for better understanding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" not both or neither " would this not imply to fail if !out_file == !verify_file
? Pls check my logic here though.
fclose(out_file); | ||
return NULL; | ||
} | ||
copy_file(file, out_file); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use file pointer as parameter is not always proposed, directly read and write is also very simple.
btw, how about fread/fwrite? since toml file is not big.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aiChaoSONG btw, this can be better done with the GNU pre-processor (like we already pre-process linker scripts).
i.e. mtl-sku.toml
// all platform memoery addresses
#include <platform.toml>
// all Intel signing config
#include <intel.toml>
// all modules
#include <volume.toml>
#include <copier.toml>
and so on
replacement: thesofproject/sof#8243 |
add support for multiple toml file for rimage, prepare for split toml file
to platform related toml and algorithm related toml.
The previous RFC #176 won't work for windows system, because it uses a linux specific function,
This RFC should work both for windows and linux.