-
-
Notifications
You must be signed in to change notification settings - Fork 1k
docker: fix NRF_SDK download and subsequent build.sh #2299
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
The upstream NRF-SDK download url and zip archive filename changed, which was fixed with #2270 But the archive contents stayed the same, with the "old" folder name. After #2270 we have basically the same docker-container as before the PR, but the `GetNrfSdk` function of the `build.sh` script is called again during firmware build time as the expected foldername for the SDK isn't the same as the zip filename: ```sh [ ! -d "$TOOLS_DIR/$NRF_SDK_VER" ] && GetNrfSdk ``` Then during the build the `buils.sh` script tries to execute `GetNrfSdk` again, which fails as the files already exist resulting in the following error: ``` replace /opt/nRF5_SDK_15.3.0_59ac345/components/802_15_4/api/HAL/hal_atomic.h? [y]es, [n]o, [A]ll, [N]one, [r]ename: NULL ``` Fix this by reverting the `NRF_SDK_VER` to the folder name in the zip archive and by some character replacement generate the download URL from the above (the download is in lower-case without the `_` and `.` characters). Furthermore add safeguards to check after the `GetNrfSdk` call if the expected folder is really created. Then we have an error early during container image creation if the contents of the zip-archive are unexpected.
Build checks have not completed. Possible reasons for this are:
|
Move the directory exists checks into the GetX functions. Otherwise we still have the error at firmware-build time instead as expected at container-build time.
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.
LGTM!
Did you have the opportunity to test that the docker image builds correctly and that it can build infinitime?
Also, any idea why 2 CI checks fail?
CI checks use the docker container, and that container is currently broken - so all firmware build CI is currently broken, main and PRs |
I tested to build the image locally with podman and build the firmware with it. Both work locally |
Failing size job fixed by using bash as shell for the job |
) The upstream NRF-SDK download url and zip archive filename changed, which was fixed with InfiniTimeOrg#2270 But the archive contents stayed the same, with the "old" folder name. After InfiniTimeOrg#2270 we have basically the same docker-container as before the PR, but the `GetNrfSdk` function of the `build.sh` script is called again during firmware build time as the expected foldername for the SDK isn't the same as the zip filename: ```sh [ ! -d "$TOOLS_DIR/$NRF_SDK_VER" ] && GetNrfSdk ``` Then during the build the `buils.sh` script tries to execute `GetNrfSdk` again, which fails as the files already exist resulting in the following error: ``` replace /opt/nRF5_SDK_15.3.0_59ac345/components/802_15_4/api/HAL/hal_atomic.h? [y]es, [n]o, [A]ll, [N]one, [r]ename: NULL ``` Fix this by reverting the `NRF_SDK_VER` to the folder name in the zip archive and by some character replacement generate the download URL from the above (the download is in lower-case without the `_` and `.` characters). Furthermore add safeguards to check after the `GetNrfSdk` call if the expected folder is really created. Then we have an error early during container image creation if the contents of the zip-archive are unexpected.
The upstream NRF-SDK download url and zip archive filename changed, which was fixed with #2270
But the archive contents stayed the same, with the "old" folder name.
After #2270 we have basically the same docker-container as before the PR, but the
GetNrfSdk
function of thebuild.sh
script is called again during firmware build time as the expected foldername for the SDK isn't the same as the zip filename:Then during the build the
buils.sh
script tries to executeGetNrfSdk
again, which fails as the files already exist resulting in the following error:Fix this by reverting the
NRF_SDK_VER
to the folder name in the zip archive and by some character replacement generate the download URL from the above (the download is in lower-case without the_
and.
characters).Furthermore add safeguards to check after the
GetNrfSdk
call if the expected folder is really created. Then we have an error early during container image creation if the contents of the zip-archive are unexpected.