-
Notifications
You must be signed in to change notification settings - Fork 349
CMake argument for custom FW names #3385
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
Conversation
plbossart
left a comment
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 sure if it's wise to replace the entire name, maybe keep a base? see below.
src/arch/xtensa/CMakeLists.txt
Outdated
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.
nit-pick: typo on commit title.
Can you also add more explanations on how this would actually be used?
Are you suggesting people manually create new firmware names which don't even have a reference to the platform? e.g. sof-kbl-custom.ri sounds better to me than sof-custom.ri, which risks increasing confusion. I think it's fine to customize, but in addition to a base.
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.
Can't the base be incorrect or something? For example imx8 and imx8x could use nearly the same firmware image (and with a modicum of runtime detection the image could be completely shared), so changing the base can be allowed.
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.
@plbossart It is for the case when you have exactly the same PCH but for example different MEU config / key. Let's assume that f.e. EHL (that is TGL) will have only different key, then you'd need sof-ehl and sof-tgl binaries.
Also what do you mean by base? sof- or sof-tgl-, so output binary will be f.e. sof-tgl-ehl?
Are you suggesting people manually create new firmware names which don't even have a reference to the platform?
Yes. It's custom/advanced option, person that is going to use it should know what he/she's doing. If you really want to keep reference to some name you can always include it manually. BTW these names usually are not meaningful and are just there becasue were first used for given signing scheme (manifest version), f.e. apl could be also named glk.
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.
@jajanusz ok, but do you mind adding a comment in the code that this is an advanced version and that OSes will need a specific configuration to make use of such custom names?
Old name was misleading, because this config is not used just as name. It is used to decide how to build and sign FW image. Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Add CMake argument FIRMWARE_NAME that enables setting custom suffix for output binary. Example `cmake ... -DFIRMWARE_NAME=custom ...` will save output files as sof-custom.ri, sof-custom.ldc etc. Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Sometimes we need image that is based on already existing config but requires different sing key / pch name to be chosen by kernel or something else. Instead of adding confusing multiple rename commands to build instructions we can just use CMake argument that will change FW suffix.
Also renamed
CONFIG_FIRMWARE_SHORT_NAMEas it would be confusing to have bothFW_NAMErelated KConfig's config and a CMake argument.