-
Notifications
You must be signed in to change notification settings - Fork 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
riotboot: set FLASHFILE to RIOTBOOT_EXTENDED_BIN if riotboot feature is used #11690
riotboot: set FLASHFILE to RIOTBOOT_EXTENDED_BIN if riotboot feature is used #11690
Conversation
|
"riotboot: use riotboot if feature is used" The PR title and commit message should maybe be more precise and say "use the riotboot extended firmware" or any other descriptive name. This was not done at the beginning as Now it should be safe to do. |
1e31f40
to
e956ef8
Compare
agreed. Changed to what the commit actually does. |
@cladmi could you take another look? |
This is currently changing multiple things in the same PR without doing them completely and giving testing for it. This changed without justifying the firmware flashed for The documentation still recommends to use The documentation update for the previous APP_VER api change is not complete as many examples still say to use |
... which is not wrong. Anyhow, changed it to say "make flash".
Which is also not wrong. I piggybacked the fix for actually wrong information, I can kick it out if you insist. I do not want to have more unrelated fixes in here. |
91ea9cb
to
9a7ac3f
Compare
@cladmi are your comments sufficiently addressed? |
makefiles/boot/riotboot.mk
Outdated
# make applications that use the riotboot feature default to actually using it | ||
# Target 'all' will generate the combined file directly. | ||
# It also makes 'flash' and 'flash-only' work without specific command. | ||
ifneq (,$(filter riotboot, $(FEATURES_USED))) |
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 guard is duplicating the one from the file. So is not 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.
yup, fixed
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.
Tested it on samr21-xpro, it works as the PR documentation states. As I can see the required documentation has been updated but not in tests/riotboot
for consistency I think it should be just as bootloaders/riotboot/README
My only concern is that now there is no way of flashing just the application without riotboot, right?
That might indeed be an issue. I'll try to come up with something. |
Do you mean e.g., only flash slot0 or slot1? That's still possible using |
Non-riotboot version. |
Ok, this would require disabling usage of an available and optional or required feature. It would probably need a new variable like "FEATURES_DISABLED", which will make people scream "YOU CANNOT DISABLE WHAT THE HARDWARE ALWAYS PROVIDES!". Unless we had a strong use-case that is now not supported anymore, I suggest we postpone this. |
True.
Ok, I agree. @cladmi do you still have issues with this? |
I'm OK with the changes, but since @cladmi requested most of them I would like for him to ACK that his concerns are addressed. |
@cladmi ping |
e90b896
to
924b52f
Compare
I realized that "bootloaders/riotboot/README.md" also had outdated testing instructions. I've replaced them with a pointer to "tests/riotboot/README.md". I think this is good to go, could someone take a look? |
@cladmi have your issues been addressed? |
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 have a comment on your last change.
924b52f
to
bd32bee
Compare
Two more boards got riotboot support, but are too small to fit the test in half the flash. Pushed a commit adding them to the blacklist. |
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.
Changes look good to me, I tested that changes didn't affect normal applications and now any application using FEATURES_REQUIRED+=riotboot
will by default use slot0-extended
when using flash
and flash-only
.
... if the riotboot feature is used. Previously, even an application that had "FEATURES_REQUIRED += riotboot" set would still flash the non-riotboot binary on "make flash". This is usualy not what the user wants. This commit set's the FLASHFILE variable to the combined "riotboot bootloader + slot0 + empty slot1" binary. This has the effect that make all, flash and flash-only will compile and/or flash a working riotboot setup. tests/riotboot and tests/riotboot_flashwrite now default to flashing the riotboot-extended binary. tests/riotboot was previously configured to use the riotboot-combined binary. This has been changed in order to not behave differently than how usual riotboot applications do.
FLASHFILE is now set to RIOTBOOT_EXTENDED_BIN, changing the meaning of make all`, `flash`, `flash-only`. This commits updates the documentation accordingly.
7166099
to
b35646a
Compare
Adding saml1[01]-xpro, nucleo-f302r8|f334r8 to BOARDS_INSUFFICIENT_MEMORY. The riotboot build fails because it only offers half the flash size (per slot), compared to before where the default build would not use riotboot at all, thus have double the flash (but being useless).
b35646a
to
8370acb
Compare
Comments were addressed. |
GO! |
Contribution description
Previously, even an application that had "FEATURES_REQUIRED += riotboot"
set would still flash the non-riotboot binary on "make flash".
This is usually not what the user wants.
This commit set's the FLASHFILE variable to the combined "riotboot
bootloader + slot0 + empty slot1" binary, if the riotboot feature is used.
This has the effect that "make all", "make flash" and "make flash-only" will compile and/or flash a working riotboot setup.
This was previously done for tests/riotboot within that application's Makefile. This PR moves the definition into
makefiles/boot/riotboot.inc.mk
, guarded by whether the riotboot feature is used.Testing procedure
Issues/PRs references