Miod Vallat <m...@online.fr> wrote:

> Up until 6.5, sparc64 bsd.rd were gzipped kernels. This got lost during
> the Great Installation Media Unification of the 6.6 release cycle, and
> since then bsd.rd are uncompressed.
> 
> The following diff ought to fix this and bring back sparc64 netboot
> times down to acceptable times.

Other architectures can use some tweaking also.  This is now in snaps,
to see if anyone runs into a problem.

I've tried to be conservative, I believe all the remaining architectures
have at least one non-gzip boot-methods.

Index: distrib/alpha/miniroot/Makefile
===================================================================
RCS file: /cvs/src/distrib/alpha/miniroot/Makefile,v
retrieving revision 1.17
diff -u -p -u -r1.17 Makefile
--- distrib/alpha/miniroot/Makefile     18 May 2020 06:20:43 -0000      1.17
+++ distrib/alpha/miniroot/Makefile     31 Dec 2020 07:42:06 -0000
@@ -104,7 +104,7 @@ unconfig:
 
 .ifdef RELEASEDIR
 install:
-       cp bsd.rd ${RELEASEDIR}/bsd.rd
+       cp bsd.gz ${RELEASEDIR}/bsd.rd
        chmod a+r ${RELEASEDIR}/bsd.rd
        cp ${FS} ${RELEASEDIR}
        cp ${CDROM} ${RELEASEDIR}
Index: distrib/amd64/iso/Makefile
===================================================================
RCS file: /cvs/src/distrib/amd64/iso/Makefile,v
retrieving revision 1.39
diff -u -p -u -r1.39 Makefile
--- distrib/amd64/iso/Makefile  5 Aug 2020 04:23:30 -0000       1.39
+++ distrib/amd64/iso/Makefile  31 Dec 2020 22:52:06 -0000
@@ -25,7 +25,7 @@ TEMPLATE=     ${.CURDIR}/template
 
 all: ${FS} ${CDROM}
 
-${FS}: ${BASE} ${XBASE} bsd.gz
+${FS}: ${BASE} ${XBASE} bsd.rd
        dd if=/dev/zero of=${FS} bs=512 count=${TOTALSIZE}
        vnconfig -v ${FS} > vnd
        fdisk -yi -l ${FSSIZE} -b ${MSDOSSIZE} -f ${DESTDIR}/usr/mdec/mbr `cat 
vnd`
@@ -49,7 +49,7 @@ ${FS}: ${BASE} ${XBASE} bsd.gz
        mkdir -p ${MOUNT_POINT}/${OSREV}/${MACHINE}
        mkdir -p ${MOUNT_POINT}/etc
        echo "set image /${OSREV}/${MACHINE}/bsd.rd" > 
${MOUNT_POINT}/etc/boot.conf
-       install -c -m 555 -o root -g wheel bsd.gz ${MOUNT_POINT}/bsd
+       install -c -m 555 -o root -g wheel bsd.rd ${MOUNT_POINT}/bsd
        ln ${MOUNT_POINT}/bsd ${MOUNT_POINT}/bsd.rd
 
        cp -p ${BASE} ${MOUNT_POINT}/${OSREV}/${MACHINE}
@@ -93,12 +93,6 @@ install:
 clean cleandir:
        rm -f ${CDROM} ${FS}
        rm -rf cd-dir
-
-bsd.gz: bsd.rd
-       cp bsd.rd bsd.strip
-       strip bsd.strip
-       strip -R .comment -R .SUNW_ctf bsd.strip
-       gzip -9cn bsd.strip > bsd.gz
 
 bsd.rd: ${BSDRD}
        cp ${BSDRD} bsd.rd
Index: distrib/amd64/ramdisk_cd/Makefile
===================================================================
RCS file: /cvs/src/distrib/amd64/ramdisk_cd/Makefile,v
retrieving revision 1.23
diff -u -p -u -r1.23 Makefile
--- distrib/amd64/ramdisk_cd/Makefile   15 Sep 2020 11:44:51 -0000      1.23
+++ distrib/amd64/ramdisk_cd/Makefile   31 Dec 2020 22:52:13 -0000
@@ -99,7 +99,7 @@ unconfig:
 
 .ifdef RELEASEDIR
 install:
-       cp bsd.rd ${RELEASEDIR}/bsd.rd
+       cp bsd.gz ${RELEASEDIR}/bsd.rd
        chmod a+r ${RELEASEDIR}/bsd.rd
        cp ${FS} ${RELEASEDIR}
        cp ${CDROM} ${RELEASEDIR}
Index: distrib/i386/iso/Makefile
===================================================================
RCS file: /cvs/src/distrib/i386/iso/Makefile,v
retrieving revision 1.29
diff -u -p -u -r1.29 Makefile
--- distrib/i386/iso/Makefile   5 Aug 2020 04:23:30 -0000       1.29
+++ distrib/i386/iso/Makefile   31 Dec 2020 22:52:43 -0000
@@ -20,7 +20,7 @@ XBASE=                ${RELXDIR}/xbase${OSrev}.tgz ${R
 
 all: ${FS} ${CDROM}
 
-${FS}: ${BASE} ${XBASE} bsd.gz
+${FS}: ${BASE} ${XBASE} bsd.rd
        dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE}
        vnconfig -v ${FS} > vnd
        fdisk -yi -l ${FSSIZE} -f ${DESTDIR}/usr/mdec/mbr `cat vnd`
