From 86992a243b0242eea4e1293529e9bebcb23c51a1 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Tue, 20 Dec 2022 00:10:22 +0100 Subject: [PATCH] Add Makefile secure boot signing support --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3353587..0ebe62d 100644 --- a/Makefile +++ b/Makefile @@ -2453,7 +2453,10 @@ all: modules modules: $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules - +sign: + @openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=Custom MOK/" + @mokutil --import MOK.der + @$(KSRC)/scripts/sign-file sha256 MOK.priv MOK.der $(MODULE_NAME) strip: $(CROSS_COMPILE)strip $(MODULE_NAME).ko --strip-unneeded