Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: IMAGEMB settings
I wrote:
> > If not, allow the builder to pass [through ENV] a value suitable.
>
> I'll add option variables like INSTALLIMGMB/USBIMGMB/EMUIMGMB etc.
The attached patch allows overriding image sizes by
INSTIMAGEMB (for install-images), USBIMAGEMB (for x86 sd0root liveimages),
and EMUIMAGEMB (for other liveimages) envs.
Index: distrib/amd64/installimage/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/amd64/installimage/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- distrib/amd64/installimage/Makefile 17 Aug 2012 16:56:34 -0000 1.2
+++ distrib/amd64/installimage/Makefile 2 Nov 2012 19:06:55 -0000
@@ -5,7 +5,7 @@
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
Index: distrib/amd64/liveimage/emuimage/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/amd64/liveimage/emuimage/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- distrib/amd64/liveimage/emuimage/Makefile 17 Aug 2012 16:56:35 -0000
1.2
+++ distrib/amd64/liveimage/emuimage/Makefile 2 Nov 2012 19:06:55 -0000
@@ -3,5 +3,8 @@
LIVEIMGBASE= NetBSD-${DISTRIBVER}-amd64-live-wd0root # gives ${IMGBASE}.img
BOOTDISK= wd0 # for QEMU etc.
+.if defined(EMUIMAGEMB)
+LIVEIMAGEMB= ${EMUIMAGEMB}
+.endif
.include "${.CURDIR}/../Makefile.liveimage"
Index: distrib/amd64/liveimage/usbimage/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/amd64/liveimage/usbimage/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- distrib/amd64/liveimage/usbimage/Makefile 17 Aug 2012 16:56:35 -0000
1.2
+++ distrib/amd64/liveimage/usbimage/Makefile 2 Nov 2012 19:06:55 -0000
@@ -2,8 +2,10 @@
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"
Index: distrib/common/bootimage/Makefile.installimage
===================================================================
RCS file: /cvsroot/src/distrib/common/bootimage/Makefile.installimage,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile.installimage
--- distrib/common/bootimage/Makefile.installimage 22 Apr 2012 07:23:42
-0000 1.3
+++ distrib/common/bootimage/Makefile.installimage 2 Nov 2012 19:06:55
-0000
@@ -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
Index: distrib/common/bootimage/Makefile.liveimage
===================================================================
RCS file: /cvsroot/src/distrib/common/bootimage/Makefile.liveimage,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile.liveimage
--- distrib/common/bootimage/Makefile.liveimage 22 Jan 2012 16:50:00 -0000
1.2
+++ distrib/common/bootimage/Makefile.liveimage 2 Nov 2012 19:06:55 -0000
@@ -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"
Index: distrib/i386/installimage/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/i386/installimage/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- distrib/i386/installimage/Makefile 17 Aug 2012 16:56:35 -0000 1.2
+++ distrib/i386/installimage/Makefile 2 Nov 2012 19:06:56 -0000
@@ -5,7 +5,7 @@
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
Index: distrib/i386/liveimage/emuimage/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/i386/liveimage/emuimage/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- distrib/i386/liveimage/emuimage/Makefile 17 Aug 2012 16:56:35 -0000
1.2
+++ distrib/i386/liveimage/emuimage/Makefile 2 Nov 2012 19:06:56 -0000
@@ -3,5 +3,8 @@
LIVEIMGBASE= NetBSD-${DISTRIBVER}-i386-live-wd0root # gives ${IMGBASE}.img
BOOTDISK= wd0 # for QEMU etc.
+.if defined(EMUIMAGEMB)
+LIVEIMAGEMB= ${EMUIMAGEMB}
+.endif
.include "${.CURDIR}/../Makefile.liveimage"
Index: distrib/i386/liveimage/usbimage/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/i386/liveimage/usbimage/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- distrib/i386/liveimage/usbimage/Makefile 17 Aug 2012 16:56:35 -0000
1.2
+++ distrib/i386/liveimage/usbimage/Makefile 2 Nov 2012 19:06:56 -0000
@@ -2,8 +2,10 @@
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"
Index: distrib/pmax/liveimage/emuimage/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/pmax/liveimage/emuimage/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- distrib/pmax/liveimage/emuimage/Makefile 17 Aug 2012 16:56:35 -0000
1.2
+++ distrib/pmax/liveimage/emuimage/Makefile 2 Nov 2012 19:06:57 -0000
@@ -6,6 +6,9 @@ LIVEIMGBASE= NetBSD-${DISTRIBVER}-pmax-l
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
Index: distrib/sparc/liveimage/emuimage/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/sparc/liveimage/emuimage/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- distrib/sparc/liveimage/emuimage/Makefile 17 Aug 2012 16:56:35 -0000
1.2
+++ distrib/sparc/liveimage/emuimage/Makefile 2 Nov 2012 19:06:57 -0000
@@ -6,6 +6,9 @@ LIVEIMGBASE= NetBSD-${DISTRIBVER}-sparc-
KERN_SET= kern-GENERIC
BOOTDISK= sd0
+.if defined(EMUIMAGEMB)
+LIVEIMAGEMB= ${EMUIMAGEMB}
+.endif
PRIMARY_BOOT= bootxx
SECONDARY_BOOT= boot
SECONDARY_BOOT_ARG= /${SECONDARY_BOOT}
Index: distrib/sparc64/liveimage/emuimage/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/sparc64/liveimage/emuimage/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- distrib/sparc64/liveimage/emuimage/Makefile 17 Aug 2012 16:56:36 -0000
1.2
+++ distrib/sparc64/liveimage/emuimage/Makefile 2 Nov 2012 19:06:58 -0000
@@ -7,6 +7,9 @@ LIVEIMGBASE= NetBSD-${DISTRIBVER}-sparc6
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
Index: distrib/sun2/liveimage/emuimage/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/sun2/liveimage/emuimage/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- distrib/sun2/liveimage/emuimage/Makefile 17 Aug 2012 16:56:36 -0000
1.2
+++ distrib/sun2/liveimage/emuimage/Makefile 2 Nov 2012 19:06:58 -0000
@@ -6,6 +6,9 @@ LIVEIMGBASE= NetBSD-${DISTRIBVER}-sun2-l
KERN_SET= kern-GENERIC
BOOTDISK= sd0
+.if defined(EMUIMAGEMB)
+LIVEIMAGEMB= ${EMUIMAGEMB}
+.endif
PRIMARY_BOOT= bootxx
SECONDARY_BOOT= ufsboot
SECONDARY_BOOT_ARG= /${SECONDARY_BOOT}
Index: distrib/sun3/liveimage/emuimage/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/sun3/liveimage/emuimage/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- distrib/sun3/liveimage/emuimage/Makefile 17 Aug 2012 16:56:36 -0000
1.2
+++ distrib/sun3/liveimage/emuimage/Makefile 2 Nov 2012 19:06:58 -0000
@@ -6,6 +6,9 @@ LIVEIMGBASE= NetBSD-${DISTRIBVER}-sun3-l
KERN_SET= kern-GENERIC
BOOTDISK= sd0
+.if defined(EMUIMAGEMB)
+LIVEIMAGEMB= ${EMUIMAGEMB}
+.endif
PRIMARY_BOOT= bootxx
SECONDARY_BOOT= ufsboot
SECONDARY_BOOT_ARG= /${SECONDARY_BOOT}
Index: distrib/vax/liveimage/emuimage/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/vax/liveimage/emuimage/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- distrib/vax/liveimage/emuimage/Makefile 17 Aug 2012 16:56:36 -0000
1.2
+++ distrib/vax/liveimage/emuimage/Makefile 2 Nov 2012 19:06:59 -0000
@@ -4,9 +4,11 @@ LIVEIMGBASE= NetBSD-${DISTRIBVER}-vax-li
.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
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index