-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
zephyr: fix mcuboot can't link into boot-partition #14620
zephyr: fix mcuboot can't link into boot-partition #14620
Conversation
Objective of the path is to allow to select by the application to link into the chosen code-partition. Introduced USE_CODE_PARTITION will be set by bootloader project. fixes zephyrproject-rtos#14566 Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Select the code partition as the target for link into. This patch together with zephyrproject-rtos/zephyr#14620 fixes the issue which was imposed while zephyr moves DTC before Kconfig processing in its build process. Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
config FLASH_LOAD_OFFSET | ||
hex "Kernel load offset" | ||
default $(dt_hex_val,DT_CODE_PARTITION_OFFSET) if BOOTLOADER_MCUBOOT | ||
default $(dt_hex_val,DT_CODE_PARTITION_OFFSET) if USE_CODE_PARTITION |
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.
Why not add a new function in kconfigfunctions.py
that conditionally returns DT_CODE_PARTITION_OFFSET
or 0? is it not possible?
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.
It's better to write Kconfig than python, isn't it?
Not sure if I understood the problem/motivation here.
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.
IMO it is more legible how it is implemented now.
@carles: were you thinking about:
default $(dt_hex_val1_or_val2, DT_CODE_PARTITION_OFFSET, 0, USE_CODE_PARTITION)
probably about somethings different
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.
nrF9160 NS board has, also, a similar setting, i.e. force using code partition.
I wonder if we could integrate this solution to the 9160 configuration, too
Select the code partition as the target for link into. This patch together with zephyrproject-rtos/zephyr#14620 fixes the issue which was imposed while zephyr moves DTC before Kconfig processing in its build process. Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Select the code partition as the target for link into. This patch together with zephyrproject-rtos/zephyr#14620 fixes the issue which was imposed while zephyr moves DTC before Kconfig processing in its build process. Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Objective of the path is to allow to select by the application
to link into the chosen code-partition.
Introduced USE_CODE_PARTITION will be set by bootloader project.
fixes #14566
Signed-off-by: Andrzej Puzdrowski andrzej.puzdrowski@nordicsemi.no