Skip to content
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

Conversation

nvlsianpu
Copy link
Collaborator

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

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>
nvlsianpu added a commit to nvlsianpu/mcuboot that referenced this pull request Mar 18, 2019
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>
@nvlsianpu nvlsianpu requested review from SebastianBoe, galak, carlescufi and lemrey and removed request for SebastianBoe March 18, 2019 13:13
@carlescufi carlescufi added this to the v1.14.0 milestone Mar 18, 2019
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
Copy link
Member

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?

Copy link
Collaborator

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.

Copy link
Collaborator Author

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

Copy link
Member

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

@galak galak added bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug labels Mar 18, 2019
@galak galak requested a review from nashif March 18, 2019 16:33
@carlescufi carlescufi merged commit 2b1227f into zephyrproject-rtos:master Mar 19, 2019
nvlsianpu added a commit to mcu-tools/mcuboot that referenced this pull request Mar 19, 2019
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>
nvlsianpu added a commit to nrfconnect/sdk-mcuboot that referenced this pull request Mar 29, 2019
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mcuboot doesn't link into code-partition
5 participants