CVS commit: src/distrib/common

2024-04-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 16 23:40:36 UTC 2024

Modified Files:
src/distrib/common: parselist.awk

Log Message:
Set LC_ALL=C before calling sort so that it works consistently. Unfortunately
ENVIRON["LC_ALL"] = "C"; does not work like in gawk (Jan-Benedict Glaw)


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/distrib/common/parselist.awk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/common

2024-04-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 16 23:40:36 UTC 2024

Modified Files:
src/distrib/common: parselist.awk

Log Message:
Set LC_ALL=C before calling sort so that it works consistently. Unfortunately
ENVIRON["LC_ALL"] = "C"; does not work like in gawk (Jan-Benedict Glaw)


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/distrib/common/parselist.awk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/common/parselist.awk
diff -u src/distrib/common/parselist.awk:1.16 src/distrib/common/parselist.awk:1.17
--- src/distrib/common/parselist.awk:1.16	Fri Apr 10 12:16:12 2009
+++ src/distrib/common/parselist.awk	Tue Apr 16 19:40:36 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: parselist.awk,v 1.16 2009/04/10 16:16:12 apb Exp $
+#	$NetBSD: parselist.awk,v 1.17 2024/04/16 23:40:36 christos Exp $
 #
 # Copyright (c) 2002 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -177,7 +177,7 @@ $1 == "COPYDIR" \
 	destdir=$3;
 	if (mode == "mtree") {
 		printf("./%s type=dir mode=755\n", destdir);
-		command="cd " srcdir " && find . -type d -print"
+		command="cd " srcdir " && find . -type d -print | LC_ALL=C sort"
 		while (command | getline dir) {
 			gsub(/^\.\//, "", dir);
 			if (dir == ".")
@@ -187,7 +187,7 @@ $1 == "COPYDIR" \
 		close(command);
 	}
 	if (mode == "install" || mode == "mtree" || mode == "populate") {
-		command="cd " srcdir " && find . -type f -print"
+		command="cd " srcdir " && find . -type f -print | LC_ALL=C sort"
 		while (command | getline srcfile) {
 			gsub(/^\.\//, "", srcfile);
 			copy(srcdir "/" srcfile, destdir "/" srcfile, "");



CVS commit: src/distrib/common

2024-03-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 20 00:31:54 UTC 2024

Modified Files:
src/distrib/common: Makefile.image

Log Message:
Fix reproducible builds (Jan-Benedict Glaw)


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/distrib/common/Makefile.image

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/common

2024-03-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 20 00:31:54 UTC 2024

Modified Files:
src/distrib/common: Makefile.image

Log Message:
Fix reproducible builds (Jan-Benedict Glaw)


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/distrib/common/Makefile.image

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/common/Makefile.image
diff -u src/distrib/common/Makefile.image:1.40 src/distrib/common/Makefile.image:1.41
--- src/distrib/common/Makefile.image:1.40	Fri Feb 10 22:07:06 2017
+++ src/distrib/common/Makefile.image	Tue Mar 19 20:31:54 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.image,v 1.40 2017/02/11 03:07:06 christos Exp $
+#	$NetBSD: Makefile.image,v 1.41 2024/03/20 00:31:54 christos Exp $
 #
 # Makefile snippet to build a tree from the provided lists,
 # and make an ffs file system image from that tree
@@ -39,13 +39,14 @@ WORKBUILT?=	work.built
 
 PARSELISTENV+=	TARGETDIR=${.OBJDIR}/${WORKDIR:Q}
 
-GZIP_FLAGS= -9 ${GZIP_N_FLAG}
-
 .if ${MKREPRO_TIMESTAMP:Uno} != "no"
 MAKEFS_TIMESTAMP=-T "${MKREPRO_TIMESTAMP}"
 PAX_TIMESTAMP=--timestamp "${MKREPRO_TIMESTAMP}"
+GZIP_N_FLAG=-n
 .endif
 
+GZIP_FLAGS= -9 ${GZIP_N_FLAG}
+
 .if !target(${WORKBUILT})	# {
 ${WORKBUILT}: ${IMAGEDEPENDS} ${WORKSPEC} ${PARSELISTDEP} ${LISTS}
 #	There is a .PHONY ${CRUNCHBIN}, so check if out of date by hand



CVS commit: src/distrib/common/bootimage

2024-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb  8 18:14:02 UTC 2024

Modified Files:
src/distrib/common/bootimage: Makefile.bootimage

Log Message:
PR/57910: Jan-Benedict Glaw: Fix typo preventing reproducible builds


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/distrib/common/bootimage/Makefile.bootimage

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/common/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.32 src/distrib/common/bootimage/Makefile.bootimage:1.33
--- src/distrib/common/bootimage/Makefile.bootimage:1.32	Sun Dec  3 02:20:23 2023
+++ src/distrib/common/bootimage/Makefile.bootimage	Thu Feb  8 13:14:02 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.32 2023/12/03 07:20:23 tsutsui Exp $
+#	$NetBSD: Makefile.bootimage,v 1.33 2024/02/08 18:14:02 christos Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -235,8 +235,8 @@ FSCYLINDERS!=	expr ${FSSECTORS} / \( ${H
 SWAPCYLINDERS!=	expr ${SWAPSECTORS} / \( ${HEADS} \* ${SECTORS} \) || true
 
 .if ${USE_GPT} != "no"
-BOOTDISK_UUID=`${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKMBR} show -i 2 | ${TOOL_AWK} '/^GUID/ {print $$2}'`
-SWAPDISK_UUID=`${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKMBR} show -i 3 | ${TOOL_AWK} '/^GUID/ {print $$2}'`
+BOOTDISK_UUID=`${TOOL_GPT} ${GPT_TIMESTAMP} ${WORKMBR} show -i 2 | ${TOOL_AWK} '/^GUID/ {print $$2}'`
+SWAPDISK_UUID=`${TOOL_GPT} ${GPT_TIMESTAMP} ${WORKMBR} show -i 3 | ${TOOL_AWK} '/^GUID/ {print $$2}'`
 .endif
 
 #
@@ -525,11 +525,11 @@ ${WORKMBR}:
 	@echo creating GPT header and partition entries...
 	${RM} -f ${WORKMBR}
 	${DD} if=/dev/zero of=${WORKMBR} seek=$$((${IMAGESECTORS} - 1)) count=1
-	${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKMBR} create
-	${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKMBR} add -a 1m -s ${EFISECTORS} -t efi -l "EFI system"
-	${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKMBR} add -a 1m -s ${FSSECTORS} -t ffs
+	${TOOL_GPT} ${GPT_TIMESTAMP} ${WORKMBR} create
+	${TOOL_GPT} ${GPT_TIMESTAMP} ${WORKMBR} add -a 1m -s ${EFISECTORS} -t efi -l "EFI system"
+	${TOOL_GPT} ${GPT_TIMESTAMP} ${WORKMBR} add -a 1m -s ${FSSECTORS} -t ffs
 .  if ${SWAPSECTORS} != 0
-	${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKMBR} add -a 1m -s ${SWAPSECTORS} -t swap
+	${TOOL_GPT} ${GPT_TIMESTAMP} ${WORKMBR} add -a 1m -s ${SWAPSECTORS} -t swap
 .  endif
 .elif ${USE_MBR} != "no"
 	@echo creating MBR labels...
@@ -584,10 +584,10 @@ ${IMGBASE}.img:	${TARGET_BLOCKS}
 	${CAT} ${TARGET_BLOCKS} > ${WORKIMG}
 .if ${USE_GPT} != "no"
 .if ${USE_GPTMBR} != "no"
-	${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKIMG} biosboot -i 2		\
+	${TOOL_GPT} ${GPT_TIMESTAMP} ${WORKIMG} biosboot -i 2		\
 	-c ${.OBJDIR}/${WORKDIR}/usr/mdec/gptmbr.bin
 .endif
-	${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKIMG} set -a bootme -i 2
+	${TOOL_GPT} ${GPT_TIMESTAMP} ${WORKIMG} set -a bootme -i 2
 .endif	# USE_GPT != "no"
 .if ${USE_SUNLABEL} != "no"
 	@echo Creating sun disklabel...



CVS commit: src/distrib/common/bootimage

2024-02-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb  8 18:14:02 UTC 2024

Modified Files:
src/distrib/common/bootimage: Makefile.bootimage

Log Message:
PR/57910: Jan-Benedict Glaw: Fix typo preventing reproducible builds


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/distrib/common/bootimage/Makefile.bootimage

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/common/bootimage

2023-12-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Dec  3 07:20:23 UTC 2023

Modified Files:
src/distrib/common/bootimage: Makefile.bootimage

Log Message:
Use defined ${GPTSECTORS} rather than hardcoded 2048.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/distrib/common/bootimage/Makefile.bootimage

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/common/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.31 src/distrib/common/bootimage/Makefile.bootimage:1.32
--- src/distrib/common/bootimage/Makefile.bootimage:1.31	Sun Dec  3 07:17:11 2023
+++ src/distrib/common/bootimage/Makefile.bootimage	Sun Dec  3 07:20:23 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.31 2023/12/03 07:17:11 tsutsui Exp $
+#	$NetBSD: Makefile.bootimage,v 1.32 2023/12/03 07:20:23 tsutsui Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -573,8 +573,8 @@ ${WORKMBR}:
 
 ${WORKGPT}: ${WORKMBR}
 	@echo create GPT image...
-	${DD} if=${WORKMBR} of=${WORKGPT} skip=$$((${IMAGESECTORS} - 2048)) \
-	count=2048
+	${DD} if=${WORKMBR} of=${WORKGPT} \
+	skip=$$((${IMAGESECTORS} - ${GPTSECTORS})) count=${GPTSECTORS}
 
 .if ${USE_GPT} == "no"
 ${IMGBASE}.img:	${WORKLABEL}



CVS commit: src/distrib/common/bootimage

2023-12-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Dec  3 07:20:23 UTC 2023

Modified Files:
src/distrib/common/bootimage: Makefile.bootimage

Log Message:
Use defined ${GPTSECTORS} rather than hardcoded 2048.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/distrib/common/bootimage/Makefile.bootimage

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/common/bootimage

2023-12-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Dec  3 07:17:11 UTC 2023

Modified Files:
src/distrib/common/bootimage: Makefile.bootimage

Log Message:
Document USE_GPTMBR and GPTSECTORS.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/distrib/common/bootimage/Makefile.bootimage

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/common/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.30 src/distrib/common/bootimage/Makefile.bootimage:1.31
--- src/distrib/common/bootimage/Makefile.bootimage:1.30	Sun May 15 00:05:24 2022
+++ src/distrib/common/bootimage/Makefile.bootimage	Sun Dec  3 07:17:11 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.30 2022/05/15 00:05:24 mrg Exp $
+#	$NetBSD: Makefile.bootimage,v 1.31 2023/12/03 07:17:11 tsutsui Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -40,6 +40,10 @@
 #	USE_GPT
 #		set yes if target disk image requires GPT partition
 #		(default: no)
+#	USE_GPTMBR
+#		set yes if target disk image requires GPT partition
+#		with hybrid MBR boot code
+#		(default: no; valid only if USE_GPT=yes)
 #	MBR_BOOTCODE
 #		optional MBR bootcode which should be installed by fdisk(8)
 #		(default: empty)
@@ -66,6 +70,10 @@
 #	FATMB
 #		FAT partition size in target image in MB
 #		(default: 0)
+#	GPTSECTORS
+#		Size of a region reserved for the secondary GPT table/entry
+#		at the end of the target image in sectors
+#		(default: 2048 if USE_GPT=yes, otherwise 0)
 #	KERN_SET
 #		kernel set name which should be extracted into image
 #		(default: kern-GENERIC)



CVS commit: src/distrib/common/bootimage

2023-12-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Dec  3 07:17:11 UTC 2023

Modified Files:
src/distrib/common/bootimage: Makefile.bootimage

Log Message:
Document USE_GPTMBR and GPTSECTORS.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/distrib/common/bootimage/Makefile.bootimage

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/common/bootimage

2023-01-29 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sun Jan 29 22:12:25 UTC 2023

Modified Files:
src/distrib/common/bootimage: fstab.in

Log Message:
Make sure to mount /var/shm

Programs such as firefox seem to require it,
and this file is used by the live image as well.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/common/bootimage/fstab.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/common/bootimage/fstab.in
diff -u src/distrib/common/bootimage/fstab.in:1.3 src/distrib/common/bootimage/fstab.in:1.4
--- src/distrib/common/bootimage/fstab.in:1.3	Sat Dec 15 18:03:17 2018
+++ src/distrib/common/bootimage/fstab.in	Sun Jan 29 22:12:25 2023
@@ -1,5 +1,6 @@
-ROOT.a		/		ffs	rw		1 1
-ROOT.b		none		none	sw		0 0
-ptyfs		/dev/pts	ptyfs	rw		0 0
-kernfs		/kern		kernfs	rw,noauto	0 0
-procfs		/proc		procfs	rw,noauto	0 0
+ROOT.a		/		ffs	rw			1 1
+ROOT.b		none		none	sw			0 0
+ptyfs		/dev/pts	ptyfs	rw			0 0
+kernfs		/kern		kernfs	rw,noauto		0 0
+procfs		/proc		procfs	rw,noauto		0 0
+tmpfs		/var/shm	tmpfs	rw,-m1777,-sram%25	0 0



CVS commit: src/distrib/common/bootimage

2023-01-29 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sun Jan 29 22:12:25 UTC 2023

Modified Files:
src/distrib/common/bootimage: fstab.in

Log Message:
Make sure to mount /var/shm

Programs such as firefox seem to require it,
and this file is used by the live image as well.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/common/bootimage/fstab.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



re: CVS commit: src/distrib/common/bootimage

2022-05-15 Thread matthew green
> > Module Name:src
> > Committed By:   mrg
> > Date:   Sun May 15 00:05:24 UTC 2022
> > 
> > Modified Files:
> > src/distrib/common/bootimage: Makefile.bootimage
> > 
> > Log Message:
> > allow some invocations of expr(1) to "fail" - expr(1) returns "1" is
> > the expression expands to "0" or empty, and sometimes these values end
> > up correctly being 0.
>
> Several values (SWAPSECTORS, EFISECTORS, FATSECTORS, and SWAPCYLINDERS)
> that couldbe zero already have '|| true'.  Should they be consistent?
> (I'm not sure if all should use strict '|| test $$? -eq 1 || exit 1')

i use the test -eq 1 method to only match the case expr(1)
exists due to "0" or "".  manual says:

The expr utility exits with one of the following values:
0   the expression is neither an empty string nor 0.
1   the expression is an empty string or 0.
2   the expression is invalid.
>2  an error occurred (such as memory allocation failure).

i kind of meant to fix the other uses too, thanks for
reminding me i wasn't done here :)


.mrg.


Re: CVS commit: src/distrib/common/bootimage

2022-05-15 Thread Izumi Tsutsui
mrg@ wrote:

> Module Name:  src
> Committed By: mrg
> Date: Sun May 15 00:05:24 UTC 2022
> 
> Modified Files:
>   src/distrib/common/bootimage: Makefile.bootimage
> 
> Log Message:
> allow some invocations of expr(1) to "fail" - expr(1) returns "1" is
> the expression expands to "0" or empty, and sometimes these values end
> up correctly being 0.

Several values (SWAPSECTORS, EFISECTORS, FATSECTORS, and SWAPCYLINDERS)
that couldbe zero already have '|| true'.  Should they be consistent?
(I'm not sure if all should use strict '|| test $$? -eq 1 || exit 1')

---
Izumi Tsutsui


CVS commit: src/distrib/common/bootimage

2022-05-14 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun May 15 00:05:24 UTC 2022

Modified Files:
src/distrib/common/bootimage: Makefile.bootimage

Log Message:
allow some invocations of expr(1) to "fail" - expr(1) returns "1" is
the expression expands to "0" or empty, and sometimes these values end
up correctly being 0.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/distrib/common/bootimage/Makefile.bootimage

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/common/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.29 src/distrib/common/bootimage/Makefile.bootimage:1.30
--- src/distrib/common/bootimage/Makefile.bootimage:1.29	Sat Sep 25 08:54:29 2021
+++ src/distrib/common/bootimage/Makefile.bootimage	Sun May 15 00:05:24 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.29 2021/09/25 08:54:29 maya Exp $
+#	$NetBSD: Makefile.bootimage,v 1.30 2022/05/15 00:05:24 mrg Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -201,8 +201,8 @@ LABELSECTORS?=	2048	# 1MB aligned for mo
 .endif
 
 FSSECTORS!=	expr ${IMAGESECTORS} - ${SWAPSECTORS} - ${LABELSECTORS} \
-		- ${EFISECTORS} - ${GPTSECTORS} - ${FATSECTORS}
-FSSIZE!=	expr ${FSSECTORS} \* 512
+		- ${EFISECTORS} - ${GPTSECTORS} - ${FATSECTORS} || test $$? -eq 1 || exit 1
+FSSIZE!=	expr ${FSSECTORS} \* 512 || test $$? -eq 1 || exit 1
 
 # parameters for disklabel and MBR
 HEADS=		64
@@ -217,9 +217,9 @@ MBRFAT?=	6	# 16-bit FAT, more than 32M
 
 BSDPARTSECTORS!= expr ${IMAGESECTORS} - ${LABELSECTORS} \
 		- ${EFISECTORS} - ${GPTSECTORS} - ${FATSECTORS}
-FSOFFSET!=	expr ${LABELSECTORS} + ${EFISECTORS} + ${FATSECTORS}
+FSOFFSET!=	expr ${LABELSECTORS} + ${EFISECTORS} + ${FATSECTORS} || test $$? -eq 1 || exit 1
 SWAPOFFSET!=	expr ${LABELSECTORS} + ${FSSECTORS} \
-		+ ${EFISECTORS} + ${FATSECTORS}
+		+ ${EFISECTORS} + ${FATSECTORS} || test $$? -eq 1 || exit 1
 FATOFFSET=	${LABELSECTORS}
 
 # parameters for sunlabel



CVS commit: src/distrib/common/bootimage

2022-05-14 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun May 15 00:05:24 UTC 2022

Modified Files:
src/distrib/common/bootimage: Makefile.bootimage

Log Message:
allow some invocations of expr(1) to "fail" - expr(1) returns "1" is
the expression expands to "0" or empty, and sometimes these values end
up correctly being 0.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/distrib/common/bootimage/Makefile.bootimage

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/distrib/common/bootimage

2020-05-29 Thread Izumi Tsutsui
> Makefile.installimage refers to it before including Makefile.bootimage and 
> this test was causing make to throw an error:
> 
>
> https://nxr.netbsd.org/xref/src/distrib/common/bootimage/Makefile.installimage#41
> 
> All other users (i386, amd64) of Makefile.installimage explicitly set 
> USE_MBR=yes. That's why it wasn't an issue before now.

Ah, I see.  Sorry for a stupid question.

---
Izumi Tsutsui


Re: CVS commit: src/distrib/common/bootimage

2020-05-29 Thread Jared McNeill

On Fri, 29 May 2020, Izumi Tsutsui wrote:


src/distrib/common/bootimage/Makefile.bootimage (included from
Makefile.installimage) already has "USE_MBR?= no" line.


Makefile.installimage refers to it before including Makefile.bootimage and 
this test was causing make to throw an error:


  
https://nxr.netbsd.org/xref/src/distrib/common/bootimage/Makefile.installimage#41

All other users (i386, amd64) of Makefile.installimage explicitly set 
USE_MBR=yes. That's why it wasn't an issue before now.


Cheers,
Jared


Re: CVS commit: src/distrib/common/bootimage

2020-05-28 Thread Izumi Tsutsui
> Modified Files:
>   src/distrib/common/bootimage: Makefile.installimage
> 
> Log Message:
> Default USE_MBR to no

Is this necessary?

src/distrib/common/bootimage/Makefile.bootimage (included from
Makefile.installimage) already has "USE_MBR?= no" line.

---
Izumi Tsutsui


CVS commit: src/distrib/common

2019-11-21 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Fri Nov 22 00:27:30 UTC 2019

Modified Files:
src/distrib/common: cgdroot.rc

Log Message:
If gpt label "cgd.conf" contains a valid /etc/cgd file system,
try mounting gpt label "cgdroot" as a root filesystem first and
only mount /dev/cgd0a if that gpt label doesn't exist or fails
to mount.

XXX pullup to 8 and 9.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/common/cgdroot.rc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/common/cgdroot.rc
diff -u src/distrib/common/cgdroot.rc:1.4 src/distrib/common/cgdroot.rc:1.5
--- src/distrib/common/cgdroot.rc:1.4	Sat Dec 29 13:09:35 2018
+++ src/distrib/common/cgdroot.rc	Fri Nov 22 00:27:30 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: cgdroot.rc,v 1.4 2018/12/29 13:09:35 alnsn Exp $
+#	$NetBSD: cgdroot.rc,v 1.5 2019/11/22 00:27:30 alnsn Exp $
 #
 # Copyright (c) 2013 Pierre Pronchery 
 # All rights reserved.
@@ -36,17 +36,20 @@ export EDITOR
 
 umask 022
 
-mounted=
+# Mount /etc/cgd.
+etc_cgd_mount=
 for dev in NAME=cgd.conf /dev/wd0a /dev/ld0a ; do
 	if mount -o ro $dev /etc/cgd 2>/dev/null ; then
-		mounted=$dev
+		etc_cgd_mount=$dev
 		break
 	fi
 done
-if [ -z "$mounted" ]; then
+if [ -z "${etc_cgd_mount}" ]; then
 	echo "Could not mount the boot partition" 1>&2
 	exit 2
 fi
+
+# Configure cgd device(s).
 /sbin/wsconsctl -d -w splash.enable=0 > /dev/null 2>&1
 cgdconfig -C
 if [ $? -ne 0 ]; then
@@ -54,13 +57,32 @@ if [ $? -ne 0 ]; then
 	umount /etc/cgd
 	exit 2
 fi
-mount -o ro /dev/cgd0a /altroot
-if [ $? -ne 0 ]; then
+
+# Select candidates for a root mount.
+root_mounts=
+if [ -z "${etc_cgd_mount##NAME=*}" ]; then
+	root_mounts="NAME=cgdroot /dev/cgd0a"
+else
+	root_mounts=/dev/cgd0a
+fi
+
+# Mount the root filesystem.
+mounted=
+for dev in ${root_mounts} ; do
+	if mount -o ro $dev /altroot 2>/dev/null ; then
+		mounted=$dev
+		break
+	fi
+done
+
+if [ -z "$mounted" ]; then
 	echo "Could not mount the root partition" 1>&2
 	cgdconfig -U
 	umount /etc/cgd
 	exit 2
 fi
+
+# Boot into /altroot.
 umount /etc/cgd
 /sbin/wsconsctl -d -w splash.enable=1 > /dev/null 2>&1
 sysctl -w init.root=/altroot



CVS commit: src/distrib/common

2019-11-21 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Fri Nov 22 00:27:30 UTC 2019

Modified Files:
src/distrib/common: cgdroot.rc

Log Message:
If gpt label "cgd.conf" contains a valid /etc/cgd file system,
try mounting gpt label "cgdroot" as a root filesystem first and
only mount /dev/cgd0a if that gpt label doesn't exist or fails
to mount.

XXX pullup to 8 and 9.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/common/cgdroot.rc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/common

2019-08-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 11 17:50:26 UTC 2019

Modified Files:
src/distrib/common: Makefile.mdset

Log Message:
Back out previous, it causes build fallout like:
release ===> etc/dreamcast/cdroms/installcd
shle--netbsdelf-install: .WAIT: stat: No such file or directory


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/distrib/common/Makefile.mdset

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/common

2019-08-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 11 17:50:26 UTC 2019

Modified Files:
src/distrib/common: Makefile.mdset

Log Message:
Back out previous, it causes build fallout like:
release ===> etc/dreamcast/cdroms/installcd
shle--netbsdelf-install: .WAIT: stat: No such file or directory


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/distrib/common/Makefile.mdset

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/common/Makefile.mdset
diff -u src/distrib/common/Makefile.mdset:1.44 src/distrib/common/Makefile.mdset:1.45
--- src/distrib/common/Makefile.mdset:1.44	Sun Aug 11 13:55:18 2019
+++ src/distrib/common/Makefile.mdset	Sun Aug 11 17:50:26 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.mdset,v 1.44 2019/08/11 13:55:18 martin Exp $
+#	$NetBSD: Makefile.mdset,v 1.45 2019/08/11 17:50:26 martin Exp $
 #
 # Makefile snippet to ${TOOL_MDSETIMAGE} file system images into kernels
 #
@@ -103,9 +103,9 @@ ${_KERNEL.${_K}.${_F}}.${_S}: ${_KERNEL.
 .endif
 
 .if defined(MDSET_NOGZIP.${_FILENAME}) || defined(MDSET_NOGZIP)
-KERNELS+=	${_KERNEL.${_K}.${_F}}.${_S} .WAIT
+KERNELS+=	${_KERNEL.${_K}.${_F}}.${_S}
 .else			# {
-KERNELS+=	${_KERNEL.${_K}.${_F}}.${_S}.gz .WAIT
+KERNELS+=	${_KERNEL.${_K}.${_F}}.${_S}.gz
 
 ${_KERNEL.${_K}.${_F}}.${_S}.gz: ${_KERNEL.${_K}.${_F}}.${_S}
 	${_MKTARGET_CREATE}



CVS commit: src/distrib/common

2019-08-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 11 13:55:18 UTC 2019

Modified Files:
src/distrib/common: Makefile.mdset

Log Message:
Various suffixes for the same kernel image may depend on each
other, so .WAIT after creating one before moving on to the next.
Case at hand: evbarm/installation/instkernel:
netbsd-RPI_INSTALL.bin needs to be complete before netbsd-RPI_INSTALL.img
can be created.
Better solutions welcome...


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/distrib/common/Makefile.mdset

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/common

2019-08-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 11 13:55:18 UTC 2019

Modified Files:
src/distrib/common: Makefile.mdset

Log Message:
Various suffixes for the same kernel image may depend on each
other, so .WAIT after creating one before moving on to the next.
Case at hand: evbarm/installation/instkernel:
netbsd-RPI_INSTALL.bin needs to be complete before netbsd-RPI_INSTALL.img
can be created.
Better solutions welcome...


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/distrib/common/Makefile.mdset

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/common/Makefile.mdset
diff -u src/distrib/common/Makefile.mdset:1.43 src/distrib/common/Makefile.mdset:1.44
--- src/distrib/common/Makefile.mdset:1.43	Wed Feb  6 07:33:08 2019
+++ src/distrib/common/Makefile.mdset	Sun Aug 11 13:55:18 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.mdset,v 1.43 2019/02/06 07:33:08 mrg Exp $
+#	$NetBSD: Makefile.mdset,v 1.44 2019/08/11 13:55:18 martin Exp $
 #
 # Makefile snippet to ${TOOL_MDSETIMAGE} file system images into kernels
 #
@@ -103,9 +103,9 @@ ${_KERNEL.${_K}.${_F}}.${_S}: ${_KERNEL.
 .endif
 
 .if defined(MDSET_NOGZIP.${_FILENAME}) || defined(MDSET_NOGZIP)
-KERNELS+=	${_KERNEL.${_K}.${_F}}.${_S}
+KERNELS+=	${_KERNEL.${_K}.${_F}}.${_S} .WAIT
 .else			# {
-KERNELS+=	${_KERNEL.${_K}.${_F}}.${_S}.gz
+KERNELS+=	${_KERNEL.${_K}.${_F}}.${_S}.gz .WAIT
 
 ${_KERNEL.${_K}.${_F}}.${_S}.gz: ${_KERNEL.${_K}.${_F}}.${_S}
 	${_MKTARGET_CREATE}



Re: CVS commit: src/distrib/common

2019-01-02 Thread maya
On Wed, Jan 02, 2019 at 09:08:50PM +, Alexander Nasonov wrote:
> m...@netbsd.org wrote:
> > On Wed, Jan 02, 2019 at 08:42:33PM +, Alexander Nasonov wrote:
> > > https://wiki.netbsd.org/projects/project/transparent-cgd/
> > > 
> > > This page describes limitations of cgdroot.kmod.
> > > 
> > > In my opinion, aes-xts should be added to efi bootloader and paramsfile
> > > should be merged into boot.cfg.
> > 
> > If you aren't doing this, it's a *really* good beginner project.
> > Perhaps adjust the wiki page to be less exploratory and more with do
> > X,Y,Z and add it to the GSoC-able list?
> 
> Adding a cgd layer on top of ffs code in libsa isn't straightforward
> but it should be doable. It's also not clear to me how to pass a
> raw encryption key from the bootloader to the kernel but I'm not very
> familiar with that code. Overall it would be a good GCoC project.


We are passing things around with BI_ADD in the bootloader, and
lookup_btinfo in the kernel.


Re: CVS commit: src/distrib/common

2019-01-02 Thread Alexander Nasonov
m...@netbsd.org wrote:
> On Wed, Jan 02, 2019 at 08:42:33PM +, Alexander Nasonov wrote:
> > https://wiki.netbsd.org/projects/project/transparent-cgd/
> > 
> > This page describes limitations of cgdroot.kmod.
> > 
> > In my opinion, aes-xts should be added to efi bootloader and paramsfile
> > should be merged into boot.cfg.
> 
> If you aren't doing this, it's a *really* good beginner project.
> Perhaps adjust the wiki page to be less exploratory and more with do
> X,Y,Z and add it to the GSoC-able list?

Adding a cgd layer on top of ffs code in libsa isn't straightforward
but it should be doable. It's also not clear to me how to pass a
raw encryption key from the bootloader to the kernel but I'm not very
familiar with that code. Overall it would be a good GCoC project.

-- 
Alex


Re: CVS commit: src/distrib/common

2019-01-02 Thread maya
On Wed, Jan 02, 2019 at 08:42:33PM +, Alexander Nasonov wrote:
> Alexander Nasonov wrote:
> > m...@netbsd.org wrote:
> > > Why are we using a memory disk for full disk encryption? I am under the
> > > impression that it shouldn't be required.
> > 
> > We use a memory disk because cgdconfig functionality isn't available in
> > the bootloader.
> 
> https://wiki.netbsd.org/projects/project/transparent-cgd/
> 
> This page describes limitations of cgdroot.kmod.
> 
> In my opinion, aes-xts should be added to efi bootloader and paramsfile
> should be merged into boot.cfg.

If you aren't doing this, it's a *really* good beginner project.
Perhaps adjust the wiki page to be less exploratory and more with do
X,Y,Z and add it to the GSoC-able list?


Re: CVS commit: src/distrib/common

2019-01-02 Thread Alexander Nasonov
Alexander Nasonov wrote:
> m...@netbsd.org wrote:
> > Why are we using a memory disk for full disk encryption? I am under the
> > impression that it shouldn't be required.
> 
> We use a memory disk because cgdconfig functionality isn't available in
> the bootloader.

https://wiki.netbsd.org/projects/project/transparent-cgd/

This page describes limitations of cgdroot.kmod.

In my opinion, aes-xts should be added to efi bootloader and paramsfile
should be merged into boot.cfg.

-- 
Alex


Re: CVS commit: src/distrib/common

2018-12-29 Thread Alexander Nasonov
m...@netbsd.org wrote:
> Why are we using a memory disk for full disk encryption? I am under the
> impression that it shouldn't be required.

We use a memory disk because cgdconfig functionality isn't available in
the bootloader.

-- 
Alex


Re: CVS commit: src/distrib/common

2018-12-29 Thread maya
On Sat, Dec 29, 2018 at 11:28:38AM +, Alexander Nasonov wrote:
> Alexander Nasonov wrote:
> > Module Name:src
> > Committed By:   alnsn
> > Date:   Sat Dec 29 00:52:11 UTC 2018
> > 
> > Modified Files:
> > src/distrib/common: cgdroot.rc
> > 
> > Log Message:
> > Don't hardcode wd0a in cgdroot.kmod, try NAME=cgd.conf and ROOT.a.
> > 
> > +mounted=
> > +for dev in NAME=cgd.conf ROOT.a ; do
> > +   if mount -o ro $dev /etc/cgd 2>/dev/null ; then
> > +   mounted=$dev
> > +   fi
> > +done
> 
> I was a bit too fast to add the second probe. ROOT.a is always /dev/md0a
> when booted with 'load cgdroot.kmod'. I can't think of anything other
> than putting back /dev/wd0a and perhaps adding few more common disks
> like /dev/ld0a.
> 
> -- 
> Alex

Why are we using a memory disk for full disk encryption? I am under the
impression that it shouldn't be required.


Re: CVS commit: src/distrib/common

2018-12-29 Thread Alexander Nasonov
Alexander Nasonov wrote:
> Module Name:  src
> Committed By: alnsn
> Date: Sat Dec 29 00:52:11 UTC 2018
> 
> Modified Files:
>   src/distrib/common: cgdroot.rc
> 
> Log Message:
> Don't hardcode wd0a in cgdroot.kmod, try NAME=cgd.conf and ROOT.a.
> 
> +mounted=
> +for dev in NAME=cgd.conf ROOT.a ; do
> +   if mount -o ro $dev /etc/cgd 2>/dev/null ; then
> +   mounted=$dev
> +   fi
> +done

I was a bit too fast to add the second probe. ROOT.a is always /dev/md0a
when booted with 'load cgdroot.kmod'. I can't think of anything other
than putting back /dev/wd0a and perhaps adding few more common disks
like /dev/ld0a.

-- 
Alex


Re: CVS commit: src/distrib/common

2015-11-26 Thread Masao Uebayashi
With tarballs the latest timestamp of them, with source tree I don't know.
:)

I'm only pointing out an interesting, reasonable idea, not asking you to
implement it right now.

On Wednesday, 25 November 2015, Christos Zoulas  wrote:

> In article <
> cadbf7ee9mruyyct+97v1bjh_0nh9tqltr-rm5bprgl+knb2...@mail.gmail.com
> >,
> Masao Uebayashi  > wrote:
> >bapt@freebsd taught me that FreeBSD uses ((the newest timestamp in the
> >source files) + 1sec) in places where appropriate for reproducible
> >build.  It might have been about Ports, but idea is it.
>
> That's a nice way to do it. How do they compute that?
>
> christos
>
>


Re: CVS commit: src/distrib/common

2015-11-25 Thread Pierre Pronchery
On 11/25/15 08:54, Martin Husemann wrote:
> On Wed, Nov 25, 2015 at 01:30:37AM +, Christos Zoulas wrote:
>> In article 
>> ,
>> Masao Uebayashi   wrote:
>>> bapt@freebsd taught me that FreeBSD uses ((the newest timestamp in the
>>> source files) + 1sec) in places where appropriate for reproducible
>>> build.  It might have been about Ports, but idea is it.
>>
>> That's a nice way to do it. How do they compute that?
> 
> I disagree - it needs to be set manually (and documented in the release
> notes). The above could be the rule how releng manually sets it though.

The automatic approach is great because we don't want reproducible
builds only for releases. It can be documented for releases regardless.

-- 
khorben



Re: CVS commit: src/distrib/common

2015-11-25 Thread Martin Husemann
On Wed, Nov 25, 2015 at 11:17:27AM +0100, Pierre Pronchery wrote:
> The automatic approach is great because we don't want reproducible
> builds only for releases. It can be documented for releases regardless.

The automatic aproach relies on local file times in your source tree.
I don't see how that can usefully work if you want to reproduce a build
on a different machine later.

Having a tool to calculate the timestamp and invoking

 ./build.sh -V MKREPROTIME=$( $tooldir/bin/latest-plus-one-sec . )

is fine, of course (even better if $MKREPROTIME goes into BUILDINFO).
Then when trying to reproduce that build you grep the timestamp from
/etc/release and do

 ./build.sh -V MKREPROTIME=1448447287

and you don't have to play games with your filetimes.

The easiest way for freebsd (using subversion) is to check for
the timestamp of the latest subversion change on the current branch and use
that. However, that is not good for folks doing local MKREPRO builds.

Anyway, my point is: the information needs to be explicitly passed on
the build.sh command line. Calculating it automatically internaly is not
good.

Generating it (sensibly) for the command line optionally automatically of
course is fine.

Martin


Re: CVS commit: src/distrib/common

2015-11-25 Thread Joerg Sonnenberger
On Wed, Nov 25, 2015 at 11:32:58AM +0100, Martin Husemann wrote:
> On Wed, Nov 25, 2015 at 11:17:27AM +0100, Pierre Pronchery wrote:
> > The automatic approach is great because we don't want reproducible
> > builds only for releases. It can be documented for releases regardless.
> 
> The automatic aproach relies on local file times in your source tree.
> I don't see how that can usefully work if you want to reproduce a build
> on a different machine later.

Especially since the time stamps will be different for "cvs up" vs
"fresh cvs co".

Joerg


Re: CVS commit: src/distrib/common

2015-11-25 Thread Pierre Pronchery
On 11/25/15 12:00, Joerg Sonnenberger wrote:
> On Wed, Nov 25, 2015 at 11:32:58AM +0100, Martin Husemann wrote:
>> On Wed, Nov 25, 2015 at 11:17:27AM +0100, Pierre Pronchery wrote:
>>> The automatic approach is great because we don't want reproducible
>>> builds only for releases. It can be documented for releases regardless.
>>
>> The automatic aproach relies on local file times in your source tree.
>> I don't see how that can usefully work if you want to reproduce a build
>> on a different machine later.
> 
> Especially since the time stamps will be different for "cvs up" vs
> "fresh cvs co".

Yes that's right; and same thing with Git.

-- 
khorben



Re: CVS commit: src/distrib/common

2015-11-24 Thread Masao Uebayashi
bapt@freebsd taught me that FreeBSD uses ((the newest timestamp in the
source files) + 1sec) in places where appropriate for reproducible
build.  It might have been about Ports, but idea is it.

On Wed, Nov 25, 2015 at 9:50 AM, Christos Zoulas  wrote:
> Module Name:src
> Committed By:   christos
> Date:   Wed Nov 25 00:50:57 UTC 2015
>
> Modified Files:
> src/distrib/common: Makefile.bootcd
> src/distrib/common/bootimage: Makefile.bootimage
>
> Log Message:
> PR/50360: Thomas Klausner: if MKREPRO is set, provide a consistent timestamp
> for the files in the cdroms to be built. For now we copy the timestamp of
> . We could set an absolute timestamp too like -T 0 for the epoch.
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.32 -r1.33 src/distrib/common/Makefile.bootcd
> cvs rdiff -u -r1.11 -r1.12 src/distrib/common/bootimage/Makefile.bootimage
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
>


Re: CVS commit: src/distrib/common

2015-11-24 Thread Christos Zoulas
In article ,
Masao Uebayashi   wrote:
>bapt@freebsd taught me that FreeBSD uses ((the newest timestamp in the
>source files) + 1sec) in places where appropriate for reproducible
>build.  It might have been about Ports, but idea is it.

That's a nice way to do it. How do they compute that?

christos



Re: CVS commit: src/distrib/common

2015-11-24 Thread Martin Husemann
On Wed, Nov 25, 2015 at 01:30:37AM +, Christos Zoulas wrote:
> In article 
> ,
> Masao Uebayashi   wrote:
> >bapt@freebsd taught me that FreeBSD uses ((the newest timestamp in the
> >source files) + 1sec) in places where appropriate for reproducible
> >build.  It might have been about Ports, but idea is it.
> 
> That's a nice way to do it. How do they compute that?

I disagree - it needs to be set manually (and documented in the release
notes). The above could be the rule how releng manually sets it though.

Martin


Re: CVS commit: src/distrib/common/bootimage

2015-03-12 Thread Christos Zoulas
In article 20150312044123.ee11...@cvs.netbsd.org,
Soren Jacobsen source-changes-d@NetBSD.org wrote:
-=-=-=-=-=-

Module Name:   src
Committed By:  snj
Date:  Thu Mar 12 04:41:23 UTC 2015

Modified Files:
   src/distrib/common/bootimage: Makefile.bootimage

Log Message:
unbreak amd64 install images by passing ipty to MAKEDEV.  revision 1.21
of etc/etc.amd64/MAKEDEV.conf removed them from 'all'.  (hi christos!)

Why are they broken? The INSTALL kernel has ptyfs now? This is the
wrong fix in the long run...

christos



Re: CVS commit: src/distrib/common

2014-02-01 Thread Izumi Tsutsui
matt@ wrote:

 Module Name:  src
 Committed By: matt
 Date: Sat Feb  1 21:05:54 UTC 2014
 
 Modified Files:
   src/distrib/common: Makefile.crunch
 
 Log Message:
 Pass DBG to crunchgen so it can get into the created mk file.

I think it should be set by each Makefile via CRUNCHGEN_FLAGS
(several mips ports already have it), not in the common Makefile.

---
Izumi Tsutsui


Re: CVS commit: src/distrib/common

2014-02-01 Thread Matt Thomas

On Feb 1, 2014, at 2:16 PM, Izumi Tsutsui tsut...@ceres.dti.ne.jp wrote:

 matt@ wrote:
 
 Module Name: src
 Committed By:matt
 Date:Sat Feb  1 21:05:54 UTC 2014
 
 Modified Files:
  src/distrib/common: Makefile.crunch
 
 Log Message:
 Pass DBG to crunchgen so it can get into the created mk file.
 
 I think it should be set by each Makefile via CRUNCHGEN_FLAGS
 (several mips ports already have it), not in the common Makefile.

Most ramdisk Makefiles have a DBG=value which is ignored.
CRUNCHGEN_FLAGS is unobvious.


Re: CVS commit: src/distrib/common

2014-02-01 Thread Izumi Tsutsui
matt@ wrote:

  matt@ wrote:
  
  Module Name:   src
  Committed By:  matt
  Date:  Sat Feb  1 21:05:54 UTC 2014
  
  Modified Files:
 src/distrib/common: Makefile.crunch
  
  Log Message:
  Pass DBG to crunchgen so it can get into the created mk file.
  
  I think it should be set by each Makefile via CRUNCHGEN_FLAGS
  (several mips ports already have it), not in the common Makefile.
 
 Most ramdisk Makefiles have a DBG=value which is ignored.
 CRUNCHGEN_FLAGS is unobvious.

Most, but not all.

The point is that your changes disallow each Makefile overwriting
default settings.  At least it should be set via
CRUNCHGEN_FLAGS?= -d ${DBG}
in the common Makefile.crunch.

Or properly remove all redundant CRUNCHGEN_FLAGS which specify -d
from existing Makefiles if you really don't like it.

---
Izumi Tsutsui