Skip to content

Conversation

@jajanusz
Copy link
Contributor

@jajanusz jajanusz commented Sep 3, 2020

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_NAME as it would be confusing to have both FW_NAME related KConfig's config and a CMake argument.

Copy link
Member

@plbossart plbossart left a 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.

Copy link
Member

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.

Copy link
Collaborator

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.

Copy link
Contributor Author

@jajanusz jajanusz Sep 8, 2020

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.

Copy link
Member

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>
@lgirdwood lgirdwood merged commit 8eb6b54 into thesofproject:master Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants