[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / i386 / stand / dosboot

File: [cvs.NetBSD.org] / src / sys / arch / i386 / stand / dosboot / Makefile (download)

Revision 1.32, Fri Sep 13 02:19:45 2019 UTC (5 weeks, 3 days ago) by manu
Branch: MAIN
Changes since 1.31: +3 -2 lines

Add multiboot 2 support to x86 bootloaders

multiboot 2 is required to boot Xen on an EFI system.
This also require a kernel patch for properly discovering
the ACPI RSDP, which is available after 20190912, in
src/sys/arch/x86/acpi/acpi_machdep.c 1.26-1.28

There are a few missing bit in this multiboot 2 implementation
(which are unused by Xen):
- Header tags Address, Freambuffer, and Relocatable are ignored
- Tags APM and Network are not provided
- Tags ACPI old and ACP new are only provided for ACPI boot
- Tag boot device does not provides the subpart (BSD disklabel partition)

Notes:
- multiboot2 is disabled in dosboot, otherwise the binary
  gets too big and build fails.
- in src/sys/arch/i386/stand/efiboot, consinit() is renamed
  as efi_consinit() to avoid prototype conflicts in src/sys/sys/systm.h

#	$NetBSD: Makefile,v 1.32 2019/09/13 02:19:45 manu Exp $

S=	${.CURDIR}/../../../..

BASE= dosboot
PROG= ${BASE}.com
NEWVERSWHAT=	"DOS Boot"
STARTFILE=	${DOSSTART}
RELOC=		0x100

SRCS= main.c devopen.c exec.c exec_multiboot1.c exec_multiboot2.c

CPPFLAGS+= -DSLOW	# for libz
CPPFLAGS+= -DCOMPAT_386BSD_MBRPART
CPPFLAGS+= -DXMS
CPPFLAGS+= -DLIBSA_ENABLE_LS_OP
CPPFLAGS+= -DNO_MULTIBOOT2 # keep the binary small
#uncomment if there are problems with memory detection
#CPPFLAGS+= -DCONSERVATIVE_MEMDETECT

#CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop
CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main

# XXX should go into library
SRCS+= getopt.c
.PATH: ${.CURDIR}/../libsa

# XXX these should depend on the size of the image
CPPFLAGS+= -DSTACK_START=0x10000
SAMISCCPPFLAGS+= -DHEAP_START=0x20000 -DHEAP_LIMIT=0x50000
SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_INCLUDE_NET=no SA_ENABLE_LS_OP=yes
I386MISCMAKEFLAGS= I386_INCLUDE_DOS=yes

VERSIONFILE= ${.CURDIR}/version

.include <bsd.init.mk>

release: check_RELEASEDIR
	${HOST_INSTALL_FILE} -m ${BINMODE} dosboot.com \
	    ${RELEASEDIR}/${MACHINE}/installation/misc

.include "../Makefile.booters"