Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Oct 2001 21:56:18 -0400
From:      The Anarcat <anarcat@anarcat.dyndns.org>
To:        Alexander Langer <alex@big.endian.de>
Cc:        Alexander Langer <alex@usw4.freebsd.org>, libh@FreeBSD.ORG
Subject:   Re: cvs commit: libh/release/floppies Makefile.inc
Message-ID:  <20011010215617.B6642@shall.anarcat.dyndns.org>
In-Reply-To: <20011010182226.A6267@shall.anarcat.dyndns.org>
References:  <200110101956.f9AJuw334989@usw4.freebsd.org> <20011010162202.D1233@shall.anarcat.dyndns.org> <20011011000940.E7311@zerogravity.kawo2.rwth-aachen.de> <20011010182226.A6267@shall.anarcat.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--QRj9sO5tAVLaXnSD
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Another patch... The original fix broke more than just -stable. It broke
all the makefiles including the .inc and assuming *_VNODE variables
designated mdn or vnn where n is the unit number. The original author
probably never tested that.

I think this fixes all that. I can now "create" the boot image. At least
try:

/u/anarcat/src/ports/libh/work/libh-0.2/release/floppies/mmnt: write
failed, file system is full
install:
/u/anarcat/src/ports/libh/work/libh-0.2/release/floppies/mmnt/sbin/tclh
: No space left on device

:) I guess 8Mb is a bit big eh? :)

So here are the patches, untested on -current, but
"seems-to-be-working-fine" on -stable.

BTW: is it "mandatory" to develop libh on -current, or is it a good
thing that I develop on -stable? I can't afford to crash my main (and
only) workstation that is *not* backed-up regularly.. :-)

Index: Makefile.1440
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/libh/cvs/libh/release/floppies/Makefile.1440,v
retrieving revision 1.1
diff -u -r1.1 Makefile.1440
--- Makefile.1440	2001/01/20 20:46:07	1.1
+++ Makefile.1440	2001/10/11 01:53:21
@@ -14,8 +14,8 @@
                 dd of=3D${MFSFL_NAME} obs=3D1 seek=3D510 conv=3Dnotrunc
 	@cd ${.CURDIR} && ${MAKE} vnconfig-mfsfl
 	dd if=3D/boot/boot1 of=3D${MFSFL_NAME} conv=3Dnotrunc
-	disklabel -Brw -b /boot/boot1 -s /boot/boot2 ${MFSFL_VNODE}c fd1440
-	newfs -i ${FLOPPY_INODES} -m 0 -p 0 -o space ${MFSFL_VNODE}c
+	disklabel -Brw -b /boot/boot1 -s /boot/boot2 ${MDEV}${MFSFL_VNODE}c fd1440
+	newfs -i ${FLOPPY_INODES} -m 0 -p 0 -o space ${MDEV}${MFSFL_VNODE}c
 	@cd ${.CURDIR} && ${MAKE} mount-mfsfl
 	gzip -9cv ${MFS_NAME} > ${MFSFL_MP}/${MFS_NAME}.gz
 	df -ik ${.CURDIR}/${MFSFL_MP}
@@ -31,8 +31,8 @@
                 dd of=3D${KERN_NAME} obs=3D1 seek=3D510 conv=3Dnotrunc
 	@cd ${.CURDIR} && ${MAKE} vnconfig-kern
 	dd if=3D/boot/boot1 of=3D${KERN_NAME} conv=3Dnotrunc
-	disklabel -Brw -b /boot/boot1 -s /boot/boot2 ${KERN_VNODE}c fd1440
-	newfs -i ${FLOPPY_INODES} -m 0 -p 0 -o space ${KERN_VNODE}c
+	disklabel -Brw -b /boot/boot1 -s /boot/boot2 ${MDEV}${KERN_VNODE}c fd1440
+	newfs -i ${FLOPPY_INODES} -m 0 -p 0 -o space ${MDEV}${KERN_VNODE}c
 	@cd ${.CURDIR} && ${MAKE} mount-kern
 	@echo
 	@echo "--> Copy files on KERN floppy"
