Introduce and use CONFIG_EDK2_CAPSULES_V2_TRANSITION

* This option prevents capsule.sh from generating capsules of a new kind
  to permit updates from a previous release.
* Set the option for MSI boards.

Change-Id: Ia87cb23c62f8b2296a332b3416367cb4ad931cee
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
This commit is contained in:
Sergii Dmytruk
2026-05-19 16:52:15 +03:00
parent fb2e4a185a
commit 972fc21001
6 changed files with 17 additions and 2 deletions
+3 -2
View File
@@ -290,7 +290,8 @@ EOF
local opt_root_cert=$root_cert
local opt_sub_cert=$sub_cert
local opt_sign_cert=$sign_cert
if [ "$CONFIG_EDK2_CAPSULES_V2" = y ]; then
if [ "${CONFIG_EDK2_CAPSULES_V2:-n}${CONFIG_EDK2_CAPSULES_V2_TRANSITION:-n}" = yn ]; then
echo "nested capsules"
# The inner capsule is always signed with the test key. Not signing it
# at all doesn't work because FmpDxe doesn't accept unsigned payloads at
# least due to Image->AuthInfo.Hdr.wRevision check in
@@ -323,7 +324,7 @@ EOF
}
EOF
if [ "$CONFIG_EDK2_CAPSULES_V2" = y ]; then
if [ "${CONFIG_EDK2_CAPSULES_V2:-n}${CONFIG_EDK2_CAPSULES_V2_TRANSITION:-n}" = yn ]; then
# The capsule created above is the inner capsule. Make it and then
# update JSON file to point at it as a payload.
if ! "${edk_tools}/GenerateCapsule" --encode \
+1
View File
@@ -74,3 +74,4 @@ CONFIG_EDK2_SETUP_MENU_KEY=0x0008
CONFIG_EDK2_RAM_DISK_ENABLE=y
CONFIG_EDK2_CREATE_PREINSTALLED_BOOT_OPTIONS=y
CONFIG_EDK2_CAPSULES_V2=y
CONFIG_EDK2_CAPSULES_V2_TRANSITION=y
+1
View File
@@ -73,3 +73,4 @@ CONFIG_EDK2_SETUP_MENU_KEY=0x0008
CONFIG_EDK2_RAM_DISK_ENABLE=y
CONFIG_EDK2_CREATE_PREINSTALLED_BOOT_OPTIONS=y
CONFIG_EDK2_CAPSULES_V2=y
CONFIG_EDK2_CAPSULES_V2_TRANSITION=y
+1
View File
@@ -73,3 +73,4 @@ CONFIG_EDK2_SETUP_MENU_KEY=0x0008
CONFIG_EDK2_RAM_DISK_ENABLE=y
CONFIG_EDK2_CREATE_PREINSTALLED_BOOT_OPTIONS=y
CONFIG_EDK2_CAPSULES_V2=y
CONFIG_EDK2_CAPSULES_V2_TRANSITION=y
+1
View File
@@ -73,3 +73,4 @@ CONFIG_EDK2_SETUP_MENU_KEY=0x0008
CONFIG_EDK2_RAM_DISK_ENABLE=y
CONFIG_EDK2_CREATE_PREINSTALLED_BOOT_OPTIONS=y
CONFIG_EDK2_CAPSULES_V2=y
CONFIG_EDK2_CAPSULES_V2_TRANSITION=y
+10
View File
@@ -440,6 +440,16 @@ config EDK2_CAPSULES_V2
Enables capsule-specific functionality added during the second round of
implementing it.
config EDK2_CAPSULES_V2_TRANSITION
bool "Capsules Update: transitioning from v1 to v2"
default n
depends on EDK2_CAPSULES_V2
help
Indicates that this is the first time EDK2_CAPSULES_V2 is enabled for a
release of a board which has been using capsules before. This enables
compatibility between this and prior releases when it comes to building
capsules.
config EDK2_CAPSULE_DOES_NOT_SURVIVE_RESET
bool "Capsules do not survive reset"
default n