Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Sep 2012 12:24:16 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r241068 - head/sys/boot/i386/loader
Message-ID:  <201209301224.q8UCOG5o029237@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Sun Sep 30 12:24:15 2012
New Revision: 241068
URL: http://svn.freebsd.org/changeset/base/241068

Log:
  Reduce the number of attempts to detect proper kld format for the amd64
  loader.

Modified:
  head/sys/boot/i386/loader/Makefile
  head/sys/boot/i386/loader/conf.c

Modified: head/sys/boot/i386/loader/Makefile
==============================================================================
--- head/sys/boot/i386/loader/Makefile	Sun Sep 30 09:26:26 2012	(r241067)
+++ head/sys/boot/i386/loader/Makefile	Sun Sep 30 12:24:15 2012	(r241068)
@@ -125,6 +125,7 @@ LDADD=	${LIBFICL} ${LIBFIREWIRE} ${LIBZF
 .if ${MACHINE_CPUARCH} == "amd64"
 beforedepend ${OBJS}: machine
 CLEANFILES+=	machine
+CFLAGS+=	-DLOADER_PREFER_AMD64
 machine:
 	ln -sf ${.CURDIR}/../../../i386/include machine
 .endif

Modified: head/sys/boot/i386/loader/conf.c
==============================================================================
--- head/sys/boot/i386/loader/conf.c	Sun Sep 30 09:26:26 2012	(r241067)
+++ head/sys/boot/i386/loader/conf.c	Sun Sep 30 12:24:15 2012	(r241068)
@@ -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
 };
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209301224.q8UCOG5o029237>