From 95556566045e141322bec9086eb2238f49ef340b Mon Sep 17 00:00:00 2001 From: jmcneill Date: Thu, 28 May 2020 15:13:21 +0000 Subject: [PATCH] Only install gptmbr.bin if USE_GPTMBR=yes --- distrib/amd64/installimage/Makefile | 3 ++- distrib/common/bootimage/Makefile.bootimage | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/distrib/amd64/installimage/Makefile b/distrib/amd64/installimage/Makefile index 042d9739bfb0..cb0c8b2e2693 100644 --- a/distrib/amd64/installimage/Makefile +++ b/distrib/amd64/installimage/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2020/05/27 22:27:58 maya Exp $ +# $NetBSD: Makefile,v 1.12 2020/05/28 15:13:21 jmcneill Exp $ .include @@ -16,6 +16,7 @@ EFIBOOT+= ${WORKDIR}/usr/mdec/bootia32.efi USE_MBR= yes USE_GPT= yes +USE_GPTMBR= yes CLEANFILES+= boot.cfg diff --git a/distrib/common/bootimage/Makefile.bootimage b/distrib/common/bootimage/Makefile.bootimage index 2111f36ffcdf..941f795b3875 100644 --- a/distrib/common/bootimage/Makefile.bootimage +++ b/distrib/common/bootimage/Makefile.bootimage @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.bootimage,v 1.24 2020/03/21 14:19:26 tsutsui Exp $ +# $NetBSD: Makefile.bootimage,v 1.25 2020/05/28 15:13:21 jmcneill Exp $ # # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui. All rights reserved. # @@ -166,6 +166,7 @@ RM?= rm # USE_MBR?= no USE_GPT?= no +USE_GPTMBR?= no USE_SUNLABEL?= no INSTALLBOOT_AFTER_DISKLABEL?= no @@ -549,8 +550,10 @@ ${IMGBASE}.img: ${WORKLABEL} ${IMGBASE}.img: ${TARGET_BLOCKS} ${CAT} ${TARGET_BLOCKS} > ${WORKIMG} .if ${USE_GPT} != "no" +.if ${USE_GPTMBR} != "no" ${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKIMG} biosboot -i 2 \ -c ${.OBJDIR}/${WORKDIR}/usr/mdec/gptmbr.bin +.endif ${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKIMG} set -a bootme -i 2 .endif # USE_GPT != "no" .if ${USE_SUNLABEL} != "no"