[pve-devel] r5200 - / pve-kernel-2.6.35 pve-kernel-2.6.35/trunk
svn-commits at proxmox.com
svn-commits at proxmox.com
Mon Oct 4 13:03:50 CEST 2010
Author: dietmar
Date: 2010-10-04 11:03:50 +0000 (Mon, 04 Oct 2010)
New Revision: 5200
Added:
pve-kernel-2.6.35/
pve-kernel-2.6.35/trunk/
pve-kernel-2.6.35/trunk/Makefile
Log:
Added: pve-kernel-2.6.35/trunk/Makefile
===================================================================
--- pve-kernel-2.6.35/trunk/Makefile (rev 0)
+++ pve-kernel-2.6.35/trunk/Makefile 2010-10-04 11:03:50 UTC (rev 5200)
@@ -0,0 +1,259 @@
+RELEASE=1.6
+
+KERNEL_VER=2.6.35
+PKGREL=1
+KREL=1
+
+EXTRAVERSION=-${KREL}-pve
+KVNAME=${KERNEL_VER}${EXTRAVERSION}
+PACKAGE=pve-kernel-${KVNAME}
+HDRPACKAGE=pve-headers-${KVNAME}
+
+ARCH=amd64
+TOP=$(shell pwd)
+
+KERNEL_SRC=linux-2.6
+
+# ubuntu hardy openvz git branch
+GIT_BRANCH=Ubuntu-2.6.35-22.33
+
+
+BUSYBOXVER=1.14.0
+BUSYBOXSOURCE=busybox-${BUSYBOXVER}.tar.bz2
+BUSYBOXDIR=busybox-${BUSYBOXVER}
+
+AOEDIR=aoe6-73
+AOESRC=${AOEDIR}.tar.gz
+
+IXGBEDIR=ixgbe-2.1.4
+IXGBESRC=${IXGBEDIR}.tar.gz
+BNX2DIR=netxtreme2-5.2.55
+BNX2SRC=${BNX2DIR}.tar.gz
+
+
+SCSTDIR=scst
+SCSTSRC=scst-snap-21.12.09.tgz
+ISCSIDIR=iscsi-scst
+ISCSI_DEB=iscsi-scst_1.0.1.1-3_${ARCH}.deb
+
+DST_DEB=${PACKAGE}_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
+HDR_DEB=${HDRPACKAGE}_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
+PVEPKG=proxmox-ve-${KERNEL_VER}
+PVE_DEB=${PVEPKG}_${RELEASE}-${PKGREL}_all.deb
+
+all: check_gcc ${DST_DEB} ${PVE_DEB} ${HDR_DEB} ${ISCSI_DEB}
+
+${PVE_DEB} pve: proxmox-ve/control proxmox-ve/postinst
+ rm -rf proxmox-ve/data
+ mkdir -p proxmox-ve/data/DEBIAN
+ mkdir -p proxmox-ve/data/usr/share/doc/${PVEPKG}/
+ install -m 0644 proxmox-ve/proxmox-release\@proxmox.com.pubkey proxmox-ve/data/usr/share/doc/${PVEPKG}
+ sed -e 's/@KVNAME@/${KVNAME}/' -e 's/@KERNEL_VER@/${KERNEL_VER}/' -e 's/@RELEASE@/${RELEASE}/' -e 's/@PKGREL@/${PKGREL}/' <proxmox-ve/control >proxmox-ve/data/DEBIAN/control
+ sed -e 's/@KERNEL_VER@/${KERNEL_VER}/' <proxmox-ve/postinst >proxmox-ve/data/DEBIAN/postinst
+ chmod 0755 proxmox-ve/data/DEBIAN/postinst
+ install -m 0644 proxmox-ve/copyright proxmox-ve/data/usr/share/doc/${PVEPKG}
+ install -m 0644 proxmox-ve/changelog.Debian proxmox-ve/data/usr/share/doc/${PVEPKG}
+ gzip --best proxmox-ve/data/usr/share/doc/${PVEPKG}/changelog.Debian
+ dpkg-deb --build proxmox-ve/data ${PVE_DEB}
+
+check_gcc:
+ gcc --version|grep "4.3.2" || false
+
+${DST_DEB}: data initrd.img-${KVNAME} control.in postinst.in
+ mkdir -p data/DEBIAN
+ sed -e 's/@KERNEL_VER@/${KERNEL_VER}/' -e 's/@KVNAME@/${KVNAME}/' -e 's/@PKGREL@/${PKGREL}/' <control.in >data/DEBIAN/control
+ sed -e 's/@@KVNAME@@/${KVNAME}/g' <postinst.in >data/DEBIAN/postinst
+ chmod 0755 data/DEBIAN/postinst
+ install -D -m 644 copyright data/usr/share/doc/${PACKAGE}/copyright
+ install -D -m 644 changelog.Debian data/usr/share/doc/${PACKAGE}/changelog.Debian
+ gzip -f --best data/usr/share/doc/${PACKAGE}/changelog.Debian
+ install -D -m 0644 initrd.img-${KVNAME} data/boot/initrd.img-${KVNAME}
+ rm -f data/lib/modules/${KVNAME}/source
+ rm -f data/lib/modules/${KVNAME}/build
+ dpkg-deb --build data ${DST_DEB}
+ lintian ${DST_DEB}
+
+
+fwlist-${KVNAME}: data
+ ./find-firmware.pl data/lib/modules/${KVNAME} >fwlist.tmp
+ mv fwlist.tmp $@
+
+data: .compile_mark config-${KERNEL_VER} aoe.ko ixgbe.ko bnx2.ko cnic.ko bnx2x.ko iscsi-scst.ko scst-modules.tar
+ rm -rf data tmp; mkdir -p tmp/lib/modules/${KVNAME}
+ mkdir tmp/boot
+ install -m 644 config-${KERNEL_VER} tmp/boot/config-${KVNAME}
+ install -m 644 ${KERNEL_SRC}/System.map tmp/boot/System.map-${KVNAME}
+ install -m 644 ${KERNEL_SRC}/arch/x86_64/boot/bzImage tmp/boot/vmlinuz-${KVNAME}
+ cd ${KERNEL_SRC}; make INSTALL_MOD_PATH=../tmp/ modules_install
+ # install drbd module
+ #install -m 644 -D drbd.ko tmp/lib/modules/${KVNAME}/kernel/drivers/block/drbd/drbd.ko
+ # install latest aoe driver
+ install -m 644 aoe.ko tmp/lib/modules/${KVNAME}/kernel/drivers/block/aoe/aoe.ko
+ # install latest ixgbe driver
+ install -m 644 ixgbe.ko tmp/lib/modules/${KVNAME}/kernel/drivers/net/ixgbe/
+ # install bnx2 and tg3 drivers
+ install -m 644 bnx2.ko tmp/lib/modules/${KVNAME}/kernel/drivers/net/
+ install -m 644 bnx2x.ko tmp/lib/modules/${KVNAME}/kernel/drivers/net/
+ install -m 644 cnic.ko tmp/lib/modules/${KVNAME}/kernel/drivers/net/
+ # install scst modules
+ install -m 644 -D iscsi-scst.ko tmp/lib/modules/${KVNAME}/extra/scst/iscsi-scst.ko
+ tar xf scst-modules.tar -C tmp/lib/modules/${KVNAME}/extra/scst
+ # remove firmware
+ rm -rf tmp/lib/firmware
+ # finalize
+ depmod -b tmp/ ${KVNAME}
+ mv tmp data
+
+.compile_mark: ${KERNEL_SRC}/README config-${KERNEL_VER}
+ cp config-${KERNEL_VER} ${KERNEL_SRC}/.config
+ cd ${KERNEL_SRC}; make oldconfig
+ cd ${KERNEL_SRC}; make -j 8
+ touch $@
+
+config-${KERNEL_VER}: config-${KERNEL_VER}.org config-${KERNEL_VER}.diff
+ cp config-${KERNEL_VER}.org $@.tmp
+ patch $@.tmp config-${KERNEL_VER}.diff
+ mv $@.tmp $@
+
+# adjust scst patch for openvz code
+put_page_callback-2.6.32.patch: scst-src/AskingQuestions put_page_callback-2.6.32.patch.diff
+ cp scst-src/iscsi-scst/kernel/patches/put_page_callback-2.6.32.patch $@.tmp
+ patch $@.tmp <put_page_callback-2.6.32.patch.diff
+ mv $@.tmp $@
+
+
+${KERNEL_SRC}/README: ${KERNEL_SRC}.org/README
+ rm -rf ${KERNEL_SRC}
+ rsync -av --exclude .git ${KERNEL_SRC}.org/ ${KERNEL_SRC}
+ #./applypatches.pl ${KERNEL_SRC} ${KERNEL_SRC}/debian/binary-custom.d/openvz/patchset
+ #./applypatches.pl ${KERNEL_SRC} patches/series
+ sed -i ${KERNEL_SRC}/Makefile -e 's/^EXTRAVERSION.*$$/EXTRAVERSION=${EXTRAVERSION}/'
+ touch $@
+
+${KERNEL_SRC}.org/README:
+ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-maverick.git ${KERNEL_SRC}.org
+ #-cd ${KERNEL_SRC}.org; git branch -D local
+ cd ${KERNEL_SRC}.org; git checkout -b local ${GIT_BRANCH}
+ touch $@
+
+aoe.ko aoe: .compile_mark ${AOESRC}
+ # aoe driver updates
+ rm -rf ${AOEDIR} aoe.ko
+ tar xf ${AOESRC}
+ mkdir -p /lib/modules/${KVNAME}
+ ln -sf ${TOP}/${KERNEL_SRC} /lib/modules/${KVNAME}/build
+ cd ${AOEDIR}; make KVER=${KVNAME}
+ cp ${AOEDIR}/linux/drivers/block/aoe/aoe.ko aoe.ko
+
+ixgbe.ko ixgbe: ${IXGBESRC}
+ rm -rf ${IXGBEDIR}
+ tar xf ${IXGBESRC}
+ mkdir -p /lib/modules/${KVNAME}
+ ln -sf ${TOP}/${KERNEL_SRC} /lib/modules/${KVNAME}/build
+ cd ${IXGBEDIR}/src; make CFLAGS_EXTRA="-DIXGBE_NO_LRO" BUILD_KERNEL=${KVNAME}
+ cp ${IXGBEDIR}/src/ixgbe.ko ixgbe.ko
+
+bnx2.ko cnic.ko bnx2x.ko: ${BNX2SRC}
+ rm -rf ${BNX2DIR}
+ tar xf ${BNX2SRC}
+ mkdir -p /lib/modules/${KVNAME}
+ ln -sf ${TOP}/linux-2.6.24-openvz /lib/modules/${KVNAME}/build
+ cd ${BNX2DIR}; make KVER=${KVNAME}
+ cp `find ${BNX2DIR} -name bnx2.ko -o -name cnic.ko -o -name bnx2x.ko` .
+
+scst-src/AskingQuestions:
+ #svn co https://scst.svn.sourceforge.net/svnroot/scst/trunk scst-src
+ tar xf ${SCSTSRC}
+
+scst-modules.tar scstmod ${SCSTDIR}/README: .compile_mark scst-src/AskingQuestions
+ rm -rf ${SCSTDIR}
+ rsync -a --exclude .svn scst-src/scst/ ${SCSTDIR}
+ mkdir -p /lib/modules/${KVNAME}
+ ln -sf ${TOP}/${KERNEL_SRC} /lib/modules/${KVNAME}/build
+ mkdir ${SCSTDIR}/modules
+ cd ${SCSTDIR}; patch -p 1 <../scst-disable-debug.diff
+ cd ${SCSTDIR}; make KDIR=/lib/modules/${KVNAME}/build
+ cd ${SCSTDIR}; cp src/*.ko src/dev_handlers/*.ko modules
+ tar cf scst-modules.tar -C ${SCSTDIR}/modules .
+ touch ${SCSTDIR}/README
+
+${ISCSI_DEB} iscsi-scst.ko iscsi: .compile_mark ${SCSTDIR}/README scst-src/AskingQuestions
+ rm -rf ${ISCSIDIR} iscsi-scst.ko
+ rsync -a --exclude .svn scst-src/iscsi-scst/ ${ISCSIDIR}
+ cp -a iscsideb ${ISCSIDIR}/debian
+ cd ${ISCSIDIR}; export KVER=${KVNAME}; dpkg-buildpackage -b -rfakeroot -us -uc
+ cd ${ISCSIDIR}; make KVER=${KVNAME} mods
+ cp ${ISCSIDIR}/kernel/iscsi-scst.ko iscsi-scst.ko
+ lintian ${ISCSI_DEB}
+
+busybox.tar: ${BUSYBOXSOURCE}
+ rm -rf ${BUSYBOXDIR}
+ tar xvjf ${BUSYBOXSOURCE}
+ #cd ${BUSYBOXDIR}; make defconfig;
+ cp busybox-config ${BUSYBOXDIR}/.config
+ cd ${BUSYBOXDIR}; make oldconfig;
+ rm -rf busybox; mkdir busybox
+ cd ${BUSYBOXDIR}; make; make CONFIG_PREFIX=../busybox/ install
+ tar cpf $@ -C busybox .
+
+INITRD_SOURCES = \
+ init \
+ ejectcd.sh \
+ busybox.tar \
+ proxmox_splash.dat \
+ create-initrd-dir
+
+pci.ids: /usr/share/misc/pci.ids
+ #update-pciids
+ cp /usr/share/misc/pci.ids pci.ids
+
+initrd.img-${KVNAME}: data ${INITRD_SOURCES} pci.ids
+ ./create-initrd-dir ${KVNAME}
+
+headers_tmp := $(CURDIR)/tmp-headers
+headers_dir := $(headers_tmp)/usr/src/linux-headers-${KVNAME}
+
+${HDR_DEB} hdr: .compile_mark headers-control.in headers-postinst.in
+ rm -rf $(headers_tmp)
+ install -d $(headers_tmp)/DEBIAN $(headers_dir)/include/
+ sed -e 's/@KERNEL_VER@/${KERNEL_VER}/' -e 's/@KVNAME@/${KVNAME}/' -e 's/@PKGREL@/${PKGREL}/' <headers-control.in >$(headers_tmp)/DEBIAN/control
+ sed -e 's/@@KVNAME@@/${KVNAME}/g' <headers-postinst.in >$(headers_tmp)/DEBIAN/postinst
+ chmod 0755 $(headers_tmp)/DEBIAN/postinst
+ install -D -m 644 copyright $(headers_tmp)/usr/share/doc/${HDRPACKAGE}/copyright
+ install -D -m 644 changelog.Debian $(headers_tmp)/usr/share/doc/${HDRPACKAGE}/changelog.Debian
+ gzip -f --best $(headers_tmp)/usr/share/doc/${HDRPACKAGE}/changelog.Debian
+ install -m 0644 ${KERNEL_SRC}/.config $(headers_dir)
+ install -m 0644 ${KERNEL_SRC}/Module.symvers $(headers_dir)
+ cd ${KERNEL_SRC}; find . -path './debian/*' -prune -o -path './include/*' -prune -o -path './Documentation' -prune \
+ -o -path './scripts' -prune -o -type f \
+ \( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Kbuild*' -o \
+ -name '*.sh' -o -name '*.pl' \) \
+ -print | cpio -pd --preserve-modification-time $(headers_dir)
+ cd ${KERNEL_SRC}; cp -a include scripts $(headers_dir)
+ cd ${KERNEL_SRC}; (find arch/x86 -name include -type d -print | \
+ xargs -n1 -i: find : -type f) | \
+ cpio -pd --preserve-modification-time $(headers_dir)
+ dpkg-deb --build $(headers_tmp) ${HDR_DEB}
+ #lintian ${HDR_DEB}
+
+.PHONY: upload
+upload: ${DST_DEB} ${PVE_DEB} ${HDR_DEB}
+ umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
+ mkdir -p /pve/${RELEASE}/extra
+ mkdir -p /pve/${RELEASE}/install
+ rm -rf /pve/${RELEASE}/extra/${PACKAGE}_*.deb
+ rm -rf /pve/${RELEASE}/extra/${HDRPACKAGE}_*.deb
+ rm -rf /pve/${RELEASE}/extra/${PVEPKG}_*.deb
+ rm -rf /pve/${RELEASE}/extra/Packages*
+ cp ${DST_DEB} ${PVE_DEB} ${HDR_DEB} /pve/${RELEASE}/extra
+ cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
+ umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
+
+.PHONY: distclean
+distclean: clean
+
+.PHONY: clean
+clean:
+ rm -rf *~ .compile_mark config-2.6.32 ${KERNEL_SRC} tmp data busybox busybox.tar ${BUSYBOXDIR} pci.ids proxmox-ve/data initrd.img-${KVNAME} *.deb ${AOEDIR} aoe.ko ${headers_tmp} scst-src ${ISCSIDIR} ${ISCSI_DEB} iscsi-scst.ko scst-modules.tar ${SCSTDIR} put_page_callback-2.6.32.patch fwdata fwlist.tmp fwlist.initrd iscsideb/*~ iscsi-scst_* *.ko ${IXGBEDIR} ${BNX2DIR} bnx2.ko cnic.ko bnx2x.ko
+
+
More information about the pve-devel
mailing list