remove sbat

This commit is contained in:
a1ive 2025-02-20 16:09:59 +09:00
parent b329d7caa3
commit d1870ddbd0
No known key found for this signature in database
GPG Key ID: DA9BACF4F462B55D
4 changed files with 4 additions and 37 deletions

View File

@ -1,8 +1,6 @@
# Versioning information # Versioning information
# #
VERSION := v3.0.4 VERSION := v3.0.4
WIMBOOT_VERSION := v2.8.0
SBAT_GENERATION := 1
# Abstract target-independent objects # Abstract target-independent objects
# #
@ -97,8 +95,6 @@ OBJCOPY_arm64 ?= $(CROSS_arm64)$(OBJCOPY)
CFLAGS += -Os -ffreestanding -Wall -W -Werror CFLAGS += -Os -ffreestanding -Wall -W -Werror
CFLAGS += -nostdinc -Iinclude/ -fshort-wchar CFLAGS += -nostdinc -Iinclude/ -fshort-wchar
CFLAGS += -DVERSION="\"$(VERSION)\"" CFLAGS += -DVERSION="\"$(VERSION)\""
CFLAGS += -DWIMBOOT_VERSION="\"$(WIMBOOT_VERSION)\""
CFLAGS += -DSBAT_GENERATION="\"$(SBAT_GENERATION)\""
CFLAGS += -include compiler.h CFLAGS += -include compiler.h
ifneq ($(DEBUG),) ifneq ($(DEBUG),)
CFLAGS += -DDEBUG=$(DEBUG) CFLAGS += -DDEBUG=$(DEBUG)

View File

@ -1,5 +1,9 @@
## FAQ ## FAQ
### Does Ntloader support secure boot?
**NO.**
### 0xc0000001 error occurs when booting VHD/VHDX ### 0xc0000001 error occurs when booting VHD/VHDX
![vhd_error](./images/vhd_error.png) ![vhd_error](./images/vhd_error.png)

View File

@ -27,27 +27,6 @@
#include "efidisk.h" #include "efidisk.h"
#include "efi/Protocol/LoadedImage.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 * Process command line
* *

View File

@ -134,18 +134,6 @@ SECTIONS {
} }
_bcd_len = ABSOLUTE ( _ebcd ) - ABSOLUTE ( _bcd ); _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 = .; _end = .;
/* Symbols required by i386.x86_64 objects */ /* Symbols required by i386.x86_64 objects */