From a14c92f15111810e6aace5458e1dcca0d0d15fed Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Mon, 27 Jan 2025 17:00:58 +0100 Subject: [PATCH] Added draft build test. --- .github/workflows/test-build-pico-sdk.yml | 63 +++++++++++++++++++++++ .github/workflows/test-configs.yml | 7 +++ IDE/pico-sdk/rp2350/test-app/runtime.c | 2 +- 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test-build-pico-sdk.yml diff --git a/.github/workflows/test-build-pico-sdk.yml b/.github/workflows/test-build-pico-sdk.yml new file mode 100644 index 000000000..49b658497 --- /dev/null +++ b/.github/workflows/test-build-pico-sdk.yml @@ -0,0 +1,63 @@ +name: Wolfboot Reusable Build Workflow for Raspberry Pi Pico2 (rp2350) + +on: + + workflow_call: + inputs: + arch: + required: true + type: string + config-file: + required: true + type: string + make-args: + required: false + type: string + +jobs: + + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - uses: actions/checkout@main + with: + repository: raspberrypi/pico-sdk + path: pico-sdk + + - name: Workaround for sources.list + run: sudo sed -i 's|http://azure.archive.ubuntu.com/ubuntu/|http://mirror.arizona.edu/ubuntu/|g' /etc/apt/sources.list + + - name: Update repository + run: sudo apt-get update + + - name: Install cross compilers + run: | + sudo apt-get install -y gcc-arm-none-eabi + + - name: make distclean + run: | + make distclean + + - name: Select config + run: | + cp ${{inputs.config-file}} .config && make include/target.h + + - name: Build tools + run: | + make -C tools/keytools && make -C tools/bin-assemble + + - name: pre-build wolfboot + run: | + make + - name: build wolfboot with pico-sdk + run: | + cd IDE/pico-sdk/${{inputs.target}}/wolfboot + mkdir build + cd build + cmake ../ -DPICO_SDK_PATH="$GITHUB_WORKSPACE/pico-sdk" + make diff --git a/.github/workflows/test-configs.yml b/.github/workflows/test-configs.yml index 69209c457..d3d822e8a 100644 --- a/.github/workflows/test-configs.yml +++ b/.github/workflows/test-configs.yml @@ -439,3 +439,10 @@ jobs: with: arch: host config-file: ./config/examples/sim-wolfHSM.config + + rp2350_test: + uses: ./.github/workflows/test-build-pico-sdk.yml + with: + arch: arm + config-file: ./config/examples/rp2350.config + target: rp2350 diff --git a/IDE/pico-sdk/rp2350/test-app/runtime.c b/IDE/pico-sdk/rp2350/test-app/runtime.c index 37e91e3b8..037e0f38b 100644 --- a/IDE/pico-sdk/rp2350/test-app/runtime.c +++ b/IDE/pico-sdk/rp2350/test-app/runtime.c @@ -7,5 +7,5 @@ void runtime_init_cpasr(void) *cpasr_ns |= 0xFF; } -preinit_fn_t __attribute__((section(".nonsecure_preinit_array"))) *((*nonsecure_preinit)(void)) = +preinit_fn_t __attribute__((section(".nonsecure_preinit_array"))) nonsecure_preinit[] = { &runtime_init_cpasr };