summaryrefslogtreecommitdiff
path: root/distrib/sparc64
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/sparc64
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/sparc64')
-rw-r--r--distrib/sparc64/miniroot/Makefile27
-rw-r--r--distrib/sparc64/ramdisk/Makefile32
-rw-r--r--distrib/sparc64/ramdiskB/Makefile26
3 files changed, 43 insertions, 42 deletions
diff --git a/distrib/sparc64/miniroot/Makefile b/distrib/sparc64/miniroot/Makefile
index 3713f5247de..1370607bd41 100644
--- a/distrib/sparc64/miniroot/Makefile
+++ b/distrib/sparc64/miniroot/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.17 2019/04/30 23:37:32 deraadt Exp $
+# $OpenBSD: Makefile,v 1.18 2019/05/03 20:03:59 deraadt Exp $
FS= miniroot${OSrev}.fs
FSSIZE= 5760
@@ -6,6 +6,7 @@ FSDISKTYPE= fakeramdisk
CDROM= cd${OSrev}.iso
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
+RAMDISK= RAMDISK
LISTS= ${.CURDIR}/list
UTILS= ${.CURDIR}/../../miniroot
@@ -21,13 +22,13 @@ ${FS}: bsd.gz
dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE}
vnconfig -v ${FS} > vnd
disklabel -w `cat vnd` ${FSDISKTYPE}
- newfs -m 0 /dev/r`cat vnd`a
+ newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
- install -c -m 555 -o root -g wheel bsd.gz ${MOUNT_POINT}/bsd
install -c -m 555 -o root -g wheel \
- ${DESTDIR}/usr/mdec/ofwbootfd ${MOUNT_POINT}/ofwboot
+ ${DESTDIR}/usr/mdec/ofwboot ${MOUNT_POINT}/ofwboot
installboot -v -r ${MOUNT_POINT} `cat vnd` \
${DESTDIR}/usr/mdec/bootblk ${MOUNT_POINT}/ofwboot
+ install -c -m 555 -o root -g wheel bsd.gz ${MOUNT_POINT}/bsd
df -i ${MOUNT_POINT}
umount ${MOUNT_POINT}
vnconfig -u `cat vnd`
@@ -60,18 +61,18 @@ ${CDROM}: bsd.rd
mksuncd f ${CDROM} ${.OBJDIR}/../miniroot/miniroot${OSrev}.fs
bsd.gz: bsd.rd
- gzip -c -9nv < bsd.rd > bsd.gz
+ objcopy -Sg -R .comment bsd.rd bsd.strip
+ strip ${STRIPOPTS} bsd.strip
+ gzip -9cn bsd.strip > bsd.gz
-bsd.rd: bsd mr.fs
- cp bsd bsd.rd_unz
- rdsetroot bsd.rd_unz mr.fs
- objcopy -Sg -R .comment bsd.rd_unz bsd.rd
- strip ${STRIPOPTS} bsd.rd
+bsd.rd: mr.fs bsd
+ cp bsd bsd.rd
+ rdsetroot bsd.rd mr.fs
bsd:
- cd ${.CURDIR}/../../../sys/arch/sparc64/compile/RAMDISK && \
+ cd ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK} && \
su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/sparc64/compile/RAMDISK/obj/bsd bsd
+ cp -p ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK}/obj/bsd bsd
mr.fs: instbin
rm -rf $@.d
@@ -108,7 +109,7 @@ install:
clean cleandir:
rm -f *.core mr.fs instbin instbin.mk instbin*.cache \
lib*.a lib*.olist instbin.map \
- *.o *.lo *.c bsd bsd.rd{,_unz} bsd.gz bsd.strip ${FS}
+ *.o *.lo *.c bsd bsd.rd bsd.gz bsd.strip ${FS}
rm -rf mr.fs.d
rm -rf ${CDROM} ${.OBJDIR}/cd-dir
diff --git a/distrib/sparc64/ramdisk/Makefile b/distrib/sparc64/ramdisk/Makefile
index 02e68244f05..a0c85834af4 100644
--- a/distrib/sparc64/ramdisk/Makefile
+++ b/distrib/sparc64/ramdisk/Makefile
@@ -1,10 +1,11 @@
-# $OpenBSD: Makefile,v 1.48 2019/04/30 23:37:32 deraadt Exp $
+# $OpenBSD: Makefile,v 1.49 2019/05/03 20:03:59 deraadt Exp $
FS= floppy${OSrev}.fs
FSSIZE= 2880
FSDISKTYPE= floppy
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
+RAMDISK= RAMDISKU1
LISTS= ${.CURDIR}/list
UTILS= ${.CURDIR}/../../miniroot
@@ -14,33 +15,35 @@ MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096
all: ${FS}
-${FS}: bsd.rd
+${FS}: bsd.gz
dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE}
vnconfig -v ${FS} > vnd
disklabel -w `cat vnd` ${FSDISKTYPE}
newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
- install -c -m 555 -o root -g wheel bsd.rd ${MOUNT_POINT}/bsd
install -c -m 555 -o root -g wheel \
- ${DESTDIR}/usr/mdec/ofwbootfd ${MOUNT_POINT}/ofwboot
+ ${DESTDIR}/usr/mdec/ofwboot ${MOUNT_POINT}/ofwboot
installboot -v -r ${MOUNT_POINT} `cat vnd` \
${DESTDIR}/usr/mdec/bootblk ${MOUNT_POINT}/ofwboot
+ install -c -m 555 -o root -g wheel bsd.gz ${MOUNT_POINT}/bsd
df -i ${MOUNT_POINT}
umount ${MOUNT_POINT}
vnconfig -u `cat vnd`
rm -f vnd
-bsd.rd: mr.fs bsd
- cp bsd bsd.rd_unz
- rdsetroot bsd.rd_unz mr.fs
- cp bsd.rd_unz bsd.strip
+bsd.gz: bsd.rd
+ cp bsd.rd bsd.strip
strip -R .SUNW_ctf bsd.strip
- gzip -c -9nv < bsd.strip > bsd.rd
+ 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/sparc64/compile/RAMDISKU1 && \
+ cd ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK} && \
su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/sparc64/compile/RAMDISKU1/obj/bsd bsd
+ cp -p ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK}/obj/bsd bsd
mr.fs: instbin
rm -rf $@.d
@@ -52,11 +55,6 @@ mr.fs: instbin
rm $@.d/instbin
makefs ${MRMAKEFSARGS} $@ $@.d
-bsd:
- cd ${.CURDIR}/../../../sys/arch/sparc64/compile/RAMDISKU1 && \
- su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/sparc64/compile/RAMDISKU1/obj/bsd bsd
-
instbin.mk instbin.cache instbin.c: instbin.conf
crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib \
-c instbin.c -e instbin -m instbin.mk instbin.conf
@@ -79,7 +77,7 @@ install:
clean cleandir:
rm -f *.core mr.fs instbin instbin.mk instbin.cache \
lib*.a lib*.olist instbin.map \
- *.o *.lo *.c bsd bsd.rd bsd.gz ${FLOPPY}
+ *.o *.lo *.c bsd bsd.rd bsd.gz ${FS}
rm -rf mr.fs.d
.include <bsd.obj.mk>
diff --git a/distrib/sparc64/ramdiskB/Makefile b/distrib/sparc64/ramdiskB/Makefile
index 0f7353ab98d..d502a5e1869 100644
--- a/distrib/sparc64/ramdiskB/Makefile
+++ b/distrib/sparc64/ramdiskB/Makefile
@@ -1,10 +1,11 @@
-# $OpenBSD: Makefile,v 1.43 2019/04/30 23:37:32 deraadt Exp $
+# $OpenBSD: Makefile,v 1.44 2019/05/03 20:03:59 deraadt Exp $
FS= floppyB${OSrev}.fs
-FSDISKTYPE= floppy
FSSIZE= 2880
+FSDISKTYPE= floppy
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
+RAMDISK= RAMDISKU5
LISTS= ${.CURDIR}/list
UTILS= ${.CURDIR}/../../miniroot
@@ -20,23 +21,29 @@ ${FS}: bsd.gz
disklabel -w `cat vnd` ${FSDISKTYPE}
newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
- cp bsd.gz ${MOUNT_POINT}/bsd
install -c -m 555 -o root -g wheel \
${DESTDIR}/usr/mdec/ofwboot ${MOUNT_POINT}/ofwboot
installboot -v -r ${MOUNT_POINT} `cat vnd` \
- /usr/mdec/bootblk ${MOUNT_POINT}/ofwboot
+ ${DESTDIR}/usr/mdec/bootblk ${MOUNT_POINT}/ofwboot
+ install -c -m 555 -o root -g wheel bsd.gz ${MOUNT_POINT}/bsd
df -i ${MOUNT_POINT}
umount ${MOUNT_POINT}
vnconfig -u `cat vnd`
rm -f vnd
bsd.gz: bsd.rd
- gzip -c -9nv < bsd.rd > bsd.gz
+ cp bsd.rd bsd.strip
+ strip -R .SUNW_ctf bsd.strip
+ gzip -9cn bsd.strip > bsd.gz
-bsd.rd: bsd mr.fs
+bsd.rd: mr.fs bsd
cp bsd bsd.rd
rdsetroot bsd.rd mr.fs
- strip -R .SUNW_ctf bsd.rd
+
+bsd:
+ cd ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK} && \
+ su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
+ cp -p ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK}/obj/bsd bsd
mr.fs: instbin
rm -rf $@.d
@@ -48,11 +55,6 @@ mr.fs: instbin
rm $@.d/instbin
makefs ${MRMAKEFSARGS} $@ $@.d
-bsd:
- cd ${.CURDIR}/../../../sys/arch/sparc64/compile/RAMDISKU5 && \
- su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/sparc64/compile/RAMDISKU5/obj/bsd bsd
-
instbin.mk instbin.cache instbin.c: instbin.conf
crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib \
-c instbin.c -e instbin -m instbin.mk instbin.conf