[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Add linux config update script and native linux build.



# HG changeset patch
# User ack@xxxxxxxxxxxxxxxxxxxxx
# Node ID 84ff152efb0aa9252df4dccd4e9e539569f9f55d
# Parent  cebedeefbfbd7114292cc55c5dbeff44b8b30bd5
Add linux config update script and native linux build.
Update script generates linux config files from others, reducing
the burden of maintaining multiple parallel files.
Signed-off-by: Emmanuel Ackaouy <ack@xxxxxxxxxxxxx>
---
 .hgignore                                       |    1 
 buildconfigs/conf.linux-native/00_xen_to_native |   84 ++++++++++++++++++++++++
 buildconfigs/create_config.sh                   |   50 ++++++++++++++
 buildconfigs/mk.linux-2.6-native                |    4 +
 buildconfigs/mk.linux-2.6-xen                   |   11 ++-
 5 files changed, 146 insertions(+), 4 deletions(-)

diff -r cebedeefbfbd -r 84ff152efb0a .hgignore
--- a/.hgignore Wed Jul 12 11:55:10 2006 +0100
+++ b/.hgignore Wed Jul 12 11:58:40 2006 +0100
@@ -54,6 +54,7 @@
 ^extras/mini-os/h/xen-public$
 ^extras/mini-os/mini-os\..*$
 ^install/.*$
+^linux-[^/]*-native/.*$
 ^linux-[^/]*-xen/.*$
 ^linux-[^/]*-xen0/.*$
 ^linux-[^/]*-xenU/.*$
diff -r cebedeefbfbd -r 84ff152efb0a buildconfigs/mk.linux-2.6-xen
--- a/buildconfigs/mk.linux-2.6-xen     Wed Jul 12 11:55:10 2006 +0100
+++ b/buildconfigs/mk.linux-2.6-xen     Wed Jul 12 11:58:40 2006 +0100
@@ -4,6 +4,9 @@ EXTRAVERSION ?= xen
 EXTRAVERSION ?= xen
 
 LINUX_DIR    = linux-$(LINUX_VER)-$(EXTRAVERSION)
+
+IMAGE_TARGET ?= vmlinuz
+INSTALL_BOOT_PATH ?= $(DESTDIR)
 
 LINUX_VER3  := $(LINUX_SERIES).$(word 3, $(subst ., ,$(LINUX_VER)))
 
@@ -16,8 +19,9 @@ build: $(LINUX_DIR)/include/linux/autoco
            $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
            $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) 
INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
        fi
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) 
vmlinuz
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) 
install
+       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) 
$(IMAGE_TARGET)
+       mkdir -p $(INSTALL_BOOT_PATH)
+       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) 
INSTALL_PATH=$(INSTALL_BOOT_PATH) install
 
 $(LINUX_DIR)/include/linux/autoconf.h: ref-linux-$(LINUX_VER)/.valid-ref
        rm -rf $(LINUX_DIR)
@@ -29,8 +33,7 @@ build: $(LINUX_DIR)/include/linux/autoco
        CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' 
