Skip to content

Commit

Permalink
base: efitools: check if we have the keys in place
Browse files Browse the repository at this point in the history
Instaed of faling with a python exception we can check if we have
all keys reqired and fail with a useful message if not.

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
  • Loading branch information
quaresmajose committed Oct 29, 2024
1 parent 8ef639a commit 3c5125d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion meta-lmp-base/recipes-bsp/efitools/efitools_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,15 @@ python do_prepare_local_auths() {
dir = d.expand('${UEFI_SIGN_KEYDIR}/')

import shutil
import os

# Use auths already generated by the user
for _ in ('PK', 'KEK', 'DB', 'DBX', 'noPK', 'noKEK'):
shutil.copyfile(dir + _ + '.auth', d.expand('${S}/') + _ + '.auth')
file = _ + '.auth'
src = dir + file
if not os.path.isfile(src):
bb.fatal("File '%s' not found!" % src)
shutil.copyfile(src, d.expand('${S}/') + file)

}
addtask prepare_local_auths after do_configure before do_compile
Expand Down

0 comments on commit 3c5125d

Please sign in to comment.