-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix s1 13188 #6537
Fix s1 13188 #6537
Conversation
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
ecce064
to
668a553
Compare
You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds. Note: This comment is automatically posted by the Documentation Publishing GitHub Action. |
668a553
to
299be96
Compare
fd71958
to
d19ede2
Compare
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.
Much better 👍
Some small observations.
config NCS_IS_VARIANT_IMAGE | ||
bool "Image is a variant build of another image [READ ONLY]" |
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.
I know the intention is to have this information available in source code.
I assume the number of cases where source code itself need to be aware of this are very few.
So maybe we should handle those case specifically.
Not so fond of user-accessible setting denoted READ ONLY
.
Alternative, we can look into the possibility of making this promptless, and handled differently.
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.
I can't think of a better mechanism than Kconfig.
Adjusting how the option is declared might make sense though.
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.
I don't see how we can modify the option if we make it promptless. Wouldn't we have to add some kconfig source code to the build?
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.
I can't think of a better mechanism than Kconfig.
Simply trying to understand exactly the intention of this.
If going to be used in code or similar, Kconfig is best way, if this is purely a build system to build system knowledge, then pure CMake variable could be an option.
I see a risk in having a very generic symbol with a prompt for the following reasons:
- Users are not supposed to change this variable, it may mess up a build
- It is in no way clear what enabling this setting trigger of changes.
If there were two symbols, likeBOOTLOADER
used in ordinary buildBOOTLOADER_VARIANT
, then I would know that something related to bootloader is affected.
Here i'm absolutely clueless as what gets adjusted, I would need to search.
@hakonfam thanks for pointing me to: https://github.com/nrfconnect/sdk-zephyr/blob/93c6a102f28fd00321c8425ddda66d7105ec55c3/include/arch/arm/aarch32/cortex_m/scripts/linker.ld#L35-L39
Now, making a variant is a generic term, and it's true that for now every time we build a variant it will be for slot 1, so in that case it could be fine, but we could also consider if it would be better to have a specific setting to indicate what setting the variant adjusts.
If a variant build in future needs the slot, but also other settings in addition, then all those could be selected by a higher level symbol. I believe that will make it easier to understand what changes a variant build imposes.
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.
an example of how we may provide variant specific Kconfig options, not generally available can be seen here:
hakonfam#12
d19ede2
to
f530f1b
Compare
f530f1b
to
cde492d
Compare
This test builds s1 variants for secure boot, that is not supported for non-secure applications without MCUboot enabled. Ref: NCSDK-13188 Signed-off-by: Håkon Øye Amundsen <[email protected]>
Handling lists within lists in cmake is prone to error. Replace the current mechanism of passing child image parameters as '-D' style arguments with a generated preload file. Ref: NCSDK-13188 Signed-off-by: Håkon Øye Amundsen <[email protected]>
This can be used when creating variant images of the root image. Ref: NCSDK-13188 Signed-off-by: Håkon Øye Amundsen <[email protected]>
A user can now pass an image Signed-off-by: Håkon Øye Amundsen <[email protected]>
Leverage multi image mechanism for building variant image instead of creating a new linker script and re-linking the base image. Ref: NCSDK-13188 Signed-off-by: Håkon Øye Amundsen <[email protected]>
cde492d
to
f85c95e
Compare
MCUboot child image kconfig options are not available when preprocesing this file. Hence, checking if CONFIG_PARTITION_SIZE_MCUBOOT_PAD = 0 will always be true. Add a Kconfig option which is used to pass information to non-mcuboot child images that mcuboot is included in the build and use this instead. This places s1_image to an incorrect location both when mcuboot is included and not. Ref: NCSDK-13188 Signed-off-by: Håkon Øye Amundsen <[email protected]>
f85c95e
to
38759bc
Compare
This has been pushed to the upmerge branch It is still open for review and review fixes, but in the upmerge branch, not here. |
Only here for the test result, will be merged in the upmerge