feat: boot mode parsing, FSBL-first flow, UI reorder

1. Boot mode parsing:
   - BootInfo.boot_mode field added
   - Matches 'Boot mode is JTAG', 'Boot Mode: QSPI', etc.
   - Fixed false version match: 'Boot mode is' no longer
     captures 'mode' as a version string

2. UART window cleanup:
   - Parsed boot info (mode/IP/ver) now only goes to main log
   - Raw serial lines still appear in UART window

3. Step 3 FSBL enforcement:
   - BIT step: after fpga -file, CPU is immediately halted (stop)
     to prevent Flash code from enabling MMU
   - ELF step: always dow FSBL → con → stop → dow bootloader

4. UI reorder:
   - FSBL ELF selector moved BEFORE Bootloader BIT
   - New layout: FSBL → BIT → ELF → Bootloader BIN → Flash → FW BIN
   - Fixed grid overlap (FSBL and Flash were both at row 6)
This commit is contained in:
Jeremy Shen
2026-06-10 16:20:12 +08:00
parent 47569a0e43
commit 9a7a625c46
4 changed files with 43 additions and 23 deletions
+14 -1
View File
@@ -23,6 +23,7 @@ class BootInfo:
ip_address: str = ""
version: str = ""
boot_message: str = ""
boot_mode: str = ""
raw_lines: list[str] | None = None
@@ -73,7 +74,7 @@ def parse_boot_output(lines: list[str]) -> BootInfo:
ip_pattern = re.compile(r"\b(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\b")
version_patterns = [
re.compile(r"[Vv]ersion[:\s]+([^\s;,\n]+)", re.IGNORECASE),
re.compile(r"[Bb]oot\s+([^\s;,\n]+)", re.IGNORECASE),
re.compile(r"[Bb]oot\s+(?:version\s+)?([Vv]?\d+\.\d+[^\s;,\n]*)", re.IGNORECASE),
re.compile(r"[Ff]irm[Ww]are:?\s*([^\s;,\n]+)", re.IGNORECASE),
re.compile(r"(?:^|[\s:=])([Vv]\d+\.\d+\.\d+[^\s;,\n]*)", re.IGNORECASE),
]
@@ -84,6 +85,10 @@ def parse_boot_output(lines: list[str]) -> BootInfo:
re.compile(r"Linux\s+booted", re.IGNORECASE),
re.compile(r"QSYS\s+ready", re.IGNORECASE),
]
boot_mode_patterns = [
re.compile(r"[Bb]oot\s*[Mm]ode\s*(?:is)?\s*[:\[=\s]*(\w+)"),
re.compile(r"BootMode\s*[:\[=\s]*(\w+)", re.IGNORECASE),
]
for line in lines:
# Extract IP address
@@ -107,6 +112,14 @@ def parse_boot_output(lines: list[str]) -> BootInfo:
info.boot_message = line.strip()
break
# Extract boot mode
if not info.boot_mode:
for pattern in boot_mode_patterns:
match = pattern.search(line)
if match:
info.boot_mode = match.group(1)
break
return info