@@ -182,6 +182,13 @@ def test_vboot(u_boot_console):
util.run_and_log(cons, [fit_check_sign, '-f', fit, '-k', dtb])
+ # Create a fresh .dtb without the public keys
+ dtc('sandbox-u-boot.dts')
+ # Then add the dev key via the fdt_add_pubkey tool
+ util.run_and_log(cons, [fdt_add_pubkey, '-a', '%s,rsa2048' % sha_algo,
+ '-k', tmpdir, '-n', 'dev', '-r', 'conf', dtb])
+ util.run_and_log(cons, [fit_check_sign, '-f', fit, '-k', dtb])
+
# Replace header bytes
bcfg = u_boot_console.config.buildconfig
max_size = int(bcfg.get('config_fit_signature_max_size', 0x10000000), 0)
@@ -246,6 +253,7 @@ def test_vboot(u_boot_console):
fit = '%stest.fit' % tmpdir
mkimage = cons.config.build_dir + '/tools/mkimage'
fit_check_sign = cons.config.build_dir + '/tools/fit_check_sign'
+ fdt_add_pubkey = cons.config.build_dir + '/tools/fdt_add_pubkey'
dtc_args = '-I dts -O dtb -i %s' % tmpdir
dtb = '%ssandbox-u-boot.dtb' % tmpdir
sig_node = '/configurations/conf-1/signature'
Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk> --- test/py/tests/test_vboot.py | 8 ++++++++ 1 file changed, 8 insertions(+)