From f5a4707554b90390102f3493269a8002be7f6abd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Desbiens?= Date: Sun, 9 Aug 2026 10:40:06 -0400 Subject: [PATCH] Added bash A profile update scripts and restored ports_arch as their source The ARMv7-A and ARMv8-A ports are generated by update.ps1, which needs PowerShell, so the cortex-a job in ports_arch_check ran on a Windows image and nobody could reproduce it locally on Linux. Add update.sh beside each update.ps1, with the same cores, compilers, copy sets and patches, and move the job to the same Linux image as everything else. The bash scripts were checked against the PowerShell ones by comparing what each reports as drifted. They agree exactly on the 63 files the Windows job last reported, and differ on 12 more, which turn out to be a defect in update.ps1 rather than in the port. Its two .cproject patterns are written as 'value=`"cortex-a7`"' with backticks that survive into the pattern, so that replacement has never matched, while the neighbouring Cortex-A7.NoFPU pattern has no backticks and always worked. The result is that the AC6 example builds for the A5, A8, A9, A12, A15 and A17 cores name cortex-a7 as their CPU while their FPU string is correct. The bash scripts do what the PowerShell ones intended, so regenerating corrects those twelve files. Restore ports_arch as the source for the rest. The implementation of _tx_thread_smp_time_get from #555 was applied to the twenty four generated SMP ports and never to ports_arch, which still held MOV x0, #0 with a FIXME comment, so regenerating would have replaced a working generic timer read with a stub. That implementation now lives in the source. The remaining differences are cosmetic and resolve in favour of the source: a trailing blank line in 38 copies of tx_thread_schedule.S and comment spacing in one tx_port.h. Note that the Cortex-A VFP fix is already present in ports_arch and was never at risk, contrary to what the description of the port consistency checks change said before this was measured. Extend scripts/check_ports.sh to run the A profile generators too, and make it fail when a generator fails or is missing rather than reporting a clean tree, which would have been a false pass. Pin every workflow to ubuntu-24.04. ubuntu-latest already resolves to that image, so nothing changes today, but a future migration becomes a deliberate commit rather than something that happens underneath the -m32 builds. Assisted-by: Claude Code (Opus 5) --- .github/workflows/ci_cortex_m.yml | 2 +- .github/workflows/ports_arch_check.yml | 31 ++-- .github/workflows/regression_template.yml | 4 +- .../example_build/sample_threadx/.cproject | 4 +- .../cortex_a12/ac6/example_build/tx/.cproject | 4 +- ports/cortex_a12/ac6/src/tx_thread_schedule.S | 1 - ports/cortex_a12/gnu/src/tx_thread_schedule.S | 1 - .../example_build/sample_threadx/.cproject | 4 +- .../cortex_a15/ac6/example_build/tx/.cproject | 4 +- ports/cortex_a15/ac6/src/tx_thread_schedule.S | 1 - ports/cortex_a15/gnu/src/tx_thread_schedule.S | 1 - .../example_build/sample_threadx/.cproject | 4 +- .../cortex_a17/ac6/example_build/tx/.cproject | 4 +- ports/cortex_a17/ac6/src/tx_thread_schedule.S | 1 - ports/cortex_a17/gnu/src/tx_thread_schedule.S | 1 - ports/cortex_a35/ac6/src/tx_thread_schedule.S | 1 - ports/cortex_a35/gnu/src/tx_thread_schedule.S | 1 - .../example_build/sample_threadx/.cproject | 4 +- .../cortex_a5/ac6/example_build/tx/.cproject | 4 +- ports/cortex_a5/ac6/src/tx_thread_schedule.S | 1 - ports/cortex_a5/gnu/src/tx_thread_schedule.S | 1 - ports/cortex_a53/ac6/src/tx_thread_schedule.S | 1 - ports/cortex_a53/gnu/src/tx_thread_schedule.S | 1 - ports/cortex_a55/ac6/src/tx_thread_schedule.S | 1 - ports/cortex_a55/gnu/src/tx_thread_schedule.S | 1 - ports/cortex_a57/ac6/src/tx_thread_schedule.S | 1 - ports/cortex_a57/gnu/src/tx_thread_schedule.S | 1 - ports/cortex_a65/ac6/src/tx_thread_schedule.S | 1 - ports/cortex_a65/gnu/src/tx_thread_schedule.S | 1 - .../cortex_a65ae/ac6/src/tx_thread_schedule.S | 1 - .../cortex_a65ae/gnu/src/tx_thread_schedule.S | 1 - ports/cortex_a7/ac6/src/tx_thread_schedule.S | 1 - ports/cortex_a7/gnu/src/tx_thread_schedule.S | 1 - ports/cortex_a72/ac6/src/tx_thread_schedule.S | 1 - ports/cortex_a72/gnu/src/tx_thread_schedule.S | 1 - ports/cortex_a73/ac6/src/tx_thread_schedule.S | 1 - ports/cortex_a73/gnu/src/tx_thread_schedule.S | 1 - ports/cortex_a75/ac6/src/tx_thread_schedule.S | 1 - ports/cortex_a75/gnu/src/tx_thread_schedule.S | 1 - ports/cortex_a76/ac6/src/tx_thread_schedule.S | 1 - ports/cortex_a76/gnu/src/tx_thread_schedule.S | 1 - .../cortex_a76ae/ac6/src/tx_thread_schedule.S | 1 - .../cortex_a76ae/gnu/src/tx_thread_schedule.S | 1 - ports/cortex_a77/ac6/src/tx_thread_schedule.S | 1 - ports/cortex_a77/gnu/src/tx_thread_schedule.S | 1 - .../example_build/sample_threadx/.cproject | 4 +- .../cortex_a8/ac6/example_build/tx/.cproject | 4 +- ports/cortex_a8/ac6/src/tx_thread_schedule.S | 1 - ports/cortex_a8/gnu/src/tx_thread_schedule.S | 1 - .../example_build/sample_threadx/.cproject | 4 +- .../cortex_a9/ac6/example_build/tx/.cproject | 4 +- ports/cortex_a9/ac6/src/tx_thread_schedule.S | 1 - ports/cortex_a9/gnu/src/tx_thread_schedule.S | 1 - ports_arch/ARMv7-A/update.sh | 164 +++++++++++++++++ .../common/src/tx_thread_smp_time_get.S | 3 +- ports_arch/ARMv8-A/update.sh | 169 ++++++++++++++++++ ports_smp/cortex_a75_smp/gnu/inc/tx_port.h | 2 +- scripts/check_ports.sh | 20 ++- 58 files changed, 397 insertions(+), 84 deletions(-) create mode 100755 ports_arch/ARMv7-A/update.sh create mode 100755 ports_arch/ARMv8-A/update.sh diff --git a/.github/workflows/ci_cortex_m.yml b/.github/workflows/ci_cortex_m.yml index 149490be5..a207ab1be 100644 --- a/.github/workflows/ci_cortex_m.yml +++ b/.github/workflows/ci_cortex_m.yml @@ -23,7 +23,7 @@ jobs: # This workflow contains a single job called "build" build: # The type of runner that the job will run on - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: matrix: diff --git a/.github/workflows/ports_arch_check.yml b/.github/workflows/ports_arch_check.yml index a2c69aeaf..589ef372c 100644 --- a/.github/workflows/ports_arch_check.yml +++ b/.github/workflows/ports_arch_check.yml @@ -25,7 +25,7 @@ jobs: # Check ports for cortex-m cortex-m: # The type of runner that the job will run on - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -46,8 +46,10 @@ jobs: run: scripts/check_ports.sh cortex-a: - # Check ports for cortex-a - runs-on: windows-latest + # Check ports for cortex-a. This ran on Windows because the A profile + # tooling was PowerShell only; update.sh beside each update.ps1 means it + # runs on the same image as every other job now. + runs-on: ubuntu-24.04 # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -60,18 +62,19 @@ jobs: - name: Checkout sources uses: actions/checkout@v4 - # Copy ports arch - - name: Copy ports arch + # Regenerate the A profile ports and fail if anything changed, which means + # a generated port was edited directly instead of ports_arch. + - name: Check the Cortex-A ports run: | - cd ports_arch/ARMv7-A - pwsh -Command ./update.ps1 -PortSets tx -CopyCommonFiles -CopyPortFiles -CopyExample -PatchFiles - cd ../../ports_arch/ARMv8-A - pwsh -Command ./update.ps1 -PortSets tx,tx_smp -CopyCommonFiles -CopyPortFiles -CopyExample -PatchFiles - if ((git status --porcelain -uno) -ne $null) { - Write-Host "Ports for ARM architecture is not updated" - git status - Exit 1 - } + (cd ports_arch/ARMv7-A && ./update.sh --port-sets tx \ + --copy-common-files --copy-port-files --copy-example --patch-files) + (cd ports_arch/ARMv8-A && ./update.sh --port-sets tx,tx_smp \ + --copy-common-files --copy-port-files --copy-example --patch-files) + if [[ -n $(git status --porcelain -uno) ]]; then + echo "The Cortex-A ports are not reproducible from ports_arch:" + git status --porcelain -uno + exit 1 + fi diff --git a/.github/workflows/regression_template.yml b/.github/workflows/regression_template.yml index 205eb5a8c..fad4d2f15 100644 --- a/.github/workflows/regression_template.yml +++ b/.github/workflows/regression_template.yml @@ -58,7 +58,7 @@ jobs: pull-requests: write # The type of runner that the job will run on - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -160,7 +160,7 @@ jobs: path: ${{ inputs.cmake_path }}/coverage_report/${{ inputs.coverage_name }} deploy_code_coverage: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: ((github.event_name == 'push') || (github.event_name == 'workflow_dispatch')) && !inputs.skip_coverage && !inputs.skip_deploy && !failure() && !cancelled() needs: run_tests environment: diff --git a/ports/cortex_a12/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a12/ac6/example_build/sample_threadx/.cproject index 7882693e3..603e2d868 100644 --- a/ports/cortex_a12/ac6/example_build/sample_threadx/.cproject +++ b/ports/cortex_a12/ac6/example_build/sample_threadx/.cproject @@ -45,7 +45,7 @@