@@ -52,7 +52,7 @@
 		${SRC}/sys/i386/conf/GENERIC.hints \
 		> ${KERN_MP}/boot/device.hints
=20
-	df -ik ${KERN_VNODE}
+	df -ik ${MDEV}${KERN_VNODE}
 	@echo "- Install kernel"
 	mkdir -p ${KERN_MP}/boot/kernel
 	cp kernel.gz ${KERN_MP}/boot/kernel/kernel.gz
Index: Makefile.inc
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/libh/cvs/libh/release/floppies/Makefile.inc,v
retrieving revision 1.2
diff -u -r1.2 Makefile.inc
--- Makefile.inc	2001/10/10 19:56:58	1.2
+++ Makefile.inc	2001/10/11 01:53:21
@@ -14,6 +14,28 @@
 KERN_MP		=3D	kmnt
 BOOT_MP		=3D	bmnt
=20
+# Get __FreeBSD_version
+# stolen from bsd.port.mk
+.if !defined(OSVERSION)
+.if exists(/sbin/sysctl)
+OSVERSION!=3D     /sbin/sysctl -n kern.osreldate
+.else
+OSVERSION!=3D     /usr/sbin/sysctl -n kern.osreldate
+.endif
+.endif
+
+.if ${OSVERSION} < 500000
+MDCONFIG	?=3D	vnconfig -s labels -c
+MDUNCONFIG	?=3D	vnconfig -u
+MDEV		?=3D	/dev/vn
+MUNIT		?=3D	${MDEV}
+.else
+MDCONFIG	?=3D	mdconfig -a -t vnode
+MDUNCONFIG	?=3D	mdconfig -d
+MDEV		?=3D	/dev/md
+MUNIT		?=3D	"-u "
+.endif
+
 # Information about mfs parameters
 # Size of mfs in kilobytes
 MFS_SIZE	=3D	4500
@@ -48,53 +70,52 @@
=20
 vnconfig-mfs:
 	@cd ${.CURDIR} && ${MAKE} vnunconfig-mfs 2>/dev/null >&2
-	mdconfig -a -t vnode -u ${MFS_VNODE} ${MFS_NAME}
+	${MDCONFIG} ${MUNIT}${MFS_VNODE} ${MFS_NAME}
 vnconfig-mfsfl:
 	@cd ${.CURDIR} && ${MAKE} vnunconfig-mfsfl 2>/dev/null >&2
-	mdconfig -a -t vnode -u ${MFS_VNODE} ${MFS_NAME}
+	${MDCONFIG} ${MUNIT}${MFS_VNODE} ${MFS_NAME}
 vnconfig-kern:
 	@cd ${.CURDIR} && ${MAKE} vnunconfig-kern 2>/dev/null >&2
-	mdconfig -a -t vnode -u ${KERN_VNODE} ${KERN_NAME}
+	${MDCONFIG} ${MUNIT}${KERN_VNODE} ${KERN_NAME}
=20
 vnconfig-boot:
 	@cd ${.CURDIR} && ${MAKE} vnunconfig-boot 2>/dev/null >&2
-	vnconfig -s labels -c ${MFS_VNODE} ${MFS_NAME}
-	mdconfig -a -t vnode -u ${MFS_VNODE} ${MFS_NAME}
+	${MDCONFIG} ${MUNIT}${MFS_VNODE} ${MFS_NAME}
=20
 vnunconfig-mfs:
 	@cd ${.CURDIR} && ${MAKE} umount-mfs 2>/dev/null >&2
-	@-mdconfig -d -u  ${MFS_VNODE} 2>/dev/null
+	@-${MDCONFIG} ${MUNIT}${MFS_VNODE} 2>/dev/null
 vnunconfig-mfsfl:
 	@cd ${.CURDIR} && ${MAKE} umount-mfsfl 2>/dev/null >&2
-	@-mdconfig -d -u  ${MFSFL_VNODE} 2>/dev/null
+	@-${MDCONFIG} ${MUNIT}${MFSFL_VNODE} 2>/dev/null
 vnunconfig-kern:
 	@cd ${.CURDIR} && ${MAKE} umount-kern 2>/dev/null >&2