@@ -31,7 +31,7 @@ ${FS}: ${BASE} ${XBASE} bsd.gz
        strip -R .comment -R .SUNW_ctf ${MOUNT_POINT}/boot
        installboot -v -r ${MOUNT_POINT} `cat vnd` \
            ${DESTDIR}/usr/mdec/biosboot ${MOUNT_POINT}/boot
-       install -c -m 555 -o root -g wheel bsd.gz ${MOUNT_POINT}/bsd
+       install -c -m 555 -o root -g wheel bsd.rd ${MOUNT_POINT}/bsd
        ln ${MOUNT_POINT}/bsd ${MOUNT_POINT}/bsd.rd
        mkdir -p ${MOUNT_POINT}/${OSREV}/${MACHINE}
        mkdir -p ${MOUNT_POINT}/etc
@@ -72,12 +72,6 @@ ${CDROM}: ${BASE} ${XBASE}
            -V "OpenBSD/${MACHINE}    ${OSREV} Install CD" \
            -b ${OSREV}/${MACHINE}/cdbr -c ${OSREV}/${MACHINE}/boot.catalog \
            ${.OBJDIR}/cd-dir
-
-bsd.gz: bsd.rd
-       cp bsd.rd bsd.strip
-       strip bsd.strip
-       strip -R .comment -R .SUNW_ctf bsd.strip
-       gzip -9cn bsd.strip > bsd.gz
 
 bsd.rd: ${BSDRD}
        cp ${BSDRD} bsd.rd
Index: distrib/i386/ramdisk_cd/Makefile
===================================================================
RCS file: /cvs/src/distrib/i386/ramdisk_cd/Makefile,v
retrieving revision 1.17
diff -u -p -u -r1.17 Makefile
--- distrib/i386/ramdisk_cd/Makefile    18 May 2020 06:20:43 -0000      1.17
+++ distrib/i386/ramdisk_cd/Makefile    31 Dec 2020 22:52:29 -0000
@@ -96,7 +96,7 @@ unconfig:
 
 .ifdef RELEASEDIR
 install:
-       cp bsd.rd ${RELEASEDIR}/bsd.rd
+       cp bsd.gz ${RELEASEDIR}/bsd.rd
        chmod a+r ${RELEASEDIR}/bsd.rd
        cp ${FS} ${RELEASEDIR}
        cp ${CDROM} ${RELEASEDIR}
Index: distrib/landisk/ramdisk/Makefile
===================================================================
RCS file: /cvs/src/distrib/landisk/ramdisk/Makefile,v
retrieving revision 1.32
diff -u -p -u -r1.32 Makefile
--- distrib/landisk/ramdisk/Makefile    18 May 2020 06:20:43 -0000      1.32
+++ distrib/landisk/ramdisk/Makefile    31 Dec 2020 07:43:00 -0000
@@ -70,7 +70,7 @@ unconfig:
 
 .ifdef RELEASEDIR
 install:
-       cp bsd.rd ${RELEASEDIR}/bsd.rd
+       cp bsd.gz ${RELEASEDIR}/bsd.rd
        chmod a+r ${RELEASEDIR}/bsd.rd
        cp ${FS} ${RELEASEDIR}
 .endif
Index: distrib/macppc/ramdisk/Makefile
===================================================================
RCS file: /cvs/src/distrib/macppc/ramdisk/Makefile,v
retrieving revision 1.47
diff -u -p -u -r1.47 Makefile
--- distrib/macppc/ramdisk/Makefile     2 Apr 2020 19:30:00 -0000       1.47
+++ distrib/macppc/ramdisk/Makefile     31 Dec 2020 07:44:28 -0000
@@ -66,7 +66,7 @@ instbin.conf: ${LISTS}
 
 .ifdef RELEASEDIR
 install:
-       cp bsd.rd ${RELEASEDIR}/bsd.rd
+       cp bsd.gz ${RELEASEDIR}/bsd.rd
        chmod a+r ${RELEASEDIR}/bsd.rd
        cp ${CDROM} ${RELEASEDIR}
 .endif
Index: distrib/sparc64/miniroot/Makefile
===================================================================
RCS file: /cvs/src/distrib/sparc64/miniroot/Makefile,v
retrieving revision 1.23
diff -u -p -u -r1.23 Makefile
--- distrib/sparc64/miniroot/Makefile   18 May 2020 06:20:44 -0000      1.23
+++ distrib/sparc64/miniroot/Makefile   31 Dec 2020 07:41:11 -0000
@@ -100,7 +100,7 @@ unconfig:
 
 .ifdef RELEASEDIR
 install:
-       cp bsd.rd ${RELEASEDIR}/bsd.rd
+       cp bsd.gz ${RELEASEDIR}/bsd.rd
        chmod a+r ${RELEASEDIR}/bsd.rd
        cp ${FS} ${RELEASEDIR}
        cp ${CDROM} ${RELEASEDIR}

Reply via email to