aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSughosh Ganu <sughosh.ganu@linaro.org>2024-03-27 16:19:00 +0530
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2024-04-08 12:59:31 +0200
commitd350b79e6daf2c0579eea97feba826e957aaddc4 (patch)
tree8fb813f6d8eb77478a2294e68a7bb36b9eb71b8e /test
parent4dd9701faf61aa6417990baf59c6f8090409912c (diff)
downloadu-boot-d350b79e6daf2c0579eea97feba826e957aaddc4.zip
u-boot-d350b79e6daf2c0579eea97feba826e957aaddc4.tar.gz
u-boot-d350b79e6daf2c0579eea97feba826e957aaddc4.tar.bz2
sandbox: capsule: binman: generate some capsules as part of build
Currently, all the capsules for the sandbox platform are generated at the time of running the capsule tests. To showcase generation of capsules through binman, generate all raw(non FIT payload) capsules needed for the sandbox platform as part of the build. This acts as an illustrative example for generating capsules as part of a platform's build. Make corresponding change in the capsule test's configuration to get these capsules from the build directory. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Diffstat (limited to 'test')
-rw-r--r--test/py/tests/test_efi_capsule/capsule_gen_binman.dts167
-rw-r--r--test/py/tests/test_efi_capsule/conftest.py1
2 files changed, 8 insertions, 160 deletions
diff --git a/test/py/tests/test_efi_capsule/capsule_gen_binman.dts b/test/py/tests/test_efi_capsule/capsule_gen_binman.dts
index e8a1858..1a62c26 100644
--- a/test/py/tests/test_efi_capsule/capsule_gen_binman.dts
+++ b/test/py/tests/test_efi_capsule/capsule_gen_binman.dts
@@ -55,42 +55,6 @@
};
capsule1 {
- filename = "Test01";
- efi-capsule {
- image-index = <0x1>;
- image-guid = SANDBOX_UBOOT_IMAGE_GUID;
-
- text {
- text = "u-boot:New";
- };
- };
- };
-
- capsule2 {
- filename = "Test02";
- efi-capsule {
- image-index = <0x2>;
- image-guid = SANDBOX_UBOOT_ENV_IMAGE_GUID;
-
- text {
- text = "u-boot-env:New";
- };
- };
- };
-
- capsule3 {
- filename = "Test03";
- efi-capsule {
- image-index = <0x1>;
- image-guid = SANDBOX_INCORRECT_GUID;
-
- text {
- text = "u-boot:New";
- };
- };
- };
-
- capsule4 {
filename = "Test04";
efi-capsule {
image-index = <0x1>;
@@ -102,7 +66,7 @@
};
};
- capsule5 {
+ capsule2 {
filename = "Test05";
efi-capsule {
image-index = <0x1>;
@@ -114,46 +78,7 @@
};
};
- capsule6 {
- filename = "Test101";
- efi-capsule {
- image-index = <0x1>;
- fw-version = <0x5>;
- image-guid = SANDBOX_UBOOT_IMAGE_GUID;
-
- text {
- text = "u-boot:New";
- };
- };
- };
-
- capsule7 {
- filename = "Test102";
- efi-capsule {
- image-index = <0x2>;
- fw-version = <0xa>;
- image-guid = SANDBOX_UBOOT_ENV_IMAGE_GUID;
-
- text {
- text = "u-boot-env:New";
- };
- };
- };
-
- capsule8 {
- filename = "Test103";
- efi-capsule {
- image-index = <0x1>;
- fw-version = <0x2>;
- image-guid = SANDBOX_UBOOT_IMAGE_GUID;
-
- text {
- text = "u-boot:New";
- };
- };
- };
-
- capsule9 {
+ capsule3 {
filename = "Test104";
efi-capsule {
image-index = <0x1>;
@@ -166,7 +91,7 @@
};
};
- capsule10 {
+ capsule4 {
filename = "Test105";
efi-capsule {
image-index = <0x1>;
@@ -179,37 +104,7 @@
};
};
- capsule11 {
- filename = "Test11";
- efi-capsule {
- image-index = <0x1>;
- image-guid = SANDBOX_UBOOT_IMAGE_GUID;
- private-key = CAPSULE_PRIV_KEY;
- public-key-cert = CAPSULE_PUB_KEY;
- monotonic-count = <0x1>;
-
- text {
- text = "u-boot:New";
- };
- };
- };
-
- capsule12 {
- filename = "Test12";
- efi-capsule {
- image-index = <0x1>;
- image-guid = SANDBOX_UBOOT_IMAGE_GUID;
- private-key = CAPSULE_INVAL_KEY;
- public-key-cert = CAPSULE_INVAL_PUB_KEY;
- monotonic-count = <0x1>;
-
- text {
- text = "u-boot:New";
- };
- };
- };
-
- capsule13 {
+ capsule5 {
filename = "Test13";
efi-capsule {
image-index = <0x1>;
@@ -224,7 +119,7 @@
};
};
- capsule14 {
+ capsule6 {
filename = "Test14";
efi-capsule {
image-index = <0x1>;
@@ -239,55 +134,7 @@
};
};
- capsule15 {
- filename = "Test111";
- efi-capsule {
- image-index = <0x1>;
- fw-version = <0x5>;
- image-guid = SANDBOX_UBOOT_IMAGE_GUID;
- private-key = CAPSULE_PRIV_KEY;
- public-key-cert = CAPSULE_PUB_KEY;
- monotonic-count = <0x1>;
-
- text {
- text = "u-boot:New";
- };
- };
- };
-
- capsule16 {
- filename = "Test112";
- efi-capsule {
- image-index = <0x2>;
- fw-version = <0xa>;
- image-guid = SANDBOX_UBOOT_ENV_IMAGE_GUID;
- private-key = CAPSULE_PRIV_KEY;
- public-key-cert = CAPSULE_PUB_KEY;
- monotonic-count = <0x1>;
-
- text {
- text = "u-boot-env:New";
- };
- };
- };
-
- capsule17 {
- filename = "Test113";
- efi-capsule {
- image-index = <0x1>;
- fw-version = <0x2>;
- image-guid = SANDBOX_UBOOT_IMAGE_GUID;
- private-key = CAPSULE_PRIV_KEY;
- public-key-cert = CAPSULE_PUB_KEY;
- monotonic-count = <0x1>;
-
- text {
- text = "u-boot:New";
- };
- };
- };
-
- capsule18 {
+ capsule7 {
filename = "Test114";
efi-capsule {
image-index = <0x1>;
@@ -303,7 +150,7 @@
};
};
- capsule19 {
+ capsule8 {
filename = "Test115";
efi-capsule {
image-index = <0x1>;
diff --git a/test/py/tests/test_efi_capsule/conftest.py b/test/py/tests/test_efi_capsule/conftest.py
index dd41da9..80b1297 100644
--- a/test/py/tests/test_efi_capsule/conftest.py
+++ b/test/py/tests/test_efi_capsule/conftest.py
@@ -85,6 +85,7 @@ def efi_capsule_data(request, u_boot_config):
check_call('cd %s; '
'./tools/binman/binman --toolpath %s/tools build -u -d %s/capsule_binman.dtb -O %s -m --allow-missing -I %s -I ./board/sandbox -I ./arch/sandbox/dts'
% (u_boot_config.source_dir, u_boot_config.build_dir, data_dir, data_dir, data_dir), shell=True)
+ check_call('cp %s/Test* %s' % (u_boot_config.build_dir, data_dir), shell=True)
os.environ['PYTHONPATH'] = pythonpath
# Create a disk image with EFI system partition