[packages/kernel/openvz-2.6.32] openvz unfinished work on 2.6.32 kernel
glen
glen at pld-linux.org
Sun Jun 16 23:14:11 CEST 2013
commit 2807be362783bd28dfddfaa576ed0385741a4938
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Jun 17 00:13:34 2013 +0300
openvz unfinished work on 2.6.32 kernel
kernel-openvz.config | 19 +++++++
kernel-rhel.config | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++
kernel.make | 1 +
kernel.spec | 62 ++++++++++++++++++++-
4 files changed, 234 insertions(+), 3 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index 5b5ff15..f65ebc1 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -49,6 +49,8 @@
%bcond_without tuxonice # support for tuxonice (ex-suspend2) (enabled by default)
%bcond_without apparmor # build kernel with apparmor (exerimental mix)
+%bcond_with openvz # support for openvz.org (rhel and openvz patches)
+
%bcond_with rescuecd # build kernel for our rescue
%bcond_with myown # build with your own config (kernel-myown.config)
@@ -96,6 +98,18 @@
%define have_sound 0
%endif
+%if %{with openvz}
+# other combinations not supported
+%unglobal with_apparmor
+%unglobal with_tuxonice
+%unglobal with_grsecurity
+%unglobal with_grsec_full
+%unglobal with_grsec_minimal
+%unglobal with_pax
+%unglobal with_vserver
+%unglobal with_reiser4
+%endif
+
%if %{with myown}
%define have_drm 0
%define have_oss 0
@@ -108,13 +122,16 @@
%define have_drm 0
%define have_oss 0
%endif
-
%if %{without pcmcia}
%define have_pcmcia 0
%endif
%define basever 2.6.32
+%if %{with openvz}
+%define postver %{nil}
+%else
%define postver .58
+%endif
%define rel 1
%define _enable_debug_packages 0
@@ -136,6 +153,9 @@
%if %{with rescuecd}
%define alt_kernel rescuecd
%endif
+%if %{with openvz}
+%define alt_kernel ovz
+%endif
# kernel release (used in filesystem and eventually in uname -r)
# modules will be looked from /lib/modules/%{kernel_release}
@@ -182,6 +202,8 @@ Source41: kernel-patches.config
Source42: kernel-tuxonice.config
Source43: kernel-vserver.config
Source45: kernel-grsec.config
+Source46: kernel-rhel.config
+Source47: kernel-openvz.config
Source49: kernel-pax.config
Source50: kernel-no-pax.config
@@ -275,6 +297,12 @@ Patch90: kernel-mpt-fusion.patch
Patch100: kernel-vserver-2.3.patch
Patch101: kernel-vserver-fixes.patch
+# based on http://download.openvz.org/kernel/branches/rhel6-2.6.32/current/patches/patch-042stab037.1-combined.gz
+#Patch120: http://download.openvz.org/kernel/branches/rhel6-2.6.32/current/patches/patch-042stab037.1-combined.gz
+# http://sisyphus.ru/en/srpm/Sisyphus/kernel-image-ovz-el/get
+Patch120: kernel-image-ovz-el-2.6.32-alt39.patch
+Patch121: rhel-fixes.patch
+
# Wake-On-Lan fix for nForce drivers; using http://atlas.et.tudelft.nl/verwei90/nforce2/wol.html
# Fix verified for that kernel version.
Patch130: kernel-forcedeth-WON.patch
@@ -458,6 +486,10 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%endif
%define MakeOpts %{CrossOpts} HOSTCC="%{__cc}"
+%if %{with opevnz}
+%define __specflags -Wnoerror=implicit-function-declaration
+%endif
+
%define __features Netfilter module dated: %{netfilter_snap}\
%{?with_grsec_full:Grsecurity support - enabled}\
%{?with_grsec_minimal:Grsecurity minimal support /proc,link,fifo,shm/ - enabled}\
@@ -698,6 +730,7 @@ sed -i 's/-Werror//' arch/alpha/kernel/Makefile
%{__bzip2} -dc %{SOURCE1} | patch -p1 -s
%endif
+%if 0
# tuxonice:
%if %{with tuxonice}
%patch69 -p1
@@ -795,10 +828,20 @@ sed -i 's/-Werror//' arch/alpha/kernel/Makefile
# vserver
%if %{with vserver}
-%patch100 -p1
+exit 11; %patch100 -p1
%patch101 -p1
%endif
+%endif
+
+# openvz
+%if %{with openvz}
+%patch120 -p1
+%patch121 -p1
+%endif
+
+%if 0
+
# forcedeth
%patch130 -p1
@@ -833,7 +876,7 @@ sed -i 's/-Werror//' arch/alpha/kernel/Makefile
%patch1000 -p1
%else
# grsec_full and/or pax
-%patch9999 -p1
+exit 9; %patch9999 -p1
%{?with_vserver:%patch10000 -p1}
%{?with_vserver:%patch10001 -p1}
%{?with_vserver:%patch10002 -p1}
@@ -857,13 +900,17 @@ sed -i 's/-Werror//' arch/alpha/kernel/Makefile
%endif
# routes
+%if %{without openvz}
%patch300 -p1
+%endif
# Small fixes:
%patch2000 -p1
%patch2001 -p1
#%patch2003 -p1
+%endif
+
# Fix EXTRAVERSION in main Makefile
sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{postver}%{?alt_kernel:_%{alt_kernel}}#g' Makefile
@@ -872,6 +919,7 @@ find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs
%build
install -d %{objdir}
+echo TARGETOBJ=%{targetobj} > default.mk
cat > %{targetobj}.mk <<'EOF'
# generated by %{name}.spec
KERNELSRC := %{_builddir}/%{name}-%{version}/linux-%{basever}
@@ -1078,6 +1126,14 @@ EOCONFIG
%if %{with vserver}
%{SOURCE43} \
%endif
+%if %{with openvz}
+%if 0
+ %{SOURCE46} \
+ %{SOURCE47} \
+%else
+ %{topdir}/linux-%{basever}/config-%{_target_base_arch} \
+%endif
+%endif
%if %{with tuxonice}
%ifarch %{ix86} %{x8664} ia64 ppc ppc64
%{SOURCE42} \
diff --git a/kernel-openvz.config b/kernel-openvz.config
new file mode 100644
index 0000000..bc475bd
--- /dev/null
+++ b/kernel-openvz.config
@@ -0,0 +1,19 @@
+# http://wiki.openvz.org/Kernel_configuration
+
+CONFIG_SCHED_VCPU=y
+CONFIG_FAIRSCHED=y
+
+CONFIG_SIM_FS=m
+CONFIG_VZ_QUOTA=m
+# CONFIG_VZ_QUOTA_UNLOAD is not set
+CONFIG_VZ_QUOTA_UGID=y
+
+CONFIG_VE=y
+CONFIG_VE_CALLS=m
+CONFIG_VZ_GENCALLS=y
+CONFIG_VE_NETDEV=m
+CONFIG_VE_ETHDEV=m
+CONFIG_VZ_DEV=m
+CONFIG_VE_IPTABLES=y
+CONFIG_VZ_WDOG=m
+CONFIG_VZ_CHECKPOINT=m
diff --git a/kernel-rhel.config b/kernel-rhel.config
new file mode 100644
index 0000000..3a65d6c
--- /dev/null
+++ b/kernel-rhel.config
@@ -0,0 +1,155 @@
+# extra options, that came if we use rhel kernel patches
+CONFIG_UTRACE=y
+CONFIG_VZ_FAIRSCHED=y
+CONFIG_BLK_CGROUP=m
+# CONFIG_DEBUG_BLK_CGROUP is not set
+CONFIG_SCHED_AUTOGROUP=y
+CONFIG_SYSFS_DEPRECATED_DYN=y
+# CONFIG_OPTPROBES is not set
+CONFIG_HAVE_OPTPROBES=y
+CONFIG_MODULE_VERIFY_ELF=y
+CONFIG_MODULE_SIG=y
+# CONFIG_MODULE_SIG_FORCE is not set
+CONFIG_CFQ_GROUP_IOSCHED=y
+# CONFIG_TRACK_DIRTY_PAGES is not set
+# CONFIG_COMPACTION is not set
+# CONFIG_KEXEC_AUTO_RESERVE is not set
+CONFIG_ACPI_HOTPLUG_MEMORY_AUTO_ONLINE=y
+CONFIG_ACPI_HED=m
+CONFIG_ACPI_APEI=y
+CONFIG_ACPI_APEI_GHES=m
+CONFIG_ACPI_APEI_EINJ=m
+CONFIG_ACPI_APEI_ERST_DEBUG=m
+CONFIG_X86_PCC_CPUFREQ=m
+CONFIG_INTEL_IDLE=y
+CONFIG_PCI_MSI_DEFAULT_ON=y
+CONFIG_VZ_CHECKPOINT_ITER=y
+CONFIG_VZ_EVENT=m
+CONFIG_NF_CONNTRACK_SNMP=m
+CONFIG_NETFILTER_XT_TARGET_AUDIT=m
+CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
+# CONFIG_BRIDGE_IGMP_SNOOPING is not set
+CONFIG_BLK_DEV_DRBD=m
+CONFIG_DRBD_TRACE=m
+CONFIG_VMWARE_BALLOON=m
+CONFIG_SCSI_CXGB4_ISCSI=m
+CONFIG_SCSI_BNX2X_FCOE=m
+CONFIG_SCSI_HPSA=m
+CONFIG_SCSI_3W_SAS=m
+CONFIG_VMWARE_PVSCSI=m
+CONFIG_SCSI_ISCI=m
+CONFIG_DM_REPLICATOR=m
+CONFIG_DM_RAID45=m
+CONFIG_MACVTAP=m
+CONFIG_CHELSIO_T4_DEPENDS=y
+CONFIG_CHELSIO_T4=m
+CONFIG_IXGBEVF=m
+CONFIG_QLCNIC=m
+CONFIG_BNA=m
+# CONFIG_IWLWIFI_DEBUG_EXPERIMENTAL_UCODE is not set
+CONFIG_CRASH=m
+CONFIG_SENSORS_K10TEMP=m
+CONFIG_SENSORS_PKGTEMP=m
+CONFIG_SENSORS_VIA_CPUTEMP=m
+CONFIG_HPWDT_NMI_DECODING=y
+CONFIG_RC_CORE=m
+CONFIG_RC_MAP=m
+CONFIG_IR_NEC_DECODER=m
+CONFIG_IR_RC5_DECODER=m
+CONFIG_IR_RC6_DECODER=m
+CONFIG_IR_JVC_DECODER=m
+CONFIG_IR_SONY_DECODER=m
+CONFIG_IR_RC5_SZ_DECODER=m
+CONFIG_IR_LIRC_CODEC=m
+CONFIG_IR_ENE=m
+CONFIG_IR_IMON=m
+CONFIG_IR_MCEUSB=m
+CONFIG_IR_NUVOTON=m
+CONFIG_IR_STREAMZAP=m
+CONFIG_IR_WINBOND_CIR=m
+CONFIG_RC_LOOPBACK=m
+CONFIG_VIDEO_SAA7134_RC=y
+CONFIG_VIDEO_CX18_ALSA=m
+CONFIG_USB_GSPCA_BENQ=m
+CONFIG_USB_GSPCA_CPIA1=m
+CONFIG_USB_GSPCA_KONICA=m
+CONFIG_USB_GSPCA_OV534_9=m
+CONFIG_USB_GSPCA_PAC7302=m
+CONFIG_USB_GSPCA_SN9C2028=m
+CONFIG_USB_GSPCA_SPCA1528=m
+CONFIG_USB_GSPCA_SQ930X=m
+CONFIG_USB_GSPCA_STV0680=m
+CONFIG_USB_GSPCA_XIRLINK_CIT=m
+CONFIG_VIDEO_TLG2300=m
+CONFIG_VIDEO_CX231XX_RC=y
+CONFIG_DVB_USB_EC168=m
+CONFIG_DVB_USB_AZ6027=m
+CONFIG_DVB_USB_LME2510=m
+CONFIG_DVB_NGENE=m
+CONFIG_VGA_ARB_MAX_GPUS=64
+CONFIG_VGA_SWITCHEROO=y
+CONFIG_SND_HDA_INPUT_BEEP_MODE=1
+CONFIG_SND_HDA_CODEC_HDMI=y
+CONFIG_INFINIBAND_CXGB4=m
+CONFIG_EDAC_I7CORE=m
+CONFIG_EDAC_I7300=m
+CONFIG_DRM_NOUVEAU=m
+CONFIG_DRM_NOUVEAU_BACKLIGHT=y
+# CONFIG_DRM_NOUVEAU_DEBUG is not set
+CONFIG_DRM_I2C_CH7006=m
+CONFIG_DRM_I2C_SIL164=m
+CONFIG_ZRAM=m
+# CONFIG_ZRAM_DEBUG is not set
+CONFIG_INTEL_IPS=m
+# CONFIG_QUOTA_DEBUG is not set
+CONFIG_NFS_USE_LEGACY_DNS=y
+CONFIG_NFS_USE_NEW_IDMAPPER=y
+# CONFIG_NFSD_DEPRECATED is not set
+CONFIG_CIFS_FSCACHE=y
+# CONFIG_DEBUG_SECTION_MISMATCH is not set
+# CONFIG_SYSRQ_DEBUG is not set
+# CONFIG_LOCKUP_DETECTOR is not set
+CONFIG_DEBUG_NMI_TIMEOUT=30
+CONFIG_X86_DECODER_SELFTEST=y
+CONFIG_SECURITY_DMESG_RESTRICT=y
+# CONFIG_CRYPTO_MPILIB is not set
+# CONFIG_CRYPTO_SIGNATURE_DSA is not set
+CONFIG_VHOST_NET=m
+CONFIG_PBG_HBA_A2=y
+CONFIG_INFINIBAND_QIB=m
+CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=m
+
+# bc must be on
+#
+# User resources
+#
+CONFIG_BEANCOUNTERS=y
+CONFIG_BC_RSS_ACCOUNTING=y
+CONFIG_BC_IO_ACCOUNTING=y
+CONFIG_BC_IO_PRIORITY=y
+CONFIG_BC_SWAP_ACCOUNTING=y
+CONFIG_BC_PROC=y
+CONFIG_BC_DEBUG=y
+# CONFIG_BC_DEBUG_KMEM is not set
+# CONFIG_BC_KEEP_UNUSED is not set
+# CONFIG_BC_DEBUG_ITEMS is not set
+# CONFIG_BC_UNLIMITED is not set
+
+# xen must be on
+CONFIG_XEN=y
+CONFIG_XEN_MAX_DOMAIN_MEMORY=32
+CONFIG_XEN_SAVE_RESTORE=y
+# CONFIG_XEN_DEBUG_FS is not set
+CONFIG_KVM_CLOCK=y
+CONFIG_KVM_GUEST=y
+CONFIG_PARAVIRT=y
+# CONFIG_PARAVIRT_SPINLOCKS is not set
+CONFIG_PARAVIRT_CLOCK=y
+# CONFIG_PARAVIRT_DEBUG is not set
+
+CONFIG_BLK_DEV_THROTTLING=y
+
+# they introduce new constants not available in sourcetree
+# - rw |= (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG);
+# + rw |= REQ_SYNC | REQ_UNPLUG;
+NILFS2_FS all=n
diff --git a/kernel.make b/kernel.make
index 0e04986..d24ca9d 100644
--- a/kernel.make
+++ b/kernel.make
@@ -1,5 +1,6 @@
MAKE_OPTS :=
+-include default.mk
include $(TARGETOBJ).mk
all := $(filter-out all Makefile,$(MAKECMDGOALS))
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/kernel.git/commitdiff/2807be362783bd28dfddfaa576ed0385741a4938
More information about the pld-cvs-commit
mailing list