-
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
tests/mcuboot: handle building in docker #11083
Conversation
I was just thinking, and I think that the same solution could be solved by only setting |
The handling with |
Let's wait for the other pull requests, I may get it through. |
PR merged, please rebase. |
d22a22a
to
ca0daee
Compare
I remove the However, I noticed in the same time, that for It would just fix doing So not sure this is really helping, except the compilation… |
@cladmi, is this PR still waiting for another PR ? It doesn't seem to. |
ca0daee
to
4465fc2
Compare
@aabadie no it does not depend anymore. It would however only fix building in docker as said in my previous comment. But at least the compilation does not fail when you do I rebased and updated the commit message to explain this. |
When using BUILD_IN_DOCKER only make 'all' execute 'mcuboot' target when inside the container. Otherwise it will execute it using your host toolchain. This is a hack and could be prevented by having a file target put in FLASHFILE. This does currently not allow flashing after building in docker as flashing should be done with `mcuboot-flash` which will not be done in docker. It would require the `FLASHFILE` fix to be done properly.
4465fc2
to
24a54fe
Compare
Rebased in case something broke in between. |
Tested this fixes the building Issue: PR:BOARD=nrf52dk BOARDS=nrf52dk PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin BUILD_IN_DOCKER=1 make -C tests/mcuboot/ all
master:BOARD=nrf52dk BOARDS=nrf52dk PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin BUILD_IN_DOCKER=1 make -C tests/mcuboot/ all
|
@cladmi does this still need to wait for something? |
No it is not waiting for anything. |
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.
ACK. Tested and this fixes the issue. This will change the testing procedure for #11857 since building in docker wont fail.
Thank you for the review. I will rebase and update the testing procedure. |
Contribution description
When using BUILD_IN_DOCKER only make 'all' execute
mcuboot
/riotboot
target wheninside the container. Otherwise it will execute it using your hosttoolchain.
This is a hack as it cannot currently be handled at the
mcuboot
/riotboot
target level.Hack and not a fix
I know it is a hack and not a library level fix.
Fixing it at
docker
level is currently harder with the way the integration is done, I tried but requires more changes that I hoped. I prefer put this HACK to make it usable until a proper fix can go in.Testing procedure
If your
arm-none-eabi-gcc
compiler is outside of/usr/bin
and you can define a working PATH not includingarm-none-eabi-gcc
you can try the following. (or have a machine withoutarm-gcc
):Compiling either
tests/mcuboot
ortests/riotboot
with docker would fail as it would be trying to use your local toolchain.Fixed now
Even flashing is now handled with this pull request:
Flashing and test works with
samr-21
forriotboot
and I can flash fortests/mcuboot
with thenrf52dk
. Note themcuboot
firmware is broken for me both on master and with this PR.`DOCKER="sudo docker" BUILD_IN_DOCKER=1 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin make -C tests/riotboot flash test`
`DOCKER="sudo docker" BUILD_IN_DOCKER=1 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin make -C tests/mcuboot/ flash`
Verify it is failing in master
`DOCKER="sudo docker" BUILD_IN_DOCKER=1 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin make -C tests/mcuboot/`
`DOCKER="sudo docker" BUILD_IN_DOCKER=1 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin make -C tests/riotboot/`
Issues/PRs references
Running compilation on a machine without toolchain installed.
Tracking issue #9645