1999-08-28 01:08:13 +00:00
|
|
|
# $FreeBSD$
|
1998-08-21 03:17:42 +00:00
|
|
|
|
2017-10-30 23:14:37 +00:00
|
|
|
.include <bsd.init.mk>
|
|
|
|
|
2009-02-21 15:04:31 +00:00
|
|
|
MK_SSP= no
|
2006-03-17 18:54:44 +00:00
|
|
|
|
2009-11-23 16:00:16 +00:00
|
|
|
LOADER?= loader
|
|
|
|
PROG= ${LOADER}.sym
|
2015-06-19 05:42:24 +00:00
|
|
|
MAN=
|
2004-02-09 14:11:58 +00:00
|
|
|
INTERNALPROG=
|
2010-08-31 19:01:12 +00:00
|
|
|
NEWVERSWHAT?= "bootstrap loader" x86
|
2016-12-19 14:40:59 +00:00
|
|
|
VERSION_FILE= ${.CURDIR}/../loader/version
|
2017-05-06 20:32:27 +00:00
|
|
|
LOADER_NET_SUPPORT?= yes
|
2017-05-27 12:20:13 +00:00
|
|
|
LOADER_NFS_SUPPORT?= yes
|
|
|
|
LOADER_TFTP_SUPPORT?= yes
|
1998-08-21 03:17:42 +00:00
|
|
|
|
2017-10-16 03:59:52 +00:00
|
|
|
LOADER_CD9660_SUPPORT?= no
|
|
|
|
LOADER_EXT2FS_SUPPORT?= no
|
|
|
|
LOADER_MSDOS_SUPPORT?= no
|
|
|
|
LOADER_UFS_SUPPORT?= yes
|
2017-11-02 18:13:26 +00:00
|
|
|
LOADER_GZIP_SUPPORT?= yes
|
2017-11-02 19:53:51 +00:00
|
|
|
LOADER_BZIP2_SUPPORT?= yes
|
2017-10-16 03:59:52 +00:00
|
|
|
|
1998-09-17 23:52:16 +00:00
|
|
|
# architecture-specific loader code
|
2017-06-16 20:08:44 +00:00
|
|
|
SRCS= main.c conf.c vers.c chain.c
|
1998-09-17 23:52:16 +00:00
|
|
|
|
2007-05-29 14:35:57 +00:00
|
|
|
# Put LOADER_FIREWIRE_SUPPORT=yes in /etc/make.conf for FireWire/dcons support
|
|
|
|
.if defined(LOADER_FIREWIRE_SUPPORT)
|
|
|
|
CFLAGS+= -DLOADER_FIREWIRE_SUPPORT
|
2017-11-02 19:45:51 +00:00
|
|
|
LIBFIREWIRE= ${BOOTOBJ}/i386/libfirewire/libfirewire.a
|
2007-05-29 14:35:57 +00:00
|
|
|
.endif
|
|
|
|
|
2009-11-23 16:00:16 +00:00
|
|
|
# Set by zfsloader Makefile
|
Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.
This bring huge amount of changes, I'll enumerate only user-visible changes:
- Delegated Administration
Allows regular users to perform ZFS operations, like file system
creation, snapshot creation, etc.
- L2ARC
Level 2 cache for ZFS - allows to use additional disks for cache.
Huge performance improvements mostly for random read of mostly
static content.
- slog
Allow to use additional disks for ZFS Intent Log to speed up
operations like fsync(2).
- vfs.zfs.super_owner
Allows regular users to perform privileged operations on files stored
on ZFS file systems owned by him. Very careful with this one.
- chflags(2)
Not all the flags are supported. This still needs work.
- ZFSBoot
Support to boot off of ZFS pool. Not finished, AFAIK.
Submitted by: dfr
- Snapshot properties
- New failure modes
Before if write requested failed, system paniced. Now one
can select from one of three failure modes:
- panic - panic on write error
- wait - wait for disk to reappear
- continue - serve read requests if possible, block write requests
- Refquota, refreservation properties
Just quota and reservation properties, but don't count space consumed
by children file systems, clones and snapshots.
- Sparse volumes
ZVOLs that don't reserve space in the pool.
- External attributes
Compatible with extattr(2).
- NFSv4-ACLs
Not sure about the status, might not be complete yet.
Submitted by: trasz
- Creation-time properties
- Regression tests for zpool(8) command.
Obtained from: OpenSolaris
2008-11-17 20:49:29 +00:00
|
|
|
.if defined(LOADER_ZFS_SUPPORT)
|
|
|
|
CFLAGS+= -DLOADER_ZFS_SUPPORT
|
2017-10-30 23:14:59 +00:00
|
|
|
.if ${MACHINE} == "amd64"
|
|
|
|
LIBZFSBOOT= ${BOOTOBJ}/zfs32/libzfsboot.a
|
|
|
|
.else
|
2017-10-30 23:14:37 +00:00
|
|
|
LIBZFSBOOT= ${BOOTOBJ}/zfs/libzfsboot.a
|
Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.
This bring huge amount of changes, I'll enumerate only user-visible changes:
- Delegated Administration
Allows regular users to perform ZFS operations, like file system
creation, snapshot creation, etc.
- L2ARC
Level 2 cache for ZFS - allows to use additional disks for cache.
Huge performance improvements mostly for random read of mostly
static content.
- slog
Allow to use additional disks for ZFS Intent Log to speed up
operations like fsync(2).
- vfs.zfs.super_owner
Allows regular users to perform privileged operations on files stored
on ZFS file systems owned by him. Very careful with this one.
- chflags(2)
Not all the flags are supported. This still needs work.
- ZFSBoot
Support to boot off of ZFS pool. Not finished, AFAIK.
Submitted by: dfr
- Snapshot properties
- New failure modes
Before if write requested failed, system paniced. Now one
can select from one of three failure modes:
- panic - panic on write error
- wait - wait for disk to reappear
- continue - serve read requests if possible, block write requests
- Refquota, refreservation properties
Just quota and reservation properties, but don't count space consumed
by children file systems, clones and snapshots.
- Sparse volumes
ZVOLs that don't reserve space in the pool.
- External attributes
Compatible with extattr(2).
- NFSv4-ACLs
Not sure about the status, might not be complete yet.
Submitted by: trasz
- Creation-time properties
- Regression tests for zpool(8) command.
Obtained from: OpenSolaris
2008-11-17 20:49:29 +00:00
|
|
|
.endif
|
2017-10-30 23:14:59 +00:00
|
|
|
.endif
|
Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.
This bring huge amount of changes, I'll enumerate only user-visible changes:
- Delegated Administration
Allows regular users to perform ZFS operations, like file system
creation, snapshot creation, etc.
- L2ARC
Level 2 cache for ZFS - allows to use additional disks for cache.
Huge performance improvements mostly for random read of mostly
static content.
- slog
Allow to use additional disks for ZFS Intent Log to speed up
operations like fsync(2).
- vfs.zfs.super_owner
Allows regular users to perform privileged operations on files stored
on ZFS file systems owned by him. Very careful with this one.
- chflags(2)
Not all the flags are supported. This still needs work.
- ZFSBoot
Support to boot off of ZFS pool. Not finished, AFAIK.
Submitted by: dfr
- Snapshot properties
- New failure modes
Before if write requested failed, system paniced. Now one
can select from one of three failure modes:
- panic - panic on write error
- wait - wait for disk to reappear
- continue - serve read requests if possible, block write requests
- Refquota, refreservation properties
Just quota and reservation properties, but don't count space consumed
by children file systems, clones and snapshots.
- Sparse volumes
ZVOLs that don't reserve space in the pool.
- External attributes
Compatible with extattr(2).
- NFSv4-ACLs
Not sure about the status, might not be complete yet.
Submitted by: trasz
- Creation-time properties
- Regression tests for zpool(8) command.
Obtained from: OpenSolaris
2008-11-17 20:49:29 +00:00
|
|
|
|
2006-11-02 00:26:45 +00:00
|
|
|
# Include bcache code.
|
|
|
|
HAVE_BCACHE= yes
|
|
|
|
|
1998-09-14 18:27:06 +00:00
|
|
|
# Enable PnP and ISA-PnP code.
|
1998-10-21 20:10:33 +00:00
|
|
|
HAVE_PNP= yes
|
|
|
|
HAVE_ISABUS= yes
|
1998-09-14 18:27:06 +00:00
|
|
|
|
2017-10-16 03:59:52 +00:00
|
|
|
.if ${LOADER_GELI_SUPPORT:Uyes} == "yes"
|
2016-03-16 23:12:19 +00:00
|
|
|
CFLAGS+= -DLOADER_GELI_SUPPORT
|
2017-10-22 22:50:08 +00:00
|
|
|
CFLAGS+= -I${BOOTSRC}/geli
|
2017-10-22 03:52:22 +00:00
|
|
|
LIBGELIBOOT= ${BOOTOBJ}/geli/libgeliboot.a
|
2017-10-30 23:14:37 +00:00
|
|
|
.PATH: ${SYSDIR}/opencrypto
|
2016-03-16 23:12:19 +00:00
|
|
|
SRCS+= xform_aes_xts.c
|
2017-10-30 23:14:37 +00:00
|
|
|
CFLAGS+= -I${SYSDIR} -D_STAND
|
2016-03-16 23:12:19 +00:00
|
|
|
.endif
|
2001-09-18 14:52:36 +00:00
|
|
|
|
2011-11-19 14:42:06 +00:00
|
|
|
# Always add MI sources
|
2017-10-30 23:14:37 +00:00
|
|
|
.include "${BOOTSRC}/loader.mk"
|
2004-02-06 21:58:32 +00:00
|
|
|
CFLAGS+= -I.
|
1998-08-21 03:17:42 +00:00
|
|
|
|
2016-12-19 14:40:59 +00:00
|
|
|
CLEANFILES= ${LOADER} ${LOADER}.bin loader.help
|
1998-08-21 03:17:42 +00:00
|
|
|
|
|
|
|
CFLAGS+= -Wall
|
2017-10-30 23:14:37 +00:00
|
|
|
LDFLAGS+= -static -Ttext 0x0
|
1998-08-21 03:17:42 +00:00
|
|
|
|
|
|
|
# i386 standalone support library
|
2017-10-30 23:14:37 +00:00
|
|
|
LIBI386= ${BOOTOBJ}/i386/libi386/libi386.a
|
|
|
|
CFLAGS+= -I${BOOTSRC}/i386
|
1998-09-17 23:52:16 +00:00
|
|
|
|
|
|
|
# BTX components
|
2017-10-30 23:14:37 +00:00
|
|
|
CFLAGS+= -I${BTXLIB}
|
1998-09-17 23:52:16 +00:00
|
|
|
|
1998-09-26 01:31:10 +00:00
|
|
|
# Debug me!
|
1998-11-04 03:42:36 +00:00
|
|
|
#CFLAGS+= -g
|
|
|
|
#LDFLAGS+= -g
|
1998-09-26 01:31:10 +00:00
|
|
|
|
2009-11-23 16:00:16 +00:00
|
|
|
${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN}
|
2002-08-30 14:59:47 +00:00
|
|
|
btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
|
2009-11-23 16:00:16 +00:00
|
|
|
-b ${BTXKERN} ${LOADER}.bin
|
1998-09-17 23:52:16 +00:00
|
|
|
|
2009-11-23 16:00:16 +00:00
|
|
|
${LOADER}.bin: ${LOADER}.sym
|
2016-12-28 04:55:43 +00:00
|
|
|
strip -R .comment -R .note -o ${.TARGET} ${.ALLSRC}
|
1998-09-17 23:52:16 +00:00
|
|
|
|
2004-02-06 21:58:32 +00:00
|
|
|
loader.help: help.common help.i386
|
2017-10-22 22:50:08 +00:00
|
|
|
cat ${.ALLSRC} | awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
|
1998-12-15 14:21:30 +00:00
|
|
|
|
2009-11-23 16:00:16 +00:00
|
|
|
FILES= ${LOADER}
|
|
|
|
# XXX INSTALLFLAGS_loader= -b
|
|
|
|
FILESMODE_${LOADER}= ${BINMODE} -b
|
|
|
|
|
|
|
|
.if !defined(LOADER_ONLY)
|
2017-10-30 23:14:37 +00:00
|
|
|
.PATH: ${BOOTSRC}/forth
|
|
|
|
.include "${BOOTSRC}/forth/Makefile.inc"
|
2015-04-02 20:07:05 +00:00
|
|
|
FILES+= pcibios.4th
|
2002-04-17 16:56:36 +00:00
|
|
|
|
2015-08-06 16:07:27 +00:00
|
|
|
FILES+= loader.rc menu.rc
|
2009-11-23 16:00:16 +00:00
|
|
|
.endif
|
1998-12-15 14:21:30 +00:00
|
|
|
|
2004-02-27 14:10:09 +00:00
|
|
|
# XXX crt0.o needs to be first for pxeboot(8) to work
|
2011-11-19 14:42:06 +00:00
|
|
|
OBJS= ${BTXCRT}
|
2004-02-27 14:10:09 +00:00
|
|
|
|
2017-11-06 15:21:45 +00:00
|
|
|
DPADD= ${LIBFICL32} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSA32}
|
|
|
|
LDADD= ${LIBFICL32} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSA32}
|
1998-09-17 23:52:16 +00:00
|
|
|
|
2004-02-09 14:11:58 +00:00
|
|
|
.include <bsd.prog.mk>
|
1998-10-21 20:10:33 +00:00
|
|
|
|
2010-08-23 01:42:09 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "amd64"
|
2004-02-07 23:30:45 +00:00
|
|
|
beforedepend ${OBJS}: machine
|
2004-02-06 21:58:32 +00:00
|
|
|
CLEANFILES+= machine
|
2012-09-30 12:24:15 +00:00
|
|
|
CFLAGS+= -DLOADER_PREFER_AMD64
|
2016-03-11 23:45:51 +00:00
|
|
|
machine: .NOMETA
|
2017-10-30 23:14:37 +00:00
|
|
|
ln -sf ${SYSDIR}/i386/include machine
|
1998-10-21 20:10:33 +00:00
|
|
|
.endif
|