]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
uki: add new .dtbauto PE section type
authoranonymix007 <48598263+anonymix007@users.noreply.github.com>
Tue, 22 Oct 2024 11:38:00 +0000 (14:38 +0300)
committeranonymix007 <48598263+anonymix007@users.noreply.github.com>
Tue, 5 Nov 2024 21:47:04 +0000 (00:47 +0300)
.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
src/fundamental/uki.c
src/fundamental/uki.h

index 65fe2c7cdf52a688f6ee49b1618e70d92a467028..eece58f43f9629f16dbcedefb2f77614b9bdde3d 100644 (file)
@@ -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) {
index bb4f6e480d683c9b3d665dc328138d205902059f..441d466a97ef077d4c6caaac9278724c8d89cac3 100644 (file)
@@ -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,
 };
index fe5a08bf7c4c349edc3550eb9c43e4cec9567857..4b6195f9b70ca273a959cbea5d81960edb64d04a 100644 (file)
@@ -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;