lockdown.efi does nothing
Posted: Sun Sep 01, 2013 4:47 pm
I am trying to run the uefi application I compiled called "LockDown.efi". It locks down the platform with my secure boot keys and puts it into Secure Boot mode. However, when I try to run it from QEMU with the OVMF UEFI BIOS it does nothing. It compiles perfectly. Could anybody tell me if the makefiles are wrong?
Here is the makefile:
Here is Make.rules:
Here is the makefile:
Code: Select all
CC=gcc
LD=ld
include Make.rules
all: lockdown.efi
lockdown.efi: lockdown.so
lockdown.so: lockdown.o lib/lib-efi.a
lockdown.o: lockdown.c
PK.h: PK.auth
KEK.h: KEK.auth
DB.h: DB.auth
Code: Select all
CFLAGS=-c -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -mno-red-zone -fno-stack-protector -g -DEFI_FUNCTION_WRAPPER
LDFLAGS=-T elf_x86_64_efi.lds -nostdlib -znocombreloc --no-undefined -shared -Bsymbolic -L lib/
EFIDIR=/usr/local/include/efi
EFIINC=-I include/ -I $(EFIDIR) -I $(EFIDIR)/x86_64 -I $(EFIDIR)/protocol
LOADLIBS=-lefi -lgnuefi
%.h: %.auth
xxd -i $< > $@
%.efi: %.so
objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel -j .rela -j .reloc --target=efi-app-x86_64 $*.so $@
%.so: %.o
ld $(LDFLAGS) $^ -o $@ $(LOADLIBS)
%.o: %.c
gcc $(EFIINC) $(CFLAGS) $^ -o $@