summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-12-22 10:55:47 -0200
committerRenato Botelho <renato@netgate.com>2015-12-22 10:55:47 -0200
commit109a7ad1ec5fcb58bce8d91fa982b503050dcf06 (patch)
treed9e78329f327edd0a32a31a41466357b4210a662 /sys/boot
parentcfe34c66a5ecf4b4d0db428dcaa83bc1959944e9 (diff)
parentdf0dedf653f6c09947ccd61ca9509629c4fb7d2f (diff)
downloadFreeBSD-src-109a7ad1ec5fcb58bce8d91fa982b503050dcf06.zip
FreeBSD-src-109a7ad1ec5fcb58bce8d91fa982b503050dcf06.tar.gz
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/amd64/boot1.efi/Makefile2
-rw-r--r--sys/boot/amd64/boot1.efi/boot1.c7
-rw-r--r--sys/boot/amd64/efi/Makefile6
-rw-r--r--sys/boot/efi/libefi/Makefile4
4 files changed, 12 insertions, 7 deletions
diff --git a/sys/boot/amd64/boot1.efi/Makefile b/sys/boot/amd64/boot1.efi/Makefile
index 3e3bc9f..dd8eaf9 100644
--- a/sys/boot/amd64/boot1.efi/Makefile
+++ b/sys/boot/amd64/boot1.efi/Makefile
@@ -51,7 +51,7 @@ boot1.efi: loader.sym
${OBJCOPY} -j .text -j .sdata -j .data \
-j .dynamic -j .dynsym -j .rel.dyn \
-j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \
- --target=${EFI_TARGET} ${.ALLSRC} ${.TARGET}
+ --output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET}
CFLAGS+= -I${.CURDIR}/../../common
diff --git a/sys/boot/amd64/boot1.efi/boot1.c b/sys/boot/amd64/boot1.efi/boot1.c
index cb75d2a..4a8f951 100644
--- a/sys/boot/amd64/boot1.efi/boot1.c
+++ b/sys/boot/amd64/boot1.efi/boot1.c
@@ -307,12 +307,19 @@ load(const char *fname)
/* XXX: For secure boot, we need our own loader here */
status = systab->BootServices->LoadImage(TRUE, image, bootdevpath,
buffer, bufsize, &loaderhandle);
+ if (EFI_ERROR(status))
+ printf("LoadImage failed with error %lx\n", status);
status = systab->BootServices->HandleProtocol(loaderhandle,
&LoadedImageGUID, (VOID**)&loaded_image);
+ if (EFI_ERROR(status))
+ printf("HandleProtocol failed with error %lx\n", status);
+
loaded_image->DeviceHandle = bootdevhandle;
status = systab->BootServices->StartImage(loaderhandle, NULL, NULL);
+ if (EFI_ERROR(status))
+ printf("StartImage failed with error %lx\n", status);
}
static void
diff --git a/sys/boot/amd64/efi/Makefile b/sys/boot/amd64/efi/Makefile
index faece5d..29e5389 100644
--- a/sys/boot/amd64/efi/Makefile
+++ b/sys/boot/amd64/efi/Makefile
@@ -26,6 +26,8 @@ SRCS= autoload.c \
vers.c
SRCS+= amd64_tramp.S \
start.S
+SRCS+= nullconsole.c \
+ comconsole.c
CFLAGS+= -fPIC
CFLAGS+= -I.
@@ -53,7 +55,7 @@ CFLAGS+= -DEFI_STAGING_SIZE=${EFI_STAGING_SIZE}
# Always add MI sources
.PATH: ${.CURDIR}/../../common
-# For smbios.c
+# For smbios.c, nullconsole.c, comconsole.c
.PATH: ${.CURDIR}/../../i386/libi386
.include "${.CURDIR}/../../common/Makefile.inc"
CFLAGS+= -I${.CURDIR}/../../common
@@ -90,7 +92,7 @@ loader.efi: loader.sym
${OBJCOPY} -j .text -j .sdata -j .data \
-j .dynamic -j .dynsym -j .rel.dyn \
-j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \
- --target=${EFI_TARGET} ${.ALLSRC} ${.TARGET}
+ --output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET}
LIBEFI= ${.OBJDIR}/../../efi/libefi/libefi.a
CFLAGS+= -I${.CURDIR}/../../common
diff --git a/sys/boot/efi/libefi/Makefile b/sys/boot/efi/libefi/Makefile
index bd753cf..99c2e9b 100644
--- a/sys/boot/efi/libefi/Makefile
+++ b/sys/boot/efi/libefi/Makefile
@@ -5,8 +5,6 @@ INTERNALLIB=
SRCS= delay.c efi_console.c efinet.c efipart.c errno.c handles.c \
libefi.c time.c
-.PATH: ${.CURDIR}/../../i386/libi386
-SRCS+= nullconsole.c comconsole.c
.if ${MACHINE_ARCH} == "amd64"
CFLAGS+= -fPIC -mno-red-zone
@@ -18,8 +16,6 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
# Pick up the bootstrap header for some interface items
CFLAGS+= -I${.CURDIR}/../../common
-CFLAGS+= -DNO_PCI
-
# Suppress warning from clang for FreeBSD %b and %D formats
CFLAGS+= -fformat-extensions
OpenPOWER on IntegriCloud