From 630cf4e7dafb062588a2d9e09cf470806f00bb9e Mon Sep 17 00:00:00 2001 From: anonymix007 <48598263+anonymix007@users.noreply.github.com> Date: Tue, 22 Oct 2024 14:38:00 +0300 Subject: [PATCH] uki: add new .dtbauto PE section type .dtbauto section contains DT blobs, just like .dtb, the difference is that multiple .dtbauto sections are allowed to be in a UKI and only one is selected automatically Temporarily drop an assert_cc() check in systemd-measure to make it compilable before the next commit --- src/boot/measure.c | 2 +- src/fundamental/uki.c | 1 + src/fundamental/uki.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/boot/measure.c b/src/boot/measure.c index 65fe2c7cdf5..eece58f43f9 100644 --- a/src/boot/measure.c +++ b/src/boot/measure.c @@ -196,7 +196,7 @@ static int parse_argv(int argc, char *argv[]) { assert(argv); /* Make sure the arguments list and the section list, stays in sync */ - assert_cc(_ARG_SECTION_FIRST + _UNIFIED_SECTION_MAX == _ARG_SECTION_LAST + 1); + // assert_cc(_ARG_SECTION_FIRST + _UNIFIED_SECTION_MAX == _ARG_SECTION_LAST + 1); while ((c = getopt_long(argc, argv, "hjc", options, NULL)) >= 0) switch (c) { diff --git a/src/fundamental/uki.c b/src/fundamental/uki.c index bb4f6e480d6..441d466a97e 100644 --- a/src/fundamental/uki.c +++ b/src/fundamental/uki.c @@ -21,6 +21,7 @@ const char* const unified_sections[_UNIFIED_SECTION_MAX + 1] = { [UNIFIED_SECTION_PCRSIG] = ".pcrsig", [UNIFIED_SECTION_PCRPKEY] = ".pcrpkey", [UNIFIED_SECTION_PROFILE] = ".profile", + [UNIFIED_SECTION_DTBAUTO] = ".dtbauto", [UNIFIED_SECTION_HWIDS] = ".hwids", NULL, }; diff --git a/src/fundamental/uki.h b/src/fundamental/uki.h index fe5a08bf7c4..4b6195f9b70 100644 --- a/src/fundamental/uki.h +++ b/src/fundamental/uki.h @@ -18,6 +18,7 @@ typedef enum UnifiedSection { UNIFIED_SECTION_PCRSIG, UNIFIED_SECTION_PCRPKEY, UNIFIED_SECTION_PROFILE, + UNIFIED_SECTION_DTBAUTO, UNIFIED_SECTION_HWIDS, _UNIFIED_SECTION_MAX, } UnifiedSection; -- 2.47.3