|
|
发表于 2009-5-11 09:58:04
|
显示全部楼层
那你系统有没有装git?
如果没有自然就无法checkout了。。。
现在传一个aufs2-standalone.git的包到googlecode,如果无法连接或者不想用git的朋友需要将PKGBUILD文件修改为:
- # Maintainer: carbonjiao <http://archlive-pkg.googlecode.com> <http://archlive.googlecode.com>
- pkgname=kernel26-archlive
- _realpkgname=kernel26
- # pkgname=kernel26-custom # Build kernel with a different name
- _kernelname=${_realpkgname#kernel26}
- _basekernel=2.6.29
- pkgver=${_basekernel}.3
- pkgrel=1
- _patchname="patch-${pkgver}-1-ARCH"
- pkgdesc="Archlive内核及模块,加入了kernel官方补丁、gentoo官方补丁、UTF-8中文补丁、reiser4补丁、aircrack-ng补丁及tuxonice-3.0.1补丁."
- #pkgdesc="Kernel configs for Archlive, with Gentoo patch set, fbcondecor patch, Chinese fonts patch, \
- # and reiser4 patch, aufs2 patch, aircrack-ng patch, also with tuxonice-3.0 patch set."
- arch=(i686 x86_64)
- license=('GPL2')
- provides=('kernel26=2.6.29')
- groups=('base' 'archlive-pkg')
- url="http://www.kernel.org"
- backup=(etc/mkinitcpio.d/${_realpkgname}.preset)
- depends=('coreutils' 'kernel26-firmware>=2.6.29' 'module-init-tools' 'mkinitcpio>=0.5.20')
- # pwc, ieee80211 and hostap-driver26 modules are included in kernel26 now
- # nforce package support was abandoned by nvidia, kernel modules should cover everything now.
- # kernel24 support is dropped since glibc24
- conflicts=('aufs')
- replaces=('kernel24' 'kernel24-scsi' 'kernel26-scsi' 'kernel26'
- 'alsa-driver' 'ieee80211' 'hostap-driver26'
- 'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
- 'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
- 'gspcav1' 'atl2' 'wlan-ng26' 'aufs')
- install=kernel26.install
- source=(
- http://www.cn.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
- #http://www.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
- ### kernel 官方补丁
- #http://www.cn.kernel.org/pub/linux/kernel/v2.6/patch-${pkgver}.bz2
- http://www.kernel.org/pub/linux/kernel/v2.6/patch-${pkgver}.bz2
- ### Arch 官方补丁
- #ftp://ftp.archlinux.org/other/kernel26/${_patchname}.bz2
- ### tuxonice patch
- http://www.tuxonice.net/downloads/all/tuxonice-3.0.1-for-2.6.29.patch.bz2
- ### gentoo patches
- #http://dev.gentoo.org/~dsd/genpatches/trunk/${_basekernel}/4100_dm-bbr.patch
- #http://dev.gentoo.org/~dsd/genpatches/trunk/${_basekernel}/4200_fbcondecor-0.9.4.patch
- #http://dev.gentoo.org/~dsd/genpatches/trunk/${_basekernel}/4400_alpha-sysctl-uac.patch
- 4100_dm-bbr.patch 4200_fbcondecor-0.9.4.patch 4400_alpha-sysctl-uac.patch
- ### sidux补丁
- http://svn.berlios.de/svnroot/repos/fullstory/linux-sidux-2.6/tags/2.6.29-7/debian/patches/bugfix/ext4-flush-on-close.patch
- #http://svn.berlios.de/svnroot/repos/fullstory/linux-sidux-2.6/tags/2.6.29-7/debian/patches/features/aufs2-20090322.diff
- http://svn.berlios.de/svnroot/repos/fullstory/linux-sidux-2.6/tags/2.6.29-9/debian/patches/bugfix/ath5k_fix-off-by-one-in-gpio-checks.diff
- http://svn.berlios.de/svnroot/repos/fullstory/linux-sidux-2.6/tags/2.6.29-9/debian/patches/bugfix/ath5k_protect-reset-sequence-by-a-spinlock.diff
- ### reiser4 补丁
- http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.29.patch.gz
- ### unionfs补丁
- #http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.5.1_for_2.6.29-rc2.diff.gz
- squashfs3.4-include.patch
- ### aufs2-standalone.git补丁
- http://archlive-pkg.googlecode.com/files/aufs2-standalone.tar.gz
- http://nchc.dl.sourceforge.net/sourceforge/ibm-acpi/thinkpad-acpi-0.22-20090318-BETA_v2.6.29.patch.gz
- ### aircrack-ng patches
- #http://patches.aircrack-ng.org/mac80211_2.6.28-rc4-wl_frag+ack_v3.patch
- #http://patches.aircrack-ng.org/ath5k-injection-2.6.27-rc2.patch
- #http://patches.aircrack-ng.org/ath5k-frequency-chaos-2.6.28.patch
- #http://patches.aircrack-ng.org/ieee80211_inject-2.6.22.patch
- #http://patches.aircrack-ng.org/rtl8187-mac80211-injection-speed-2.6.28-wl.patch
- #http://patches.aircrack-ng.org/rtl8187_hw_signal_backport_2.6.28.patch
- #http://patches.aircrack-ng.org/zd1211rw_inject_2.6.26.patch
- #http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch
- mac80211_2.6.29-2.6.28-rc8-wl_frag+ack_radiotap.patch
- ath5k-injection-2.6.27-rc2.patch ath5k-frequency-chaos-2.6.28.patch
- #ath5k-pass-failed-crc.patch #ath5k-radiotap-fragfix-2.6.29.patch
- b43-injection-2.6.29-wl.patch #ieee80211_inject-2.6.22.patch
- rtl8187-mac80211-injection-speed-2.6.28-wl.patch
- #rtl8187_hw_signal_backport_2.6.28.patch
- zd1211rw_inject_2.6.26.patch hostap-kernel-2.6.18.patch
- ### Fastboot 提供的补丁
- 0001-kernel-trace-open.patch
- ### Archpwn 提供的补丁
- openlog.patch ecryptfs.patch
- ### 孙海勇 大侠的 内核中文补丁 http://youbest.cublog.cn/
- http://zdbr.net.cn/download/utf8-kernel-2.6.29-core-1.patch.bz2
- http://zdbr.net.cn/download/utf8-kernel-2.6-fonts-2.patch.bz2
- http://zdbr.net.cn/download/utf8-kernel-2.6.28-fbcondecor-1.patch.bz2
- # the main kernel config files
- config config.x86_64
- # standard config files for mkinitcpio ramdisk
- kernel26.preset)
- optdepends=('crda: to set the correct wireless channels of your country')
- md5sums=('64921b5ff5cdadbccfcd3820f03be7d8'
- '61b2c96aa87dce6075f228bd29151041'
- #'ea3999b363734e65e49eb15680f6f2d7'
- #'0eb27c7c58530293ca9fc1fd364741fa'
- #'25584700a0a679542929c4bed31433b6'
- )
- build() {
- KARCH=x86
- #cd "${srcdir}"
- #git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git
- #cd aufs2-standalone
- #git checkout origin/aufs2-29
- cd ${srcdir}/linux-$_basekernel
-
- # Add -ARCH patches
- # See http://projects.archlinux.org/git/?p=linux-2.6-ARCH.git;a=summary
- #patch -Np1 -i ${srcdir}/${_patchname} || return 1
- # Applying official patch
- patch -Np1 -i ${srcdir}/patch-$pkgver #|| return 1
- # patch aufs & sqlzma3.4
- patch -Np1 -i "${srcdir}"/aufs2-standalone/aufs2-standalone.patch || return 1
- cp -R "${srcdir}"/aufs2-standalone/{Documentation,include,fs,config.mk} .
- echo "fix for sqlzma 3.4"
- patch -Np1 -i "${srcdir}"/squashfs3.4-include.patch || return 1
- # Applying gentoo patches
- for i in $(ls ../[1-9][0-9][0-9][0-9]*);do
- patch -Np1 -i ../$i
- done
- patch -Np1 -i ${srcdir}/0001-kernel-trace-open.patch #|| return 1
- # Add kernel utf-8 characters patch
- patch -Np1 -i ${srcdir}/utf8-kernel-2.6.29-core-1.patch || return 1
- patch -Np1 -i ${srcdir}/utf8-kernel-2.6.28-fbcondecor-1.patch || return 1
- patch -Np1 -i ${srcdir}/utf8-kernel-2.6-fonts-2.patch || return 1
- patch -Np1 -i ${srcdir}/tuxonice-3.0.1-for-2.6.29.patch #|| return 1
-
- # applying ext4 patch
- patch -Np1 -i ${srcdir}/ext4-flush-on-close.patch #|| return 1
- # applying ath5k patch
- patch -Np1 -i ${srcdir}/ath5k_fix-off-by-one-in-gpio-checks.diff #|| return 1
- patch -Np1 -i ${srcdir}/ath5k_protect-reset-sequence-by-a-spinlock.diff #|| return 1
- # applying reiserfs4 patch
- patch -Np1 -i ${srcdir}/reiser4-for-2.6.29.patch #|| return 1
- # applying unionfs patch
- #patch -Np1 -i ${srcdir}/unionfs-2.5.1_for_2.6.29-rc2.diff #|| return 1
- # add aircrack-ng injection support
- patch -Np0 -i "${srcdir}"/zd1211rw_inject_2.6.26.patch #|| return 1
- patch -Np1 -i "${srcdir}"/mac80211_2.6.29-2.6.28-rc8-wl_frag+ack_radiotap.patch #|| return 1
- patch -Np1 -i "${srcdir}"/ath5k-injection-2.6.27-rc2.patch #|| return 1
- patch -Np1 -i "${srcdir}"/ath5k-frequency-chaos-2.6.28.patch #|| return 1
- #patch -Np1 -i "${srcdir}"/ath5k-pass-failed-crc.patch #|| return 1
- #patch -Np1 -i "${srcdir}"/ath5k-radiotap-fragfix-2.6.29.patch #|| return 1
- patch -Np1 -i "${srcdir}"/b43-injection-2.6.29-wl.patch #|| return 1
- #patch -Np1 -i "${srcdir}"/ieee80211_inject-2.6.22.patch #|| return 1
- patch -Np1 -i "${srcdir}"/rtl8187-mac80211-injection-speed-2.6.28-wl.patch #|| return 1
- #patch -Np1 -i "${srcdir}"/rtl8187_hw_signal_backport_2.6.28.patch #|| return 1
- patch -Np1 -i "${srcdir}"/hostap-kernel-2.6.18.patch #|| return 1
- # add openlog patch
- patch -Np0 -i "${srcdir}"/openlog.patch #|| return 1
- # applying thinkpad-acpi patch
- patch -Np1 -i ${srcdir}/thinkpad-acpi-0.22-20090318-BETA_v2.6.29.patch #|| return 1
- # remove extraversion
- sed -i 's|^EXTRAVERSION = .*$|EXTRAVERSION =|g' Makefile
- if [ "$CARCH" = "x86_64" ]; then
- cat ../config.x86_64 >./.config
- else
- cat ../config >./.config
- fi
- if [ "${_kernelname}" != "" ]; then
- sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION="${_kernelname}"|g" ./.config
- fi
-
- source ./.config
- _kernver="$_basekernel${CONFIG_LOCALVERSION}"
- # load configuration
- # Configure the kernel. Replace the line below with one of your choice.
- #make menuconfig # CLI menu for configuration
- #make xconfig # X-based configuration
- #make oldconfig # using old config from previous kernel version
- # ... or manually edit .config
- ####################
- # stop here
- # this is useful to configure the kernel
- #msg "Stopping build"
- #return 1
- ####################
- yes "" | make config
- # build!
- make bzImage modules || return 1
- mkdir -p ${pkgdir}/{lib/modules,boot}
- make INSTALL_MOD_PATH=${pkgdir} modules_install || return 1
- cp System.map ${pkgdir}/boot/System.map26${_kernelname}
- cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname}
- install -D -m644 Makefile \
- ${pkgdir}/usr/src/linux-${_kernver}/Makefile
- install -D -m644 kernel/Makefile \
- ${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile
- install -D -m644 .config \
- ${pkgdir}/usr/src/linux-${_kernver}/.config
- mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include
- for i in acpi asm-{generic,x86} config linux math-emu media net pcmcia scsi sound video; do
- cp -a include/$i ${pkgdir}/usr/src/linux-${_kernver}/include/
- done
- # copy arch includes for external modules
- mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/x86
- cp -a arch/x86/include ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/
- # copy files necessary for later builds, like nvidia and vmware
- cp Module.symvers ${pkgdir}/usr/src/linux-${_kernver}
- cp -a scripts ${pkgdir}/usr/src/linux-${_kernver}
- # fix permissions on scripts dir
- chmod og-w -R ${pkgdir}/usr/src/linux-${_kernver}/scripts
- #mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions
- mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel
- cp arch/$KARCH/Makefile ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
- if [ "$CARCH" = "i686" ]; then
- cp arch/$KARCH/Makefile_32.cpu ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
- fi
- cp arch/$KARCH/kernel/asm-offsets.s ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel/
- # add headers for lirc package
- mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video
- cp drivers/media/video/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/
- for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301; do
- mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
- cp -a drivers/media/video/$i/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
- done
- # add dm headers
- mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
- cp drivers/md/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
- # add inotify.h
- mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/linux
- cp include/linux/inotify.h ${pkgdir}/usr/src/linux-${_kernver}/include/linux/
- # add CLUSTERIP file for iptables
- mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/net/ipv4/netfilter/
- # add wireless headers
- mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
- cp net/mac80211/*.h ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
- # add dvb headers for external modules
- # in reference to:
- # http://bugs.archlinux.org/task/9912
- mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core
- cp drivers/media/dvb/dvb-core/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/
- # add dvb headers for external modules
- # in reference to:
- # http://bugs.archlinux.org/task/11194
- mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
- cp include/config/dvb/*.h ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
- # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
- # in reference to:
- # http://bugs.archlinux.org/task/13146
- mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
- cp drivers/media/dvb/frontends/lgdt330x.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
- cp drivers/media/video/msp3400-driver.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
- # add xfs and shmem for aufs building
- mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs
- mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/mm
- cp fs/xfs/xfs_sb.h ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h
- # add vmlinux
- cp vmlinux ${pkgdir}/usr/src/linux-${_kernver}
- # copy in Kconfig files
- for i in `find . -name "Kconfig*"`; do
- mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/`echo $i | sed 's|/Kconfig.*||'`
- cp $i ${pkgdir}/usr/src/linux-${_kernver}/$i
- done
- cd ${pkgdir}/usr/src/linux-${_kernver}/include && ln -s asm-$KARCH asm
- chown -R root.root ${pkgdir}/usr/src/linux-${_kernver}
- find ${pkgdir}/usr/src/linux-${_kernver} -type d -exec chmod 755 {} \;
- cd ${pkgdir}/lib/modules/${_kernver} && \
- (rm -f source build; ln -sf ../../../usr/src/linux-${_kernver} build)
- # install fallback mkinitcpio.conf file and preset file for kernel
- install -m644 -D ${srcdir}/kernel26.preset ${pkgdir}/etc/mkinitcpio.d/${_realpkgname}.preset || return 1
- # set correct depmod command for install
- sed \
- -e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
- -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
- -i $startdir/kernel26.install
- sed \
- -e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \
- -e "s|default_image=.*|default_image="/boot/${_realpkgname}.img"|g" \
- -e "s|fallback_image=.*|fallback_image="/boot/${_realpkgname}-fallback.img"|g" \
- -i ${pkgdir}/etc/mkinitcpio.d/${_realpkgname}.preset
- echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${startdir}/pkg/etc/mkinitcpio.d/${_realpkgname}.kver
- # remove unneeded architectures
- rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
- # remove the firmware
- rm -rf ${pkgdir}/lib/firmware
- }
复制代码
下次PKGBUILD里面加上makedepends... |
|