<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mcuboot - checking whether firmware matches hardware</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118047/mcuboot---checking-whether-firmware-matches-hardware</link><description>Hi, 
 Legacy SDK bootloader and dfu preparation workflow had the following option: 
 
 hw_option allowed for checks, whether supplied firmware matches given hardware. So firmware for device A won&amp;#39;t get programmed into device B. 
 How about mcuboot? 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Jan 2025 13:14:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118047/mcuboot---checking-whether-firmware-matches-hardware" /><item><title>RE: Mcuboot - checking whether firmware matches hardware</title><link>https://devzone.nordicsemi.com/thread/519763?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2025 13:14:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fab46cb7-19be-46a6-a6ee-fdef4a4a1e6a</guid><dc:creator>m5k8</dc:creator><description>&lt;p&gt;OK, I also didn&amp;#39;t find anything like hardware compatibility check, so using the keys looks like the only way.&lt;/p&gt;
&lt;p&gt;But that&amp;#39;s far from perfect.&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s say you have hardware V1 and matching firmware V1. Then hardware V2 happens, there are some changes. Previous firmware V1 didn&amp;#39;t know the future and doesn&amp;#39;t work with new hardware, but firmware V2 knows how to work with both hardware V1 and V2. We want to allow loading fw1 to hw1 only, and allow fw2 to load to both hw1 and hw2. Different keys won&amp;#39;t allow that.&lt;/p&gt;
&lt;p&gt;Hardware compatibility level or list of compatible hardware versions embedded in firmware and checked by bootloader would solve this.&lt;/p&gt;
&lt;p&gt;Or multiple keys. There&amp;#39;s hope in mcuboot docs:&lt;/p&gt;
&lt;p&gt;&amp;quot;Image &lt;em&gt;may&lt;/em&gt; contain a signature TLV. If it does, it must also have a KEYHASH TLV with the hash of the key that was used to sign. The list of keys will then be iterated over looking for the matching key, which then will then be used to verify the image contents.&amp;quot;&lt;/p&gt;
&lt;p&gt;Slightly vague, first &amp;quot;signature&amp;quot; is mentioned as singular, then &amp;quot;list of keys&amp;quot; is introduced as plural, but it&amp;#39;s light on the details.&lt;/p&gt;
&lt;p&gt;And finally:&lt;/p&gt;
&lt;p&gt;&amp;quot;Currently, the Zephyr RTOS port limits its support to one keypair at the time, although MCUboot&amp;rsquo;s key management infrastructure supports multiple keypairs.&amp;quot;&lt;/p&gt;
&lt;p&gt;So, as I can see, the answer for hardware versions compatibility checks is &amp;quot;not possible&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mcuboot - checking whether firmware matches hardware</title><link>https://devzone.nordicsemi.com/thread/518656?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2025 13:58:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09c84e01-8590-42a5-b16e-0d2016333648</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;From what I can see you are right, there is no concept of hardare version in MCUboot (and not corresponding field in the image trailer or other metadata), so the way to solve this is by uding different signing keys. (That has the added advantage that in&amp;nbsp;the unlikely event that the private key used for one version is compromized, it would not affect other versions).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>