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/ allmaster: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. |
|
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/riotboottarget wheninside the container. Otherwise it will execute it using your hosttoolchain.
This is a hack as it cannot currently be handled at the
mcuboot/riotboottarget level.Hack and not a fix
I know it is a hack and not a library level fix.
Fixing it at
dockerlevel 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-gcccompiler is outside of/usr/binand you can define a working PATH not includingarm-none-eabi-gccyou can try the following. (or have a machine withoutarm-gcc):Compiling either
tests/mcubootortests/riotbootwith 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-21forriotbootand I can flash fortests/mcubootwith thenrf52dk. Note themcubootfirmware 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