-
Notifications
You must be signed in to change notification settings - Fork 8.3k
dfu: mcuboot: rename boot_swap_type> mcuboot_swap_type #13475
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #13475 +/- ##
=======================================
Coverage 52.5% 52.5%
=======================================
Files 318 318
Lines 46526 46526
Branches 10754 10754
=======================================
Hits 24429 24429
Misses 17198 17198
Partials 4899 4899Continue to review full report at Codecov.
|
What a bootloader? It is something else than mcuboot? |
|
Honestly - this change is wired - better to change function names in application your attempt to build, or if this is relay impossibly - change names here. |
yes, mcuboot. |
dfu usb depends on image manager and pulls mcuboot.c, mcuboot.c duplicates function names in mcuboot, but those are only used when you have the application use mcumgr (which does not make sense to enable in the bootloader), so just use those duplicated functions with mcumgr and not when building mcuboot. I do not see anything weird about that. |
|
Don't see such file name in mcuboot mainline - so this is something you working on. USB DFU (DFU class instead of serial recovery?) in bootloader should use mcuboot primitives instead of the zephyr primitives. |
it is up to me to decide how I want to build my bootloader and what features I want to add in. |
subsys/dfu/boot/mcuboot.c
Outdated
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 understand. These are static and there are no functions by the same name anywhere else in the tree. Why is this necessary?
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.
Missed the thread on this.
Can we just rename them in this file to not conflict or something, since they're static? No need for extra ifdefing.
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.
yes, renaming is probably a better option, I thought there might be some purpose behind the same names. Btw, we have functions defined in the is file that are used no where in the tree. dead code basically, i.e boot_read_bank_header
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.
since they're static?
btw, the main culprit is not static but if we ifdef it, the others will be become 'unused', hence why they all were ifdef'ed
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.
yes, renaming is probably a better option. I thought there might be some purpose behind the same names.
That is my opinion as well, so will approve. Name were the same as function does the same as in mucboot (and had no better name before) - only that.
This function conflicts with a function of the same name in mcuboot. This happens when building USB DFU support into mcuboot. DFU over USB uses image manager and mcuboot internals to manage images downloaded to the device. Signed-off-by: Anas Nashif <[email protected]>
| [MCUBOOT] [INF] boot_status_source: Scratch: magic=unset, copy_done=0xe, image_ok=0xff | ||
| [MCUBOOT] [INF] boot_status_source: Boot source: slot 0 | ||
| [MCUBOOT] [INF] boot_swap_type: Swap type: test | ||
| [MCUBOOT] [INF] mcuboot_swap_type: Swap type: test |
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.
This should not have been changed; those log messages are from mcuboot itself
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.
fix covered in #13552
| [MCUBOOT] [INF] boot_status_source: Scratch: magic=unset, copy_done=0xe, image_ok=0xff | ||
| [MCUBOOT] [INF] boot_status_source: Boot source: none | ||
| [MCUBOOT] [INF] boot_swap_type: Swap type: revert | ||
| [MCUBOOT] [INF] mcuboot_swap_type: Swap type: revert |
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.
same 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.
fix covered in #13552
Reverted unwanted documentation change on usb dfu sample. Changes was introduce accidentally within PR zephyrproject-rtos#13475 Signed-off-by: Andrzej Puzdrowski <[email protected]>
Reverted unwanted documentation change on usb dfu sample. Changes was introduce accidentally within PR #13475 Signed-off-by: Andrzej Puzdrowski <[email protected]>
This function conflicts with a function of the same name in mcuboot. This happens when building USB DFU support into mcuboot.
DFU over USB uses image manager and mcuboot internals to manage images downloaded to the device.