Allow overriding live-image and install-image sizes by

INSTIMAGEMB (for install-images), USBIMAGEMB (for x86 sd0root liveimages),
and EMUIMAGEMB (for other liveimages) variables.
Per discussion on current-users@:
http://mail-index.NetBSD.org/current-users/2012/10/29/msg021368.html
This commit is contained in:
tsutsui 2012-11-03 14:25:32 +00:00
parent 2ce34034e0
commit 7be7385533
14 changed files with 63 additions and 19 deletions

View File

@ -1,11 +1,11 @@
# $NetBSD: Makefile,v 1.2 2012/08/17 16:56:34 riz Exp $
# $NetBSD: Makefile,v 1.3 2012/11/03 14:25:32 tsutsui Exp $
.include <bsd.own.mk>
INSTIMGBASE= NetBSD-${DISTRIBVER}-amd64-install # gives ${IMGBASE}.img
BOOTDISK= sd0 # for USB flash etc.
IMAGEMB= 550 # for all installation binaries
INSTIMAGEMB?= 550 # for all installation binaries
PRIMARY_BOOT= bootxx_ffsv1
SECONDARY_BOOT= boot

View File

@ -1,7 +1,10 @@
# $NetBSD: Makefile,v 1.2 2012/08/17 16:56:35 riz Exp $
# $NetBSD: Makefile,v 1.3 2012/11/03 14:25:32 tsutsui Exp $
LIVEIMGBASE= NetBSD-${DISTRIBVER}-amd64-live-wd0root # gives ${IMGBASE}.img
BOOTDISK= wd0 # for QEMU etc.
.if defined(EMUIMAGEMB)
LIVEIMAGEMB= ${EMUIMAGEMB}
.endif
.include "${.CURDIR}/../Makefile.liveimage"

View File

@ -1,9 +1,11 @@
# $NetBSD: Makefile,v 1.2 2012/08/17 16:56:35 riz Exp $
# $NetBSD: Makefile,v 1.3 2012/11/03 14:25:32 tsutsui Exp $
LIVEIMGBASE= NetBSD-${DISTRIBVER}-amd64-live-sd0root # gives ${IMGBASE}.img
USBIMAGEMB?= 1536 # 2GB USB flash memories aren't 2GiB
BOOTDISK= sd0 # for USB flash etc.
IMAGEMB= 1536 # 2GB USB flash memories aren't 2GiB
LIVEIMAGEMB= ${USBIMAGEMB}
OMIT_SWAPIMG= yes # no need to write swap
.include "${.CURDIR}/../Makefile.liveimage"

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.installimage,v 1.3 2012/04/22 07:23:42 tsutsui Exp $
# $NetBSD: Makefile.installimage,v 1.4 2012/11/03 14:25:32 tsutsui Exp $
#
# Common Makefile to create a bootable installation image for USB flash etc.
#
@ -8,6 +8,11 @@
# INSTIMGBASE
# Basename of the liveimage
#
# Optional variables:
# INSTIMAGEMB
# target image size in MB
# (if empty default IMAGEMB in Makefile.bootimage is used)
#
# See Makefile.bootimage for other variables.
#
@ -21,6 +26,9 @@ check_INSTIMGBASE: .PHONY .NOTMAIN
.endif
.endif
.if defined(INSTIMAGEMB)
IMAGEMB= ${INSTIMAGEMB}
.endif
SWAPMB= 0 # no swap
OMIT_SWAPIMG= yes # nothing to write

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.liveimage,v 1.2 2012/01/22 16:50:00 tsutsui Exp $
# $NetBSD: Makefile.liveimage,v 1.3 2012/11/03 14:25:32 tsutsui Exp $
#
# Common Makefile to create a bootable FS image for USB flash or emulators
#
@ -8,6 +8,11 @@
# LIVEIMGBASE
# Basename of the liveimage
#
# Optional variables:
# LIVEIMAGEMB
# target image size in MB
# (if empty default IMAGEMB in Makefile.bootimage is used)
#
# See Makefile.bootimage for other variables.
#
@ -21,6 +26,10 @@ check_LIVEIMGBASE: .PHONY .NOTMAIN
.endif
.endif
.if defined(LIVEIMAGEMB)
IMAGEMB= ${LIVEIMAGEMB}
.endif
IMGBASE= ${LIVEIMGBASE}
.include "${NETBSDSRCDIR}/distrib/common/bootimage/Makefile.bootimage"

View File

@ -1,11 +1,11 @@
# $NetBSD: Makefile,v 1.2 2012/08/17 16:56:35 riz Exp $
# $NetBSD: Makefile,v 1.3 2012/11/03 14:25:33 tsutsui Exp $
.include <bsd.own.mk>
INSTIMGBASE= NetBSD-${DISTRIBVER}-i386-install # gives ${IMGBASE}.img
BOOTDISK= sd0 # for USB flash etc.
IMAGEMB= 512 # for all installation binaries
INSTIMAGEMB?= 512 # for all installation binaries
PRIMARY_BOOT= bootxx_ffsv1
SECONDARY_BOOT= boot

View File

@ -1,7 +1,10 @@
# $NetBSD: Makefile,v 1.2 2012/08/17 16:56:35 riz Exp $
# $NetBSD: Makefile,v 1.3 2012/11/03 14:25:33 tsutsui Exp $
LIVEIMGBASE= NetBSD-${DISTRIBVER}-i386-live-wd0root # gives ${IMGBASE}.img
BOOTDISK= wd0 # for QEMU etc.
.if defined(EMUIMAGEMB)
LIVEIMAGEMB= ${EMUIMAGEMB}
.endif
.include "${.CURDIR}/../Makefile.liveimage"

View File

