CVS commit: src/distrib/cdrom

2024-06-08 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun  8 13:05:33 UTC 2024

Modified Files:
src/distrib/cdrom: boothfs.uue
src/distrib/cdrom/macppc_mkboothfs: mkboothfs.c

Log Message:
Make sure NetBSD_BootBlock partition has 32KB to avoid extra padding.

It looks at least OpenFirmware 2.x fails to load the primary bootloader
in the NetBSD_BootBlock partition if the partition size is too small,
probably because OpenFirmware read() function implicitly uses 32KB blocks.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/cdrom/boothfs.uue
cvs rdiff -u -r1.3 -r1.4 src/distrib/cdrom/macppc_mkboothfs/mkboothfs.c

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

Modified files:

Index: src/distrib/cdrom/boothfs.uue
diff -u src/distrib/cdrom/boothfs.uue:1.1 src/distrib/cdrom/boothfs.uue:1.2
--- src/distrib/cdrom/boothfs.uue:1.1	Sun Mar 29 04:54:19 2009
+++ src/distrib/cdrom/boothfs.uue	Sat Jun  8 13:05:32 2024
@@ -1,4 +1,4 @@
-$NetBSD: boothfs.uue,v 1.1 2009/03/29 04:54:19 tsutsui Exp $
+$NetBSD: boothfs.uue,v 1.2 2024/06/08 13:05:32 tsutsui Exp $
 begin 644 boothfs
 M15((`0`!
 M
@@ -11,9 +11,9 @@ M```
 M
 M
 M
-M``!030```0$!3F5T0E-$7T)O;W1"
+M``!030```0$03F5T0E-$7T)O;W1"
 M;&]C:P!!<'!L95]$
 #endif
+#if !HAVE_NBTOOL_CONFIG_H || HAVE_SYS_ENDIAN_H
+#include 
+#endif
 
 #include 
 #include 
@@ -40,8 +43,18 @@
 #include 
 #include 
 
+#define BUFSIZE		(64 * 1024)
+
 #define BSIZE		512
-#define BUFSIZE		(8 * 1024)
+#define BOOTPARTSIZE	32768	/* XXX: not sure how much required */
+#define BOOTDATASIZE	(BOOTPARTSIZE - MACPPC_BOOT_BLOCK_MAX_SIZE)
+
+#define HFS_BLKSIZE	512
+#define HFS_MAGICOFFSET	(BOOTDATASIZE - (HFS_BLKSIZE * 2))
+#define HFS_MAGIC	0x4c4b
+
+#define SIZETOBLK512(size)	((size) / 512)
+#define SIZETOBLK2048(size)	((size) / 2048)
 
 static void usage(void);
 
@@ -94,8 +107,8 @@ main(int argc, char **argv)
 	pme.pmSig =		htobe16(APPLE_PART_MAP_ENTRY_MAGIC);
 	pme.pmMapBlkCnt =	htobe32(1);
 	pme.pmPyPartStart =	htobe32(1);
-	pme.pmPartBlkCnt =	htobe32(1);
-	pme.pmDataCnt =		htobe32(1);
+	pme.pmPartBlkCnt =	htobe32(SIZETOBLK2048(BOOTPARTSIZE));
+	pme.pmDataCnt =		htobe32(SIZETOBLK2048(BOOTDATASIZE));
 	strlcpy(pme.pmPartName, "NetBSD_BootBlock", sizeof(pme.pmPartName));
 	strlcpy(pme.pmPartType, "Apple_Driver", sizeof(pme.pmPartType));
 	pme.pmPartStatus =	htobe32(0x3b);
@@ -112,8 +125,8 @@ main(int argc, char **argv)
 	 * Write 512-byte/sector map in the third 512 byte block
 	 */
 	pme.pmPyPartStart =	htobe32(4);
-	pme.pmPartBlkCnt =	htobe32(4);
-	pme.pmDataCnt =		htobe32(4);
+	pme.pmPartBlkCnt =	htobe32(SIZETOBLK512(BOOTPARTSIZE));
+	pme.pmDataCnt =		htobe32(SIZETOBLK512(BOOTDATASIZE));
 	memset(buf, 0, BSIZE);
 	memcpy(buf, , sizeof(pme));
 	write(ofd, buf, BSIZE);
@@ -133,10 +146,9 @@ main(int argc, char **argv)
 	/*
 	 * Prepare HFS "bootblock"; enough to pacify mkisofs.
 	 */
-	memset(buf, 0, BSIZE * 2);
-	buf[0] = 0x4c;
-	buf[1] = 0x4b;
-	if (write(ofd, buf, BSIZE * 2) != BSIZE * 2)
+	memset(buf, 0, BOOTDATASIZE);
+	be16enc([HFS_MAGICOFFSET], HFS_MAGIC);
+	if (write(ofd, buf, BOOTDATASIZE) != BOOTDATASIZE)
 		err(1, "write boot-hfs-file `%s'", boothfs);
  
 	free(buf);



CVS commit: src/distrib/cdrom

2024-06-08 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun  8 13:05:33 UTC 2024

Modified Files:
src/distrib/cdrom: boothfs.uue
src/distrib/cdrom/macppc_mkboothfs: mkboothfs.c

Log Message:
Make sure NetBSD_BootBlock partition has 32KB to avoid extra padding.

It looks at least OpenFirmware 2.x fails to load the primary bootloader
in the NetBSD_BootBlock partition if the partition size is too small,
probably because OpenFirmware read() function implicitly uses 32KB blocks.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/cdrom/boothfs.uue
cvs rdiff -u -r1.3 -r1.4 src/distrib/cdrom/macppc_mkboothfs/mkboothfs.c

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



CVS commit: src/distrib/cdrom

2024-05-31 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri May 31 20:54:33 UTC 2024

Modified Files:
src/distrib/cdrom: Makefile

Log Message:
Build mac68k and macppc iso images using tools/mkhybrid.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/distrib/cdrom/Makefile

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

Modified files:

Index: src/distrib/cdrom/Makefile
diff -u src/distrib/cdrom/Makefile:1.54 src/distrib/cdrom/Makefile:1.55
--- src/distrib/cdrom/Makefile:1.54	Thu May 16 14:21:45 2024
+++ src/distrib/cdrom/Makefile	Fri May 31 20:54:33 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.54 2024/05/16 14:21:45 tsutsui Exp $
+# $NetBSD: Makefile,v 1.55 2024/05/31 20:54:33 tsutsui Exp $
 #
 # Consult "*.conf" for the configuration variables; this Makefile is typically
 # not edited for basic configuration changes.
@@ -63,6 +63,10 @@ ALL_PORTS:=		${ALL_PORTS} ${BASE_PORTS.$
 
 SUBDIR=
 
+.if !empty(ALL_PORTS:Mmac68k) || !empty(ALL_PORTS:Mmacppc)
+MKISOFS=	${TOOL_MKHYBRID}
+.endif
+
 .if !empty(ALL_PORTS:Mmacppc)
 SUBDIR+=	macppc_installboot
 .endif



CVS commit: src/distrib/cdrom

2024-05-31 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri May 31 20:54:33 UTC 2024

Modified Files:
src/distrib/cdrom: Makefile

Log Message:
Build mac68k and macppc iso images using tools/mkhybrid.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/distrib/cdrom/Makefile

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



CVS commit: src/distrib/cdrom/macppc_installboot

2024-05-24 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri May 24 10:13:44 UTC 2024

Modified Files:
src/distrib/cdrom/macppc_installboot: Makefile
Removed Files:
src/distrib/cdrom/macppc_installboot: cd9660.c

Log Message:
Pull sharable src/usr.sbin/installboot/cd9660.c.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/distrib/cdrom/macppc_installboot/Makefile
cvs rdiff -u -r1.6 -r0 src/distrib/cdrom/macppc_installboot/cd9660.c

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



CVS commit: src/distrib/cdrom/macppc_installboot

2024-05-24 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri May 24 10:13:44 UTC 2024

Modified Files:
src/distrib/cdrom/macppc_installboot: Makefile
Removed Files:
src/distrib/cdrom/macppc_installboot: cd9660.c

Log Message:
Pull sharable src/usr.sbin/installboot/cd9660.c.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/distrib/cdrom/macppc_installboot/Makefile
cvs rdiff -u -r1.6 -r0 src/distrib/cdrom/macppc_installboot/cd9660.c

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

Modified files:

Index: src/distrib/cdrom/macppc_installboot/Makefile
diff -u src/distrib/cdrom/macppc_installboot/Makefile:1.12 src/distrib/cdrom/macppc_installboot/Makefile:1.13
--- src/distrib/cdrom/macppc_installboot/Makefile:1.12	Sun May 19 15:51:30 2024
+++ src/distrib/cdrom/macppc_installboot/Makefile	Fri May 24 10:13:44 2024
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.12 2024/05/19 15:51:30 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.13 2024/05/24 10:13:44 tsutsui Exp $
 
 .include 
 HOSTPROG=	macppc_installboot
 SRCS=		installboot.c cd9660.c cd9660_util.c
 
-.PATH.c: ${NETBSDSRCDIR}/sys/fs/cd9660
+.PATH.c: ${NETBSDSRCDIR}/usr.sbin/installboot ${NETBSDSRCDIR}/sys/fs/cd9660
 
 HOST_CPPFLAGS+=	-I. -I${.CURDIR}
 #HOST_CPPFLAGS+=	-DDEBUG



CVS commit: src/distrib/cdrom/macppc_installboot

2024-05-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun May 19 15:52:34 UTC 2024

Modified Files:
src/distrib/cdrom/macppc_installboot: cd9660.c installboot.c

Log Message:
Use native cd9660 blocksize to specify block numbers in cd9660.c.

This reduces diffs from src/usr.sbin/installboot/cd9660.c.
Also explicitly call cd9660_match() to get fstype->blocksize properly.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/cdrom/macppc_installboot/cd9660.c
cvs rdiff -u -r1.6 -r1.7 src/distrib/cdrom/macppc_installboot/installboot.c

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

Modified files:

Index: src/distrib/cdrom/macppc_installboot/cd9660.c
diff -u src/distrib/cdrom/macppc_installboot/cd9660.c:1.5 src/distrib/cdrom/macppc_installboot/cd9660.c:1.6
--- src/distrib/cdrom/macppc_installboot/cd9660.c:1.5	Sun May 19 15:51:30 2024
+++ src/distrib/cdrom/macppc_installboot/cd9660.c	Sun May 19 15:52:34 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: cd9660.c,v 1.5 2024/05/19 15:51:30 tsutsui Exp $	*/
+/*	$NetBSD: cd9660.c,v 1.6 2024/05/19 15:52:34 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2005 Izumi Tsutsui.  All rights reserved.
@@ -30,7 +30,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: cd9660.c,v 1.5 2024/05/19 15:51:30 tsutsui Exp $");
+__RCSID("$NetBSD: cd9660.c,v 1.6 2024/05/19 15:52:34 tsutsui Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -213,8 +213,6 @@ cd9660_findstage2(ib_params *params, uin
 			found = 1;
 			/* ISO filesystem always has contiguous file blocks */
 			blocks[0].block = (int64_t)isonum_733(idr->extent);
-			/* XXX bootxx assumes blocksize is 512 */
-			blocks[0].block *= blocksize / 512;
 			blocks[0].blocksize =
 			roundup(isonum_733(idr->size), blocksize);
 			*maxblk = 1;

Index: src/distrib/cdrom/macppc_installboot/installboot.c
diff -u src/distrib/cdrom/macppc_installboot/installboot.c:1.6 src/distrib/cdrom/macppc_installboot/installboot.c:1.7
--- src/distrib/cdrom/macppc_installboot/installboot.c:1.6	Sun May 19 15:51:30 2024
+++ src/distrib/cdrom/macppc_installboot/installboot.c	Sun May 19 15:52:34 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: installboot.c,v 1.6 2024/05/19 15:51:30 tsutsui Exp $	*/
+/*	$NetBSD: installboot.c,v 1.7 2024/05/19 15:52:34 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2005 Izumi Tsutsui.  All rights reserved.
@@ -47,6 +47,12 @@ static	void usage(void);
 
 static	ib_params	installboot_params;
 
+static	struct ib_fs cd9660_fstype = {
+	.name = "cd9660",
+	.match = cd9660_match,
+	.findstage2 = cd9660_findstage2
+};
+
 int
 main(int argc, char **argv)
 {
@@ -59,6 +65,7 @@ main(int argc, char **argv)
 	uint32_t nblk, maxblk, blk_i;
 	int rv;
 	ib_block *blocks;
+	uint64_t block;
 
 	setprogname(argv[0]);
 	params = _params;
@@ -70,11 +77,16 @@ main(int argc, char **argv)
 		usage();
 
 	params->filesystem = argv[1];
+	params->fstype = _fstype;
 
 	if ((params->fsfd = open(params->filesystem, O_RDWR, 0600)) == -1)
 		err(1, "Opening file system `%s' read", params->filesystem);
 	if (fstat(params->fsfd, >fsstat) == -1)
 		err(1, "Examining file system `%s'", params->filesystem);
+	if (!params->fstype->match(params))
+		errx(1, "File system `%s' is not of type %s",
+		params->filesystem, params->fstype->name);
+
 #ifdef DEBUG
 	printf("file system: %s, %ld bytes\n",
 	params->filesystem, (long)params->fsstat.st_size);
@@ -167,14 +179,16 @@ main(int argc, char **argv)
 	}
 
 	nblk = maxblk;
-	if (!cd9660_findstage2(params, , blocks)) {
+	if (!params->fstype->findstage2(params, , blocks)) {
 		exit(1);
 	}
 
 	bbinfop->bbi_block_count = htobe32(nblk);
 	bbinfop->bbi_block_size = htobe32(blocks[0].blocksize);
 	for (blk_i = 0; blk_i < nblk; blk_i++) {
-		bbinfop->bbi_block_table[blk_i] = htobe32(blocks[blk_i].block);
+		/* XXX bootxx assumes blocksize is 512 */
+		block = blocks[blk_i].block * (params->fstype->blocksize / 512);
+		bbinfop->bbi_block_table[blk_i] = htobe32(block);
 		if (blocks[blk_i].blocksize < blocks[0].blocksize &&
 		blk_i + 1 != nblk) {
 			warnx("Secondary bootstrap `%s' blocks do not have "



CVS commit: src/distrib/cdrom/macppc_installboot

2024-05-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun May 19 15:52:34 UTC 2024

Modified Files:
src/distrib/cdrom/macppc_installboot: cd9660.c installboot.c

Log Message:
Use native cd9660 blocksize to specify block numbers in cd9660.c.

This reduces diffs from src/usr.sbin/installboot/cd9660.c.
Also explicitly call cd9660_match() to get fstype->blocksize properly.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/cdrom/macppc_installboot/cd9660.c
cvs rdiff -u -r1.6 -r1.7 src/distrib/cdrom/macppc_installboot/installboot.c

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



CVS commit: src/distrib/cdrom/macppc_installboot

2024-05-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun May 19 15:51:30 UTC 2024

Modified Files:
src/distrib/cdrom/macppc_installboot: Makefile cd9660.c installboot.c
installboot.h

Log Message:
Sync with src/usr.sbin/installboot/cd9660.c:

- include now properly updated cd9660_extern.h for function prototypes
  and remove them from local installboot.h
- use ISO_MAXNAMLEN rather than (BSD specific and incorrect) MAXNAMLEN
- use proper names for the secondary boot file
- appease several pointer signedness warnings (not fatal on HOST tools)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/distrib/cdrom/macppc_installboot/Makefile
cvs rdiff -u -r1.4 -r1.5 src/distrib/cdrom/macppc_installboot/cd9660.c \
src/distrib/cdrom/macppc_installboot/installboot.h
cvs rdiff -u -r1.5 -r1.6 src/distrib/cdrom/macppc_installboot/installboot.c

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

Modified files:

Index: src/distrib/cdrom/macppc_installboot/Makefile
diff -u src/distrib/cdrom/macppc_installboot/Makefile:1.11 src/distrib/cdrom/macppc_installboot/Makefile:1.12
--- src/distrib/cdrom/macppc_installboot/Makefile:1.11	Tue May  1 19:59:43 2018
+++ src/distrib/cdrom/macppc_installboot/Makefile	Sun May 19 15:51:30 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2018/05/01 19:59:43 christos Exp $
+#	$NetBSD: Makefile,v 1.12 2024/05/19 15:51:30 tsutsui Exp $
 
 .include 
 HOSTPROG=	macppc_installboot
@@ -16,6 +16,7 @@ HOST_CPPFLAGS+=	-I. -I${.CURDIR}
 	${HOST_INSTALL_DIR} fs/cd9660
 	${HOST_LN} -s ${NETBSDSRCDIR}/sys/fs/unicode.h fs
 	${HOST_LN} -s ${NETBSDSRCDIR}/sys/fs/cd9660/iso.h fs/cd9660
+	${HOST_LN} -s ${NETBSDSRCDIR}/sys/fs/cd9660/cd9660_extern.h fs/cd9660
 .endif
 
 cleandir distclean: cleaninc

Index: src/distrib/cdrom/macppc_installboot/cd9660.c
diff -u src/distrib/cdrom/macppc_installboot/cd9660.c:1.4 src/distrib/cdrom/macppc_installboot/cd9660.c:1.5
--- src/distrib/cdrom/macppc_installboot/cd9660.c:1.4	Sat Sep 27 15:21:40 2014
+++ src/distrib/cdrom/macppc_installboot/cd9660.c	Sun May 19 15:51:30 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: cd9660.c,v 1.4 2014/09/27 15:21:40 tsutsui Exp $	*/
+/*	$NetBSD: cd9660.c,v 1.5 2024/05/19 15:51:30 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2005 Izumi Tsutsui.  All rights reserved.
@@ -30,7 +30,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: cd9660.c,v 1.4 2014/09/27 15:21:40 tsutsui Exp $");
+__RCSID("$NetBSD: cd9660.c,v 1.5 2024/05/19 15:51:30 tsutsui Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -51,6 +51,7 @@ __RCSID("$NetBSD: cd9660.c,v 1.4 2014/09
 #include 
 
 #include 
+#include 
 
 #include "installboot.h"
 
@@ -87,7 +88,7 @@ cd9660_match(ib_params *params)
 		return 0;
 	}
 
-	blocksize = isonum_723((char *)ipd.logical_block_size);
+	blocksize = isonum_723((u_char *)ipd.logical_block_size);
 	if (blocksize != ISO_DEFAULT_BLOCK_SIZE) {
 		warnx("Invalid blocksize %d in `%s'",
 		blocksize, params->filesystem);
@@ -104,10 +105,11 @@ int
 cd9660_findstage2(ib_params *params, uint32_t *maxblk, ib_block *blocks)
 {
 	uint8_t buf[ISO_DEFAULT_BLOCK_SIZE];
-	char name[MAXNAMLEN];
-	char *ofwboot;
+	char name[ISO_MAXNAMLEN];
+	char *stage2;
 	off_t loc;
-	int rv, blocksize, found, i;
+	int rv, blocksize, found;
+	u_int i;
 	struct iso_primary_descriptor ipd;
 	struct iso_directory_record *idr;
 
@@ -122,20 +124,20 @@ cd9660_findstage2(ib_params *params, uin
 #endif
 
 	/* The secondary bootstrap must be clearly in /. */
-	strlcpy(name, params->stage2, MAXNAMLEN);
-	ofwboot = name;
-	if (ofwboot[0] == '/')
-		ofwboot++;
-	if (strchr(ofwboot, '/') != NULL) {
+	strlcpy(name, params->stage2, ISO_MAXNAMLEN);
+	stage2 = name;
+	if (stage2[0] == '/')
+		stage2++;
+	if (strchr(stage2, '/') != NULL) {
 		warnx("The secondary bootstrap `%s' must be in / "
 		"on filesystem `%s'", params->stage2, params->filesystem);
 		return 0;
 	}
-	if (strchr(ofwboot, '.') == NULL) {
+	if (strchr(stage2, '.') == NULL) {
 		/*
 		 * XXX should fix isofncmp()?
 		 */
-		strlcat(ofwboot, ".", MAXNAMLEN);
+		strlcat(name, ".", ISO_MAXNAMLEN);
 	}
 
 	rv = pread(params->fsfd, , sizeof(ipd),
@@ -148,7 +150,7 @@ cd9660_findstage2(ib_params *params, uin
 		   params->filesystem);
 		return 0;
 	}
-	blocksize = isonum_723((char *)ipd.logical_block_size);
+	blocksize = isonum_723((u_char *)ipd.logical_block_size);
 
 	idr = (void *)ipd.root_directory_record;
 	loc = (off_t)isonum_733(idr->extent) * blocksize;
@@ -205,8 +207,9 @@ cd9660_findstage2(ib_params *params, uin
 			printf("\n");
 		}
 #endif
-		if (isofncmp(ofwboot, strlen(ofwboot),
-		idr->name, isonum_711(idr->name_len), 0) == 0) {
+		if (isofncmp((u_char *)stage2, strlen(stage2),
+		(u_char *)idr->name,
+		isonum_711((u_char *)idr->name_len), 0) == 0) {
 			found = 1;
 			/* ISO filesystem always has contiguous file blocks */
 			blocks[0].block = (int64_t)isonum_733(idr->extent);
Index: 

CVS commit: src/distrib/cdrom/macppc_installboot

2024-05-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun May 19 15:51:30 UTC 2024

Modified Files:
src/distrib/cdrom/macppc_installboot: Makefile cd9660.c installboot.c
installboot.h

Log Message:
Sync with src/usr.sbin/installboot/cd9660.c:

- include now properly updated cd9660_extern.h for function prototypes
  and remove them from local installboot.h
- use ISO_MAXNAMLEN rather than (BSD specific and incorrect) MAXNAMLEN
- use proper names for the secondary boot file
- appease several pointer signedness warnings (not fatal on HOST tools)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/distrib/cdrom/macppc_installboot/Makefile
cvs rdiff -u -r1.4 -r1.5 src/distrib/cdrom/macppc_installboot/cd9660.c \
src/distrib/cdrom/macppc_installboot/installboot.h
cvs rdiff -u -r1.5 -r1.6 src/distrib/cdrom/macppc_installboot/installboot.c

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



CVS commit: src/distrib/cdrom

2024-05-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu May 16 14:21:45 UTC 2024

Modified Files:
src/distrib/cdrom: Makefile

Log Message:
Add -data-change-warn to MKISOFS_ARGS for macppc as done for mac68k:

https://mail-index.netbsd.org/source-changes/2023/05/19/msg144826.html
> Creating Type mappings for .bin (macbinary encoded) files,
> mkisofs changes files, then turns around and complains they have been
> changed.
>
> This is a self-inflicted wound, so demote the error to a warning.

This looks to make macppccd builds with cdrtools-3.02a10.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/distrib/cdrom/Makefile

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

Modified files:

Index: src/distrib/cdrom/Makefile
diff -u src/distrib/cdrom/Makefile:1.53 src/distrib/cdrom/Makefile:1.54
--- src/distrib/cdrom/Makefile:1.53	Fri May 19 14:47:16 2023
+++ src/distrib/cdrom/Makefile	Thu May 16 14:21:45 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.53 2023/05/19 14:47:16 hauke Exp $
+# $NetBSD: Makefile,v 1.54 2024/05/16 14:21:45 tsutsui Exp $
 #
 # Consult "*.conf" for the configuration variables; this Makefile is typically
 # not edited for basic configuration changes.
@@ -294,7 +294,7 @@ MKISOFS_ARGS.${image}+= -b ${BOOTFILE.am
 .if !empty(ports:Mmacppc)
 BOOTHFS=	boothfs
 MKISOFS_ARGS.${image}+=	-hfs -part -hide-hfs-list ${.CURDIR}/hide-hfs.lst \
-	--macbin -map ${.CURDIR}/hfsmap.lst \
+	--macbin -data-change-warn -map ${.CURDIR}/hfsmap.lst \
 	-boot-hfs-file ${.OBJDIR}/${BOOTHFS}
 UUDECODE_FILES=	${BOOTHFS}
 .include 



CVS commit: src/distrib/cdrom

2024-05-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu May 16 14:21:45 UTC 2024

Modified Files:
src/distrib/cdrom: Makefile

Log Message:
Add -data-change-warn to MKISOFS_ARGS for macppc as done for mac68k:

https://mail-index.netbsd.org/source-changes/2023/05/19/msg144826.html
> Creating Type mappings for .bin (macbinary encoded) files,
> mkisofs changes files, then turns around and complains they have been
> changed.
>
> This is a self-inflicted wound, so demote the error to a warning.

This looks to make macppccd builds with cdrtools-3.02a10.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/distrib/cdrom/Makefile

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



Re: CVS commit: src/distrib/cdrom/macppc_installboot

2016-03-11 Thread Christos Zoulas
On Mar 11,  9:20pm, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote:
-- Subject: Re: CVS commit: src/distrib/cdrom/macppc_installboot

| christos@ wrote:
| 
| > There is one more spurious fp++ I removed, can you please take a look?
| 
| This one?
| http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/fs/cd9660/cd9660_util.c#rev1.11

Yes. Looks like it is correct to remove it then!

| > | Note it looks the following awful include no longer necessary.
| > | > #include "installboot.h"
| > | 
| > | (I don't remember why I added it though)
| > 
| > I will take a look!
| 
| Probably just for a prototype declaration of isofncmp().

It is all good now, thanks!

christos


Re: CVS commit: src/distrib/cdrom/macppc_installboot

2016-03-11 Thread Izumi Tsutsui
christos@ wrote:

> There is one more spurious fp++ I removed, can you please take a look?

This one?
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/fs/cd9660/cd9660_util.c#rev1.11

> | Note it looks the following awful include no longer necessary.
> | > #include "installboot.h"
> | 
> | (I don't remember why I added it though)
> 
> I will take a look!

Probably just for a prototype declaration of isofncmp().

---
Izumi Tsutsui


Re: CVS commit: src/distrib/cdrom/macppc_installboot

2016-03-09 Thread Christos Zoulas
On Mar 10,  2:03am, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote:
-- Subject: Re: CVS commit: src/distrib/cdrom/macppc_installboot

| christos@ wrote:
| 
| > On Mar 9, 10:22pm, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote:
| > -- Subject: Re: CVS commit: src/distrib/cdrom/macppc_installboot
| > 
| > | Could you please rather sync it with the original kernel part source?
| > | http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/fs/cd9660/cd9660_util.c#rev1.7
| > 
| > I merged them instead.
| 
| Thanks.

There is one more spurious fp++ I removed, can you please take a look?

| Note it looks the following awful include no longer necessary.
| > #include "installboot.h"
| 
| (I don't remember why I added it though)

I will take a look!

christos


Re: CVS commit: src/distrib/cdrom/macppc_installboot

2016-03-09 Thread Izumi Tsutsui
christos@ wrote:

> On Mar 9, 10:22pm, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote:
> -- Subject: Re: CVS commit: src/distrib/cdrom/macppc_installboot
> 
> | Could you please rather sync it with the original kernel part source?
> | http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/fs/cd9660/cd9660_util.c#rev1.7
> 
> I merged them instead.

Thanks.

Note it looks the following awful include no longer necessary.
> #include "installboot.h"

(I don't remember why I added it though)
---
Izumi Tsutsui


Re: CVS commit: src/distrib/cdrom/macppc_installboot

2016-03-09 Thread Christos Zoulas
On Mar 9, 10:22pm, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote:
-- Subject: Re: CVS commit: src/distrib/cdrom/macppc_installboot

| Could you please rather sync it with the original kernel part source?
| http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/fs/cd9660/cd9660_util.c#rev1.7

I merged them instead.

christos


Re: CVS commit: src/distrib/cdrom/macppc_installboot

2016-03-09 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: christos
> Date: Tue Mar  8 20:16:56 UTC 2016
> 
> Modified Files:
>   src/distrib/cdrom/macppc_installboot: cd9660_util.c
> 
> Log Message:
> PR/50915: David Binderman: Fix infinite loop and printf format.

Could you please rather sync it with the original kernel part source?
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/fs/cd9660/cd9660_util.c#rev1.7

---
Izumi Tsutsui