summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
Diffstat (limited to 'distrib')
-rw-r--r--distrib/miniroot/Makefile95
-rw-r--r--distrib/sparc/Makefile8
-rw-r--r--distrib/sparc/Makefile.inc3
-rw-r--r--distrib/sparc/miniroot/Makefile64
-rw-r--r--distrib/sparc/miniroot/Makefile.inc3
-rw-r--r--distrib/sparc/miniroot/list.local45
6 files changed, 71 insertions, 147 deletions
diff --git a/distrib/miniroot/Makefile b/distrib/miniroot/Makefile
deleted file mode 100644
index 9a0848a857c..00000000000
--- a/distrib/miniroot/Makefile
+++ /dev/null
@@ -1,95 +0,0 @@
-# $OpenBSD: Makefile,v 1.33 2011/04/18 16:52:10 thib Exp $
-
-REV= ${OSrev}
-
-CBIN= instbin
-ARCHDIR= ${.CURDIR}/../${MACHINE}/miniroot
-
-.include <bsd.own.mk>
-
-.if exists(${ARCHDIR}/Makefile.inc)
-.include "${ARCHDIR}/Makefile.inc"
-.endif
-
-UTILS= ${.CURDIR}
-
-MOUNT_POINT?= /mnt
-VND?= vnd0
-VND_DEV= /dev/${VND}a
-VND_RDEV= /dev/r${VND}a
-DISKTYPE= miniroot
-PID!= echo $$$$
-REALIMAGE!= echo /var/tmp/image.${PID}
-IMAGE?= miniroot${REV}.fs
-IMAGESIZE?= 10240 # 5MB in 512 byte blocks
-NEWFSOPTS?=
-NEWFS_WILL_FAIL?=false
-.if ${ELF_TOOLCHAIN:L} == "yes"
-CRUNCHGENOPTS?=-E
-.else
-CRUNCHGENOPTS?=
-.endif
-
-LISTS= ${.CURDIR}/list ${ARCHDIR}/list.local
-CRUNCHCONF= ${CBIN}.conf
-MTREE= ${.CURDIR}/mtree.conf
-
-.ifndef DESTDIR
-all:
- @echo setenv DESTDIR before making a miniroot!
- @false
-.else
-
-bsd:
- cd ${.CURDIR}/../../sys/arch/${MACHINE}/conf && config GENERIC
- cd ${.CURDIR}/../../sys/arch/${MACHINE}/compile/GENERIC && \
- ${MAKE} clean && ${MAKE} depend && ${MAKE}
- cp ${.CURDIR}/../../sys/arch/${MACHINE}/compile/GENERIC/bsd bsd
-
-all: ${CBIN} bsd
- dd if=/dev/zero of=${REALIMAGE} count=${IMAGESIZE}
- vnconfig -v -c ${VND} ${REALIMAGE}
- disklabel -w ${VND} ${DISKTYPE}
- newfs -m 0 -o space ${NEWFSOPTS} ${VND_RDEV} || ${NEWFS_WILL_FAIL}
- mount ${VND_DEV} ${MOUNT_POINT}
- mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u
- REV=${REV} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
- UTILS=${UTILS} ARCHDIR=${ARCHDIR} TARGDIR=${MOUNT_POINT} \
- RELEASEDIR=${RELEASEDIR} sh ${UTILS}/runlist.sh ${LISTS}
- rm ${MOUNT_POINT}/${CBIN}
- @echo ""
- @df -i ${MOUNT_POINT}
- @echo ""
- umount ${MOUNT_POINT}
- vnconfig -u ${VND_DEV}
- cp ${REALIMAGE} ${IMAGE}
- rm ${REALIMAGE}
-
-${CBIN}.conf: ${LISTS}
- awk -f ${.CURDIR}/makeconf.awk CBIN=${CBIN} ${LISTS} > ${CBIN}.conf
-
-${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
- crunchgen ${CRUNCHGENOPTS} -D ${.CURDIR}/../.. -L ${DESTDIR}/usr/lib \
- ${CRUNCHCONF}
-
-${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
- ${MAKE} -f ${CBIN}.mk all
-
-clean cleandir:
- /bin/rm -f *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache \
- ${CBIN}.conf *.o *.lo *.c
-
-.endif # DESTDIR check
-
-.ifdef RELEASEDIR
-beforeinstall:
- cp ${IMAGE} ${RELEASEDIR}
-.endif
-
-unconfig:
- -umount -f ${MOUNT_POINT}
- -vnconfig -u ${VND}
- -/bin/rm -f ${IMAGE}
-
-.include <bsd.obj.mk>
-.include <bsd.subdir.mk>
diff --git a/distrib/sparc/Makefile b/distrib/sparc/Makefile
index c11961930cf..82b8207f789 100644
--- a/distrib/sparc/Makefile
+++ b/distrib/sparc/Makefile
@@ -1,13 +1,13 @@
-# $OpenBSD: Makefile,v 1.9 2009/04/17 03:58:55 deraadt Exp $
+# $OpenBSD: Makefile,v 1.10 2012/09/10 22:21:03 deraadt Exp $
-SUBDIR+= ../ramdisk ../miniroot cdfs
+# preserve order: 'miniroot' and 'cdfs' depend on 'ramdisk'
+SUBDIR+= ../ramdisk miniroot cdfs
.if make(obj) || make(cleandir) || make(clean)
SUBDIR+= iso
.endif
unconfig:
- cd ramdisk; ${MAKE} unconfig
- cd ramdiskA; ${MAKE} unconfig
+ cd ../ramdisk; ${MAKE} unconfig
.include <bsd.subdir.mk>
diff --git a/distrib/sparc/Makefile.inc b/distrib/sparc/Makefile.inc
new file mode 100644
index 00000000000..4d42dbfe34d
--- /dev/null
+++ b/distrib/sparc/Makefile.inc
@@ -0,0 +1,3 @@
+# $OpenBSD: Makefile.inc,v 1.1 2012/09/10 22:21:03 deraadt Exp $
+
+REV= ${OSrev}
diff --git a/distrib/sparc/miniroot/Makefile b/distrib/sparc/miniroot/Makefile
new file mode 100644
index 00000000000..1428e0413a5
--- /dev/null
+++ b/distrib/sparc/miniroot/Makefile
@@ -0,0 +1,64 @@
+# $OpenBSD: Makefile,v 1.1 2012/09/10 22:21:03 deraadt Exp $
+
+TOP= ${.CURDIR}/..
+
+.include "${TOP}/Makefile.inc"
+
+TARGET=miniroot${REV}.fs
+
+.ifndef DESTDIR
+all ${TARGET}:
+ @echo setenv DESTDIR before making a ramdisk!
+ @false
+.else
+
+all: ${TARGET}
+
+${TARGET}: vn_up install_files installboot showit vn_down
+
+vn_up: blank_filesystem
+ vnconfig vnd0 ${TARGET}
+ disklabel -w vnd0 fakeramdisk
+ newfs -m 0 /dev/rvnd0a
+ mount /dev/vnd0a /mnt
+
+showit:
+ df -ki /mnt
+
+vn_down:
+ -umount /mnt
+ -vnconfig -u vnd0
+
+install_files: bsd.rd ofwboot
+
+bsd.rd:
+ install -c -m 555 -o root -g wheel \
+ ${.OBJDIR}/../../ramdisk/bsd.rd /mnt/bsd
+
+ofwboot:
+ install -c -m 555 -o root -g wheel \
+ ${DESTDIR}/usr/mdec/boot /mnt/boot
+
+installboot:
+ /usr/mdec/binstall -v ffs /mnt
+
+blank_filesystem:
+ dd if=/dev/zero of=${TARGET} bs=512 count=12288
+
+.endif
+
+unconfig:
+ -umount -f /mnt
+ -vnconfig -u /dev/vnd0a
+
+.ifdef RELEASEDIR
+install:
+ cp ${TARGET} ${RELEASEDIR}
+.endif
+
+clean:
+ rm -f ${TARGET}
+
+.include <bsd.own.mk>
+.include <bsd.obj.mk>
+.include <bsd.subdir.mk>
diff --git a/distrib/sparc/miniroot/Makefile.inc b/distrib/sparc/miniroot/Makefile.inc
deleted file mode 100644
index a666f0c94eb..00000000000
--- a/distrib/sparc/miniroot/Makefile.inc
+++ /dev/null
@@ -1,3 +0,0 @@
-# $OpenBSD: Makefile.inc,v 1.5 2007/06/17 00:28:21 deraadt Exp $
-
-IMAGESIZE?= 12288 # 6MB in 512 byte blocks
diff --git a/distrib/sparc/miniroot/list.local b/distrib/sparc/miniroot/list.local
deleted file mode 100644
index 04e96165f2a..00000000000
--- a/distrib/sparc/miniroot/list.local
+++ /dev/null
@@ -1,45 +0,0 @@
-# $OpenBSD: list.local,v 1.1 2010/10/18 04:08:32 deraadt Exp $
-# $NetBSD: list,v 1.2.4.2 1996/06/26 19:25:00 pk Exp $
-
-# Sparc extra's
-LINK instbin bin/sha256
-
-LINK instbin sbin/disklabel
-LINK instbin sbin/dhclient
-LINK instbin usr/bin/grep usr/bin/egrep usr/bin/fgrep
-LINK instbin usr/bin/less usr/bin/more
-LINK instbin usr/sbin/installboot
-
-SRCDIRS sys/arch/sparc/stand
-
-SYMLINK /tmp var/tmp
-
-# copy the MAKEDEV script and make some devices
-SCRIPT ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
-SPECIAL cd dev; sh MAKEDEV ramdisk
-
-# we need the contents of /usr/mdec
-COPYDIR ${DESTDIR}/usr/mdec usr/mdec
-SPECIAL rm -f usr/mdec/binstall usr/mdec/installboot
-
-# copy the kernel
-COPY bsd bsd
-
-# various files that we need in /etc for the install
-SYMLINK /tmp/fstab.shadow etc/fstab
-SYMLINK /tmp/resolv.conf.shadow etc/resolv.conf
-SYMLINK /tmp/hosts etc/hosts
-TERMCAP vt100,vt220,dumb,sun usr/share/misc/termcap
-
-# dhcp things
-SCRIPT ${DESTDIR}/sbin/dhclient-script sbin/dhclient-script
-SPECIAL chmod 755 sbin/dhclient-script
-
-# and the installation tools
-SCRIPT ${ARCHDIR}/../install.md install.md
-
-COPY ${DESTDIR}/usr/mdec/boot boot
-SPECIAL sync; ${DESTDIR}/usr/mdec/binstall -v ffs ${TARGDIR}
-
-HASH var/hash
-TZ