-	@-mdconfig -d -u ${KERN_VNODE} 2>/dev/null
+	@-${MDCONFIG} ${MUNIT}${KERN_VNODE} 2>/dev/null
 vnunconfig-boot:
 	@cd ${.CURDIR} && ${MAKE} umount-boot 2>/dev/null >&2
-	@-mdconfig -d -u ${BOOT_VNODE} 2>/dev/null
+	@-${MDCONFIG} ${MUNIT}${BOOT_VNODE} 2>/dev/null
=20
 mount-mfs: ${MFS_MP}
 	@cd ${.CURDIR} && ${MAKE} vnconfig-mfs
-	mount /dev/md${MFS_VNODE} ${MFS_MP}
+	mount ${MDEV}${MFS_VNODE} ${MFS_MP}
 mount-mfsfl: ${MFSFL_MP}
 	@cd ${.CURDIR} && ${MAKE} vnconfig-mfs
-	mount /dev/md${MFSFL_VNODE} ${MFSFL_MP}
+	mount ${MDEV}${MFSFL_VNODE} ${MFSFL_MP}
 mount-kern: ${KERN_MP}
 	@cd ${.CURDIR} && ${MAKE} vnconfig-kern
-	mount /dev/md${KERN_VNODE} ${KERN_MP}
+	mount ${MDEV}${KERN_VNODE} ${KERN_MP}
 mount-boot: ${BOOT_MP}
 	@cd ${.CURDIR} && ${MAKE} vnconfig-boot
-	mount /dev/md${BOOT_VNODE} ${BOOT_MP}
+	mount ${MDEV}${BOOT_VNODE} ${BOOT_MP}
=20
 umount-mfs:
-	@-umount /dev/md${MFS_VNODE} 2>/dev/null >&2
+	@-umount ${MDEV}${MFS_VNODE} 2>/dev/null >&2
 umount-mfsfl:
-	@-umount /dev/md${MFSFL_VNODE} 2>/dev/null
+	@-umount ${MDEV}${MFSFL_VNODE} 2>/dev/null
 umount-kern:
-	@-umount /dev/md${KERN_VNODE} 2>/dev/null
+	@-umount ${MDEV}${KERN_VNODE} 2>/dev/null
 umount-boot:
-	@-umount /dev/md${BOOT_VNODE} 2>/dev/null
+	@-umount ${MDEV}${BOOT_VNODE} 2>/dev/null
=20
 ${MFS_MP} ${MFSFL_MP} ${KERN_MP} ${BOOT_MP}:
 	@mkdir -p $@
Index: Makefile.mfsroot
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/libh/cvs/libh/release/floppies/Makefile.mfsroot,v
retrieving revision 1.1
diff -u -r1.1 Makefile.mfsroot
--- Makefile.mfsroot	2001/01/20 20:46:07	1.1
+++ Makefile.mfsroot	2001/10/11 01:53:21
@@ -13,8 +13,8 @@
 	    dd of=3D${MFS_NAME} obs=3D1 seek=3D510 conv=3Dnotrunc  2> /dev/null
 	@cd ${.CURDIR} && ${MAKE} vnconfig-mfs
 	dd if=3D/boot/boot1 of=3D${MFS_NAME} conv=3Dnotrunc
-	disklabel -rw ${MFS_VNODE} minimum3
-	newfs -i ${MFS_INODES} -m 0 -p 0 -o space ${MFS_VNODE}c
+	disklabel -rw ${MDEV}${MFS_VNODE} minimum3
+	newfs -i ${MFS_INODES} -m 0 -p 0 -o space ${MDEV}${MFS_VNODE}c
 	@echo
 	@echo "--> Populating MFS image"
 	@cd ${.CURDIR} && ${MAKE} mount-mfs

A.

--QRj9sO5tAVLaXnSD
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjvE/EAACgkQttcWHAnWiGebsACcCrVvbMCw+vDkB4aD9np7imKo
mbMAn2Xl5pDjyc3dDknN/F2c6JsJPtJR
=q1FR
-----END PGP SIGNATURE-----

--QRj9sO5tAVLaXnSD--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-libh" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011010215617.B6642>