@@ -55,6 +55,8 @@ $(OBJCOPY) --add-section ".$(patsubst %.csv,%,$(1))=$(1)" $(2)
5555endef
5656
5757SBATPATH = $(TOPDIR ) /data/sbat.csv
58+ SBATLEVELLATESTPATH = $(TOPDIR ) /data/sbat_level_latest.csv
59+ SBATLEVELPREVIOUSPATH = $(TOPDIR ) /data/sbat_level_previous.csv
5860VENDOR_SBATS := $(sort $(foreach x,$(wildcard $(TOPDIR ) /data/sbat.* .csv data/sbat.* .csv) ,$(notdir $(x ) ) ) )
5961
6062OBJFLAGS =
@@ -84,7 +86,7 @@ ifeq ($(ARCH),arm)
8486 BUILDFLAGS += -ffreestanding -I$(shell $(CC) -print-file-name=include)
8587endif
8688
87- all : certmule.efi
89+ all : certmule.efi revocations.efi
8890
8991certmule.so : sbat_data.o certmule.o
9092certmule.so : SOLIBS=
@@ -94,6 +96,15 @@ certmule.efi : OBJFLAGS = --strip-unneeded $(call VENDOR_DB, $<)
9496certmule.efi : SECTIONS=.text .reloc .db .sbat
9597certmule.efi : VENDOR_DB_FILE?=db.esl
9698
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 .sbatl .sbatp
104+
105+ revocations.o : certmule.o
106+ cp certmule.o revocations.o
107+
97108% .efi : % .so
98109ifneq ($(OBJCOPY_GTE224 ) ,1)
99110 $(error objcopy >= 2.24 is required)
@@ -109,6 +120,12 @@ sbat_data.o : /dev/null
109120 $(OBJCOPY ) --add-section .sbat=$(SBATPATH ) \
110121 --set-section-flags .sbat=contents,alloc,load,readonly,data \
111122 $@
123+ $(OBJCOPY ) --add-section .sbatl=$(SBATLEVELLATESTPATH ) \
124+ --set-section-flags .sbatl=contents,alloc,load,readonly,data \
125+ $@
126+ $(OBJCOPY ) --add-section .sbatp=$(SBATLEVELPREVIOUSPATH ) \
127+ --set-section-flags .sbatp=contents,alloc,load,readonly,data \
128+ $@
112129 $(foreach vs,$(VENDOR_SBATS ) ,$(call add-vendor-sbat,$(vs ) ,$@ ) )
113130
114131% .so : % .o
0 commit comments