Skip to content

Conversation

NeroBurner
Copy link
Contributor

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:

[ ! -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 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.
@NeroBurner NeroBurner added this to the 1.16.0 milestone May 24, 2025
@NeroBurner NeroBurner added the bug Something isn't working label May 24, 2025
@NeroBurner NeroBurner self-assigned this May 24, 2025
@NeroBurner NeroBurner mentioned this pull request May 24, 2025
Copy link

Build checks have not completed. Possible reasons for this are:

  1. The checks need to be approved by a maintainer
  2. The branch has conflicts
  3. The firmware build has failed

@NeroBurner NeroBurner requested a review from a team May 24, 2025 12:35
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.
Copy link
Collaborator

@JF002 JF002 left a 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?

@mark9064
Copy link
Member

CI checks use the docker container, and that container is currently broken - so all firmware build CI is currently broken, main and PRs

@NeroBurner
Copy link
Contributor Author

I tested to build the image locally with podman and build the firmware with it. Both work locally

@NeroBurner NeroBurner merged commit 6f2a661 into main May 27, 2025
4 of 6 checks passed
@NeroBurner NeroBurner deleted the fix_nrf_sdk_download branch May 27, 2025 20:56
@mark9064
Copy link
Member

@NeroBurner
Copy link
Contributor Author

NeroBurner commented May 28, 2025

https://github.com/InfiniTimeOrg/InfiniTime/actions/runs/15285543037/job/42994956633

Failing size job fixed by using bash as shell for the job

c3295d6

JustScott pushed a commit to JustScott/InfiniTime that referenced this pull request Jul 29, 2025
)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants