changeset 2868:c6c11cf3e587

6460124 nightly -X doesn't properly copy the IHV proto area 6463720 more realmode build cleanup
author dduvall
date Thu, 05 Oct 2006 17:29:17 -0700
parents acd9a4fc9952
children 324151eecd58
files usr/src/pkgdefs/SUNWpcmci/prototype_com usr/src/tools/env/developer.sh usr/src/tools/env/gatekeeper.sh usr/src/tools/protocmp/protodir.c usr/src/tools/scripts/makebfu.sh usr/src/tools/scripts/nightly.1 usr/src/tools/scripts/nightly.sh
diffstat 7 files changed, 84 insertions(+), 147 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/pkgdefs/SUNWpcmci/prototype_com	Thu Oct 05 14:56:57 2006 -0700
+++ b/usr/src/pkgdefs/SUNWpcmci/prototype_com	Thu Oct 05 17:29:17 2006 -0700
@@ -2,9 +2,8 @@
 # CDDL HEADER START
 #
 # The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
 #
 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 # or http://www.opensolaris.org/os/licensing.
@@ -19,12 +18,14 @@
 #
 # CDDL HEADER END
 #
+
 #
-# Copyright 1999-2003 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
+# ident	"%Z%%M%	%I%	%E% SMI"
 #
+
 # This required package information file contains a list of package contents.
 # The 'pkgmk' command uses this file to identify the contents of a package
 # and their location on the development machine when building the package.
@@ -50,7 +51,7 @@
 #
 d none etc 0755 root sys
 d none etc/init.d 0755 root sys
-e initd etc/init.d/pcmcia=etc/init.d/pcmcia 0744 root sys
+e initd etc/init.d/pcmcia 0744 root sys
 d none kernel 0755 root sys
 d none kernel/drv 0755 root sys
 f none kernel/drv/pcic.conf 0644 root sys
--- a/usr/src/tools/env/developer.sh	Thu Oct 05 14:56:57 2006 -0700
+++ b/usr/src/tools/env/developer.sh	Thu Oct 05 17:29:17 2006 -0700
@@ -18,12 +18,14 @@
 #
 # CDDL HEADER END
 #
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
+
 #
 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
+# ident	"%Z%%M%	%I%	%E% SMI"
+#
+
 #	Configuration variables for the runtime environment of the nightly
 # build script and other tools for construction and packaging of releases.
 # This script is sourced by 'nightly' and 'bldenv' to set up the environment
@@ -156,11 +158,6 @@
 #LINTDIRS="$SRC y";	export LINTDIRS
 
 #
-# NT server for realmode builds
-#
-#NTSERVER=<hostname>;			export NTSERVER
-
-#
 # Reference to IA32 IHV workspace, proto area and packages
 #
 #IA32_IHV_WS=/ws/${GATE}-ihv;				export IA32_IHV_WS
@@ -168,18 +165,10 @@
 #IA32_IHV_PKGS=$IA32_IHV_WS/packages/i386/nightly;	export IA32_IHV_PKGS
 
 #
-# Reference to binary-only IA32 IHV packages (for boot floppy construction)
-#
-#IA32_IHV_BINARY_PKGS=/ws/${GATE}_ihv_bin
-#export IA32_IHV_BINARY_PKGS
-
+# Reference to binary-only IA32 IHV packages
 #
-# Boot floppy proto area
-#
-#DCB_ROOT="${CODEMGR_WS}/proto/root_dcb_${MACH}"
-#BOOTFLOPPY_ROOT="${CODEMGR_WS}/proto/root_BootFloppy_${MACH}"
-#export DCB_ROOT
-#export BOOTFLOPPY_ROOT
+#IA32_IHV_BINARY_PKGS=/ws/${GATE}-ihv-bin
+#export IA32_IHV_BINARY_PKGS
 
 #
 # Destination for sparc realmode package SUNWrmodu
@@ -187,16 +176,6 @@
 #SPARC_RM_PKGARCHIVE="${CODEMGR_WS}/packages/sparc_realmode/nightly"
 #export SPARC_RM_PKGARCHIVE
 
-# REF_PROTO_LIST_DCB & REF_PROTO_LIST_BOOTFLOPPY
-# To compare the list of stuff in your DCB and BootFloppy proto areas
-# against. Generally this should be left alone, since you want to see
-# differences from your parent (the gate).
-#
-#REF_PROTO_LIST_DCB=$PARENT_WS/usr/src/realmode/proto_list_dcb_${MACH}
-#REF_PROTO_LIST_BOOTFLOPPY=$PARENT_WS/usr/src/realmode/proto_list_bootfloppy_${MACH}
-#export REF_PROTO_LIST_DCB
-#export REF_PROTO_LIST_BOOTFLOPPY
-
 # Set this flag to 'n' to disable the automatic validation of the dmake
 # version in use.  The default is to check it.
 #CHECK_DMAKE=y
--- a/usr/src/tools/env/gatekeeper.sh	Thu Oct 05 14:56:57 2006 -0700
+++ b/usr/src/tools/env/gatekeeper.sh	Thu Oct 05 17:29:17 2006 -0700
@@ -18,12 +18,14 @@
 #
 # CDDL HEADER END
 #
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
+
 #
 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
+# ident	"%Z%%M%	%I%	%E% SMI"
+#
+
 #	Configuration variables for the runtime environment of the nightly
 # build script and other tools for construction and packaging of releases.
 # This script is sourced by 'nightly' and 'bldenv' to set up the environment
@@ -166,11 +168,6 @@
 #LINTDIRS="$SRC y";	export LINTDIRS
 
 #
-# NT server for realmode builds
-#
-#NTSERVER=<hostname>;			export NTSERVER
-
-#
 # Reference to IA32 IHV workspace, proto area and packages
 #
 #IA32_IHV_WS=/ws/${GATE}-ihv;				export IA32_IHV_WS
@@ -178,18 +175,10 @@
 #IA32_IHV_PKGS=$IA32_IHV_WS/packages/i386/nightly;	export IA32_IHV_PKGS
 
 #
-# Reference to binary-only IA32 IHV packages (for boot floppy construction)
-#
-#IA32_IHV_BINARY_PKGS=/ws/${GATE}_ihv_bin
-#export IA32_IHV_BINARY_PKGS
-
+# Reference to binary-only IA32 IHV packages
 #
-# Boot floppy proto area
-#
-#DCB_ROOT="${CODEMGR_WS}/proto/root_dcb_${MACH}"
-#BOOTFLOPPY_ROOT="${CODEMGR_WS}/proto/root_BootFloppy_${MACH}"
-#export DCB_ROOT
-#export BOOTFLOPPY_ROOT
+#IA32_IHV_BINARY_PKGS=/ws/${GATE}-ihv-bin
+#export IA32_IHV_BINARY_PKGS
 
 #
 # Destination for sparc realmode package SUNWrmodu
@@ -197,16 +186,6 @@
 #SPARC_RM_PKGARCHIVE="${CODEMGR_WS}/packages/sparc_realmode/nightly"
 #export SPARC_RM_PKGARCHIVE
 
-# REF_PROTO_LIST_DCB & REF_PROTO_LIST_BOOTFLOPPY
-# To compare the list of stuff in your DCB and BootFloppy proto areas
-# against. Generally this should be left alone, since you want to see
-# differences between todays build and yesterdays.
-#
-#REF_PROTO_LIST_DCB=$PARENT_WS/usr/src/realmode/proto_list_dcb_${MACH}
-#REF_PROTO_LIST_BOOTFLOPPY=$PARENT_WS/usr/src/realmode/proto_list_bootfloppy_${MACH}
-#export REF_PROTO_LIST_DCB
-#export REF_PROTO_LIST_BOOTFLOPPY
-
 # Set this flag to 'n' to disable the automatic validation of the dmake
 # version in use.  The default is to check it.
 #CHECK_DMAKE=y
--- a/usr/src/tools/protocmp/protodir.c	Thu Oct 05 14:56:57 2006 -0700
+++ b/usr/src/tools/protocmp/protodir.c	Thu Oct 05 17:29:17 2006 -0700
@@ -2,9 +2,8 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
  *
  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  * or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
  *
  * CDDL HEADER END
  */
+
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -128,12 +128,23 @@
 		/*
 		 * The '=' operator is subtly different for link and non-link
 		 * entries.  For the hard or soft link case, the left hand side
-		 * exists in the proto area and is created by the package.  For
-		 * the other cases, the right hand side is in the proto area.
+		 * exists in the proto area and is created by the package.
+		 *
+		 * When the file is an editable file, it's very likely that the
+		 * right hand side is only a fragment of that file, which is
+		 * delivered by multiple packages in the consolidation.  Thus it
+		 * can't exist in the proto area, and because we can't really
+		 * know where the file's root directory is, we should skip the
+		 * file.
+		 *
+		 * For all other filetypes, assume the right hand side is in the
+		 * proto area.
 		 */
 		if (e->file_type == SYM_LINK_T || e->file_type == LINK_T) {
 			*src++ = '\0';
 			e->symsrc = strdup(src);
+		} else if (e->file_type == EDIT_T) {
+			return (0);
 		} else {
 			file = src + 1;
 		}
--- a/usr/src/tools/scripts/makebfu.sh	Thu Oct 05 14:56:57 2006 -0700
+++ b/usr/src/tools/scripts/makebfu.sh	Thu Oct 05 17:29:17 2006 -0700
@@ -3,9 +3,8 @@
 # CDDL HEADER START
 #
 # The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
 #
 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 # or http://www.opensolaris.org/os/licensing.
@@ -20,12 +19,14 @@
 #
 # CDDL HEADER END
 #
+
 #
-# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
+# ident	"%Z%%M%	%I%	%E% SMI"
 #
+
 # Builds bfu archives. If no arguments, uses the environment variables
 # already set (by bldenv). One argument specifies an environment file
 # like nightly or bldenv uses.
@@ -93,7 +94,6 @@
 echo "Making ${archivetype}archives from $ROOT in $CPIODIR."
 if [ "$o_FLAG" != "y" -a -n "$MACH" -a -n "$SRC" -a -d "$SRC/pkgdefs" ]; then
 	pkg=$SRC/pkgdefs
-	bpkg=$SRC/realmode/pkgdefs
 	if [[ -d $SRC/../closed/pkgdefs && \
 	    "$CLOSED_IS_PRESENT" != no ]]; then
 		cpkg=$SRC/../closed/pkgdefs
@@ -103,15 +103,10 @@
 	exc=etc/exception_list_$MACH
 	if [ "$X_FLAG" = "y" ]; then
 		ipkg=$IA32_IHV_WS/usr/src/pkgdefs
-		bpkgargs="-e $bpkg/$exc -e $ipkg/$exc $bpkg $ipkg"
+		bpkgargs="-e $ipkg/$exc $ipkg"
 	else
 		bpkgargs=""
 	fi
-# boot/solaris/boot.bin is in $SRC/pkgdefs/SUNWcar.i, rather than in
-# $SRC/realmode/pkgdefs, so the boot build needs to read both sources of
-# packaging.
-# usr/lib/fs/ufs/mboot and a few friends are in $SRC/realmode/pkgdefs,
-# so the regular build also needs this packaging data.
 	mkbfu	-f "cpiotranslate -e $pkg/$exc $bpkgargs $pkg $cpkg" \
 		$zflag $ROOT $CPIODIR
 else
--- a/usr/src/tools/scripts/nightly.1	Thu Oct 05 14:56:57 2006 -0700
+++ b/usr/src/tools/scripts/nightly.1	Thu Oct 05 17:29:17 2006 -0700
@@ -57,7 +57,7 @@
 .TP
 bringover from the identified parent gate/clone
 .TP
-perform non-debug and debug builds
+perform non-DEBUG and DEBUG builds
 .TP
 list proto area files and compare with previous list
 .TP
@@ -208,8 +208,12 @@
 set the build version string to VERS, overriding VERSION
 .TP
 .B \-X
-do IA32 realmode builds (requires access to a
-properly-configured NT build machine and root permissions)
+Copies the proto area and packages from the IHV and IHV-bin gates into the
+nightly proto and package areas.  This is only available on i386.  See
+.B REALMODE ENVIRONMENT VARIABLES
+and
+.B BUILDING THE IHV WORKSPACE
+below.
 .TP
 .B \-S E | D | H
 Build the Export, Domestic, or Hybrid source product. Only Export and
@@ -344,7 +348,7 @@
 .RE
 .B RELEASE_BUILD
 .RS 5
-Define this to build a release with a non-debug kernel. 
+Define this to build a release with a non-DEBUG kernel. 
 Generally, let
 .I nightly
 set this for you based on its options.
@@ -463,14 +467,7 @@
 .LP
 The following environment variables referenced by
 .I nightly
-are only required on IA32 realmode builds, enabled with option -X.
-.LP
-.B NTSERVER
-.RS 5
-The host name of the NT server to be used for realmode builds.
-It is unlikely there will be any public NT machines available,
-so you'll most likely need to set one of these up for your project's
-use if you need to build realmode.
+are only required when the -X option is used.
 .LP
 .RE
 .B IA32_IHV_WS
@@ -487,55 +484,20 @@
 .RE
 .B IA32_IHV_PKGS
 .RS 5
-Reference to the IHV workspace packages.
-The IHV workspace must be fully built before starting the ON realmode build.
+Reference to the IHV workspace packages.  If this is empty or the directory
+is non-existent, then nightly will skip copying the packages.
 .LP
 .RE
 .B IA32_IHV_BINARY_PKGS
 .RS 5
-Reference to binary-only IHV packages.  These packages must
-be available before starting the ON realmode build.
-.LP
-.RE
-.B DCB_ROOT
-.RS 5
-The DCB proto area containing all the individual realmode
-drivers used to construct the boot floppy.
-.LP
-.RE
-.B BOOTFLOPPY_ROOT
-.RS 5
-Boot floppy proto area containing the actual boot floppy image
-resulting from the build.
+Reference to binary-only IHV packages.  If this is empty or the directory
+is non-existent, then nightly will skip copying the packages.
 .LP
 .RE
 .B SPARC_RM_PKGARCHIVE
 .RS 5
 Destination for sparc realmode package SUNWrmodu.
 Yes, this sparc package really is built on x86.
-.LP
-.RE
-.B REF_PROTO_LIST_DCB
-.RS 5
-This is the reference DCB proto area to compare against
-the results of your build.  This makes it easy to see
-the changes introduced from one build to the next.
-.LP
-.RE
-.B REF_PROTO_LIST_BOOTFLOPPY
-.RS 5
-This is the reference BootFloppy proto area to compare against
-the results of your build.  This makes it easy to see
-the changes introduced from one build to the next.
-.SH REALMODE BUILDS
-.LP
-Since realmode builds are always non-DEBUG, there's no difference
-between the DEBUG & non-DEBUG versions of the realmode packages.
-All the realmode and IHV packages are installed by
-.I nightly
-in both the nightly and nightly-nd
-packages so both sets of packages are complete.
-This means both the IHV and ON builds must include non-DEBUG.
 .SH BUILDING THE IHV WORKSPACE
 .LP
 The IHV workspace can be built with
@@ -546,11 +508,8 @@
 NIGHTLY_OPTIONS="-pmWN"
 .RE
 .LP
-The NTSERVER variable must be set to provide the NT server
-to be used for the realmode part of the IHV build.  None
-of the other realmode environment variables needed for
-ON realmode builds are required to build the IHV
-workspace.
+None of the realmode environment variables needed for ON realmode builds
+are required to build the IHV workspace.
 .SH EXAMPLES
 .LP
 Start with the example file in usr/src/tools/env/developer.sh
--- a/usr/src/tools/scripts/nightly.sh	Thu Oct 05 14:56:57 2006 -0700
+++ b/usr/src/tools/scripts/nightly.sh	Thu Oct 05 17:29:17 2006 -0700
@@ -615,14 +615,14 @@
 
 copy_ihv_proto() {
 
-	echo "\n==== Installing $IA32_IHV_ROOT  ====\n" \
+	echo "\n==== Installing IHV proto area ====\n" \
 		>> $LOGFILE
 	if [ -d "$IA32_IHV_ROOT" ]; then
 		if [ ! -d "$ROOT" ]; then
 			echo "mkdir -p $ROOT" >> $LOGFILE
 			mkdir -p $ROOT
 		fi
-		echo "cd $IA32_IHV_ROOT\n" >> $LOGFILE
+		echo "copying $IA32_IHV_ROOT to $ROOT\n" >> $LOGFILE
 		cd $IA32_IHV_ROOT
 		tar -cf - . | (cd $ROOT; umask 0; tar xpf - ) 2>&1 >> $LOGFILE
 	else
@@ -1189,7 +1189,7 @@
 
 # we export POUND_SIGN to speed up the build process -- prevents evaluation of
 # the Makefile.master definitions.
-export o_FLAG POUND_SIGN
+export o_FLAG X_FLAG POUND_SIGN
 
 maketype="distributed"
 MAKE=dmake
@@ -1291,6 +1291,14 @@
                 echo "$IA32_IHV_ROOT: not found"
                 args_ok=n
         fi
+        if [ "$IA32_IHV_WS" = "" ]; then
+		echo "IA32_IHV_WS: must be set for copying ihv proto"
+		args_ok=n
+        fi
+        if [ ! -d "$IA32_IHV_WS" ]; then
+                echo "$IA32_IHV_WS: not found"
+                args_ok=n
+        fi
 fi
 
 # Append source version
@@ -1677,14 +1685,6 @@
 	fi
 fi
 
-# copy ihv proto area in addition to the build itself
-
-if [ "$X_FLAG" = "y" ]; then
-
-	# Install IA32 IHV proto area
-	copy_ihv_proto
-fi
-
 echo "==== Build environment ====\n" | tee -a $mail_msg_file >> $LOGFILE
 
 # System
@@ -1881,6 +1881,13 @@
 	build_tools ${TOOLS_PROTO}
 fi
 
+#
+# copy ihv proto area in addition to the build itself
+#
+if [ "$X_FLAG" = "y" ]; then
+	copy_ihv_proto
+fi
+
 if [ "$i_FLAG" = "y" -a "$SH_FLAG" = "y" ]; then
 	echo "\n==== NOT Building base OS-Net source ====\n" | \
 	    tee -a $LOGFILE >> $mail_msg_file
@@ -1971,6 +1978,9 @@
 		if [ -f $SRC/pkgdefs/$exc ]; then
 			ELIST="-e $SRC/pkgdefs/$exc"
 		fi
+		if [ "$X_FLAG" = "y" -a -f $IA32_IHV_WS/usr/src/pkgdefs/$exc ]; then
+			ELIST="$ELIST -e $IA32_IHV_WS/usr/src/pkgdefs/$exc"
+		fi
 
 		if [ -f "$REF_PROTO_LIST" ]; then
 			$PROTOCMPTERSE \
@@ -1991,6 +2001,9 @@
 				PKGDEFS_LIST="$PKGDEFS_LIST -d $d/pkgdefs"
 			fi
 		done
+		if [ "$X_FLAG" = "y" -a -d $IA32_IHV_WS/usr/src/pkgdefs ]; then
+			PKGDEFS_LIST="$PKGDEFS_LIST -d $IA32_IHV_WS/usr/src/pkgdefs"
+		fi
 
 		$PROTOCMPTERSE \
 		    "Files missing from the proto area:" \