From 226f8f52edfba1a0c5db464ee864a2aefa88a341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Riedm=C3=BCller?= Date: Thu, 1 Aug 2024 17:13:41 +0200 Subject: [PATCH 1/2] snagrecover: Fix imx8mp alias imx865 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As the imx815 and imx93 the imx865 only requires a single firmware file containing both spl and u-boot and does not require a preliminary step before the transfer. Signed-off-by: Stefan Riedmüller --- src/snagrecover/firmware/rom_container.py | 2 +- src/snagrecover/protocols/imx_sdp.py | 4 ++-- src/snagrecover/supported_socs.yaml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/snagrecover/firmware/rom_container.py b/src/snagrecover/firmware/rom_container.py index 3965c5d..e00c3cd 100644 --- a/src/snagrecover/firmware/rom_container.py +++ b/src/snagrecover/firmware/rom_container.py @@ -63,7 +63,7 @@ def get_container_size(boot_blob: bytes) -> int: container for boards socs using the SDPS protocol. """ soc_model = recovery_config["soc_model"] - if soc_model in ["imx815","imx93"]: + if soc_model in ["imx815", "imx865", "imx93"]: return len(boot_blob) rom_container_tag = boot_blob[CONTAINER_HDR_ALIGNMENT + 3] if rom_container_tag != CONTAINER_TAG: diff --git a/src/snagrecover/protocols/imx_sdp.py b/src/snagrecover/protocols/imx_sdp.py index aad21de..c7a23ed 100644 --- a/src/snagrecover/protocols/imx_sdp.py +++ b/src/snagrecover/protocols/imx_sdp.py @@ -327,7 +327,7 @@ def sdps_write(self, blob: bytes, size: int) -> bool: """ logger.info(f"SDPS write with parameters size:0x{size:x} offset:0x00") soc_model = recovery_config["soc_model"] - if soc_model not in ["imx8qm", "imx8qxp","imx815","imx93"]: + if soc_model not in ["imx8qm", "imx8qxp", "imx815", "imx865", "imx93"]: # only some mpu models require a preliminary command before the report 2 # transfer packet1_arr = bytearray(b"\x01") # report 1 @@ -341,7 +341,7 @@ def sdps_write(self, blob: bytes, size: int) -> bool: packet1_arr += b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" # reserved packet1 = bytes(packet1_arr) self.dev.write(packet1) - if soc_model in ["imx815","imx93"]: + if soc_model in ["imx815", "imx865", "imx93"]: transfer_size = 1020 else: transfer_size = 1024 diff --git a/src/snagrecover/supported_socs.yaml b/src/snagrecover/supported_socs.yaml index 3bd03f0..4a34825 100644 --- a/src/snagrecover/supported_socs.yaml +++ b/src/snagrecover/supported_socs.yaml @@ -25,6 +25,8 @@ tested: family: imx imx7d: family: imx + imx865: + family: imx imx8mm: family: imx imx8qm: @@ -98,8 +100,6 @@ untested: family: imx imx815: family: imx - imx865: - family: imx imx8dxl: family: imx imx8mq: From 85184f463ce4cbffc6d3b5bdd25fad201deb0a69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Riedm=C3=BCller?= Date: Thu, 1 Aug 2024 17:17:24 +0200 Subject: [PATCH 2/2] snagrecover: templates: Add i.MX 8MP phyBOARD-Pollux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a template for PHYTEC's phyBOARD-Pollux SBC. It supports the phyCORE-i.MX8MP (imx865) SOMs. Signed-off-by: Stefan Riedmüller --- src/snagrecover/templates/imx8mp-phyboard-pollux.yaml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 src/snagrecover/templates/imx8mp-phyboard-pollux.yaml diff --git a/src/snagrecover/templates/imx8mp-phyboard-pollux.yaml b/src/snagrecover/templates/imx8mp-phyboard-pollux.yaml new file mode 100644 index 0000000..02273b0 --- /dev/null +++ b/src/snagrecover/templates/imx8mp-phyboard-pollux.yaml @@ -0,0 +1,2 @@ +flash-bin: + path: imx-boot