@ -1,9 +1,11 @@
# $NetBSD: Makefile,v 1.2 2012/08/17 16:56:35 riz Exp $
# $NetBSD: Makefile,v 1.3 2012/11/03 14:25:33 tsutsui Exp $
LIVEIMGBASE= NetBSD-${DISTRIBVER}-i386-live-sd0root # gives ${IMGBASE}.img
USBIMAGEMB?= 1536 # 2GB USB flash memories aren't 2GiB
BOOTDISK= sd0 # for USB flash etc.
IMAGEMB= 1536 # 2GB USB flash memories aren't 2GiB
LIVEIMAGEMB= ${USBIMAGEMB}
OMIT_SWAPIMG= yes # no need to write swap
.include "${.CURDIR}/../Makefile.liveimage"

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.2 2012/08/17 16:56:35 riz Exp $
# $NetBSD: Makefile,v 1.3 2012/11/03 14:25:33 tsutsui Exp $
LIVEIMGBASE= NetBSD-${DISTRIBVER}-pmax-live-sd0root # gives ${IMGBASE}.img
@ -6,6 +6,9 @@ LIVEIMGBASE= NetBSD-${DISTRIBVER}-pmax-live-sd0root # gives ${IMGBASE}.img
KERN_SET= kern-GENERIC
BOOTDISK= sd0
.if defined(EMUIMAGEMB)
LIVEIMAGEMB= ${EMUIMAGEMB}
.endif
PRIMARY_BOOT= bootxx_ffs
#SECONDARY_BOOT= # boot.pmax is extracted from base.tgz
SECONDARY_BOOT_ARG= # nothing

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.2 2012/08/17 16:56:35 riz Exp $
# $NetBSD: Makefile,v 1.3 2012/11/03 14:25:33 tsutsui Exp $
LIVEIMGBASE= NetBSD-${DISTRIBVER}-sparc-live-sd0root # gives ${IMGBASE}.img
@ -6,6 +6,9 @@ LIVEIMGBASE= NetBSD-${DISTRIBVER}-sparc-live-sd0root # gives ${IMGBASE}.img
KERN_SET= kern-GENERIC
BOOTDISK= sd0
.if defined(EMUIMAGEMB)
LIVEIMAGEMB= ${EMUIMAGEMB}
.endif
PRIMARY_BOOT= bootxx
SECONDARY_BOOT= boot
SECONDARY_BOOT_ARG= /${SECONDARY_BOOT}

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.2 2012/08/17 16:56:36 riz Exp $
# $NetBSD: Makefile,v 1.3 2012/11/03 14:25:33 tsutsui Exp $
LIVEIMGBASE= NetBSD-${DISTRIBVER}-sparc64-live-sd0root # gives ${IMGBASE}.img
@ -7,6 +7,9 @@ LIVEIMGBASE= NetBSD-${DISTRIBVER}-sparc64-live-sd0root # gives ${IMGBASE}.img
KERN_SET= kern-GENERIC
BOOTDISK= sd0 # for QEMU
#BOOTDISK= wd0 # for Ultra5/10 image?
.if defined(EMUIMAGEMB)
LIVEIMAGEMB= ${EMUIMAGEMB}
.endif
PRIMARY_BOOT= bootblk
#SECONDARY_BOOT= # nothing
#SECONDARY_BOOT_ARG= # unnecessary

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.2 2012/08/17 16:56:36 riz Exp $
# $NetBSD: Makefile,v 1.3 2012/11/03 14:25:33 tsutsui Exp $
LIVEIMGBASE= NetBSD-${DISTRIBVER}-sun2-live-sd0root # gives ${IMGBASE}.img
@ -6,6 +6,9 @@ LIVEIMGBASE= NetBSD-${DISTRIBVER}-sun2-live-sd0root # gives ${IMGBASE}.img
KERN_SET= kern-GENERIC
BOOTDISK= sd0
.if defined(EMUIMAGEMB)
LIVEIMAGEMB= ${EMUIMAGEMB}
.endif
PRIMARY_BOOT= bootxx
SECONDARY_BOOT= ufsboot
SECONDARY_BOOT_ARG= /${SECONDARY_BOOT}

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.2 2012/08/17 16:56:36 riz Exp $
# $NetBSD: Makefile,v 1.3 2012/11/03 14:25:33 tsutsui Exp $
LIVEIMGBASE= NetBSD-${DISTRIBVER}-sun3-live-sd0root # gives ${IMGBASE}.img
@ -6,6 +6,9 @@ LIVEIMGBASE= NetBSD-${DISTRIBVER}-sun3-live-sd0root # gives ${IMGBASE}.img
KERN_SET= kern-GENERIC
BOOTDISK= sd0
.if defined(EMUIMAGEMB)
LIVEIMAGEMB= ${EMUIMAGEMB}
.endif
PRIMARY_BOOT= bootxx
SECONDARY_BOOT= ufsboot
SECONDARY_BOOT_ARG= /${SECONDARY_BOOT}

View File

@ -1,12 +1,14 @@
# $NetBSD: Makefile,v 1.2 2012/08/17 16:56:36 riz Exp $
# $NetBSD: Makefile,v 1.3 2012/11/03 14:25:33 tsutsui Exp $
LIVEIMGBASE= NetBSD-${DISTRIBVER}-vax-live-ra0root # gives ${IMGBASE}.img
.include <bsd.own.mk>
EMUIMAGEMB?= 1024 # ra0 can't handle 2GB image
KERN_SET= kern-GENERIC
BOOTDISK= ra0
IMAGEMB= 1024 # ra0 can't handle 2GB image
LIVEIMAGEMB= ${EMUIMAGEMB}
PRIMARY_BOOT= xxboot
#SECONDARY_BOOT= # boot is extracted from base.tgz
SECONDARY_BOOT_ARG= # nothing