75 خطوط
2.4 KiB
YAML
75 خطوط
2.4 KiB
YAML
name: flash-aminpa-V1.5.yml
|
|
# Production hardware flashing for Amin Pardaz Asia device v1.5
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
concurrency:
|
|
group: aminpa-serial-flash
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
flash-aminpa:
|
|
name: Hardware flashing - Amin Pardaz Asia v1.5
|
|
runs-on: serial-runner
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Validate all firmware files before erasing flash
|
|
run: |
|
|
/usr/bin/python3 - <<'PY'
|
|
from pathlib import Path
|
|
|
|
required = {
|
|
"u-boot-sunxi-with-spl.bin": 32,
|
|
"sun8i-v3s-licheepi-zero-dock.dtb": 32,
|
|
"zImage": 64,
|
|
"rootfs.squashfs": 64,
|
|
}
|
|
for filename, minimum in required.items():
|
|
path = Path("firmware") / filename
|
|
if not path.is_file() or path.stat().st_size < minimum:
|
|
raise SystemExit(f"Missing or invalid firmware: {path}")
|
|
print(f"Found {path}: {path.stat().st_size} bytes")
|
|
PY
|
|
|
|
- name: Check current U-Boot CLI
|
|
run: /usr/bin/python3 scripts/serial_command.py check
|
|
|
|
- name: Configure and verify network
|
|
run: /usr/bin/python3 scripts/serial_command.py configure
|
|
|
|
- name: Check all firmware sizes against detected flash layout
|
|
run: /usr/bin/python3 scripts/serial_command.py preflight
|
|
|
|
- name: Erase detected SPI flash and verify sample
|
|
run: /usr/bin/python3 scripts/serial_command.py erase
|
|
|
|
- name: Transfer, write and verify U-Boot
|
|
run: /usr/bin/python3 scripts/serial_command.py transfer
|
|
|
|
- name: Transfer, write and verify DTB
|
|
run: /usr/bin/python3 scripts/serial_command.py transfer-dtb
|
|
|
|
- name: Transfer, write and verify Kernel
|
|
run: /usr/bin/python3 scripts/serial_command.py transfer-kernel
|
|
|
|
- name: Transfer, write and verify RootFS
|
|
run: /usr/bin/python3 scripts/serial_command.py transfer-rootfs
|
|
|
|
- name: Inspect boot configuration
|
|
run: /usr/bin/python3 scripts/serial_command.py boot-config
|
|
|
|
- name: Configure and verify bootcmd for detected flash
|
|
run: /usr/bin/python3 scripts/serial_command.py set-bootcmd
|
|
|
|
- name: Save U-Boot environment before reboot
|
|
run: /usr/bin/python3 scripts/serial_command.py saveenv
|
|
|
|
- name: Reboot hardware after successful flashing
|
|
run: /usr/bin/python3 scripts/serial_command.py reboot
|