@@ -55,6 +55,8 @@ $(OBJCOPY) --add-section ".$(patsubst %.csv,%,$(1))=$(1)" $(2)
55
55
endef
56
56
57
57
SBATPATH = $(TOPDIR ) /data/sbat.csv
58
+ SBATLEVELLATESTPATH = $(TOPDIR ) /data/sbat_level_latest.csv
59
+ SBATLEVELPREVIOUSPATH = $(TOPDIR ) /data/sbat_level_previous.csv
58
60
VENDOR_SBATS := $(sort $(foreach x,$(wildcard $(TOPDIR ) /data/sbat.* .csv data/sbat.* .csv) ,$(notdir $(x ) ) ) )
59
61
60
62
OBJFLAGS =
@@ -84,7 +86,7 @@ ifeq ($(ARCH),arm)
84
86
BUILDFLAGS += -ffreestanding -I$(shell $(CC) -print-file-name=include)
85
87
endif
86
88
87
- all : certmule.efi
89
+ all : certmule.efi revocations.efi
88
90
89
91
certmule.so : sbat_data.o certmule.o
90
92
certmule.so : SOLIBS=
@@ -94,6 +96,15 @@ certmule.efi : OBJFLAGS = --strip-unneeded $(call VENDOR_DB, $<)
94
96
certmule.efi : SECTIONS=.text .reloc .db .sbat
95
97
certmule.efi : VENDOR_DB_FILE?=db.esl
96
98
99
+ revocations.so : sbat_data.o revocations.o
100
+ revocations.so : SOLIBS=
101
+ revocations.so : SOFLAGS=
102
+ revocations.efi : OBJFLAGS = --strip-unneeded
103
+ revocations.efi : SECTIONS=.text .reloc .sbat .sbatlevellatest .sbatlevelprevious
104
+
105
+ revocations.o : certmule.o
106
+ cp certmule.o revocations.o
107
+
97
108
% .efi : % .so
98
109
ifneq ($(OBJCOPY_GTE224 ) ,1)
99
110
$(error objcopy >= 2.24 is required)
@@ -109,6 +120,12 @@ sbat_data.o : /dev/null
109
120
$(OBJCOPY ) --add-section .sbat=$(SBATPATH ) \
110
121
--set-section-flags .sbat=contents,alloc,load,readonly,data \
111
122
$@
123
+ $(OBJCOPY ) --add-section .sbatlevellatest=$(SBATLEVELLATESTPATH ) \
124
+ --set-section-flags .sbatlevellatest=contents,alloc,load,readonly,data \
125
+ $@
126
+ $(OBJCOPY ) --add-section .sbatlevelprevious=$(SBATLEVELPREVIOUSPATH ) \
127
+ --set-section-flags .sbatlevelprevious=contents,alloc,load,readonly,data \
128
+ $@
112
129
$(foreach vs,$(VENDOR_SBATS ) ,$(call add-vendor-sbat,$(vs ) ,$@ ) )
113
130
114
131
% .so : % .o
0 commit comments