Browse Source

sync to new disklabel, add ${REALIMAGE} support

OPENBSD_2_0
deraadt 28 years ago
parent
commit
31a3404d6d
1 changed files with 13 additions and 8 deletions
  1. +13
    -8
      src/etc/etc.i386/Makefile.kc

+ 13
- 8
src/etc/etc.i386/Makefile.kc View File

@ -1,4 +1,4 @@
# $Id: Makefile.kc,v 1.1.1.1 1995/10/18 08:38:00 deraadt Exp $
# $Id: Makefile.kc,v 1.2 1996/06/11 09:04:53 deraadt Exp $
.ifndef MOUNT_POINT .ifndef MOUNT_POINT
MOUNT_POINT= /mnt MOUNT_POINT= /mnt
@ -8,6 +8,9 @@ VND_DEV= /dev/vnd0a
VND_RDEV= /dev/rvnd0a VND_RDEV= /dev/rvnd0a
.endif .endif
PID!= echo $$$$
REALIMAGE!= echo /tmp/image.${PID}
ROOTDIRLIST= / /bin /dev /instbin /mnt /sbin /usr ROOTDIRLIST= / /bin /dev /instbin /mnt /sbin /usr
BINDIRLIST= /usr/bin BINDIRLIST= /usr/bin
FLOPPYBINS= fsck init mount reboot sh tar test umount FLOPPYBINS= fsck init mount reboot sh tar test umount
@ -17,10 +20,10 @@ all:
@echo both IMAGE and KERNEL must be defined @echo both IMAGE and KERNEL must be defined
@false @false
.else .else
dd if=/dev/zero of=${IMAGE} bs=100k count=12
vnconfig -c ${VND_DEV} ${IMAGE}
disklabel -r -w ${VND_DEV} floppy5 \
${DESTDIR}/usr/mdec/fdboot ${DESTDIR}/usr/mdec/bootfd
dd if=/dev/zero of=${REALIMAGE} bs=10k count=120
vnconfig -c ${VND_DEV} ${REALIMAGE}
disklabel -w -B -b ${DESTDIR}/usr/mdec/fdboot -s ${DESTDIR}/usr/mdec/bootfd \
${VND} floppy5
newfs -m 0 -o space -i 6144 -c 80 ${VND_DEV} floppy5 newfs -m 0 -o space -i 6144 -c 80 ${VND_DEV} floppy5
mount ${VND_DEV} ${MOUNT_POINT} mount ${VND_DEV} ${MOUNT_POINT}
for d in ${ROOTDIRLIST} ; do \ for d in ${ROOTDIRLIST} ; do \
@ -43,10 +46,12 @@ all:
cp ${.CURDIR}/etc.i386/files.kc/$$from ${MOUNT_POINT}/$$to; \ cp ${.CURDIR}/etc.i386/files.kc/$$from ${MOUNT_POINT}/$$to; \
done done
umount ${MOUNT_POINT} umount ${MOUNT_POINT}
vnconfig -u ${VND_DEV} ${IMAGE}
vnconfig -u ${VND_DEV}
cat /*bin/* > /dev/null
cp ${REALIMAGE} ${IMAGE}
.endif .endif
unconfig: unconfig:
-umount -f ${MOUNT_POINT} -umount -f ${MOUNT_POINT}
-vnconfig -u ${VND_DEV} ${IMAGE}
-/bin/rm -f ${IMAGE}
-vnconfig -u ${VND_DEV}
-/bin/rm -f ${REALIMAGE} ${IMAGE}

Loading…
Cancel
Save