Re: compress sparc64 bsd.rd

2021-01-03 Thread Miod Vallat
> > Rebooting with command: boot bsd.rd.gz   
> 
> This is interesting. The change has it just being named bsd.rd, without the
> .gz.

That's just me testing a compressed bsd.rd.



Re: compress sparc64 bsd.rd

2021-01-03 Thread Kurt Mosiejczuk
On Sun, Jan 03, 2021 at 07:19:51PM +, Miod Vallat wrote:
> > Since this change went in, bsd.rd doesn't boot unless I uncompress it first.

> > upgrade detected: switching to /bsd.upgrade
> > Trying /bsd.upgrade...
> > NOTE: random seed is being reused.
> > Booting /pci@400/pci@2/pci@0/pci@c/nvme@0/disk@1:a/bsd.upgrade
> > 4246528@0x100+5120@0x140cc00+3248796@0x1c0+945508@0x1f1929c 
> > OF_map_phys(ff84,8192,fee5,-1) failed
> > no space for symbol table
> > Program terminated

> What machine and OpenBoot version are you using?

> gzipped kernels work here (as they used to) on:

> Sun Ultra 1 UPA/SBus (UltraSPARC 167MHz), No Keyboard
> OpenBoot 3.1, 128 MB memory installed, Serial #8592590.
> Ethernet address 8:0:20:83:1c:ce, Host ID: 80831cce.

T4-1 LDOM. One of the build cluster.

SPARC T4-1, No Keyboard
Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.38.9, 7.5000 GB memory available, Serial #83498844.
Ethernet address 0:14:4f:fa:17:5c, Host ID: 84fa175c.



Boot device: /pci@400/pci@1/pci@0/pci@0/nvme@0/disk@1  File and args: 
OpenBSD IEEE 1275 Bootblock 2.1
..>> OpenBSD BOOT 1.21

ERROR: /iscsi-hba: No iscsi-network-bootpath property
upgrade detected: switching to /bsd.upgrade
Trying /bsd.upgrade...
NOTE: random seed is being reused.
Booting /pci@400/pci@1/pci@0/pci@0/nvme@0/disk@1:a/bsd.upgrade
4246528@0x100+5120@0x140cc00+3248796@0x1c0+945508@0x1f1929c 
OF_map_phys(3f842000,8192,fee52000,-1) failed
no space for symbol table
Program terminated


> Rebooting with command: boot bsd.rd.gz   

This is interesting. The change has it just being named bsd.rd, without the
.gz.

--Kurt

> Boot device: /sbus/SUNW,fas@e,880/sd@0,0  File and args: bsd.rd.gz
> OpenBSD IEEE 1275 Bootblock 2.1
> ..>> OpenBSD BOOT 1.21
> Booting /sbus@1f,0/SUNW,fas@e,880/sd@0,0:a/bsd.rd.gz
> 4249968@0x100+1680@0x140d970+3249820@0x1c0+944484@0x1f1969c 
> symbols @ 0xffe88400 249148+165+369384+224195 start=0x100
> console is /sbus@1f,0/zs@f,110:a
> Copyright (c) 1982, 1986, 1989, 1991, 1993
> The Regents of the University of California.  All rights reserved.
> Copyright (c) 1995-2020 OpenBSD. All rights reserved.  https://www.OpenBSD.org
> (etc, etc)



Re: compress sparc64 bsd.rd

2021-01-03 Thread Miod Vallat
> Since this change went in, bsd.rd doesn't boot unless I uncompress it first.
> 
> upgrade detected: switching to /bsd.upgrade
> Trying /bsd.upgrade...
> NOTE: random seed is being reused.
> Booting /pci@400/pci@2/pci@0/pci@c/nvme@0/disk@1:a/bsd.upgrade
> 4246528@0x100+5120@0x140cc00+3248796@0x1c0+945508@0x1f1929c 
> OF_map_phys(ff84,8192,fee5,-1) failed
> no space for symbol table
> Program terminated

What machine and OpenBoot version are you using?

gzipped kernels work here (as they used to) on:

Sun Ultra 1 UPA/SBus (UltraSPARC 167MHz), No Keyboard
OpenBoot 3.1, 128 MB memory installed, Serial #8592590.
Ethernet address 8:0:20:83:1c:ce, Host ID: 80831cce.



Rebooting with command: boot bsd.rd.gz   
Boot device: /sbus/SUNW,fas@e,880/sd@0,0  File and args: bsd.rd.gz
OpenBSD IEEE 1275 Bootblock 2.1
..>> OpenBSD BOOT 1.21
Booting /sbus@1f,0/SUNW,fas@e,880/sd@0,0:a/bsd.rd.gz
4249968@0x100+1680@0x140d970+3249820@0x1c0+944484@0x1f1969c 
symbols @ 0xffe88400 249148+165+369384+224195 start=0x100
console is /sbus@1f,0/zs@f,110:a
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2020 OpenBSD. All rights reserved.  https://www.OpenBSD.org
(etc, etc)



Re: compress sparc64 bsd.rd

2021-01-03 Thread Kurt Mosiejczuk
On Wed, Dec 30, 2020 at 08:37:49PM +, Miod Vallat 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.

Since this change went in, bsd.rd doesn't boot unless I uncompress it first.

upgrade detected: switching to /bsd.upgrade
Trying /bsd.upgrade...
NOTE: random seed is being reused.
Booting /pci@400/pci@2/pci@0/pci@c/nvme@0/disk@1:a/bsd.upgrade
4246528@0x100+5120@0x140cc00+3248796@0x1c0+945508@0x1f1929c 
OF_map_phys(ff84,8192,fee5,-1) failed
no space for symbol table
Program terminated

--Kurt

> Index: miniroot/Makefile
> ===
> RCS file: /OpenBSD/src/distrib/sparc64/miniroot/Makefile,v
> retrieving revision 1.23
> diff -u -p -r1.23 Makefile
> --- miniroot/Makefile 18 May 2020 06:20:44 -  1.23
> +++ miniroot/Makefile 30 Dec 2020 20:35:55 -
> @@ -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}
> 



Re: compress sparc64 bsd.rd

2021-01-02 Thread Theo de Raadt
Miod Vallat  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 -  1.17
+++ distrib/alpha/miniroot/Makefile 31 Dec 2020 07:42:06 -
@@ -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 -   1.39
+++ distrib/amd64/iso/Makefile  31 Dec 2020 22:52:06 -
@@ -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 -  1.23
+++ distrib/amd64/ramdisk_cd/Makefile   31 Dec 2020 22:52:13 -
@@ -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 -   1.29
+++ distrib/i386/iso/Makefile   31 Dec 2020 22:52:43 -
@@ -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/Makefile18 May 202

compress sparc64 bsd.rd

2020-12-30 Thread Miod Vallat
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.

Index: miniroot/Makefile
===
RCS file: /OpenBSD/src/distrib/sparc64/miniroot/Makefile,v
retrieving revision 1.23
diff -u -p -r1.23 Makefile
--- miniroot/Makefile   18 May 2020 06:20:44 -  1.23
+++ miniroot/Makefile   30 Dec 2020 20:35:55 -
@@ -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}