diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-02-15 13:51:08 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-02-15 13:51:08 +0000 |
commit | 6d3cfffe222adeb0262aee3a776ef0107e596fe0 (patch) | |
tree | 2d59704819e4eb2a684e1ea383d4366ab7bdff81 /distrib/socppc | |
parent | f5bf353163c06097e6510fcd834cde85915f67fa (diff) |
Create an installation miniroot images for the rb600 that can be dd'ed to CF
which then simply boots the rb600 into the installer.
Diffstat (limited to 'distrib/socppc')
-rw-r--r-- | distrib/socppc/miniroot/Makefile | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/distrib/socppc/miniroot/Makefile b/distrib/socppc/miniroot/Makefile new file mode 100644 index 00000000000..5c260c37ae2 --- /dev/null +++ b/distrib/socppc/miniroot/Makefile @@ -0,0 +1,66 @@ + +REV= ${OSrev} +BSD_RD= bsd.rd + +IMAGE= miniroot${REV}.fs + +MOUNT_POINT= /mnt + +VND?= svnd0 +VND_DEV= /dev/${VND}a +VND_CDEV= /dev/${VND}c +VND_IDEV= /dev/${VND}i +VND_RDEV= /dev/r${VND}a +VND_CRDEV= /dev/r${VND}c +PID!= echo $$$$ + +DISKTYPE= miniroot +NBLKS= 8064 +# minfree, opt, b/i trks, sects, cpg +NEWFSARGS= -m 0 -o space -i 4096 + + +.ifndef DESTDIR +all ${IMAGE}: + @echo setenv DESTDIR before making a ramdisk! + @false +.else +all: ${IMAGE} + +${IMAGE}: rd_setup do_files rd_teardown + +.endif + +do_files: + dd if=${DESTDIR}/usr/mdec/boot.elf of=${VND_IDEV} + gzip -c < ${.OBJDIR}/../ramdisk/bsd.rd > ${MOUNT_POINT}/bsd.rd + ln ${MOUNT_POINT}/bsd.rd ${MOUNT_POINT}/bsd + +rd_setup: + dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS} + vnconfig -v -c -t ${DISKTYPE} ${VND} ${IMAGE} + dd if=${DESTDIR}/usr/mdec/mbr.mini of=${VND_CDEV} + disklabel -w ${VND} ${DISKTYPE} + newfs ${NEWFSARGS} ${VND_RDEV} + fsck ${VND_RDEV} + mount ${VND_DEV} ${MOUNT_POINT} + +rd_teardown: + @df -i ${MOUNT_POINT} + -umount ${MOUNT_POINT} + -vnconfig -u ${VND} + + +unconfig: + -umount -f ${MOUNT_POINT} + -vnconfig -u ${VND} + +.PRECIOUS: ${IMAGE} + +.ifdef RELEASEDIR +install: + cp ${IMAGE} ${RELEASEDIR} +.endif + +.include <bsd.obj.mk> +.include <bsd.subdir.mk> |