-
Notifications
You must be signed in to change notification settings - Fork 637
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: restore device tree overlay #604
Conversation
0e3fa72 removed device tree overlay that is required to flash mcuboot to correct partition and CMake variable that pointed to it. Restore it. Do not restore adding "boards/${BOARD}.overlay" to the list since Zephyr detects this file automatically now - see https://docs.zephyrproject.org/latest/application/index.html#devicetree-overlays Signed-off-by: Sergey Koziakov <dya.eshshmai@gmail.com>
I believe this is incorrect. It only detects it automatically if DTC_OVERLAY_FILE is not already set. See this comment for a fuller description: #577 (review) |
This is exactly what I was talking about when I say I wish the Zephyr behavior were additive instead of mutually exclusive. |
I more meant that the BOARD.overlay behavior is desirable. |
We do need to do something, though. Right now, Zephyr doesn't build correctly, because there is no overlay, and it goes in the wrong partition? We do need a general overlay file that is used for all MCUboot targets, in order to set the default partition. |
Then I think there's no choice but to implement the desired "additive" logic by hand before including the boilerplate file. |
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'm ok with doing it this way. At least it restores Zephyr builds.
@mbolivar Are you ok with this approach for now? |
No objections from me on any of this, just chiming in with information I thought might be relevant |
0e3fa72 removed device tree overlay that configures Zephyr to link mcuboot at the beginning of the flash, and CMake variable that pointed to it (required for Zephyr). This resulted in mcuboot not being linked at some offset, rendering it unable to boot. Restore overlay and required code.
Without it, Zephyr will use
zephyr,code-partition
configuration from board device tree that usually points to theslot0_partition
. This behaviour is due to the CONFIG_USE_CODE_PARTITION being used in MCUboot's configuration for Zephyr.Fixes #601.
Signed-off-by: Sergey Koziakov dya.eshshmai@gmail.com