diff mbox

[Xen-devel,OSSTEST,2/4] import enable-xen-config from xen.git, use for ts-kernel-build

Message ID 1395229675-13658-2-git-send-email-ian.campbell@citrix.com
State New
Headers show

Commit Message

Ian Campbell March 19, 2014, 11:47 a.m. UTC
I plan to remove it from xen.git. Take the version from a03984e7bcdf which
hasn't changed since 8dedf6431393 in 2010.

Update ts-kernel-build to not require xen.git.

config_intree_buildconfigs was unused so remove it.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 enable-xen-config | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 mfi-common        |   2 -
 ts-kernel-build   |  21 +--------
 3 files changed, 129 insertions(+), 21 deletions(-)
 create mode 100755 enable-xen-config

Comments

Ian Jackson March 19, 2014, 12:09 p.m. UTC | #1
Ian Campbell writes ("[PATCH OSSTEST 2/4] import enable-xen-config from xen.git, use for ts-kernel-build"):
> I plan to remove it from xen.git. Take the version from a03984e7bcdf which
> hasn't changed since 8dedf6431393 in 2010.
> 
> Update ts-kernel-build to not require xen.git.

>  enable-xen-config | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++++++

I normally try to avoid random files like this floating about in
osstest.git.  Shouldn't this be a here document (in ts-kernel-build,
probably) ?

Ian.
Ian Campbell March 19, 2014, 12:22 p.m. UTC | #2
On Wed, 2014-03-19 at 12:09 +0000, Ian Jackson wrote:
> Ian Campbell writes ("[PATCH OSSTEST 2/4] import enable-xen-config from xen.git, use for ts-kernel-build"):
> > I plan to remove it from xen.git. Take the version from a03984e7bcdf which
> > hasn't changed since 8dedf6431393 in 2010.
> > 
> > Update ts-kernel-build to not require xen.git.
> 
> >  enable-xen-config | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 
> I normally try to avoid random files like this floating about in
> osstest.git.  Shouldn't this be a here document (in ts-kernel-build,
> probably) ?

I wondered about that but thought it was a bit long (50% the size of the
script it goes in), but I will do it this way now that you've expressed
the preference.

Ian.
diff mbox

Patch

