summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2012-09-30 12:24:15 +0000
committerae <ae@FreeBSD.org>2012-09-30 12:24:15 +0000
commit2441140ba83495471e697d8fdab67934bb301a3b (patch)
treeb4136a3a1e9aa1e1616c80351768090e666f0684 /sys/boot/i386
parent333f372c81bfd6c15295732871cc1d2b464f3ec2 (diff)
downloadFreeBSD-src-2441140ba83495471e697d8fdab67934bb301a3b.zip
FreeBSD-src-2441140ba83495471e697d8fdab67934bb301a3b.tar.gz
Reduce the number of attempts to detect proper kld format for the amd64
loader.
Diffstat (limited to 'sys/boot/i386')
-rw-r--r--sys/boot/i386/loader/Makefile1
-rw-r--r--sys/boot/i386/loader/conf.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/sys/boot/i386/loader/Makefile b/sys/boot/i386/loader/Makefile
index cc3eaf8..f91715c 100644
--- a/sys/boot/i386/loader/Makefile
+++ b/sys/boot/i386/loader/Makefile
@@ -125,6 +125,7 @@ LDADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSTAND}
.if ${MACHINE_CPUARCH} == "amd64"
beforedepend ${OBJS}: machine
CLEANFILES+= machine
+CFLAGS+= -DLOADER_PREFER_AMD64
machine:
ln -sf ${.CURDIR}/../../../i386/include machine
.endif
diff --git a/sys/boot/i386/loader/conf.c b/sys/boot/i386/loader/conf.c
index 4d44fbb..ac19751 100644
--- a/sys/boot/i386/loader/conf.c
+++ b/sys/boot/i386/loader/conf.c
@@ -109,10 +109,16 @@ extern struct file_format amd64_elf;
extern struct file_format amd64_elf_obj;
struct file_format *file_formats[] = {
+#ifdef LOADER_PREFER_AMD64
+ &amd64_elf,
+ &amd64_elf_obj,
+#endif
&i386_elf,
&i386_elf_obj,
+#ifndef LOADER_PREFER_AMD64
&amd64_elf,
&amd64_elf_obj,
+#endif
NULL
};
OpenPOWER on IntegriCloud