$(LINUX_DIR)/Makefile); \
        [ -r 
$(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
          cp 
$(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) 
$(LINUX_DIR)/.config \
-         || cp 
buildconfigs/linux-defconfig_$(EXTRAVERSION)_$(XEN_TARGET_ARCH)$(XEN_SYSTYPE) \
-               $(LINUX_DIR)/.config
+         || sh buildconfigs/create_config.sh $(LINUX_DIR)/.config 
$(EXTRAVERSION) $(XEN_TARGET_ARCH) $(XEN_SYSTYPE)
        # See if we need to munge config to enable PAE
        $(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk 
config-update-pae
        # Patch kernel Makefile to set EXTRAVERSION
diff -r cebedeefbfbd -r 84ff152efb0a 
buildconfigs/conf.linux-native/00_xen_to_native
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/buildconfigs/conf.linux-native/00_xen_to_native   Wed Jul 12 11:58:40 
2006 +0100
@@ -0,0 +1,84 @@
+# Linux kernel version: 2.6.16.13-native
+# Mon May 15 10:59:54 2006
+#
+CONFIG_X86_PC=y
+# CONFIG_X86_XEN is not set
+# CONFIG_HPET_TIMER is not set
+# CONFIG_SCHED_SMT is not set
+# CONFIG_X86_MCE is not set
+# CONFIG_X86_MSR is not set
+# CONFIG_SWIOTLB is not set
+# CONFIG_EDD is not set
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_SPARSEMEM_STATIC=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_HIGHPTE is not set
+# CONFIG_MATH_EMULATION is not set
+# CONFIG_EFI is not set
+CONFIG_IRQBALANCE=y
+# CONFIG_KEXEC is not set
+CONFIG_DOUBLEFAULT=y
+CONFIG_PM_LEGACY=y
+# CONFIG_PM_DEBUG is not set
+# CONFIG_SOFTWARE_SUSPEND is not set
+CONFIG_SUSPEND_SMP=y
+CONFIG_ACPI_SLEEP=y
+CONFIG_ACPI_SLEEP_PROC_FS=y
+# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
+CONFIG_X86_PM_TIMER=y
+# APM (Advanced Power Management) BIOS Support
+#
+# CONFIG_APM is not set
+
+#
+CONFIG_PCI_BIOS=y
+# CONFIG_XEN_PCIDEV_FRONTEND is not set
+# CONFIG_XEN_PCIDEV_FE_DEBUG is not set
+# CONFIG_PCI_MSI is not set
+# CONFIG_ISA is not set
+# CONFIG_MCA is not set
+# CONFIG_HOTPLUG_PCI_COMPAQ is not set
+# CONFIG_HOTPLUG_PCI_IBM is not set
+# CONFIG_I2O_EXT_ADAPTEC_DMA64 is not set
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_TCG_XEN is not set
+# CONFIG_HUGETLBFS is not set
+# CONFIG_XEN is not set
+# CONFIG_XEN_INTERFACE_VERSION is not set
+
+#
+# XEN
+#
+# CONFIG_XEN_PRIVILEGED_GUEST is not set
+# CONFIG_XEN_UNPRIVILEGED_GUEST is not set
+# CONFIG_XEN_BACKEND is not set
+# CONFIG_XEN_PCIDEV_BACKEND is not set
+# CONFIG_XEN_PCIDEV_BACKEND_VPCI is not set
+# CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
+# CONFIG_XEN_PCIDEV_BE_DEBUG is not set
+# CONFIG_XEN_BLKDEV_BACKEND is not set
+# CONFIG_XEN_BLKDEV_TAP_BE is not set
+# CONFIG_XEN_NETDEV_BACKEND is not set
+# CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set
+# CONFIG_XEN_NETDEV_LOOPBACK is not set
+# CONFIG_XEN_TPMDEV_BACKEND is not set
+# CONFIG_XEN_BLKDEV_FRONTEND is not set
+# CONFIG_XEN_NETDEV_FRONTEND is not set
+# CONFIG_XEN_BLKDEV_TAP is not set
+# CONFIG_XEN_SCRUB_PAGES is not set
+# CONFIG_XEN_DISABLE_SERIAL is not set
+# CONFIG_XEN_SYSFS is not set
+# CONFIG_XEN_COMPAT_030002_AND_LATER is not set
+# CONFIG_XEN_COMPAT_LATEST_ONLY is not set
+# CONFIG_XEN_COMPAT_030002 is not set
+# CONFIG_HAVE_ARCH_ALLOC_SKB is not set
+# CONFIG_HAVE_ARCH_DEV_ALLOC_SKB is not set
+# CONFIG_NO_IDLE_HZ is not set
+CONFIG_X86_HT=y
+# CONFIG_X86_NO_TSS is not set
+# CONFIG_X86_NO_IDT is not set
diff -r cebedeefbfbd -r 84ff152efb0a buildconfigs/create_config.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/buildconfigs/create_config.sh     Wed Jul 12 11:58:40 2006 +0100
@@ -0,0 +1,50 @@
+#!/bin/sh
+set -e
+
+
+# Parse arguments
+#
+if [ $# -lt 1 -o $# -gt 4 ]; then
+    echo "Usage: $0 config-file EXTRAVERSION XEN_TARGET_ARCH XEN_SYSTYPE"
+    exit 1
+fi
+
+config_file=$1
+extraversion=$2
+target_arch=$3
+systype=$4
+
+
+# Start with initial config skeleton file, if any.
+# Derive from linux-defconfig_xen_x86_32 otherwise.
+#
+skeleton=buildconfigs/linux-defconfig_${extraversion}_${target_arch}${systype}
+[ -r $skeleton ] || skeleton=buildconfigs/linux-defconfig_xen_x86_32
+cp $skeleton $config_file
+
+
+# Update
+#
+filter_template="s/^#\{0,1\} *\(CONFIG[^= ]*\).*/\/^#\\\{0,1\\\} *\1[= 
].*\/d/p"
+config_dirs="buildconfigs/conf.linux buildconfigs/conf.linux-${target_arch} 
buildconfigs/conf.linux-${extraversion} 
buildconfigs/conf.linux-${target_arch}-${extraversion}"
+
+for config_dir in $config_dirs
+do
+    if [ -d $config_dir ]; then
+        # processing is done in alphanumeric order
+        find $config_dir -type f | sort | while read update
+        do
+            # create the filter rules in a temp file
+            filter_rules=`mktemp -t xenupdateconf.XXXXXXXXXX`
+            sed -n "${filter_template}" < $update > $filter_rules
+
+            # filter the config file in place, removing any options that
+            # will be updated.
+            sed -f $filter_rules -i $config_file
+            cat $update >> $config_file
+
+            # clean up
+            rm -f $filter_rules
+        done
+    fi
+done
diff -r cebedeefbfbd -r 84ff152efb0a buildconfigs/mk.linux-2.6-native
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/buildconfigs/mk.linux-2.6-native  Wed Jul 12 11:58:40 2006 +0100
@@ -0,0 +1,4 @@
+EXTRAVERSION = native
+IMAGE_TARGET = bzImage
+INSTALL_BOOT_PATH = $(DESTDIR)/boot
+include buildconfigs/mk.linux-2.6-xen

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.