اضافه شدن ورک فلو ریبوت نهایی
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
name: flash-aminpa-V1.5
|
name: flash-aminpa-V1.5.yml
|
||||||
# Production flash for Amin Pardaz Asia device v1.5
|
# Production hardware flashing for Amin Pardaz Asia device v1.5
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -12,7 +12,7 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
flash-aminpa:
|
flash-aminpa:
|
||||||
name: Production flash - Amin Pardaz Asia v1.5
|
name: Hardware flashing - Amin Pardaz Asia v1.5
|
||||||
runs-on: serial-runner
|
runs-on: serial-runner
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -66,3 +66,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Configure and verify bootcmd for detected flash
|
- name: Configure and verify bootcmd for detected flash
|
||||||
run: /usr/bin/python3 scripts/serial_command.py set-bootcmd
|
run: /usr/bin/python3 scripts/serial_command.py set-bootcmd
|
||||||
|
|
||||||
|
- name: Reboot hardware after successful flashing
|
||||||
|
run: /usr/bin/python3 scripts/serial_command.py reboot
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ def boot_config(cli, confirmed=False):
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument("mode", choices=("check", "configure", "transfer", "transfer-dtb", "transfer-kernel", "transfer-rootfs", "erase", "boot-config", "preflight", "set-bootcmd"), default="check", nargs="?")
|
parser.add_argument("mode", choices=("check", "configure", "transfer", "transfer-dtb", "transfer-kernel", "transfer-rootfs", "erase", "boot-config", "preflight", "set-bootcmd", "reboot"), default="check", nargs="?")
|
||||||
parser.add_argument("--port", default="/dev/ttyUSB0")
|
parser.add_argument("--port", default="/dev/ttyUSB0")
|
||||||
parser.add_argument("--firmware", type=Path, default=None)
|
parser.add_argument("--firmware", type=Path, default=None)
|
||||||
parser.add_argument("--rootfs-size", type=lambda value: int(value, 0), help="Actual RootFS partition size in bytes (decimal or 0x-prefixed hex)")
|
parser.add_argument("--rootfs-size", type=lambda value: int(value, 0), help="Actual RootFS partition size in bytes (decimal or 0x-prefixed hex)")
|
||||||
@@ -232,6 +232,12 @@ def main():
|
|||||||
cli.detect()
|
cli.detect()
|
||||||
if args.mode == "check":
|
if args.mode == "check":
|
||||||
return
|
return
|
||||||
|
if args.mode == "reboot":
|
||||||
|
print("\n>>> reset", flush=True)
|
||||||
|
port.write(b"reset\r")
|
||||||
|
port.flush()
|
||||||
|
print("Reset command sent; reboot completion has not been verified.", flush=True)
|
||||||
|
return
|
||||||
if args.mode == "preflight":
|
if args.mode == "preflight":
|
||||||
capacity = detect_flash(cli)
|
capacity = detect_flash(cli)
|
||||||
files = {"uboot": "u-boot-sunxi-with-spl.bin", "dtb": "sun8i-v3s-licheepi-zero-dock.dtb",
|
files = {"uboot": "u-boot-sunxi-with-spl.bin", "dtb": "sun8i-v3s-licheepi-zero-dock.dtb",
|
||||||
|
|||||||
مرجع در شماره جدید
مسدود کردن کاربر