Add hooks for a script to update kernel configuration after tree has been

prepared. This is to support upstream sources which do not enable Xen in their
default configurations.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
This commit is contained in:
Ian Campbell committed 2007-07-09 11:29:39 +01:00
1 parent 2141bdd107
commit 97e8f14b87
3 files changed
+43 -1

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
#!/bin/sh
set -ex
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
y|m) echo "${OPTION}=${VALUE}" >> "${CONFIG}" ;;
n) echo "# ${OPTION} is not set" >> "${CONFIG}" ;;
*) echo "Invalid value ${VALUE} for ${OPTION}" 1>&2 ; exit 1 ;;
esac
}
setopt CONFIG_PARAVIRT y
setopt CONFIG_XEN y
setopt CONFIG_VMI y
setopt CONFIG_LGUEST n
setopt CONFIG_XEN_BLKDEV_FRONTEND y
setopt CONFIG_XEN_NETDEV_FRONTEND y
setopt CONFIG_HVC_XEN y
exit 0
+3 -1
View File
@@ -8,6 +8,8 @@ IMAGE_TARGET ?= vmlinux bzImage
XEN_LINUX_ALLOW_INTERFACE_MISMATCH := y
EXTRAVERSION ?=
XEN_LINUX_CONFIG_UPDATE := buildconfigs/enable-xen-config
EXTRAVERSION ?= -paravirt
include buildconfigs/mk.linux-2.6-xen
+4
View File
@@ -74,6 +74,10 @@ $(LINUX_DIR)/include/linux/autoconf.h: $(LINUX_SRCDIR)/.valid-src
else \
echo "No configuration method found for this kernel" ; \
fi
ifneq ($(XEN_LINUX_CONFIG_UPDATE),)
echo "Updating $(CONFIG_FILE) using $(XEN_LINUX_CONFIG_UPDATE)"
sh $(XEN_LINUX_CONFIG_UPDATE) $(CONFIG_FILE)
endif
ifeq ($(XEN_TARGET_ARCH),x86_32)
ifeq ($(pae),y)
sed -e 's!^CONFIG_HIGHMEM4G=y$$!\# CONFIG_HIGHMEM4G is not set!;s!^\# CONFIG_HIGHMEM64G is not set$$!CONFIG_HIGHMEM64G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.