ia64/xen-unstable

changeset 10729:84ff152efb0a

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@xensource.com>
author ack@localhost.localdomain
date Wed Jul 12 11:58:40 2006 +0100 (2006-07-12)
parents cebedeefbfbd
children b20580cf7fc1
files .hgignore buildconfigs/conf.linux-native/00_xen_to_native buildconfigs/create_config.sh buildconfigs/mk.linux-2.6-native buildconfigs/mk.linux-2.6-xen
line diff
     1.1 --- a/.hgignore	Wed Jul 12 11:55:10 2006 +0100
     1.2 +++ b/.hgignore	Wed Jul 12 11:58:40 2006 +0100
     1.3 @@ -54,6 +54,7 @@
     1.4  ^extras/mini-os/h/xen-public$
     1.5  ^extras/mini-os/mini-os\..*$
     1.6  ^install/.*$
     1.7 +^linux-[^/]*-native/.*$
     1.8  ^linux-[^/]*-xen/.*$
     1.9  ^linux-[^/]*-xen0/.*$
    1.10  ^linux-[^/]*-xenU/.*$
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/buildconfigs/conf.linux-native/00_xen_to_native	Wed Jul 12 11:58:40 2006 +0100
     2.3 @@ -0,0 +1,84 @@
     2.4 +# Linux kernel version: 2.6.16.13-native
     2.5 +# Mon May 15 10:59:54 2006
     2.6 +#
     2.7 +CONFIG_X86_PC=y
     2.8 +# CONFIG_X86_XEN is not set
     2.9 +# CONFIG_HPET_TIMER is not set
    2.10 +# CONFIG_SCHED_SMT is not set
    2.11 +# CONFIG_X86_MCE is not set
    2.12 +# CONFIG_X86_MSR is not set
    2.13 +# CONFIG_SWIOTLB is not set
    2.14 +# CONFIG_EDD is not set
    2.15 +CONFIG_ARCH_FLATMEM_ENABLE=y
    2.16 +CONFIG_ARCH_SPARSEMEM_ENABLE=y
    2.17 +CONFIG_ARCH_SELECT_MEMORY_MODEL=y
    2.18 +CONFIG_SPARSEMEM_STATIC=y
    2.19 +CONFIG_SPLIT_PTLOCK_CPUS=4
    2.20 +# CONFIG_HIGHPTE is not set
    2.21 +# CONFIG_MATH_EMULATION is not set
    2.22 +# CONFIG_EFI is not set
    2.23 +CONFIG_IRQBALANCE=y
    2.24 +# CONFIG_KEXEC is not set
    2.25 +CONFIG_DOUBLEFAULT=y
    2.26 +CONFIG_PM_LEGACY=y
    2.27 +# CONFIG_PM_DEBUG is not set
    2.28 +# CONFIG_SOFTWARE_SUSPEND is not set
    2.29 +CONFIG_SUSPEND_SMP=y
    2.30 +CONFIG_ACPI_SLEEP=y
    2.31 +CONFIG_ACPI_SLEEP_PROC_FS=y
    2.32 +# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
    2.33 +CONFIG_X86_PM_TIMER=y
    2.34 +# APM (Advanced Power Management) BIOS Support
    2.35 +#
    2.36 +# CONFIG_APM is not set
    2.37 +
    2.38 +#
    2.39 +CONFIG_PCI_BIOS=y
    2.40 +# CONFIG_XEN_PCIDEV_FRONTEND is not set
    2.41 +# CONFIG_XEN_PCIDEV_FE_DEBUG is not set
    2.42 +# CONFIG_PCI_MSI is not set
    2.43 +# CONFIG_ISA is not set
    2.44 +# CONFIG_MCA is not set
    2.45 +# CONFIG_HOTPLUG_PCI_COMPAQ is not set
    2.46 +# CONFIG_HOTPLUG_PCI_IBM is not set
    2.47 +# CONFIG_I2O_EXT_ADAPTEC_DMA64 is not set
    2.48 +CONFIG_SERIAL_8250=y
    2.49 +CONFIG_SERIAL_8250_CONSOLE=y
    2.50 +CONFIG_SERIAL_CORE=y
    2.51 +CONFIG_SERIAL_CORE_CONSOLE=y
    2.52 +# CONFIG_TCG_XEN is not set
    2.53 +# CONFIG_HUGETLBFS is not set
    2.54 +# CONFIG_XEN is not set
    2.55 +# CONFIG_XEN_INTERFACE_VERSION is not set
    2.56 +
    2.57 +#
    2.58 +# XEN
    2.59 +#
    2.60 +# CONFIG_XEN_PRIVILEGED_GUEST is not set
    2.61 +# CONFIG_XEN_UNPRIVILEGED_GUEST is not set
    2.62 +# CONFIG_XEN_BACKEND is not set
    2.63 +# CONFIG_XEN_PCIDEV_BACKEND is not set
    2.64 +# CONFIG_XEN_PCIDEV_BACKEND_VPCI is not set
    2.65 +# CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
    2.66 +# CONFIG_XEN_PCIDEV_BE_DEBUG is not set
    2.67 +# CONFIG_XEN_BLKDEV_BACKEND is not set
    2.68 +# CONFIG_XEN_BLKDEV_TAP_BE is not set
    2.69 +# CONFIG_XEN_NETDEV_BACKEND is not set
    2.70 +# CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set
    2.71 +# CONFIG_XEN_NETDEV_LOOPBACK is not set
    2.72 +# CONFIG_XEN_TPMDEV_BACKEND is not set
    2.73 +# CONFIG_XEN_BLKDEV_FRONTEND is not set
    2.74 +# CONFIG_XEN_NETDEV_FRONTEND is not set
    2.75 +# CONFIG_XEN_BLKDEV_TAP is not set
    2.76 +# CONFIG_XEN_SCRUB_PAGES is not set
    2.77 +# CONFIG_XEN_DISABLE_SERIAL is not set
    2.78 +# CONFIG_XEN_SYSFS is not set
    2.79 +# CONFIG_XEN_COMPAT_030002_AND_LATER is not set
    2.80 +# CONFIG_XEN_COMPAT_LATEST_ONLY is not set
    2.81 +# CONFIG_XEN_COMPAT_030002 is not set
    2.82 +# CONFIG_HAVE_ARCH_ALLOC_SKB is not set
    2.83 +# CONFIG_HAVE_ARCH_DEV_ALLOC_SKB is not set
    2.84 +# CONFIG_NO_IDLE_HZ is not set
    2.85 +CONFIG_X86_HT=y
    2.86 +# CONFIG_X86_NO_TSS is not set
    2.87 +# CONFIG_X86_NO_IDT is not set
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/buildconfigs/create_config.sh	Wed Jul 12 11:58:40 2006 +0100
     3.3 @@ -0,0 +1,50 @@
     3.4 +#!/bin/sh
     3.5 +set -e
     3.6 +
     3.7 +
     3.8 +# Parse arguments
     3.9 +#
    3.10 +if [ $# -lt 1 -o $# -gt 4 ]; then
    3.11 +    echo "Usage: $0 config-file EXTRAVERSION XEN_TARGET_ARCH XEN_SYSTYPE"
    3.12 +    exit 1
    3.13 +fi
    3.14 +
    3.15 +config_file=$1
    3.16 +extraversion=$2
    3.17 +target_arch=$3
    3.18 +systype=$4
    3.19 +
    3.20 +
    3.21 +# Start with initial config skeleton file, if any.
    3.22 +# Derive from linux-defconfig_xen_x86_32 otherwise.
    3.23 +#
    3.24 +skeleton=buildconfigs/linux-defconfig_${extraversion}_${target_arch}${systype}
    3.25 +[ -r $skeleton ] || skeleton=buildconfigs/linux-defconfig_xen_x86_32
    3.26 +cp $skeleton $config_file
    3.27 +
    3.28 +
    3.29 +# Update
    3.30 +#
    3.31 +filter_template="s/^#\{0,1\} *\(CONFIG[^= ]*\).*/\/^#\\\{0,1\\\} *\1[= ].*\/d/p"
    3.32 +config_dirs="buildconfigs/conf.linux buildconfigs/conf.linux-${target_arch} buildconfigs/conf.linux-${extraversion} buildconfigs/conf.linux-${target_arch}-${extraversion}"
    3.33 +
    3.34 +for config_dir in $config_dirs
    3.35 +do
    3.36 +    if [ -d $config_dir ]; then
    3.37 +        # processing is done in alphanumeric order
    3.38 +        find $config_dir -type f | sort | while read update
    3.39 +        do
    3.40 +            # create the filter rules in a temp file
    3.41 +            filter_rules=`mktemp -t xenupdateconf.XXXXXXXXXX`
    3.42 +            sed -n "${filter_template}" < $update > $filter_rules
    3.43 +
    3.44 +            # filter the config file in place, removing any options that
    3.45 +            # will be updated.
    3.46 +            sed -f $filter_rules -i $config_file
    3.47 +            cat $update >> $config_file
    3.48 +
    3.49 +            # clean up
    3.50 +            rm -f $filter_rules
    3.51 +        done
    3.52 +    fi
    3.53 +done
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/buildconfigs/mk.linux-2.6-native	Wed Jul 12 11:58:40 2006 +0100
     4.3 @@ -0,0 +1,4 @@
     4.4 +EXTRAVERSION = native
     4.5 +IMAGE_TARGET = bzImage
     4.6 +INSTALL_BOOT_PATH = $(DESTDIR)/boot
     4.7 +include buildconfigs/mk.linux-2.6-xen
     5.1 --- a/buildconfigs/mk.linux-2.6-xen	Wed Jul 12 11:55:10 2006 +0100
     5.2 +++ b/buildconfigs/mk.linux-2.6-xen	Wed Jul 12 11:58:40 2006 +0100
     5.3 @@ -5,6 +5,9 @@ EXTRAVERSION ?= xen
     5.4  
     5.5  LINUX_DIR    = linux-$(LINUX_VER)-$(EXTRAVERSION)
     5.6  
     5.7 +IMAGE_TARGET ?= vmlinuz
     5.8 +INSTALL_BOOT_PATH ?= $(DESTDIR)
     5.9 +
    5.10  LINUX_VER3  := $(LINUX_SERIES).$(word 3, $(subst ., ,$(LINUX_VER)))
    5.11  
    5.12  include buildconfigs/Rules.mk
    5.13 @@ -16,8 +19,9 @@ build: $(LINUX_DIR)/include/linux/autoco
    5.14  	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
    5.15  	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    5.16  	fi
    5.17 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) vmlinuz
    5.18 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
    5.19 +	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) $(IMAGE_TARGET)
    5.20 +	mkdir -p $(INSTALL_BOOT_PATH)
    5.21 +	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(INSTALL_BOOT_PATH) install
    5.22  
    5.23  $(LINUX_DIR)/include/linux/autoconf.h: ref-linux-$(LINUX_VER)/.valid-ref
    5.24  	rm -rf $(LINUX_DIR)
    5.25 @@ -29,8 +33,7 @@ build: $(LINUX_DIR)/include/linux/autoco
    5.26  	CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
    5.27  	[ -r $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
    5.28  	  cp $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
    5.29 -	  || cp buildconfigs/linux-defconfig_$(EXTRAVERSION)_$(XEN_TARGET_ARCH)$(XEN_SYSTYPE) \
    5.30 -		$(LINUX_DIR)/.config
    5.31 +	  || sh buildconfigs/create_config.sh $(LINUX_DIR)/.config $(EXTRAVERSION) $(XEN_TARGET_ARCH) $(XEN_SYSTYPE)
    5.32  	# See if we need to munge config to enable PAE
    5.33  	$(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk config-update-pae
    5.34  	# Patch kernel Makefile to set EXTRAVERSION