-# $OpenBSD: Makefile.inc,v 1.10 2013/11/09 22:35:40 miod Exp $
+# $OpenBSD: Makefile.inc,v 1.11 2015/10/15 19:28:32 miod Exp $
# TOP is assumed to be defined by Makefile including this one.
umount -f ${MOUNT_POINT}
vnconfig -u ${VND}
-bootroot: xxboot boot
+bootroot:
dd if=/dev/zero of=${BOOTSYS} bs=512 count=8192
vnconfig -v -c ${VND} ${BOOTSYS}
disklabel -w ${VND} bootroot
newfs -O 0 -m 0 -o space -i 8192 ${VND_RDEV}
- dd if=xxboot of=${VND_RDEV} count=16
mount ${VND_DEV} ${MOUNT_POINT}
- cp boot ${MOUNT_POINT}
+ installboot -vr ${MOUNT_POINT} ${VND} \
+ ${DESTDIR}/usr/mdec/xxboot ${DESTDIR}/usr/mdec/boot
umount -f ${MOUNT_POINT}
vnconfig -u ${VND}
-xxboot boot:
- cd /usr/src/sys/arch/vax/boot;${MAKE}
- cp /usr/src/sys/arch/vax/boot/xxboot/xxboot .
- cp /usr/src/sys/arch/vax/boot/boot/boot .
-
-
unconfig:
-umount -f ${MOUNT_POINT}
-vnconfig -u ${VND} ${IMAGE}
-# $OpenBSD: list,v 1.40 2015/04/13 21:27:07 deraadt Exp $
+# $OpenBSD: list,v 1.41 2015/10/15 19:28:32 miod Exp $
SRCDIRS distrib/special
SRCDIRS sys/arch/vax/stand
COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
SPECIAL cd dev; sh MAKEDEV ramdisk
-# we need the contents of /usr/mdec (XXX)
-# COPY ${DESTDIR}/usr/mdec/* usr/mdec
-
# various files that we need in /etc for the install
COPY ${DESTDIR}/etc/group etc/group
COPY ${CURDIR}/../../miniroot/master.passwd etc/master.passwd
TERMCAP vt100,vt220,dumb usr/share/misc/termcap
COPY ${DESTDIR}/bsd .
-COPY ${DESTDIR}/boot .
TZ
-# $OpenBSD: install.md,v 1.45 2015/06/02 19:54:07 rpe Exp $
+# $OpenBSD: install.md,v 1.46 2015/10/15 19:28:31 miod Exp $
# $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $
#
#
MDMTDEVS='/^[ms]t[0-9][0-9]* /s/ .*//p'
md_installboot() {
- # Use cat to avoid holes created by cp(1)
- cat /mnt/usr/mdec/boot > /mnt/boot
- /sbin/disklabel -B $1
+ if ! installboot -r /mnt ${1}; then
+ echo "\nFailed to install bootblocks."
+ echo "You will not be able to boot OpenBSD from ${1}."
+ exit
+ fi
}
md_prep_disklabel() {
-# $OpenBSD: Makefile,v 1.15 2014/09/21 13:44:45 deraadt Exp $
+# $OpenBSD: Makefile,v 1.16 2015/10/15 19:28:32 miod Exp $
TOP= ${.CURDIR}/..
PID!= echo $$$$
ISOIMAGE!= echo image.${PID}
ISOSIZE= 798600 # 33*11*2200
-BOOT= ${DESTDIR}/usr/mdec/boot
-BOOTXX= ${DESTDIR}/usr/mdec/xxboot
NEWFSOPTS= -t ffs -m 0 -o space -f 1024 -b 8192 -i 8192 -s ${ISOSIZE}
all: ${CDROM}
-${CDROM}: ${BASE} ${XBASE} ${BOOT} ${BOOTXX}
+${CDROM}: ${BASE} ${XBASE}
-rm -f ${.OBJDIR}/image.*
dd if=/dev/zero of=${ISOIMAGE} count=${ISOSIZE}
vnconfig -v -c ${VND} ${ISOIMAGE}
disklabel -w ${VND} ${DISKTYPE}
newfs ${NEWFSOPTS} ${VND_RDEV}
mount ${VND_DEV} ${MOUNT_POINT}
- cp ${BOOT} ${MOUNT_POINT}/
+ installboot -vr ${MOUNT_POINT} ${VND} \
+ ${DESTDIR}/usr/mdec/xxboot ${DESTDIR}/usr/mdec/boot
cp ${RELDIR}/bsd.rd ${MOUNT_POINT}/bsd
mkdir -p ${MOUNT_POINT}/${OSREV}/${MACHINE}
${MOUNT_POINT}/${OSREV}/${MACHINE}/SHA256
# XXX no SHA256.sig
- disklabel -B -b ${BOOTXX} ${VND}
@echo ""
@df -i ${MOUNT_POINT}
@echo ""
-# $OpenBSD: Makefile.inc,v 1.7 2007/06/17 00:28:21 deraadt Exp $
+# $OpenBSD: Makefile.inc,v 1.8 2015/10/15 19:28:32 miod Exp $
IMAGESIZE= 3072
GZIPCMD?= gzip
#NEWFSOPTS_RD= -t ffs -m 0 -o space -f 1024 -i 16384 -s 8192
HOSTCCFLAGS= -DDEBUG -O0
#HOSTCCFLAGS= -DBROKEN_NMAGIC -DDEBUG
-BOOTXX= ${DESTDIR}/usr/mdec/sdboot
-INSTALLBOOT= @true -- # totally incredible
NEWFSOPTS_RD= ${NEWFSOPTS} -i 4096 -s ${IMAGESIZE}
+BOOTXX= ${DESTDIR}/usr/mdec/xxboot
-# $OpenBSD: list.local,v 1.3 2015/04/02 20:51:04 deraadt Exp $
+# $OpenBSD: list.local,v 1.4 2015/10/15 19:28:32 miod Exp $
# $NetBSD: list,v 1.2.4.2 1996/06/26 19:25:00 pk Exp $
# extras
LINK instbin sbin/disklabel
LINK instbin usr/bin/grep usr/bin/egrep usr/bin/fgrep
LINK instbin usr/bin/more usr/bin/less
+LINK instbin usr/sbin/installboot
SYMLINK /tmp var/tmp
SCRIPT ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
SPECIAL cd dev; sh MAKEDEV ramdisk
-# for disklabel(8) -B
-COPY ${DESTDIR}/usr/mdec/xxboot usr/mdec/xxboot
-LINK usr/mdec/xxboot usr/mdec/hpboot
-LINK usr/mdec/xxboot usr/mdec/raboot
-LINK usr/mdec/xxboot usr/mdec/rdboot
-LINK usr/mdec/xxboot usr/mdec/sdboot
-
# various files that we need in /etc for the install
SYMLINK /tmp/fstab.shadow etc/fstab
SYMLINK /tmp/resolv.conf.shadow etc/resolv.conf