Skip to content

Commit

Permalink
secureboot: imx: program bootloader in integrity check
Browse files Browse the repository at this point in the history
After modifying the bootloader binary to corrupt the signature it needs
to be programmed into disk.

Change-type: patch
Signed-off-by: Alex Gonzalez <alexg@balena.io>
  • Loading branch information
alexgg committed Feb 28, 2025
1 parent 55e1d15 commit 3818044
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/suites/os/tests/secureboot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,18 @@ class imxSecureBoot extends secureBoot {
}

await this.replaceBinaryPattern(args.path, args.pattern, args.replacement);
if ( args.name == 'Bootloader' ) {
// Program the bootloader
await this.worker.executeCommandInHostOS(
[
'tmpdir=$(mktemp -d)', ';',
'cp /etc/hostapp-update-hooks.d/99-flash-bootloader ${tmpdir}', ';',
'sed -i "s,resin-boot,mnt/imx,g" ${tmpdir}/99-flash-bootloader', ';',
'${tmpdir}/99-flash-bootloader', ';'
],
this.link
)
}
await this.worker.executeCommandInHostOS('reboot', this.link)
await this.test.resolves(
this.waitForFailedBoot(),
Expand Down

0 comments on commit 3818044

Please sign in to comment.