test/py: efi_secboot: small rework for adding a new test
It won't be very useful to customize HELLO_PATH and EFI_SECBOOT_IMAGE_NAME under the current code base. So just remove them. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
This commit is contained in:
parent
1115edd846
commit
57be8cdce3
@ -25,13 +25,8 @@ def efi_boot_env(request, u_boot_config):
|
|||||||
Return:
|
Return:
|
||||||
A path to disk image to be used for testing
|
A path to disk image to be used for testing
|
||||||
"""
|
"""
|
||||||
global HELLO_PATH
|
|
||||||
|
|
||||||
image_path = u_boot_config.persistent_data_dir
|
image_path = u_boot_config.persistent_data_dir
|
||||||
image_path = image_path + '/' + EFI_SECBOOT_IMAGE_NAME
|
image_path = image_path + '/test_efi_secboot.img'
|
||||||
|
|
||||||
if HELLO_PATH == '':
|
|
||||||
HELLO_PATH = u_boot_config.build_dir + '/lib/efi_loader/helloworld.efi'
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
mnt_point = u_boot_config.build_dir + '/mnt_efisecure'
|
mnt_point = u_boot_config.build_dir + '/mnt_efisecure'
|
||||||
@ -98,7 +93,8 @@ def efi_boot_env(request, u_boot_config):
|
|||||||
shell=True)
|
shell=True)
|
||||||
|
|
||||||
# Copy image
|
# Copy image
|
||||||
check_call('cp %s %s' % (HELLO_PATH, mnt_point), shell=True)
|
check_call('cp %s/lib/efi_loader/helloworld.efi %s' %
|
||||||
|
(u_boot_config.build_dir, mnt_point), shell=True)
|
||||||
|
|
||||||
# Sign image
|
# Sign image
|
||||||
check_call('cd %s; sbsign --key db.key --cert db.crt helloworld.efi'
|
check_call('cd %s; sbsign --key db.key --cert db.crt helloworld.efi'
|
||||||
|
@ -1,14 +1,8 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0+
|
# SPDX-License-Identifier: GPL-2.0+
|
||||||
|
|
||||||
# Disk image name
|
|
||||||
EFI_SECBOOT_IMAGE_NAME = 'test_efi_secboot.img'
|
|
||||||
|
|
||||||
# Owner guid
|
# Owner guid
|
||||||
GUID = '11111111-2222-3333-4444-123456789abc'
|
GUID = '11111111-2222-3333-4444-123456789abc'
|
||||||
|
|
||||||
# v1.5.1 or earlier of efitools has a bug in sha256 calculation, and
|
# v1.5.1 or earlier of efitools has a bug in sha256 calculation, and
|
||||||
# you need build a newer version on your own.
|
# you need build a newer version on your own.
|
||||||
EFITOOLS_PATH = ''
|
EFITOOLS_PATH = ''
|
||||||
|
|
||||||
# Hello World application for sandbox
|
|
||||||
HELLO_PATH = ''
|
|
||||||
|
Loading…
Reference in New Issue
Block a user