head	1.5;
access;
symbols
	RELENG_9_1_0_RELEASE:1.2.2.1.4.2
	RELENG_9_1:1.2.2.1.0.4
	RELENG_9_1_BP:1.2.2.1
	RELENG_9_0_0_RELEASE:1.2.2.1.2.1
	RELENG_9_0:1.2.2.1.0.2
	RELENG_9_0_BP:1.2.2.1
	RELENG_9:1.2.0.2
	RELENG_9_BP:1.2;
locks; strict;
comment	@# @;


1.5
date	2013.01.23.00.30.38;	author svnexp;	state Exp;
branches;
next	1.4;

1.4
date	2012.11.17.01.51.17;	author svnexp;	state Exp;
branches;
next	1.3;

1.3
date	2012.04.20.15.01.23;	author marcel;	state Exp;
branches;
next	1.2;

1.2
date	2010.08.31.19.01.12;	author delphij;	state Exp;
branches
	1.2.2.1;
next	1.1;

1.1
date	2010.04.07.18.16.05;	author rpaulo;	state Exp;
branches;
next	;

1.2.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.2.2.1.2.1
	1.2.2.1.4.1;
next	1.2.2.2;

1.2.2.2
date	2012.11.17.11.36.47;	author svnexp;	state Exp;
branches;
next	1.2.2.3;

1.2.2.3
date	2013.10.10.13.01.43;	author svnexp;	state Exp;
branches;
next	;

1.2.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.2.2.1.2.2;

1.2.2.1.2.2
date	2012.11.17.08.36.46;	author svnexp;	state Exp;
branches;
next	;

1.2.2.1.4.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.2.2.1.4.2;

1.2.2.1.4.2
date	2012.11.17.08.47.36;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.5
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/245765
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@# $FreeBSD: head/sys/boot/i386/efi/Makefile 245765 2013-01-22 04:14:27Z benno $

NO_MAN=
WITHOUT_SSP=
BUILDING_EFI=

.include <bsd.own.mk>

PROG=		loader.sym
INTERNALPROG=

# architecture-specific loader code
SRCS=	main.c exec.c conf.c vers.c reloc.c start.S elf32_freebsd.c
SRCS+=	i386_copy.c bootinfo.c autoload.c devicename.c efimd.c

CFLAGS+=	-I${.CURDIR}/../../efi/include
CFLAGS+=	-I${.CURDIR}/../../efi/include/i386

.if ${MK_FORTH} != "no"
BOOT_FORTH=	yes
CFLAGS+=	-DBOOT_FORTH
CFLAGS+=	-I${.CURDIR}/../../ficl
CFLAGS+=	-I${.CURDIR}/../../ficl/i386
LIBFICL=	${.OBJDIR}/../../ficl/libficl.a
.endif

# Include bcache code.
HAVE_BCACHE=    yes

# Always add MI sources 
.PATH:		${.CURDIR}/../../common
.include	"${.CURDIR}/../../common/Makefile.inc"
CFLAGS+=	-I${.CURDIR}/../../common

FILES=	loader.efi
FILESMODE_loader.efi=	${BINMODE}

LDSCRIPT=	${.CURDIR}/ldscript.i386
LDFLAGS=	-Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared

${PROG}:	${LDSCRIPT}

CLEANFILES=	vers.c loader.efi

NEWVERSWHAT=	"EFI loader" x86

vers.c:	${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
	sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}

OBJCOPY?=	objcopy
OBJDUMP?=	objdump

loader.efi: loader.sym
	if [ `${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*' | wc -l` != 0 ]; then \
		${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*'; \
		exit 1; \
	fi
	${OBJCOPY} -j .data -j .dynamic -j .dynstr -j .dynsym -j .hash \
	    -j .rel.dyn -j .reloc -j .sdata -j .text -j set_Xcommand_set \
	    --target=efi-app-ia32 ${.ALLSRC} ${.TARGET}

LIBEFI=		${.OBJDIR}/../../efi/libefi/libefi.a
CFLAGS+=	-I${.CURDIR}/../libi386
CFLAGS+=	-I${.CURDIR}/../btx/lib

DPADD=		${LIBFICL} ${LIBEFI} ${LIBSTAND}
LDADD=		${LIBFICL} ${LIBEFI} ${LIBSTAND}

.include <bsd.prog.mk>

.if ${MACHINE_CPUARCH} == "amd64"
CFLAGS+=        -I.
beforedepend ${OBJS}: machine
machine:
	ln -sf ${.CURDIR}/../../../i386/include machine
.endif
@


1.4
log
@Switching exporter and resync
@
text
@d1 1
a1 1
# $FreeBSD: head/sys/boot/i386/efi/Makefile 234493 2012-04-20 15:01:23Z marcel $
d39 1
a39 1
LDFLAGS=	-Wl,-T${LDSCRIPT} -shared -symbolic
@


1.3
log
@SVN rev 234493 on 2012-04-20 15:01:23Z by marcel

Build a 32-bit EFI loader on amd64. This to match the rest of the
code that is used to construct a loader (e.g. libstand, ficl, etc).

There is such a thing as a 64-bit EFI application, but it's not
as standard as 32-bit is. Let's make the 32-bit functional (as in
we can load and actualy boot a kernel) before solving the 64-bit
loader problem.
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.2
log
@SVN rev 212066 on 2010-08-31 19:01:12Z by delphij

For consistency, change all 'i386' and MACHINE_ARCH to x86.

Reviewed by:	jhb
MFC after:	1 week
@
text
@d38 1
a38 1
LDSCRIPT=	${.CURDIR}/ldscript.${MACHINE_ARCH}
d67 1
a67 1
LDADD=		${LIBFICL} ${LIBEFI} -lstand
d70 7
@


1.2.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.2.2.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sys/boot/i386/efi/Makefile 212066 2010-08-31 19:01:12Z delphij $
@


1.2.2.3
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/256266
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sys/boot/i386/efi/Makefile 256266 2013-10-10 12:46:26Z bdrewery $
d4 1
a7 1
MK_SSP=		no
@


1.2.2.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.2.2.1.4.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/sys/boot/i386/efi/Makefile 212066 2010-08-31 19:01:12Z delphij $
@


1.2.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.2.2.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/sys/boot/i386/efi/Makefile 212066 2010-08-31 19:01:12Z delphij $
@


1.1
log
@SVN rev 206376 on 2010-04-07 18:16:05Z by rpaulo

EFI boot loader for FreeBSD/i386.

Doesn't boot a kernel yet, but it can read an ELF file from the EFI FAT
partition.
@
text
@d45 1
a45 1
NEWVERSWHAT=	"EFI loader" ${MACHINE_ARCH}
@