diff --git a/enable-xen-config b/enable-xen-config
new file mode 100755
index 0000000..7ee4d37
--- /dev/null
+++ b/enable-xen-config
@@ -0,0 +1,127 @@ 
+#!/bin/sh
+
+set -e
+
+if [ $# -ne 1 ] ; then
+	echo "Usage $(basename $0) <config-file>" 1>&2
+	exit 1
+fi
+
+CONFIG=$1
+
+setopt()
+{
+	OPTION=$1
+	VALUE=$2
+
+	# First remove any existing instances of this option
+	sed -e "s/^# ${OPTION} is not set$//g ; s/^${OPTION}=.*$//g" -i "${CONFIG}"
+
+	# Then append the new value
+	case ${VALUE} in
+	    n)     echo "# ${OPTION} is not set" >> "${CONFIG}" ;;
+	    y|m|*) echo "${OPTION}=${VALUE}" >> "${CONFIG}" ;;
+	esac
+}
+
+setopt CONFIG_PARAVIRT y
+setopt CONFIG_PARAVIRT_DEBUG y
+setopt CONFIG_PARAVIRT_GUEST y
+setopt CONFIG_PARAVIRT_SPINLOCKS y
+
+setopt CONFIG_XEN y
+setopt CONFIG_XEN_BLKDEV_FRONTEND y
+setopt CONFIG_XEN_NETDEV_FRONTEND y
+setopt CONFIG_XEN_KBDDEV_FRONTEND y
+setopt CONFIG_XEN_FBDEV_FRONTEND y
+setopt CONFIG_XEN_PCIDEV_FRONTEND y
+setopt CONFIG_XEN_BALLOON y
+setopt CONFIG_XEN_SCRUB_PAGES y
+setopt CONFIG_XEN_DEV_EVTCHN y
+setopt CONFIG_XEN_BACKEND y
+setopt CONFIG_XEN_BLKDEV_BACKEND y
+setopt CONFIG_XEN_BLKDEV_TAP y
+setopt CONFIG_XEN_NETDEV_BACKEND y
+setopt CONFIG_XEN_PCIDEV_BACKEND y
+setopt CONFIG_XEN_PCIDEV_BACKEND_VPCI y
+setopt CONFIG_XEN_PCIDEV_BACKEND_PASS n
+setopt CONFIG_XEN_PCIDEV_BACKEND_SLOT n
+setopt CONFIG_XEN_PCIDEV_BE_DEBUG n
+setopt CONFIG_XENFS y
+setopt CONFIG_XEN_COMPAT_XENFS y
+setopt CONFIG_XEN_PCI_PASSTHROUGH y
+setopt CONFIG_HVC_XEN y
+setopt CONFIG_XEN_MAX_DOMAIN_MEMORY 32
+setopt CONFIG_XEN_DEBUG_FS y
+setopt CONFIG_XEN_DOM0 y
+setopt CONFIG_XEN_SYS_HYPERVISOR y
+setopt CONFIG_XEN_GNTDEV y
+setopt CONFIG_XEN_PLATFORM_PCI y
+
+setopt CONFIG_VMI y
+setopt CONFIG_TUN y
+
+setopt CONFIG_KVM y
+setopt CONFIG_KVM_INTEL y
+setopt CONFIG_KVM_AMD y
+setopt CONFIG_KVM_CLOCK y
+setopt CONFIG_KVM_GUEST n
+setopt CONFIG_KVM_TRACE n
+
+setopt CONFIG_LGUEST n
+
+setopt CONFIG_LOCALVERSION_AUTO n
+
+setopt CONFIG_BRIDGE y
+
+setopt CONFIG_DEBUG_STACK_USAGE n
+
+setopt CONFIG_MEMORY_HOTPLUG y
+setopt CONFIG_MEMORY_HOTREMOVE y
+
+setopt CONFIG_MIGRATION n
+
+setopt CONFIG_ACPI_HOTPLUG_MEMORY n
+
+# Should all be set one way or another in defconfig but aren't
+setopt CONFIG_NUMA n
+setopt CONFIG_X86_VSMP n
+setopt CONFIG_X86_UV n
+setopt CONFIG_CALGARY_IOMMU n
+setopt CONFIG_AMD_IOMMU n
+setopt CONFIG_MAXSMP n
+setopt CONFIG_SPARSEMEM_VMEMMAP n
+setopt CONFIG_I7300_IDLE n
+setopt CONFIG_DMAR n
+setopt CONFIG_INTR_REMAP n
+setopt CONFIG_GFS2_FS n
+setopt CONFIG_IOMMU_DEBUG n
+setopt CONFIG_X86_MCE_INTEL n
+setopt CONFIG_X86_MCE_AMD n
+setopt CONFIG_CRYPTO_AES_NI_INTEL n
+setopt CONFIG_CISS_SCSI_TAPE n
+
+setopt CONFIG_FUSION y
+setopt CONFIG_FUSION_SPI m
+setopt CONFIG_FUSION_SAS m
+setopt CONFIG_FUSION_FC m
+setopt CONFIG_FUSION_MAX_SGE 128
+setopt CONFIG_FUSION_CTL n
+setopt CONFIG_FUSION_LOGGING n
+
+setopt CONFIG_BLK_CPQ_CISS_DA m
+
+case ${XEN_TARGET_ARCH} in
+    x86_32) setopt CONFIG_64BIT n ;;
+    x86_64)
+	setopt CONFIG_64BIT y
+	setopt CONFIG_IA32_EMULATION y
+	setopt CONFIG_IA32_AOUT n
+	setopt CONFIG_CRYPTO_AES_X86_64 n
+	setopt CONFIG_CRYPTO_SALSA20_X86_64 n
+	setopt CONFIG_CRYPTO_TWOFISH_X86_64 n
+	;;
+    *) ;;
+esac
+
+exit 0
diff --git a/mfi-common b/mfi-common
index 52ed4d4..df7f8b0 100644
--- a/mfi-common
+++ b/mfi-common
@@ -153,11 +153,9 @@  create_build_jobs () {
 
     ./cs-job-create $flight build-$arch-pvops build-kern                     \
                 arch=$arch kconfighow=xen-enable-xen-config                  \
-        tree_xen=$TREE_XEN                                                   \
                 $RUNVARS $BUILD_RUNVARS $BUILD_LINUX_RUNVARS $arch_runvars   \
                 $suite_runvars                                               \
                 host_hostflags=$build_hostflags                              \
-                revision_xen=$REVISION_XEN                                   \
                 $pvops_kernel $pvops_kconfig_overrides                       \
                 ${TREEVCS_LINUX:+treevcs_linux=}${TREEVCS_LINUX}             \
                 tree_linuxfirmware=$TREE_LINUXFIRMWARE                       \
diff --git a/ts-kernel-build b/ts-kernel-build
index 05d9e96..f80d857 100755
--- a/ts-kernel-build
+++ b/ts-kernel-build
@@ -41,8 +41,6 @@  my $archparms = {
 sub checkout () {
     target_cmd($ho, "rm -rf $builddir && mkdir $builddir", 600);
 
-    build_clone($ho, 'xen', $builddir, 'xen-unstable');
-
     build_clone($ho, 'linux', $builddir, 'linux');
 
     if (length($r{tree_pq_linux})) {
@@ -250,8 +248,9 @@  $config_features
 $config_runvars
 END
 
+    target_putfile($ho, 1000, "enable-xen-config", "$builddir/enable-xen-config");
+
     target_cmd_build($ho, 1000, $builddir, <<END);
-        cp xen-unstable/buildconfigs/enable-xen-config .
         ed <$edscript enable-xen-config
         chmod +x enable-xen-config
         cd linux
@@ -264,22 +263,6 @@  END
     # /;
 }
 
-sub config_intree_buildconfigs () {
-    my $edscript= stash_config_edscript(<<END);
-$config_hardware
-$config_features
-END
-    target_cmd_build($ho, 1000, $builddir, <<END);
-        sed 's/setopt CONFIG/true &/' xen-unstable/buildconfigs/enable-xen-config >enable-device-configs
-        ed <$edscript enable-device-configs
-        chmod +x enable-device-configs
-	cd linux
-	make -f buildconfigs/Rules.mk defconfig </dev/null
-        ../enable-device-configs .config
-        yes '' | make oldconfig
-END
-}
-
 sub config () {
     my $confighow= $r{kconfighow};
     $confighow =~ s/\W/_/g;