summaryrefslogtreecommitdiff
path: root/distrib/i386
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-05-03 20:04:00 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-05-03 20:04:00 +0000
commitf4d1d40f84c06cfca32e8a6713275b7561d2c0d4 (patch)
tree3554042028da01bab315c7e330c123ff1f6c1b44 /distrib/i386
parent5dea246e02f9e7cb55b01c138de3fbe57bb27664 (diff)
Further removal of differences (using install instead of cp, sorting
chunks in a specified order, using a few variables, performing bsd.rd to bsd.gz conversion as similar as possible)
Diffstat (limited to 'distrib/i386')
-rw-r--r--distrib/i386/iso/Makefile7
-rw-r--r--distrib/i386/ramdisk/Makefile11
-rw-r--r--distrib/i386/ramdisk_cd/Makefile12
3 files changed, 16 insertions, 14 deletions
diff --git a/distrib/i386/iso/Makefile b/distrib/i386/iso/Makefile
index 8403ae8353a..0b53c62720e 100644
--- a/distrib/i386/iso/Makefile
+++ b/distrib/i386/iso/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.25 2019/05/01 20:53:55 deraadt Exp $
+# $OpenBSD: Makefile,v 1.26 2019/05/03 20:03:58 deraadt Exp $
FS= install${OSrev}.fs
FSSIZE= 921600
@@ -29,9 +29,10 @@ ${FS}: ${BASE} ${XBASE} bsd.gz
mount /dev/`cat vnd`a ${MOUNT_POINT}
cp ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot
strip -R .comment -R .SUNW_ctf ${MOUNT_POINT}/boot
- dd if=bsd.gz of=${MOUNT_POINT}/bsd bs=512
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
+ ln ${MOUNT_POINT}/bsd ${MOUNT_POINT}/bsd.rd
mkdir -p ${MOUNT_POINT}/${OSREV}/${MACHINE}
mkdir -p ${MOUNT_POINT}/etc
echo "set image /${OSREV}/${MACHINE}/bsd.rd" > ${MOUNT_POINT}/etc/boot.conf
@@ -76,7 +77,7 @@ bsd.gz: bsd.rd
cp bsd.rd bsd.strip
strip bsd.strip
strip -R .comment -R .SUNW_ctf bsd.strip
- gzip -c9n bsd.strip > bsd.gz
+ gzip -9cn bsd.strip > bsd.gz
bsd.rd: ${BSDRD}
cp ${BSDRD} bsd.rd
diff --git a/distrib/i386/ramdisk/Makefile b/distrib/i386/ramdisk/Makefile
index 14d8d7b7610..685e2eab39b 100644
--- a/distrib/i386/ramdisk/Makefile
+++ b/distrib/i386/ramdisk/Makefile
@@ -1,10 +1,11 @@
-# $OpenBSD: Makefile,v 1.5 2019/04/30 23:25:19 deraadt Exp $
+# $OpenBSD: Makefile,v 1.6 2019/05/03 20:03:58 deraadt Exp $
FS= floppy${OSrev}.fs
FSSIZE= 2880
FSDISKTYPE= floppy3
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
+RAMDISK= RAMDISK
LISTS= ${.CURDIR}/../common/list ${.CURDIR}/list.local
UTILS= ${.CURDIR}/../../miniroot
@@ -25,7 +26,7 @@ ${FS}: bsd.gz
strip -R .comment -R .SUNW_ctf ${.OBJDIR}/boot
installboot -v -r ${MOUNT_POINT} `cat vnd` \
${DESTDIR}/usr/mdec/biosboot ${.OBJDIR}/boot
- dd if=bsd.gz of=${MOUNT_POINT}/bsd bs=512
+ install -c -m 555 -o root -g wheel bsd.gz ${MOUNT_POINT}/bsd
df -i ${MOUNT_POINT}
umount ${MOUNT_POINT}
vnconfig -u `cat vnd`
@@ -38,16 +39,16 @@ bsd.gz: bsd.rd
cp bsd.rd bsd.strip
strip bsd.strip
strip -R .comment -R .SUNW_ctf bsd.strip
- gzip -c9n bsd.strip > bsd.gz
+ gzip -9cn bsd.strip > bsd.gz
bsd.rd: mr.fs bsd
cp bsd bsd.rd
rdsetroot bsd.rd mr.fs
bsd:
- cd ${.CURDIR}/../../../sys/arch/i386/compile/RAMDISK && \
+ cd ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK} && \
su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/i386/compile/RAMDISK/obj/bsd bsd
+ cp -p ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK}/obj/bsd bsd
mr.fs: instbin
rm -rf $@.d
diff --git a/distrib/i386/ramdisk_cd/Makefile b/distrib/i386/ramdisk_cd/Makefile
index 56f7243ae79..1023939731a 100644
--- a/distrib/i386/ramdisk_cd/Makefile
+++ b/distrib/i386/ramdisk_cd/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.12 2019/05/01 20:53:55 deraadt Exp $
+# $OpenBSD: Makefile,v 1.13 2019/05/03 20:03:58 deraadt Exp $
FS= miniroot${OSrev}.fs
FSSIZE= 7936
@@ -6,11 +6,11 @@ FSDISKTYPE= mini34
CDROM= cd${OSrev}.iso
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
+RAMDISK= RAMDISK_CD
LISTS= ${.CURDIR}/../common/list ${.CURDIR}/list.local
UTILS= ${.CURDIR}/../../miniroot
-RAMDISK=RAMDISK_CD
LBA=1
all: ${FS} ${CDROM}
@@ -29,7 +29,7 @@ ${FS}: bsd.gz
strip -R .comment -R .SUNW_ctf ${.OBJDIR}/boot
installboot -v -r ${MOUNT_POINT} `cat vnd` \
${DESTDIR}/usr/mdec/biosboot ${.OBJDIR}/boot
- dd if=bsd.gz of=${MOUNT_POINT}/bsd bs=512
+ install -c -m 555 -o root -g wheel bsd.gz ${MOUNT_POINT}/bsd
df -i ${MOUNT_POINT}
umount ${MOUNT_POINT}
vnconfig -u `cat vnd`
@@ -58,16 +58,16 @@ bsd.gz: bsd.rd
cp bsd.rd bsd.strip
strip bsd.strip
strip -R .comment -R .SUNW_ctf bsd.strip
- gzip -c9n bsd.strip > bsd.gz
+ gzip -9cn bsd.strip > bsd.gz
bsd.rd: mr.fs bsd
cp bsd bsd.rd
rdsetroot bsd.rd mr.fs
bsd:
- cd ${.CURDIR}/../../../sys/arch/i386/compile/${RAMDISK} && \
+ cd ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK} && \
su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/i386/compile/${RAMDISK}/obj/bsd bsd
+ cp -p ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK}/obj/bsd bsd
mr.fs: instbin
rm -rf $@.d