mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-12-18 09:53:04 +00:00
m1n1/fw/dcp/parse_log: Parse firmware version from log
Incomplete, needs to reload fw.dcp.ipc. Signed-off-by: Janne Grunau <j@jannau.net>
This commit is contained in:
parent
40d1d302d0
commit
7498b785ae
1 changed files with 7 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
|
||||
from m1n1.utils import *
|
||||
from m1n1.constructutils import Ver
|
||||
from m1n1.fw.dcp.ipc import *
|
||||
|
||||
def parse_log(fd):
|
||||
|
@ -17,6 +18,12 @@ def parse_log(fd):
|
|||
op = op_stack[chan].pop()
|
||||
assert int(off, 0) == op.off
|
||||
op.ack(bytes.fromhex(out_data))
|
||||
elif optype == "VERSION":
|
||||
for arg in args.strip().split(" "):
|
||||
version = arg.split(":")
|
||||
if len(version) == 2:
|
||||
Ver.set_version_key(version[0], version[1])
|
||||
continue
|
||||
else:
|
||||
raise Exception(f"Unknown log cmd {optype}")
|
||||
|
||||
|
|
Loading…
Reference in a new issue