summaryrefslogtreecommitdiff
path: root/distrib/sparc64/ramdisk/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'distrib/sparc64/ramdisk/Makefile')
-rw-r--r--distrib/sparc64/ramdisk/Makefile32
1 files changed, 15 insertions, 17 deletions
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>