Blog

i.MX8 Secure Boot made easy – Code Signing using Yocto

Wednesday, 06 Apr 2022  |  Nathan Drude

By now, most engineers have heard of Secure Boot and the benefits of using it. However, after briefly reviewing the documentation, Secure Boot appears too complicated and time consuming and is set aside as a nice-to-have in the future. Does this sound familiar?

With Variscite’s integration of Secure Boot and Yocto, it has never been easier to enable Secure Boot on your Variscite i.MX8 based product. While manually building and signing your images outside of the Yocto build system requires many steps and creates opportunities for human error, using Yocto to automate signing your images saves time, is easily reproducible, can be distributed to many developers, and requires only a small configuration in local.conf.

What is Secure Boot and why should you use it?

Secure Boot is the process of authenticating the boot images and operating system in your product. It enables you to trust that the software running in your product is authentic and has not been modified or replaced by a third party. Among other things, this prevents your product from being repurposed or infected with malicious boot or operating system software.

How does it work?

The i.MX8 (i.MX8Q and iMX8X) and i.MX8M (i.MX8M, i.MX8M Mini, i.MX8M Nano and iMX8M Plus) SoC families have an optional hardware feature to enable Secure Boot. The i.MX8M family features High Assurance Boot (HAB), and the i.MX8 family features Advanced High Assurance Boot (AHAB). While the architecture for each family is slightly different, they both achieve the same end result.

The HAB/AHAB authentication is based on public key cryptography. Authentication is achieved using a Super Root Key (SRK), which is an RSA key pair. The boot images are signed offline using the private key. The resulting signed images are then verified on the i.MX processor using the corresponding public key. The public key is included in the final binary and a hash of the public key is programmed in the SoC, in One-Time Programmable e-fuses, for establishing the root of trust.

The first boot image is authenticated by the i.MX ROM bootloader. Each image then calls the HAB/AHAB API to authenticate the next image, to establish a chain of trust.

 

DART-MX8M SoM
DART-MX8M SoM

 

How do I get started?

Varsicite’s Yocto layer, meta-variscite-hab, makes it easy to get started using Secure Boot on your product. The general process is:

Follow Variscite’s wiki guide “Build Yocto from Source Code” to setup your Yocto Build environment

  1. Download NXP’s Code Signing Tool (CST)
  2. Use CST to generate a Public Key Infrastructure (PKI) tree. This only needs to be done once.
  3. Configure meta-variscite-hab in conf/local.conf with customer specific information
  4. Use bitbake to build a signed SD card image
  5. U-Boot: Program i.MX SoC e-fuses with SRK public key hash
  6. U-Boot: Verify signed image by running hab_status or ahab_status
  7. U-Boot: Close the device by writing to a dedicated SoC e-fuse

For a full step by step walkthrough, please visit Variscite’s software wiki for your Variscite SoM:

Latest Posts
Software releases
July software updates
Stay current with software updates – Keep your Variscite SoMs performing at their best with our latest software releases.
 
21.07.2026
Newsroom
Variscite and NRG Team Up to Simplify Embedded Medical Device Development.
Getting a regulated medical product to market requires more than great hardware. Engineering teams must simultaneously manage embedded software, cybersecurity, QMS documentation, and validation – keeping all of it aligned around a single certified, long-term-reliable product. That is precisely the challenge a new Variscite and NRG partnership is designed to address.
Variscite, a leading System on Module manufacturer with proven expertise in medical applications, has joined forces with NRG, an engineering firm specializing in regulated medtech systems, to deliver an integrated hardware-software solution for companies building embedded medical products. The partnership gives development teams access to both a proven hardware platform and the software and engineering capabilities needed to support regulated development goals and product readiness.
22.07.2026
Blog
supply-chain-resilience-website-size.png
The global component crisis is forcing embedded teams to confront an uncomfortable reality: not all SoM vendors are equally equipped to weather it. In the latest episode of the Embedded Executive Podcast, Variscite CEO Ohad Yaniv joined Rich Nass of Embedded Computing Design to discuss what it takes to keep customer projects on schedule when supplies are under sustained pressure and why the answer starts with who controls your manufacturing. Unlike vendors who rely on subcontractors, Variscite designs and manufactures its entire System on Module portfolio in-house, with production fully certified to ISO 9001, 13485, and 27001 standards.
15.07.2026 Ohad Yaniv