Skip to content

Commit 61b2ae2

Browse files
committed
fixing IMX8MP so it shows as a linux kernel
1 parent 385c5a2 commit 61b2ae2

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

adafruit_platformdetect/board.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ def _imx8mx_id(self) -> Optional[str]:
421421
if "Phanbell" in board_value:
422422
return boards.CORAL_EDGE_TPU_DEV
423423
return None
424-
424+
425425
def _imx8mp_id(self) -> Optional[str]:
426426
"""Check what type iMX8M board."""
427427
board_value = self.detector.get_device_model()

adafruit_platformdetect/chip.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ def _linux_id(self) -> Optional[str]:
269269
if self.detector.check_dt_compatible_value("sun20i-d1"):
270270
return chips.D1_RISCV
271271

272+
if self.detector.check_dt_compatible_value("imx8mp"):
273+
return chips.IMX8MP
274+
272275
if self.detector.check_dt_compatible_value("libretech,aml-s905x-cc"):
273276
return chips.S905X
274277

@@ -311,11 +314,7 @@ def _linux_id(self) -> Optional[str]:
311314
elif "nvidia,tegra234" in compats:
312315
linux_id = chips.T234
313316
if compatible and "imx8m" in compatible:
314-
compats = compatible.split("\x00")
315-
if "imx8mp" in compats:
316-
linux_id = chips.IMX8MP
317-
else:
318-
linux_id = chips.IMX8MX
317+
linux_id = chips.IMX8MX
319318
if compatible and "odroid-c2" in compatible:
320319
linux_id = chips.S905
321320
if compatible and "amlogic" in compatible:

0 commit comments

Comments
 (0)