Added bash A profile update scripts and restored ports_arch as their source (#592)

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) <noreply@anthropic.com>
This commit is contained in:
Frédéric Desbiens
2026-08-09 10:55:29 -04:00
committed by GitHub
parent 08b120d2bc
commit f23a1807a2
58 changed files with 397 additions and 84 deletions
+1 -1
View File
@@ -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:
+17 -14
View File
@@ -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
+2 -2
View File
@@ -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: