From 2f899d6022632a6b26d5112328772dbf3a18bb9b Mon Sep 17 00:00:00 2001 From: Conor Patrick Date: Tue, 1 Jun 2021 23:11:23 -0700 Subject: [PATCH] default trustzone enabled in signed image --- src/signed_binary.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/signed_binary.rs b/src/signed_binary.rs index 05825a2c..17419275 100644 --- a/src/signed_binary.rs +++ b/src/signed_binary.rs @@ -122,7 +122,7 @@ fn modify_header(padded_image: &mut Vec, padded_certificate_length: usize) - padded_image[0x20..][..4].copy_from_slice((total_image_size as u32).to_le_bytes().as_ref()); // 0x24: image type "SPT" = [XIP Signed, TZ disabled, 0, 0-] // This doesn't seem to match UM 11126, Chap. 7, Table 183 at all :) - padded_image[0x24..][..4].copy_from_slice(&[0x04, 0x40, 0x00, 0x00]); + padded_image[0x24..][..4].copy_from_slice(&[0x04, 0x00, 0x00, 0x00]); // "header offset", i.e. image size padded_image[0x28..][..4].copy_from_slice((image_size as u32).to_le_bytes().as_ref());