Subject: port-sparc/5899: some sparc boot floppy build fixes
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jbernard@ox.mines.edu>
List: netbsd-bugs
Date: 08/02/1998 14:47:20
>Number: 5899
>Category: port-sparc
>Synopsis: some sparc boot floppy build fixes
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Aug 2 13:50:01 1998
>Last-Modified:
>Originator: Jim Bernard
>Organization:
Speaking for myself
>Release: August 2, 1998
>Environment:
System: NetBSD zoo 1.3F NetBSD 1.3F (ZOO) #0: Sun Jun 14 09:09:08 MDT 1998 local@zoo:/home/local/compile/sys/arch/i386/compile/ZOO i386
>Description:
Attempts to build a sparc boot floppy fail because:
paths in distrib/sparc/Makefile.inc and
distrib/sparc/floppies/bootfloppy/Makefile don't work
the default floppy entry in etc/etc.sparc/disktab doesn't specify
the filesystem type for partition a
>How-To-Repeat:
make sure /etc/disktab contains the same "floppy" entry found
in the -current etc/etc.sparc/disktab (the "floppyinstfs" entry
is also needed, but is not at issue here)
build an INSTALL kernel in the usual location
cd /usr/src/distrib/sparc/ramdisk
make
cd ../floppies/bootfloppy
make
Various failures to find files occur; when the Makefile
problems are fixed, the newfs step fails:
vnconfig -t floppy -v -c /dev/vnd0c boot13F.fs
/dev/vnd0c: 1474560 bytes on boot13F.fs using geometry 512/18/2/80
disklabel -rw /dev/vnd0c floppy
newfs -m 0 -o space -i 204800 -c 80 /dev/rvnd0a
newfs: /dev/rvnd0a: open: Device not configured
*** Error code 1
Stop.
This is fixed by adding a fstype specification for partition a.
>Fix:
Patches below fix up the three files mentioned above.
(Beware that the patches don't contain directory information.)
* distrib/sparc/floppies/bootfloppy/Makefile:
- The TOP macro was incorrect for this location
- The KERN macro was incorrect; I've chosen to change it to
find the kernel relative to TOP rather than .CURDIR (so it's
easier to keep the path correct if the Makefile is moved to
a different level, which is probably how it came to be wrong
in the first place)
- The location of the ramdisk directory (in RAMDISK macro) was
incorrect; again, I've chosen to find it relative to TOP
rather than .CURDIR (for the reason given above)
* distrib/sparc/Makefile.inc:
- The REV and VER macros didn't locate the osrelease.sh script
correctly for Makefiles at different depths relative to the
directory containing this file--in particular, they were
incorrect for floppies/bootfloppy/Makefile. They were incorrect
because of the use of .CURDIR, so I've changed them to locate the
script relative to TOP, which is already defined by all the
Makefiles that include this file. This way, Makefile.inc will
work for including Makefiles at any depth.
BTW: I noticed that other ports' distrib/.../Makefile.inc files
also use .CURDIR and could presumably also benefit from a similar
change, although I guess they don't yet have any including
Makefiles that break on account of the use of .CURDIR.
* etc/etc.sparc/disktab:
- The entry for "floppy" doesn't specify the filesystem type,
and after disklabeling vnd0c, a subsequent newfs on /dev/rvnd0a
fails. The patch adds a type specification, like that present
in the floppy entry of the disktabs of other ports.
--- Makefile-dist Sun Jun 21 05:06:37 1998
+++ Makefile Sat Aug 1 20:58:16 1998
@@ -1,13 +1,13 @@
# $NetBSD: Makefile,v 1.3 1998/06/20 13:31:34 mrg Exp $
-TOP= ${.CURDIR}/..
+TOP= ${.CURDIR}/../..
.include "${TOP}/Makefile.inc"
IMAGE= boot${REV}.fs
-KERN= ${.CURDIR}/../../../../sys/arch/sparc/compile/INSTALL/netbsd
+KERN= ${TOP}/../../sys/arch/sparc/compile/INSTALL/netbsd
MOUNT_POINT?= /mnt
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
@@ -18,11 +18,11 @@
IMAGE?= xxx.fs
KERN?= netbsd-xxx
MDEC= ${DESTDIR}/usr/mdec
LISTS= ${.CURDIR}/list
-RAMDISK!= cd $(.CURDIR)/../ramdisk/; \
+RAMDISK!= cd ${TOP}/ramdisk/; \
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/ramdisk.fs\n" | \
${MAKE} -s -f-
DISKTYPE= floppy
--- Makefile.inc-dist Sun Jun 21 05:06:35 1998
+++ Makefile.inc Sat Aug 1 20:54:39 1998
@@ -1,6 +1,6 @@
# $NetBSD: Makefile.inc,v 1.2 1998/06/21 07:39:45 mrg Exp $
# REV is revision without dots, as in "12C"
# VER is revision with dots, as in "1.2C"
-REV!=sh ${.CURDIR}/../../../sys/conf/osrelease.sh -s
-VER!=sh ${.CURDIR}/../../../sys/conf/osrelease.sh
+REV!=sh ${TOP}/../../sys/conf/osrelease.sh -s
+VER!=sh ${TOP}/../../sys/conf/osrelease.sh
--- disktab-dist Sat Jun 6 05:12:15 1998
+++ disktab Sun Aug 2 14:05:44 1998
@@ -28,11 +28,11 @@
:pa#3168:oa#0:ba#4096:fa#512:ta=4.2BSD:\
:pc#3168:oc#0:
floppy|floppy3|3in|3.5in High Density Floppy:\
:ty=floppy:se#512:nt#2:rm#300:ns#18:nc#80:\
- :pa#2880:oa#0:ba#4096:fa#512:\
+ :pa#2880:oa#0:ba#4096:fa#512:ta=4.2BSD:\
:pb#2880:ob#0:\
:pc#2880:oc#0:
ASI-1.0GIBM:\
:ty#winchester:ns#80:nt#15:nc#1632:
>Audit-Trail:
>Unformatted: