Secure boot on imxrt1024..5A Hi, I am trying to sign my bootable image (which contains the FCFB, IVT, and other boot components) using CST, and I need to understand a few things: Do we need to create a CSF.txt/hab.csf file and use cst.exe to generate csf.bin? Then, do we need to use elftosb.exe to generate the final boot image? If elftosb.exe is required, where can I find it? In my CST installation, I can only find cst.exe and srktool.exe. As we know, SPT generates a nopadding_signed.bin. Is it possible to sign a bootable firmware image while retaining the FCFB block? Since the PKI contains four SRKs and I burn the SRK hash into OTP, if I sign my firmware using the private key corresponding to each of the four SRKs (IMG_1, IMG_2, IMG_3, and IMG_4), will all four signed images be able to pass HAB authentication? i.MXRT 102x Re: Secure boot on imxrt1024..5A The reason to use CST is that i guess we can just select the region of firmware we want to sign, like in SPT if i give firmware to sign it remove FCFB block from the firmware and then manually we have to concatenate the FCFB block. I want that if development team gives me binary just signed it and ship the signed_firmware.bin that is ready to use Re: Secure boot on imxrt1024..5A Hi @Abhay2080 ,
I am sorry, but why are you still using CST package? For i.MX RT customers, we recommend SPT as the primary tool — use the GUI for development/prototyping, then leverage the generated scripts (powered by SPSDK) for mass production. This is NXP's official recommended path and eliminates the need to manually deal with elftosb , cst.exe , or BD file authoring. Please refer to https://www.nxp.com/applications/industrial/factory-automation/mobile-robotics/mcuxpresso-secure-provisioning-tool:MCUXPRESSO-SECURE-PROVISIONING for more details.
Hope that helps,
Have a great day, Kan
------------------------------------------------------------------------------- Note: - If this post answers your question, please click the "Mark Correct" button. Thank you! - We are following threads for 7 weeks after the last post, later replies are ignored Please open a new thread and refer to the closed one, if you have a related question at a later point in time. -------------------------------------------------------------------------------
Re: Secure boot on imxrt1024..5A Hi @Abhay2080 ,
Thanks for the clarification! Please have my comments as below:
1. Do we need to create a CSF.txt/hab.csf file and use cst.exe to generate csf.bin? Then, do we need to use elftosb.exe to generate the final boot image?
- Yes to CSF + cst.exe. For RT1024, elftosb is part of the standard NXP-documented workflow — but is NOT required if you already have a pre-assembled binary.
There are two valid workflows for RT1024:
1. Standard NXP workflow (elftosb + CST, image built from components)
This is documented in AN12079 (How to use RT Security Boot) and AN12681 (How to use HAB secure boot in i.MX RT10xx), the primary references for RT1024. elftosb reads a BD file, calls CST internally to generate the signature, and assembles the final image including the FCFB, IVT, and App in a single step:
2. CST-direct workflow (pre-assembled binary, for "receive → sign → ship")
If the development team delivers a pre-assembled firmware.bin (already containing FCFB + IVT + App with CSF space reserved), CST is used directly and elftosb is not needed at all.
2. If elftosb.exe is required, where can I find it? In my CST installation, I can only find cst.exe and srktool.exe.
- Correct - elftosb.exe is intentionally not bundled with CST. CST only ships cst.exe and srktool.exe . elftosb is a separate tool from the flashloader/boot utility ecosystem.
For i.MX RT1024, you can obtain it from:
MCUBoot Flashloader Package: — download from NXP's website for i.MX RT102x. The tool is documented in the elftosb User's Guide https://www.nxp.com/docs/en/user-guide/MBOOTELFTOSBUG.pdf Kan_Li_0-1787913209797.pngKan_Li_0-1787913209797.pngKan_Li_0-1787913209797.png
You may refer to https://www.nxp.com/docs/en/nxp/application-notes/AN12238.pdf for more details.
3. As we know, SPT generates a nopadding_signed.bin. Is it possible to sign a bootable firmware image while retaining the FCFB block?
- Yes — and CST direct is the correct approach for this exact requirement. The complete workflow for RT1024:
# Step 1: Generate CSF binary (CST only reads firmware.bin for hashing — never modifies it) cst.exe --i hab.csf --o csf.bin
# Step 2: Append CSF to original binary (FCFB intact at file offset 0x000) cat firmware.bin csf.bin > signed_firmware.bin
signed_firmware.bin = FCFB (0x000–0x3FF) + IVT + App + CSF appended. Flash directly. Done.
The following is a sample hab.csf for RT1024:
[Header] Version = 4.3 Hash Algorithm = sha256 Engine Configuration = 0 Certificate Format = X509 Signature Format = CMS
[Install SRK] File = "../crts/SRK_1_2_3_4_table.bin" Source index = 0
[Install CSFK] File = "../crts/CSF1_1_sha256_2048_65537_v3_usr_crt.pem"
[Authenticate CSF]
[Install Key] Verification index = 0 Target index = 2 File = "../crts/IMG1_1_sha256_2048_65537_v3_usr_crt.pem"
[Authenticate Data] Verification index = 2 Blocks = 0x60001000 0x1000 0x "firmware.bin"
4. Since the PKI contains four SRKs and I burn the SRK hash into OTP, if I sign my firmware using the private key corresponding to each of the four SRKs (IMG_1, IMG_2, IMG_3, and IMG_4), will all four signed images be able to pass HAB authentication?
- Yes — all four will pass, as long as no SRK revocation bits have been burned.
Hope that makes sense,
Have a great day, Kan
------------------------------------------------------------------------------- Note: - If this post answers your question, please click the "Mark Correct" button. Thank you! - We are following threads for 7 weeks after the last post, later replies are ignored Please open a new thread and refer to the closed one, if you have a related question at a later point in time. ------------------------------------------------------------------------------- Re: Secure boot on imxrt1024..5A Just a small doubt regarding # Step 2: Append CSF to original binary (FCFB intact at file offset 0x000) cat firmware.bin csf.bin > signed_firmware.bin If i am just appending csf.bin to firmware how csf pointer will get updated in IVT? Re: Secure boot on imxrt1024..5A Hi @Abhay2080 ,
The CSF pointer in the IVT is NOT updated by the cat command. It must be pre-set by the development team in the firmware build, before CST ever runs. The cat step simply places csf.bin at exactly the offset the IVT pointer already expects.
Hope that makes sense,
Have a great day, Kan
------------------------------------------------------------------------------- Note: - If this post answers your question, please click the "Mark Correct" button. Thank you! - We are following threads for 7 weeks after the last post, later replies are ignored Please open a new thread and refer to the closed one, if you have a related question at a later point in time. -------------------------------------------------------------------------------
View full article