The i.MX8 cannot be deblobbed
Devices based on the i.MX8 or i.MX8M (such as the Librem phone or MNT Reform) have received popular coverage recently. The number of firmware blobs involved in the bringup of these devices is often a point of discussion. At times, people have considered whether some of these blobs could be replaced with libre replacements via reverse engineering.
I can now confirm that these chips can never be fully deblobbed. The following is an excerpt from the i.MX8M Reference Manual (page 840):
Since the wording is a little vague as to whether it's NXP or the customer who signs this blob, let's verify that this firmware blob is indeed signed by NXP and not the customer:
$ wget http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.0.bin
# This is a makeself-style self-extracting shell script with some shrinkwrap
# EULA attached. Sorry, not interested:
$ 7z x firmware-imx-8.0.bin
$ tar xvf firmware-imx-8.0
$ find firmware-imx-8.0 -type f | grep hdmi
firmware-imx-8.0/firmware/hdmi/cadence/signed_dp_imx8m.bin
firmware-imx-8.0/firmware/hdmi/cadence/signed_hdmi_imx8m.bin
firmware-imx-8.0/firmware/hdmi/cadence/dpfw.bin
firmware-imx-8.0/firmware/hdmi/cadence/hdmitxfw.bin
firmware-imx-8.0/firmware/hdmi/cadence/hdmirxfw.bin
# Binwalk tells us the signed blob contains an X.509 certificate:
$ cd firmware-imx-8.0/firmware/hdmi/cadence
$ binwalk signed_hdmi_imx8.bin
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
38488 0x9658 MySQL ISAM compressed data file Version 1
103636 0x194D4 Certificate in DER format (x509 v3), header length: 4, sequence length: 680
# Extract the certificate.
$ tail -c +103637 signed_hdmi_imx8.bin > x.bin
$ openssl x509 -inform der -in x.bin -text
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 1 (0x1)
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN = iMX_CA@nxp.com
Validity
Not Before: Jan 1 00:00:00 2017 GMT
Not After : Jan 1 00:00:00 2037 GMT
Subject: CN = MIMX8MQ0101
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public-Key: (2048 bit)
Modulus:
00:b1:26:2e:94:29:86:5d:35:a5:ad:55:62:d7:65:
98:bf:18:59:fa:3d:5f:22:90:1a:cd:ca:c6:ab:26:
83:1e:50:62:da:8f:0f:18:b3:59:b0:e8:0a:f2:46:
2e:97:12:e4:81:5f:88:11:d1:38:9a:43:54:06:7a:
65:b6:ab:d2:9a:1c:73:27:54:4b:4c:94:51:1f:25:
55:0f:32:26:77:29:ca:8b:cd:96:b1:dd:60:3b:5f:
9d:20:7e:e9:1c:75:91:19:36:cf:6c:c6:05:5d:65:
9b:f0:a5:9f:27:e1:85:5d:b4:e1:6f:bc:4f:e0:2b:
e8:83:37:86:d0:9c:26:18:d7:f2:40:b9:2c:fc:5a:
92:3a:a0:85:1b:b9:be:6e:d3:e7:01:5e:ab:e5:0a:
1e:16:10:0b:9f:b9:e0:bc:51:42:d1:93:0a:a0:69:
19:a7:12:b5:f0:04:74:64:2d:11:33:2c:f7:14:1d:
48:8c:61:78:03:90:77:b3:8b:48:a9:38:b8:ea:0d:
9d:de:19:de:61:15:10:75:40:47:f1:37:db:d8:0f:
c3:0b:60:1a:6a:31:b3:15:0b:01:ce:82:72:80:f0:
29:6f:28:59:ce:a0:e0:15:3a:cd:3f:b6:4a:4e:a5:
73:28:bb:db:d4:f1:ab:85:97:9e:dc:6e:31:56:d9:
36:53
Exponent: 65537 (0x10001)
Signature Algorithm: sha256WithRSAEncryption
49:c8:f8:97:10:8b:fe:ff:7e:16:93:46:98:5e:d3:68:83:e1:
5c:12:6f:83:bd:17:96:e0:56:89:c5:78:dc:0e:5c:fb:de:e9:
a5:ec:ca:6a:3f:13:45:96:c3:7f:b1:ed:ae:84:cf:c3:e8:0b:
29:72:14:14:21:ff:e8:9d:a5:c9:c8:03:0e:96:f8:91:a1:95:
43:8d:88:2c:0c:73:ac:5a:6e:b4:3b:92:ed:d8:01:22:fb:f6:
62:dd:68:55:dc:7a:0e:e8:ff:5f:3e:74:4c:8d:26:97:41:ec:
a0:aa:0d:38:14:a6:c9:b3:47:b0:94:d6:21:8a:ab:75:4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YgsDHOsWm60O5Lt2AEi+/Zi3WhV3HoO6P9f
PnRMjSaXQeygqg04FKbJs0ewlNYhiqt1TgSeICNlGE6fgPkb5S7vr/syqQpytfQz
JpJ4fa2c7cpdU23M0MmtD9hOJu+7PfTB4zB+n5fAiRLlvFsmhJzYx3uY6oR8WAAn
e2Ud1tFQGwV89gY8bp9WS7Mozb0h28oMFmsgogsfh7gjMIA1W/wsLiQ5sm2KIHMq
bLpxRsdCZrQuCY11
-----END CERTIFICATE-----
The blob is signed by “iMX_CA@nxp.com”.
Conclusions:
- The i.MX8(M) boot ROM searches for an NXP-signed HDMI firmware image before even attempting to boot the main cores. If it does not find this image, or it is not signed, the HDMI block will be locked until next reset.
- Therefore, it is impossible to ever replace the HDMI blob used by this device. The device could be used without this blob, but you then forego use of the HDMI (or DisplayPort) functionality.
Note about the MNT Reform: The MNT Reform went out of its way to avoid relying on this blob for its internal display. Rather than doing the obvious thing and connecting the i.MX8M's DisplayPort interface to the Embedded DisplayPort (eDP) display panel, they connected the internal display by using the i.MX8M's MIPI DSI interface (which is unaffected by this blob) to connect to a MIPI DSI to eDP converter chip, and then to the display (indeed, the fact that they went out of their way to ensure people can use the laptop without the blob certainly warrants praise). The external HDMI port can't be used without the blob, however.
2023-04-24: Updated to note how MNT Reform is and isn't affected.