From d1870ddbd097de0ff955ff25453e515329e61bfb Mon Sep 17 00:00:00 2001 From: a1ive <10670106+a1ive@users.noreply.github.com> Date: Thu, 20 Feb 2025 16:09:59 +0900 Subject: [PATCH] remove sbat --- Makefile | 4 ---- docs/faq.md | 4 ++++ kern/efimain.c | 21 --------------------- script.lds | 12 ------------ 4 files changed, 4 insertions(+), 37 deletions(-) diff --git a/Makefile b/Makefile index abe74c4..c79d6ee 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,6 @@ # Versioning information # VERSION := v3.0.4 -WIMBOOT_VERSION := v2.8.0 -SBAT_GENERATION := 1 # Abstract target-independent objects # @@ -97,8 +95,6 @@ OBJCOPY_arm64 ?= $(CROSS_arm64)$(OBJCOPY) CFLAGS += -Os -ffreestanding -Wall -W -Werror CFLAGS += -nostdinc -Iinclude/ -fshort-wchar CFLAGS += -DVERSION="\"$(VERSION)\"" -CFLAGS += -DWIMBOOT_VERSION="\"$(WIMBOOT_VERSION)\"" -CFLAGS += -DSBAT_GENERATION="\"$(SBAT_GENERATION)\"" CFLAGS += -include compiler.h ifneq ($(DEBUG),) CFLAGS += -DDEBUG=$(DEBUG) diff --git a/docs/faq.md b/docs/faq.md index acf463e..2b0d36c 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -1,5 +1,9 @@ ## FAQ +### Does Ntloader support secure boot? + +**NO.** + ### 0xc0000001 error occurs when booting VHD/VHDX ![vhd_error](./images/vhd_error.png) diff --git a/kern/efimain.c b/kern/efimain.c index 14e9702..cfa8a6b 100644 --- a/kern/efimain.c +++ b/kern/efimain.c @@ -27,27 +27,6 @@ #include "efidisk.h" #include "efi/Protocol/LoadedImage.h" -/** SBAT section attributes */ -#define __sbat __attribute__ ((section (".sbat"), aligned (512))) - -/** SBAT metadata */ -#define SBAT_CSV \ - /* SBAT version */ \ - "sbat,1,SBAT Version,sbat,1," \ - "https://github.com/rhboot/shim/blob/main/SBAT.md" \ - "\n" \ - /* wimboot version */ \ - "wimboot," SBAT_GENERATION ",iPXE,wimboot," WIMBOOT_VERSION "," \ - "https://ipxe.org/wimboot" \ - "\n" \ - /* ntloader version */ \ - "ntloader," SBAT_GENERATION ",a1ive,ntloader," VERSION "," \ - "https://github.com/grub4dos/ntloader" \ - "\n" - -/** SBAT metadata (with no terminating NUL) */ -const char sbat[ sizeof (SBAT_CSV) - 1 ] __sbat = SBAT_CSV; - /** * Process command line * diff --git a/script.lds b/script.lds index 1fc7528..514c3d4 100644 --- a/script.lds +++ b/script.lds @@ -134,18 +134,6 @@ SECTIONS { } _bcd_len = ABSOLUTE ( _ebcd ) - ABSOLUTE ( _bcd ); - /* Secure Boot Advanced Targeting (SBAT) section */ - _sbat_pos = ( _bcd_pos + _bcd_len ); - .sbat : AT ( _sbat_pos ) { - _sbat = .; - *(.sbat) - *(.sbat.*) - _esbat = .; - ASSERT ( ABSOLUTE ( . ) <= ABSOLUTE ( _ebda_start ), - "Binary is too large (overlap the EBDA)" ); - } - _sbat_len = ABSOLUTE ( _esbat ) - ABSOLUTE ( _sbat ); - _end = .; /* Symbols required by i386.x86_64 objects */