Skip to content

Restore native ARAnyM FAT disk byte order #31

Restore native ARAnyM FAT disk byte order

Restore native ARAnyM FAT disk byte order #31

Workflow file for this run

name: aranym integration probe
on:
push:
paths:
- ".github/workflows/aranym-probe.yml"
- "ROADMAP.md"
- "README.md"
pull_request:
paths:
- ".github/workflows/aranym-probe.yml"
workflow_dispatch:
jobs:
aranym-baseline:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install ARAnyM
run: |
sudo apt-get update
sudo apt-get install -y aranym dosfstools mtools
- name: Record ARAnyM baseline
run: |
set -eux
command -v aranym
dpkg-query -W -f='aranym_version=${Version}\n' aranym | tee aranym-version.txt
(aranym --help || true) > aranym-help.txt 2>&1
test -s aranym-version.txt
- name: Provision EmuTOS for ARAnyM
run: |
set -eux
curl --fail --location --retry 3 -o /tmp/emutos.zip \
https://sourceforge.net/projects/emutos/files/emutos/1.4/emutos-512k-1.4.zip/download
unzip -q /tmp/emutos.zip -d /tmp/emutos
rom="$(find /tmp/emutos -type f \( -name 'etos512*.img' -o -name 'etos512*.rom' \) -print -quit)"
test -n "$rom"
mkdir -p "$HOME/.aranym"
cp "$rom" "$HOME/.aranym/emutos-aranym.img"
test -s "$HOME/.aranym/emutos-aranym.img"
sha256sum "$HOME/.aranym/emutos-aranym.img" | tee aranym-emutos.sha256
- name: Discover current FreeMiNT release
run: |
set -eux
curl --fail --location --retry 3 \
https://api.github.com/repos/freemint/freemint/releases/latest \
-o freemint-release.json
python3 - <<'PY'
import json
d=json.load(open("freemint-release.json"))
print("freemint_release_tag="+d.get("tag_name",""))
for a in d.get("assets",[]):
print(a.get("name","")+"\t"+a.get("browser_download_url",""))
PY
python3 - <<'PY' > freemint-release.txt
import json
d=json.load(open("freemint-release.json"))
print("tag="+d.get("tag_name",""))
print("published_at="+d.get("published_at",""))
for a in d.get("assets",[]):
print("asset="+a.get("name","")+"\t"+a.get("browser_download_url",""))
PY
grep -q '^tag=.' freemint-release.txt
- name: Inspect FreeMiNT 1.18.0 distribution
run: |
set -eux
url="$(python3 - <<'PY'
import json
d=json.load(open("freemint-release.json"))
for a in d.get("assets",[]):
if a.get("name","").endswith(".zip"):
print(a["browser_download_url"])
break
PY
)"
test -n "$url"
curl --fail --location --retry 6 --retry-all-errors --connect-timeout 15 --max-time 180 -o /tmp/freemint.zip "$url"
unzip -l /tmp/freemint.zip | tee freemint-contents.txt
unzip -q /tmp/freemint.zip -d /tmp/freemint
find /tmp/freemint -type f \
\( -iname '*aranym*' -o -iname 'mint*.prg' -o -iname 'mint*.xfs' -o -iname '*kernel*' \) \
-printf '%P\n' | sort | tee freemint-boot-candidates.txt
test -s freemint-boot-candidates.txt
- name: Stage FreeMiNT ARAnyM kernel tree
run: |
set -eux
mkdir -p aranym-freemint/C/AUTO aranym-freemint/C/MINT/1-18-0
mkdir -p aranym-freemint/C/MINT
cp /tmp/freemint/freemint/auto/mintara.prg aranym-freemint/C/AUTO/MINTARA.PRG
cp /tmp/freemint/freemint/auto/mint030.prg aranym-freemint/C/AUTO/MINT030.PRG
cp /tmp/freemint/freemint/driver/xfs/aranym.xfs aranym-freemint/C/MINT/1-18-0/ARANYM.XFS
cp /tmp/freemint/freemint/driver/xfs/hostfs.xfs aranym-freemint/C/MINT/1-18-0/HOSTFS.XFS
cp /tmp/freemint/freemint/mint/1-18-0/mint.cnf aranym-freemint/C/MINT/1-18-0/MINT.CNF
cp /tmp/freemint/freemint/mint/1-18-0/mint.cnf aranym-freemint/C/MINT/MINT.CNF
cp /tmp/freemint/freemint/mint/1-18-0/mint.cnf aranym-freemint/C/MINT.CNF
test -s aranym-freemint/C/AUTO/MINTARA.PRG
test -s aranym-freemint/C/AUTO/MINT030.PRG
test -s aranym-freemint/C/MINT/1-18-0/ARANYM.XFS
test -s aranym-freemint/C/MINT/1-18-0/HOSTFS.XFS
test -s aranym-freemint/C/MINT/MINT.CNF
test -s aranym-freemint/C/MINT.CNF
truncate -s 32M aranym-freemint-c.img
mkfs.vfat -F 16 -n FREEMINT aranym-freemint-c.img
mmd -i aranym-freemint-c.img ::AUTO ::MINT ::MINT/1-18-0
mcopy -i aranym-freemint-c.img aranym-freemint/C/AUTO/MINT030.PRG ::AUTO/MINT030.PRG
mcopy -i aranym-freemint-c.img aranym-freemint/C/MINT.CNF ::MINT.CNF
mcopy -i aranym-freemint-c.img aranym-freemint/C/MINT/MINT.CNF ::MINT/MINT.CNF
mcopy -i aranym-freemint-c.img aranym-freemint/C/MINT/1-18-0/MINT.CNF ::MINT/1-18-0/MINT.CNF
mcopy -i aranym-freemint-c.img aranym-freemint/C/MINT/1-18-0/ARANYM.XFS ::MINT/1-18-0/ARANYM.XFS
mcopy -i aranym-freemint-c.img aranym-freemint/C/MINT/1-18-0/HOSTFS.XFS ::MINT/1-18-0/HOSTFS.XFS
mdir -i aranym-freemint-c.img :: | tee freemint-fat-root.txt
test -s aranym-freemint/C/MINT/1-18-0/MINT.CNF
sha256sum \
aranym-freemint/C/AUTO/MINTARA.PRG \
aranym-freemint/C/MINT/1-18-0/ARANYM.XFS \
| tee freemint-aranym-files.sha256
{
echo "freemint_version=1.18.0"
echo "kernel=AUTO/MINT030.PRG"
echo "xfs=MINT/1-18-0/ARANYM.XFS"
echo "status=STAGED"
} | tee freemint-aranym-stage.txt
- name: Configure ARAnyM hostfs C drive for FreeMiNT
run: |
set -eux
cat > aranym-freemint.cfg <<EOF
[GLOBAL]
FastRAM = 64
EmuTOS = $HOME/.aranym/emutos-aranym.img
Bootstrap = $GITHUB_WORKSPACE/aranym-freemint/C/AUTO/MINT030.PRG
BootstrapArgs = DEBUG_LEVEL=1 BOOT_DELAY=0 MEM_PROT=NO
BootstrapArgs = DEBUG_LEVEL=1 BOOT_DELAY=0 MEM_PROT=NO BOOT_DRIVE=C
[IDE0]
Present = Yes
IsCDROM = No
ByteSwap = No
ReadOnly = No
Path = $GITHUB_WORKSPACE/aranym-freemint-c.img
[HOSTFS]
D = $GITHUB_WORKSPACE/aranym-freemint/C
[BOOT]
BootDrive = C
EOF
test -s aranym-freemint.cfg
grep -F "Path = $GITHUB_WORKSPACE/aranym-freemint-c.img" aranym-freemint.cfg
grep -F "ByteSwap = No" aranym-freemint.cfg
grep -F "BootDrive = C" aranym-freemint.cfg
grep -F "Bootstrap = $GITHUB_WORKSPACE/aranym-freemint/C/AUTO/MINT030.PRG" aranym-freemint.cfg
grep -F "BOOT_DRIVE=C" aranym-freemint.cfg
grep -F "FastRAM = 64" aranym-freemint.cfg
printf '\n=== ARAnyM startup log ===\n'
# printed after the emulator run below
- name: Probe headless ARAnyM + EmuTOS startup
run: |
set -eux
sudo apt-get install -y xvfb imagemagick x11-utils
Xvfb :99 -screen 0 1024x768x24 > aranym-xvfb.log 2>&1 &
xvfb_pid=$!
export DISPLAY=:99
sleep 1
aranym -N -e -c "$GITHUB_WORKSPACE/aranym-freemint.cfg" > aranym-startup.log 2>&1 &
aranym_pid=$!
for i in $(seq 1 30); do
if mdir -i aranym-freemint-c.img ::MINT/BOOT.LOG >/dev/null 2>&1; then
echo "freemint_boot_log_appeared_after=${i}s" | tee freemint-guest-result.txt
break
fi
sleep 1
done
import -display :99 -window root aranym-emutos.png
identify aranym-emutos.png | tee aranym-framebuffer.txt
cat aranym-startup.log | tee aranym-startup-visible.log
grep -Ei 'NF BOOTSTRAP|FreeMiNT|MiNT|parse_cnf|realloc_region|panic|fatal|error' aranym-startup.log | tee freemint-bootstrap-trace.txt || true
strings aranym-freemint/C/AUTO/MINT030.PRG | grep -Ei 'FreeMiNT|MiNT' | head -20 | tee freemint-kernel-identity.txt || true
colors="$(convert aranym-emutos.png -format %c histogram:info:- | wc -l)"
printf 'aranym_framebuffer_colors=%s\n' "$colors" | tee -a aranym-framebuffer.txt
test "$colors" -gt 1
if mdir -i aranym-freemint-c.img ::MINT/BOOT.LOG >/dev/null 2>&1; then
mcopy -i aranym-freemint-c.img ::MINT/BOOT.LOG freemint-boot.log
grep -Ei 'MiNT|FreeMiNT' freemint-boot.log | head -40 | tee -a freemint-guest-result.txt || true
else
echo "freemint_boot_log=missing" | tee -a freemint-guest-result.txt
fi
mdir -i aranym-freemint-c.img ::MINT | tee freemint-fat-mint.txt || true
mcopy -i aranym-freemint-c.img ::MINT/BOOT.LOG freemint-boot.log 2>/dev/null || true
if test -s freemint-boot.log; then
grep -Ei 'MiNT|FreeMiNT' freemint-boot.log | head -40 | tee -a freemint-guest-result.txt || true
fi
kill "$aranym_pid" 2>/dev/null || true
wait "$aranym_pid" 2>/dev/null || true
kill "$xvfb_pid" 2>/dev/null || true
rc=0
rc=${rc:-0}
test "$rc" -eq 0
test -s aranym-startup.log
! grep -Fq "No operating system found" aranym-startup.log
printf 'aranym_startup_exit=%s\n' "$rc" | tee aranym-startup-result.txt
- name: Record M4.1 host capabilities
run: |
{
echo "milestone=M4.1"
echo "emulator=ARAnyM"
echo "guest_target=FreeMiNT"
echo "machine_class=TT/Falcon-oriented"
echo "status=BASELINE_PASS"
} | tee aranym-baseline.txt
- name: Upload ARAnyM baseline evidence
uses: actions/upload-artifact@v4
with:
name: aranym-m4-1-baseline
path: |
aranym-version.txt
aranym-package-files.txt
aranym-manual.txt
aranym-package-docs.txt
aranym-config-doc-hits.txt
aranym-startup-visible.log
freemint-bootstrap-trace.txt
aranym-help.txt
aranym-emutos.sha256
freemint-release.txt
freemint-release.json
freemint-contents.txt
freemint-boot-candidates.txt
freemint-aranym-files.sha256
freemint-aranym-stage.txt
aranym-freemint.cfg
aranym-startup.log
aranym-startup-result.txt
aranym-xvfb.log
aranym-emutos.png
aranym-framebuffer.txt
freemint-kernel-identity.txt
freemint-guest-result.txt
freemint-boot.log
aranym-baseline.txt
if-no-files-found: warn