summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--distrib/alpha/miniroot/Makefile32
-rw-r--r--distrib/amd64/iso/Makefile7
-rw-r--r--distrib/amd64/ramdiskA/Makefile11
-rw-r--r--distrib/amd64/ramdisk_cd/Makefile11
-rw-r--r--distrib/arm64/ramdisk/Makefile17
-rw-r--r--distrib/armv7/miniroot/Makefile.inc67
-rw-r--r--distrib/armv7/ramdisk/Makefile8
-rw-r--r--distrib/hppa/ramdisk/Makefile13
-rw-r--r--distrib/i386/iso/Makefile7
-rw-r--r--distrib/i386/ramdisk/Makefile11
-rw-r--r--distrib/i386/ramdisk_cd/Makefile12
-rw-r--r--distrib/landisk/ramdisk/Makefile27
-rw-r--r--distrib/loongson/ramdisk/Makefile16
-rw-r--r--distrib/luna88k/ramdisk/Makefile17
-rw-r--r--distrib/macppc/ramdisk/Makefile12
-rw-r--r--distrib/octeon/ramdisk/Makefile11
-rw-r--r--distrib/ramdisk/Makefile10
-rw-r--r--distrib/sgi/cdfs/Makefile6
-rw-r--r--distrib/sgi/iso/Makefile4
-rw-r--r--distrib/sgi/ramdisk/Makefile6
-rw-r--r--distrib/socppc/ramdisk/Makefile41
-rw-r--r--distrib/sparc64/miniroot/Makefile27
-rw-r--r--distrib/sparc64/ramdisk/Makefile32
-rw-r--r--distrib/sparc64/ramdiskB/Makefile26
24 files changed, 214 insertions, 217 deletions
diff --git a/distrib/alpha/miniroot/Makefile b/distrib/alpha/miniroot/Makefile
index 96fea74e1e9..39b8a4e025a 100644
--- a/distrib/alpha/miniroot/Makefile
+++ b/distrib/alpha/miniroot/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.13 2019/05/01 20:53:35 deraadt Exp $
+# $OpenBSD: Makefile,v 1.14 2019/05/03 20:03:57 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= RAMDISKBIG
LISTS= ${.CURDIR}/list
UTILS= ${.CURDIR}/../../miniroot
@@ -17,30 +18,30 @@ MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=8192
all: ${FS} ${CDROM}
-${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 /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.rd ${MOUNT_POINT}/bsd
install -c -m 555 -o root -g wheel \
${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot
/usr/mdec/installboot -v \
${MOUNT_POINT}/boot ${DESTDRIR}/usr/mdec/bootxx `cat vnd`
+ 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
-${CDROM}: bsd.rd
+${CDROM}: bsd.gz
rm -rf ${.OBJDIR}/cd-dir
mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE}
- cp bsd.rd ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE}
+ cp bsd.gz ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE}
# make sure right kernel is in /
- ln ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE}/bsd.rd ${.OBJDIR}/cd-dir/bsd.rd
+ ln ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE}/bsd.gz ${.OBJDIR}/cd-dir/bsd.rd
ln ${.OBJDIR}/cd-dir/bsd.rd ${.OBJDIR}/cd-dir/bsd
cp ${DESTDIR}/usr/mdec/boot ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE}
@@ -62,20 +63,19 @@ ${CDROM}: bsd.rd
vnconfig -u `cat vnd`
rm -f vnd
-bsd.rd: bsd.rd_unz
- objcopy -Sg -R .comment bsd.rd_unz bsd.strip
+bsd.gz: bsd.rd
+ objcopy -Sg -R .comment bsd.rd bsd.strip
strip ${STRIPOPTS} bsd.strip
- gzip -c -9nv bsd.strip > bsd.rd
+ gzip -9cn bsd.strip > bsd.gz
-bsd.rd_unz: bsd mr.fs
- cp bsd bsd.rd_unz
- rdsetroot bsd.rd_unz mr.fs
- strip -R .SUNW_ctf -R .shstrtab bsd.rd_unz
+bsd.rd: mr.fs bsd
+ cp bsd bsd.rd
+ rdsetroot bsd.rd mr.fs
bsd:
- cd ${.CURDIR}/../../../sys/arch/alpha/compile/RAMDISKBIG && \
+ cd ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK} && \
su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/alpha/compile/RAMDISKBIG/obj/bsd bsd
+ cp -p ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK}/obj/bsd bsd
mr.fs: instbin
rm -rf $@.d
diff --git a/distrib/amd64/iso/Makefile b/distrib/amd64/iso/Makefile
index e92f8fcd563..400c0da03df 100644
--- a/distrib/amd64/iso/Makefile
+++ b/distrib/amd64/iso/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.32 2019/05/01 20:53:55 deraadt Exp $
+# $OpenBSD: Makefile,v 1.33 2019/05/03 20:03:58 deraadt Exp $
FS= install${OSrev}.fs
FSSIZE= 921536
@@ -45,12 +45,13 @@ ${FS}: ${BASE} ${XBASE} bsd.gz
cp ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot
strip ${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
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
+ ln ${MOUNT_POINT}/bsd ${MOUNT_POINT}/bsd.rd
cp -p ${BASE} ${MOUNT_POINT}/${OSREV}/${MACHINE}
cp -p ${XBASE} ${MOUNT_POINT}/${OSREV}/${MACHINE}
@@ -98,7 +99,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/amd64/ramdiskA/Makefile b/distrib/amd64/ramdiskA/Makefile
index 60171d11600..fd0de7b0b2d 100644
--- a/distrib/amd64/ramdiskA/Makefile
+++ b/distrib/amd64/ramdiskA/Makefile
@@ -1,10 +1,11 @@
-# $OpenBSD: Makefile,v 1.6 2019/04/30 23:25:19 deraadt Exp $
+# $OpenBSD: Makefile,v 1.7 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
@@ -24,7 +25,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`
@@ -37,16 +38,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/amd64/compile/RAMDISK && \
+ cd ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK} && \
su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/amd64/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/amd64/ramdisk_cd/Makefile b/distrib/amd64/ramdisk_cd/Makefile
index d710e75961e..10c989576c2 100644
--- a/distrib/amd64/ramdisk_cd/Makefile
+++ b/distrib/amd64/ramdisk_cd/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.18 2019/05/01 20:53:55 deraadt Exp $
+# $OpenBSD: Makefile,v 1.19 2019/05/03 20:03:58 deraadt Exp $
FS= miniroot${OSrev}.fs
FSSIZE= 9600
@@ -6,6 +6,7 @@ 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
@@ -31,7 +32,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`
@@ -60,16 +61,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/amd64/compile/RAMDISK_CD && \
+ cd ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK} && \
su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/amd64/compile/RAMDISK_CD/obj/bsd bsd
+ cp -p ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK}/obj/bsd bsd
mr.fs: instbin
rm -rf $@.d
diff --git a/distrib/arm64/ramdisk/Makefile b/distrib/arm64/ramdisk/Makefile
index 5f5baa52b9d..b069a36fb0d 100644
--- a/distrib/arm64/ramdisk/Makefile
+++ b/distrib/arm64/ramdisk/Makefile
@@ -1,10 +1,11 @@
-# $OpenBSD: Makefile,v 1.13 2019/04/30 23:25:19 deraadt Exp $
+# $OpenBSD: Makefile,v 1.14 2019/05/03 20:03:58 deraadt Exp $
FS= miniroot${OSrev}.fs
FSSIZE= 43008
FSDISKTYPE= miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
+RAMDISK= RAMDISK
MSDOSSTART= 8192
MSDOSSIZE= 8192
@@ -44,11 +45,6 @@ ${FS}: bsd.rd
| fdisk -e `cat vnd` >/dev/null
echo 'a a\n\n\n\nw\nq\n' | disklabel -E `cat vnd` >/dev/null
newfs -t msdos ${NEWFS_ARGS_msdos} /dev/r`cat vnd`i
- newfs -m 0 -o space -i 4096 /dev/r`cat vnd`a
- mount /dev/`cat vnd`a ${MOUNT_POINT}
- cp bsd.rd ${MOUNT_POINT}/bsd.rd
- ln ${MOUNT_POINT}/bsd.rd ${MOUNT_POINT}/bsd
- umount ${MOUNT_POINT}
mount ${MOUNT_ARGS_msdos} /dev/`cat vnd`i ${MOUNT_POINT}
.for FILE in ${PIFILES}
cp ${PRPI}/${FILE} ${MOUNT_POINT}/
@@ -60,6 +56,11 @@ ${FS}: bsd.rd
echo 'arm_64bit=1\nenable_uart=1\ndevice_tree_address=0x02600000\nkernel=u-boot.bin' > ${MOUNT_POINT}/config.txt
dd if=${PUBOOT}/pine64_plus/u-boot-sunxi-with-spl.bin \
of=/dev/r`cat vnd`c bs=1024 seek=8
+ umount ${MOUNT_POINT}
+ 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
+ ln ${MOUNT_POINT}/bsd ${MOUNT_POINT}/bsd.rd
df -i ${MOUNT_POINT}
umount ${MOUNT_POINT}
vnconfig -u `cat vnd`
@@ -70,9 +71,9 @@ bsd.rd: mr.fs bsd
rdsetroot bsd.rd mr.fs
bsd:
- cd ${.CURDIR}/../../../sys/arch/arm64/compile/RAMDISK && \
+ cd ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK} && \
su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/arm64/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/armv7/miniroot/Makefile.inc b/distrib/armv7/miniroot/Makefile.inc
index efb49489804..9f1b86f52ba 100644
--- a/distrib/armv7/miniroot/Makefile.inc
+++ b/distrib/armv7/miniroot/Makefile.inc
@@ -1,44 +1,30 @@
+# $OpenBSD: Makefile.inc,v 1.23 2019/05/03 20:03:58 deraadt Exp $
-IMAGE= miniroot-${BOARD}-${OSrev}.fs
-MKUBOOT?= mkuboot
-
+FS= miniroot-${BOARD}-${OSrev}.fs
+FSSIZE= 36864 # ffs+msdos, actually
MOUNT_POINT= /mnt
+MKUBOOT?= mkuboot
+
DISKTYPE= miniroot
-NBLKS= 36864
MSDOSSTART= 2048
MSDOSSIZE= 4096
FFSSTART!= expr ${MSDOSSTART} + ${MSDOSSIZE}
-FS?= msdos
-PART_ID?=C
-
-NEWFS_ARGS_msdos=-L boot
-MOUNT_ARGS_msdos=-o-l
-
PDTB= /usr/local/share/dtb/arm
PUBOOT= /usr/local/share/u-boot
-cleandir: clean
-clean:
- rm -f ${IMAGE}
-
-.ifndef DESTDIR
-all ${IMAGE}:
- @echo setenv DESTDIR before making a ramdisk!
- @false
-.else
-all: ${IMAGE}
-
-${IMAGE}: rd_setup do_files rd_teardown
+all: ${FS}
-.endif
+${FS}: bsd.rd
+ dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE}
+ vnconfig -v -t ${DISKTYPE} ${FS} > vnd
+ echo 'u\ne 0\nC\nn\n${MSDOSSTART}\n${MSDOSSIZE}\ne 3\nA6\nn\n${FFSSTART}\n*\nf 0\nw\nq\n' \
+ | fdisk -e `cat vnd` >/dev/null
+ echo 'a a\n\n\n\nw\nq\n' | disklabel -E `cat vnd` >/dev/null
+ newfs -t msdos -L boot /dev/r`cat vnd`i
+ mount -o-l /dev/`cat vnd`i ${MOUNT_POINT}
-do_files:
- cp ${.OBJDIR}/../../ramdisk/bsd.rd ${MOUNT_POINT}/bsd.rd
- ln ${MOUNT_POINT}/bsd.rd ${MOUNT_POINT}/bsd
- -umount ${MOUNT_POINT}
- mount ${MOUNT_ARGS_msdos} /dev/`cat vnd`i ${MOUNT_POINT}
.for DTB in ${DTBS}
cp ${PDTB}/${DTB} ${MOUNT_POINT}/
.endfor
@@ -57,34 +43,33 @@ do_files:
dd if=${PUBOOT}/${UBOOT}/u-boot-sunxi-with-spl.bin \
of=/dev/r`cat vnd`c bs=1024 seek=8
.endif
+
mkdir -p ${MOUNT_POINT}/efi/boot
cp /usr/mdec/BOOTARM.EFI ${MOUNT_POINT}/efi/boot/bootarm.efi
+ umount ${MOUNT_POINT}
-rd_setup:
- dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS}
- vnconfig -v -t ${DISKTYPE} ${IMAGE} > vnd
- echo 'u\ne 0\n${PART_ID}\nn\n${MSDOSSTART}\n${MSDOSSIZE}\ne 3\nA6\nn\n${FFSSTART}\n*\nf 0\nw\nq\n' \
- | fdisk -e `cat vnd` >/dev/null
- echo 'a a\n\n\n\nw\nq\n' | disklabel -E `cat vnd` >/dev/null
- newfs -t msdos ${NEWFS_ARGS_msdos} /dev/r`cat vnd`i
- newfs -m 0 -o space -i 4096 /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}
-
-rd_teardown:
+ install -c -m 555 -o root -g wheel bsd.rd ${MOUNT_POINT}/bsd
+ ln ${MOUNT_POINT}/bsd ${MOUNT_POINT}/bsd.rd
df -i ${MOUNT_POINT}
umount ${MOUNT_POINT}
vnconfig -u `cat vnd`
rm -f vnd
+bsd.rd:
+ cp ${.OBJDIR}/../../ramdisk/bsd.rd bsd.rd
+
unconfig:
-umount -f ${MOUNT_POINT}
-[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd
-.PRECIOUS: ${IMAGE}
-
.ifdef RELEASEDIR
install:
- cp ${IMAGE} ${RELEASEDIR}
+ cp ${FS} ${RELEASEDIR}
.endif
+clean cleandir:
+ rm -f ${FS}
+
.include <bsd.obj.mk>
diff --git a/distrib/armv7/ramdisk/Makefile b/distrib/armv7/ramdisk/Makefile
index b249675956f..1933368c3d8 100644
--- a/distrib/armv7/ramdisk/Makefile
+++ b/distrib/armv7/ramdisk/Makefile
@@ -1,6 +1,7 @@
-# $OpenBSD: Makefile,v 1.26 2019/04/30 23:25:19 deraadt Exp $
+# $OpenBSD: Makefile,v 1.27 2019/05/03 20:03:58 deraadt Exp $
MTREE= ${UTILS}/mtree.conf
+RAMDISK= RAMDISK
LISTS= ${.CURDIR}/list
UTILS= ${.CURDIR}/../../miniroot
@@ -15,10 +16,9 @@ bsd.rd: mr.fs bsd
rdsetroot bsd.rd mr.fs
bsd:
- cd ${.CURDIR}/../../../sys/arch/armv7/compile/RAMDISK && \
+ cd ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK} && \
su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/armv7/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/hppa/ramdisk/Makefile b/distrib/hppa/ramdisk/Makefile
index 5d1b1ba2fd8..51d47f14f8c 100644
--- a/distrib/hppa/ramdisk/Makefile
+++ b/distrib/hppa/ramdisk/Makefile
@@ -1,8 +1,9 @@
-# $OpenBSD: Makefile,v 1.43 2019/04/30 23:25:19 deraadt Exp $
+# $OpenBSD: Makefile,v 1.44 2019/05/03 20:03:58 deraadt Exp $
LIF= lif${OSrev}.fs
CDROM= cd${OSrev}.iso
MTREE= ${UTILS}/mtree.conf
+RAMDISK= RAMDISK
LISTS= ${.CURDIR}/../list ${.CURDIR}/list.local
UTILS= ${.CURDIR}/../../miniroot
@@ -28,18 +29,18 @@ ${CDROM}: bsd.rd
bs=32k count=1 conv=notrunc
dd if=/dev/zero bs=64k count=1 >> ${.OBJDIR}/${CDROM}
+bsd.lif: bsd.rd
+ (cat bsd.rd ; dd if=/dev/zero count=1) | gzip -9n > bsd.lif
+
bsd.rd: mr.fs bsd
cp bsd bsd.rd
rdsetroot bsd.rd mr.fs
strip -R .SUNW_ctf bsd.rd
-bsd.lif: bsd.rd
- (cat bsd.rd ; dd if=/dev/zero count=1) | gzip -9nv > bsd.lif
-
bsd:
- cd ${.CURDIR}/../../../sys/arch/hppa/compile/RAMDISK && \
+ cd ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK} && \
su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/hppa/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/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
diff --git a/distrib/landisk/ramdisk/Makefile b/distrib/landisk/ramdisk/Makefile
index 8ab59394e40..f2fefbfa953 100644
--- a/distrib/landisk/ramdisk/Makefile
+++ b/distrib/landisk/ramdisk/Makefile
@@ -1,10 +1,11 @@
-# $OpenBSD: Makefile,v 1.29 2019/05/01 22:55:06 deraadt Exp $
+# $OpenBSD: Makefile,v 1.30 2019/05/03 20:03:58 deraadt Exp $
FS= miniroot${OSrev}.fs
FSSIZE= 5120
FSDISKTYPE= miniroot2.5M
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
+RAMDISK= RAMDISK
LISTS= ${.CURDIR}/list
UTILS= ${.CURDIR}/../../miniroot
@@ -12,32 +13,37 @@ UTILS= ${.CURDIR}/../../miniroot
MRDISKTYPE= rdroot2.5M
MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096
-# minfree, opt, b/i trks, sects, cpg
-NEWFSARGS= -m 0 -o space -i 4096
-
all: ${FS}
-${FS}: bsd.rd
+${FS}: bsd.gz
dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE}
vnconfig -v -t ${FSDISKTYPE} ${FS} > vnd
fdisk -i -y `cat vnd`
fdisk -u -y -f ${DESTDIR}/usr/mdec/mbr `cat vnd`
disklabel -w `cat vnd` ${FSDISKTYPE}
- newfs ${NEWFSARGS} /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}
installboot -vr ${MOUNT_POINT} `cat vnd` \
${DESTDIR}/usr/mdec/xxboot ${DESTDIR}/usr/mdec/boot
- gzip -c < ${.OBJDIR}/bsd.rd > ${MOUNT_POINT}/bsd.rd
- ln ${MOUNT_POINT}/bsd.rd ${MOUNT_POINT}/bsd
+ install -c -m 555 -o root -g wheel bsd.gz ${MOUNT_POINT}/bsd
+ ln ${MOUNT_POINT}/bsd ${MOUNT_POINT}/bsd.rd
df -i ${MOUNT_POINT}
umount ${MOUNT_POINT}
vnconfig -u `cat vnd`
rm -f vnd
+bsd.gz: bsd.rd
+ gzip -9cn bsd.rd > bsd.gz
+
bsd.rd: mr.fs bsd
cp bsd bsd.rd
rdsetroot bsd.rd mr.fs
+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
install -d -o root -g wheel $@.d
@@ -48,11 +54,6 @@ mr.fs: instbin
rm $@.d/instbin
makefs ${MRMAKEFSARGS} $@ $@.d
-bsd:
- cd ${.CURDIR}/../../../sys/arch/landisk/compile/RAMDISK && \
- su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/landisk/compile/RAMDISK/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
diff --git a/distrib/loongson/ramdisk/Makefile b/distrib/loongson/ramdisk/Makefile
index 3043e8f7be7..b9be639e5a2 100644
--- a/distrib/loongson/ramdisk/Makefile
+++ b/distrib/loongson/ramdisk/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.23 2019/05/01 22:55:58 deraadt Exp $
+# $OpenBSD: Makefile,v 1.24 2019/05/03 20:03:58 deraadt Exp $
FS= miniroot${OSrev}.fs
FSSIZE= 18432
@@ -6,6 +6,7 @@ FSDISKTYPE= miniroot
CDROM= cd${OSrev}.iso
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
+RAMDISK= RAMDISK
LISTS= ${.CURDIR}/list
UTILS= ${.CURDIR}/../../miniroot
@@ -22,7 +23,8 @@ ${FS}: bsd.rd
echo 'w\ny\nq\n' | disklabel -E `cat vnd` > /dev/null
newfs_ext2fs /dev/r`cat vnd`i
mount /dev/`cat vnd`i ${MOUNT_POINT}
- cp ${.OBJDIR}/bsd.rd ${MOUNT_POINT}/bsd.rd
+ install -c -m 555 -o root -g wheel bsd.gz ${MOUNT_POINT}/bsd
+ ln ${MOUNT_POINT}/bsd ${MOUNT_POINT}/bsd.rd
df -i ${MOUNT_POINT}
-umount ${MOUNT_POINT}
vnconfig -u `cat vnd`
@@ -45,6 +47,11 @@ bsd.rd: mr.fs bsd
cp bsd bsd.rd
rdsetroot bsd.rd mr.fs
+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
install -d -o root -g wheel $@.d
@@ -55,11 +62,6 @@ mr.fs: instbin
rm $@.d/instbin
makefs ${MRMAKEFSARGS} $@ $@.d
-bsd:
- cd ${.CURDIR}/../../../sys/arch/loongson/compile/RAMDISK && \
- su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/loongson/compile/RAMDISK/obj/bsd bsd
-
instbin.mk instbin.cache instbin.c: instbin.conf
crunchgen -E -M -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib \
-c instbin.c -e instbin -m instbin.mk instbin.conf
diff --git a/distrib/luna88k/ramdisk/Makefile b/distrib/luna88k/ramdisk/Makefile
index 2b6b9d66b5e..cee8a490c43 100644
--- a/distrib/luna88k/ramdisk/Makefile
+++ b/distrib/luna88k/ramdisk/Makefile
@@ -1,10 +1,11 @@
-# $OpenBSD: Makefile,v 1.26 2019/04/30 21:14:59 deraadt Exp $
+# $OpenBSD: Makefile,v 1.27 2019/05/03 20:03:58 deraadt Exp $
FS= miniroot${OSrev}.fs
FSSIZE= 8192
FSDISKTYPE= miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
+RAMDISK= RAMDISK
LISTS= ${.CURDIR}/list
UTILS= ${.CURDIR}/../../miniroot
@@ -20,12 +21,12 @@ ${FS}: vn_up install_files showit vn_down
dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE}
vnconfig -v ${FS} > vnd
disklabel -w `cat vnd` ${FSDISKTYPE}
- newfs -m 0 -f 1024 -b 8192 /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.rd ${MOUNT_POINT}/bsd
install -c -m 555 -o root -g wheel \
${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot
ln ${MOUNT_POINT}/boot ${MOUNT_POINT}/vmunix
+ install -c -m 555 -o root -g wheel bsd.rd ${MOUNT_POINT}/bsd
df -i ${MOUNT_POINT}
umount ${MOUNT_POINT}
vnconfig -u `cat vnd`
@@ -35,6 +36,11 @@ bsd.rd: mr.fs bsd
cp bsd bsd.rd
rdsetroot bsd.rd mr.fs
+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
install -d -o root -g wheel $@.d
@@ -45,11 +51,6 @@ mr.fs: instbin
rm $@.d/instbin
makefs ${MRMAKEFSARGS} $@ $@.d
-bsd:
- cd ${.CURDIR}/../../../sys/arch/luna88k/compile/RAMDISK && \
- su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/luna88k/compile/RAMDISK/obj/bsd bsd
-
instbin.mk instbin.cache instbin.c: instbin.conf
crunchgen -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib \
-c instbin.c -e instbin -m instbin.mk instbin.conf
diff --git a/distrib/macppc/ramdisk/Makefile b/distrib/macppc/ramdisk/Makefile
index b0235c41593..ce7c03e6ded 100644
--- a/distrib/macppc/ramdisk/Makefile
+++ b/distrib/macppc/ramdisk/Makefile
@@ -1,7 +1,8 @@
-# $OpenBSD: Makefile,v 1.45 2019/05/02 02:59:29 deraadt Exp $
+# $OpenBSD: Makefile,v 1.46 2019/05/03 20:03:58 deraadt Exp $
CDROM= cd${OSrev}.iso
MTREE= ${UTILS}/mtree.conf
+RAMDISK= RAMDISK
LISTS= ${.CURDIR}/list
UTILS= ${.CURDIR}/../../miniroot
@@ -16,8 +17,7 @@ ${CDROM}: bsd.gz
# we skip doing so.
# ln ${.OBJDIR}/cd-dir/${OSREV}/macppc/bsd.rd ${.OBJDIR}/cd-dir/bsd.rd
# ln ${.OBJDIR}/cd-dir/bsd.rd ${.OBJDIR}/cd-dir/bsd
- cp ${DESTDIR}/usr/mdec/tbxidata/bsd.tbxi \
- ${.OBJDIR}/cd-dir/${OSREV}/macppc
+ cp ${DESTDIR}/usr/mdec/bsd.tbxi ${.OBJDIR}/cd-dir/${OSREV}/macppc
cp ${DESTDIR}/usr/mdec/ofwboot ${.OBJDIR}/cd-dir/
mkhybrid -r -part -hfs \
-hfs-bless ${.OBJDIR}/cd-dir/${OSREV}/macppc \
@@ -32,7 +32,7 @@ MRDISKTYPE= rdroot
MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096
bsd.gz: bsd.rd
- gzip -9nv < bsd.rd > bsd.gz
+ gzip -9cn bsd.rd > bsd.gz
bsd.rd: mr.fs bsd
cp bsd bsd.rd
@@ -40,9 +40,9 @@ bsd.rd: mr.fs bsd
strip -R .SUNW_ctf bsd.rd
bsd:
- cd ${.CURDIR}/../../../sys/arch/macppc/compile/RAMDISK && \
+ cd ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK} && \
su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/macppc/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/octeon/ramdisk/Makefile b/distrib/octeon/ramdisk/Makefile
index d14c0926bce..d30b3d21a75 100644
--- a/distrib/octeon/ramdisk/Makefile
+++ b/distrib/octeon/ramdisk/Makefile
@@ -1,16 +1,15 @@
-# $OpenBSD: Makefile,v 1.15 2019/05/01 14:03:25 visa Exp $
+# $OpenBSD: Makefile,v 1.16 2019/05/03 20:03:59 deraadt Exp $
FS= miniroot${OSrev}.fs
FSSIZE= 24576
FSDISKTYPE= miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
+RAMDISK= RAMDISK
LISTS= ${.CURDIR}/list
UTILS= ${.CURDIR}/../../miniroot
-NEWFSARGS= -t msdos
-
MRDISKTYPE= rdroot
MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096
@@ -21,7 +20,7 @@ ${FS}: bsd.rd
vnconfig -v -t ${FSDISKTYPE} ${FS} > vnd
echo 'u\ne 0\nC\nn\n64\n22528\nf 0\nw\nq\n' | fdisk -e `cat vnd`
echo 'w\ny\nq\n' | disklabel -E `cat vnd` > /dev/null
- newfs ${NEWFSARGS} /dev/r`cat vnd`i
+ newfs -t msdos /dev/r`cat vnd`i
mount /dev/`cat vnd`i ${MOUNT_POINT}
cp bsd.rd ${MOUNT_POINT}/bsd.rd
df -i ${MOUNT_POINT}
@@ -34,9 +33,9 @@ bsd.rd: mr.fs bsd
rdsetroot bsd.rd mr.fs
bsd:
- cd ${.CURDIR}/../../../sys/arch/octeon/compile/RAMDISK && \
+ cd ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK} && \
su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/octeon/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/ramdisk/Makefile b/distrib/ramdisk/Makefile
index 85d2c80331e..1573d456417 100644
--- a/distrib/ramdisk/Makefile
+++ b/distrib/ramdisk/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.63 2019/04/30 21:14:59 deraadt Exp $
+# $OpenBSD: Makefile,v 1.64 2019/05/03 20:03:59 deraadt Exp $
ARCHDIR= ${.CURDIR}/../${MACHINE}/ramdisk
@@ -62,13 +62,13 @@ bsd:
su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
cp -p ${.CURDIR}/../../sys/arch/${MACHINE}/compile/${RAMDISK}/obj/bsd bsd
+bsd.gz: bsd.rd
+ strip -R .SUNW_ctf bsd.rd
+ gzip -9nv < bsd.rd > bsd.gz
+
bsd.rd: bsd ${IMAGE}
cp bsd bsd.rd
rdsetroot bsd.rd ${IMAGE}
- strip -R .SUNW_ctf bsd.rd
-
-bsd.gz: bsd.rd
- gzip -9nv < bsd.rd > bsd.gz
${IMAGE}: instbin
dd if=/dev/zero of=${IMAGE} count=${IMAGESIZE}
diff --git a/distrib/sgi/cdfs/Makefile b/distrib/sgi/cdfs/Makefile
index f27c58534d5..897f55c0583 100644
--- a/distrib/sgi/cdfs/Makefile
+++ b/distrib/sgi/cdfs/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.25 2019/05/02 01:18:40 deraadt Exp $
+# $OpenBSD: Makefile,v 1.26 2019/05/03 20:03:59 deraadt Exp $
FS= miniroot${OSrev}.fs
CDROM= cd${OSrev}.iso
@@ -21,11 +21,11 @@ ${CDROM}:
dd if=/dev/zero of=${FS} bs=1m count=${CDFSMB}
vnconfig -v ${FS} > vnd
disklabel -w `cat vnd` minicdroot "OpenBSD/sgi "
- newfs /dev/r`cat vnd`a
+ newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${.OBJDIR}/cd-dir
mkdir -p ${.OBJDIR}/cd-dir/${OSrev}/sgi
.for IP in ${ALLIP}
- gzip -9f < ${.OBJDIR}/../ramdisk/bsd.rd.IP${IP} > \
+ gzip -9cf ${.OBJDIR}/../ramdisk/bsd.rd.IP${IP} > \
${.OBJDIR}/cd-dir/bsd.IP${IP}
ln ${.OBJDIR}/cd-dir/bsd.IP${IP} ${.OBJDIR}/cd-dir/bsd.rd.IP${IP}
ln ${.OBJDIR}/cd-dir/bsd.IP${IP} ${.OBJDIR}/cd-dir/${OSrev}/sgi/bsd.IP${IP}
diff --git a/distrib/sgi/iso/Makefile b/distrib/sgi/iso/Makefile
index 28d214b231a..8127627013a 100644
--- a/distrib/sgi/iso/Makefile
+++ b/distrib/sgi/iso/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.35 2019/04/30 21:14:59 deraadt Exp $
+# $OpenBSD: Makefile,v 1.36 2019/05/03 20:03:59 deraadt Exp $
CDROM= install${OSrev}.iso
RELXDIR?= /home/relx-${MACHINE}
@@ -69,7 +69,7 @@ ${CDROM}:
vnconfig -v -t cdroot ${CDROM} > vnd
disklabel -w `cat vnd` cdroot "OpenBSD/sgi "
- newfs /dev/r`cat vnd`a
+ newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${.OBJDIR}/cd-dir
mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE}
diff --git a/distrib/sgi/ramdisk/Makefile b/distrib/sgi/ramdisk/Makefile
index 6b593af4e8f..9340db0c536 100644
--- a/distrib/sgi/ramdisk/Makefile
+++ b/distrib/sgi/ramdisk/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.30 2019/04/30 21:14:59 deraadt Exp $
+# $OpenBSD: Makefile,v 1.31 2019/05/03 20:03:59 deraadt Exp $
MTREE= ${UTILS}/mtree.conf
@@ -21,9 +21,9 @@ bsd.rd.IP${IP}: mr.fs bsd.IP${IP}
rdsetroot bsd.rd.IP${IP} mr.fs
bsd.IP${IP}:
- cd ${.CURDIR}/../../../sys/arch/sgi/compile/RAMDISK-IP${IP} && \
+ cd ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/RAMDISK-IP${IP} && \
su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/sgi/compile/RAMDISK-IP${IP}/obj/bsd bsd.IP${IP}
+ cp -p ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/RAMDISK-IP${IP}/obj/bsd bsd.IP${IP}
.endfor
mr.fs: instbin
diff --git a/distrib/socppc/ramdisk/Makefile b/distrib/socppc/ramdisk/Makefile
index f42688a3a6e..cde86e5dd83 100644
--- a/distrib/socppc/ramdisk/Makefile
+++ b/distrib/socppc/ramdisk/Makefile
@@ -1,13 +1,11 @@
-# $OpenBSD: Makefile,v 1.26 2019/04/30 23:25:19 deraadt Exp $
+# $OpenBSD: Makefile,v 1.27 2019/05/03 20:03:59 deraadt Exp $
FS= miniroot${OSrev}.fs
FSSIZE= 8064
FSDISKTYPE= miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
-
-# minfree, opt, b/i trks, sects, cpg
-NEWFSARGS= -m 0 -o space -i 4096
+RAMDISK= RAMDISK
LISTS= ${.CURDIR}/list
UTILS= ${.CURDIR}/../../miniroot
@@ -17,42 +15,45 @@ MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096
all: ${FS} bsd.bin
-${FS}: mr.fs
+${FS}: bsd.gz
dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE}
vnconfig -v -t ${FSDISKTYPE} ${FS} > vnd
fdisk -i -y `cat vnd`
disklabel -w `cat vnd` ${FSDISKTYPE}
- newfs ${NEWFSARGS} /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}
dd if=${DESTDIR}/usr/mdec/boot.elf of=/dev/r`cat vnd`i conv=osync
- gzip -c < bsd.rd > ${MOUNT_POINT}/bsd.rd
- ln ${MOUNT_POINT}/bsd.rd ${MOUNT_POINT}/bsd
+ install -c -m 555 -o root -g wheel bsd.gz ${MOUNT_POINT}/bsd
+ ln ${MOUNT_POINT}/bsd ${MOUNT_POINT}/bsd.rd
df -i ${MOUNT_POINT}
umount ${MOUNT_POINT}
vnconfig -u `cat vnd`
rm -f vnd
-mr.fs: instbin
- rm -rf $@.d
- install -d -o root -g wheel $@.d
- mtree -def ${MTREE} -p $@.d -u
- CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} OSrev=${OSrev} \
- TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \
- sh ${UTILS}/runlist.sh ${LISTS}
- rm $@.d/instbin
- makefs ${MRMAKEFSARGS} $@ $@.d
-
bsd.bin: bsd.rd
objcopy -O binary bsd.rd bsd.bin
+bsd.gz: bsd.rd
+ gzip -9cn bsd.rd > bsd.gz
+
bsd.rd: mr.fs bsd
cp bsd bsd.rd
rdsetroot bsd.rd mr.fs
bsd:
- cd ${.CURDIR}/../../../sys/arch/socppc/compile/RAMDISK && \
+ cd ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK} && \
su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
- cp -p ${.CURDIR}/../../../sys/arch/socppc/compile/RAMDISK/obj/bsd bsd
+ cp -p ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK}/obj/bsd bsd
+
+mr.fs: instbin
+ rm -rf $@.d
+ install -d -o root -g wheel $@.d
+ mtree -def ${MTREE} -p $@.d -u
+ CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} OSrev=${OSrev} \
+ TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \
+ sh ${UTILS}/runlist.sh ${LISTS}
+ rm $@.d/instbin
+ makefs ${MRMAKEFSARGS} $@ $@.d
instbin.mk instbin.cache instbin.c: instbin.conf
crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib \
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