binman: capsule: Add support for generating EFI capsules
Add support in binman for generating EFI capsules. The capsule parameters can be specified through the capsule binman entry. Also add test cases in binman for testing capsule generation. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
21
tools/binman/test/311_capsule.dts
Normal file
21
tools/binman/test/311_capsule.dts
Normal file
@@ -0,0 +1,21 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
binman {
|
||||
efi-capsule {
|
||||
image-index = <0x1>;
|
||||
/* Image GUID for testing capsule update */
|
||||
image-guid = "binman-test";
|
||||
hardware-instance = <0x0>;
|
||||
|
||||
blob {
|
||||
filename = "capsule_input.bin";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
23
tools/binman/test/312_capsule_signed.dts
Normal file
23
tools/binman/test/312_capsule_signed.dts
Normal file
@@ -0,0 +1,23 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
binman {
|
||||
efi-capsule {
|
||||
image-index = <0x1>;
|
||||
/* Image GUID for testing capsule update */
|
||||
image-guid = "binman-test";
|
||||
hardware-instance = <0x0>;
|
||||
private-key = "key.key";
|
||||
public-key-cert = "key.crt";
|
||||
|
||||
blob {
|
||||
filename = "capsule_input.bin";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
22
tools/binman/test/313_capsule_version.dts
Normal file
22
tools/binman/test/313_capsule_version.dts
Normal file
@@ -0,0 +1,22 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
binman {
|
||||
efi-capsule {
|
||||
image-index = <0x1>;
|
||||
fw-version = <0x2>;
|
||||
/* Image GUID for testing capsule update */
|
||||
image-guid = "binman-test";
|
||||
hardware-instance = <0x0>;
|
||||
|
||||
blob {
|
||||
filename = "capsule_input.bin";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
24
tools/binman/test/314_capsule_signed_ver.dts
Normal file
24
tools/binman/test/314_capsule_signed_ver.dts
Normal file
@@ -0,0 +1,24 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
binman {
|
||||
efi-capsule {
|
||||
image-index = <0x1>;
|
||||
fw-version = <0x2>;
|
||||
/* Image GUID for testing capsule update */
|
||||
image-guid = "binman-test";
|
||||
hardware-instance = <0x0>;
|
||||
private-key = "key.key";
|
||||
public-key-cert = "key.crt";
|
||||
|
||||
blob {
|
||||
filename = "capsule_input.bin";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
22
tools/binman/test/315_capsule_oemflags.dts
Normal file
22
tools/binman/test/315_capsule_oemflags.dts
Normal file
@@ -0,0 +1,22 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
binman {
|
||||
efi-capsule {
|
||||
image-index = <0x1>;
|
||||
/* Image GUID for testing capsule update */
|
||||
image-guid = "binman-test";
|
||||
hardware-instance = <0x0>;
|
||||
oem-flags = <0x8000>;
|
||||
|
||||
blob {
|
||||
filename = "capsule_input.bin";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
22
tools/binman/test/316_capsule_missing_key.dts
Normal file
22
tools/binman/test/316_capsule_missing_key.dts
Normal file
@@ -0,0 +1,22 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
binman {
|
||||
efi-capsule {
|
||||
image-index = <0x1>;
|
||||
/* Image GUID for testing capsule update */
|
||||
image-guid = "binman-test";
|
||||
hardware-instance = <0x0>;
|
||||
private-key = "tools/binman/test/key.key";
|
||||
|
||||
blob {
|
||||
filename = "capsule_input.bin";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
20
tools/binman/test/317_capsule_missing_index.dts
Normal file
20
tools/binman/test/317_capsule_missing_index.dts
Normal file
@@ -0,0 +1,20 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
binman {
|
||||
efi-capsule {
|
||||
/* Image GUID for testing capsule update */
|
||||
image-guid = "binman-test";
|
||||
hardware-instance = <0x0>;
|
||||
|
||||
blob {
|
||||
filename = "capsule_input.bin";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
19
tools/binman/test/318_capsule_missing_guid.dts
Normal file
19
tools/binman/test/318_capsule_missing_guid.dts
Normal file
@@ -0,0 +1,19 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
binman {
|
||||
efi-capsule {
|
||||
image-index = <0x1>;
|
||||
hardware-instance = <0x0>;
|
||||
|
||||
blob {
|
||||
filename = "capsule_input.bin";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user