You are not logged in.

#1 2009-04-06 04:06:03

carbonjiao
Member
Registered: 2008-11-07
Posts: 20
Website

[solved]patch 2.6.29-3-ARCH confilict with aufs2

After checked the aufs2 standalone code and 2.6.29-3-ARCH patch, I found 2.6.29-3-ARCH confilict with aufs2...

2.6.29-3-ARCH changed the do_splice_from of fs/splice.c to vfs_splice_from...   while aufs2 standalone need do_splice_from ...

And there is no such change on kernel official patch 2.6.29.1...

So,

If you need aufs2 support, abandon 2.6.29-3-ARCH patch is the best way...


-------------090406----------------
2.6.29.1-2-ARCH patch already contained aufs patch, use vfs_splice_from...

With  kernel26-2.6.29.1-2.pkg.tar.gz, just need " modprobe aufs" to use aufs...

Last edited by carbonjiao (2009-04-07 01:49:36)


http://archlive.googlecode.com
http://archlive-pkg.googlecode.com
Live system and build scripts base on Arch GNU/Linux
基于Arch GNU/Linux的live系统及制作脚本

Offline

#2 2009-04-06 04:29:34

godane
Member
From: NH, USA
Registered: 2008-02-03
Posts: 241
Website

Re: [solved]patch 2.6.29-3-ARCH confilict with aufs2

i build my own 2.6.29.1-1-ARCH patch without unionfs to get around this problem.

[archiso-live]
Server = http://arch-live.isawsome.net/testing/

There is my testing repo for kernel 2.6.29.1 that i made. Its compatible with the 3rd party modules has far has i know.

I hope this is some help for you.


I'm working on a live cds based on Archlinux. http://godane.wordpress.com/

Offline

#3 2009-04-06 04:44:53

carbonjiao
Member
Registered: 2008-11-07
Posts: 20
Website

Re: [solved]patch 2.6.29-3-ARCH confilict with aufs2

HI, godane, thanks for your reply!

Could you share your kernel PKGBUILD?
I must add tuxonice patch and kernel UTF-8 Chinese characters patch...

Here is my PKGBUILD I am compliling now (haven't finished now...)

pkgname=kernel26-archlive
_realpkgname=kernel26
_basekernel=2.6.29
pkgver=2.6.29.1
pkgrel=1
_patchname="patch-${_basekernel}-3-ARCH"
pkgdesc="Archlive内核及模块,加入了gentoo官方补丁、UTF-8补丁、reiser4补丁、aufs补丁及tuxonice支持."
#pkgdesc="Kernel configs for Archlive, with Gentoo patch set, fbcondecor patch, Chinese fonts patch, \
#           and reiser4 patch, aufs patch, also with tuxonice patch set."
arch=(i686 x86_64)
license=('GPL2')
groups=('base')
url="http://archlive.googlecode.com"
backup=(etc/mkinitcpio.d/${_realpkgname}.preset)
depends=('coreutils' 'module-init-tools' 'mkinitcpio>=0.5.18')
provides=('kernel26=2.6.29')
optdepends=('sreadahead: daemon for data sequential boot from disk')
replaces=('kernel24' 'kernel24-scsi' 'kernel26-scsi' 'kernel26'
          'alsa-driver' 'ieee80211' 'hostap-driver26'
          'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
          'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
          'gspcav1')
install=${_realpkgname}.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
 #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
 ftp://ftp.archlinux.org/other/kernel26/${_patchname}.bz2
 http://www.tuxonice.net/downloads/all/tuxonice-3.0-for-2.6.29.patch.bz2
 #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
 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://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.29.patch.gz
 http://nchc.dl.sourceforge.net/sourceforge/ibm-acpi/thinkpad-acpi-0.22-20090318-BETA_v2.6.29.patch.gz
 config    
 config.x86_64
 mkinitcpio.conf
 kernel26.preset  ecryptfs.patch
 0001-kernel-trace-open.patch   aufs2.patch aufs2-standalone.patch #aufs2-linux-2.6.29.patch
 4100_dm-bbr.patch  4200_fbcondecor-0.9.4.patch  4400_alpha-sysctl-uac.patch
 utf8-kernel-2.6-fonts-1.patch.tar.gz
 utf8-kernel-2.6.29-core-1.patch
 utf8-kernel-2.6.29-fbcondecor-1.patch
 )
 md5sums=('64921b5ff5cdadbccfcd3820f03be7d8'
         #'1ee50bb06a8b981efb6cfacaee7ea2f2'
         #'d94bf612ff1a7899f7da9baed4533cf0'
         #'1cdc40cd1b8a3a9cfbb22626ad1e3d66'
         #'325299ab1c4b5634ec7d2769031d29e0'
         #'7ed983ea4f0f47844352ed6e81c8cb55'
           )
         
build() {

    [ "${CARCH}" = "i686" ]   && KARCH=x86
    [ "${CARCH}" = "x86_64" ] && KARCH=x86

  ### mkinitcpio
    cd $startdir
    mkdir $pkgdir/etc
    cp mkinitcpio.conf $pkgdir/etc
    chmod 644 $pkgdir/etc/mkinitcpio.conf

    cd ${srcdir}/linux-$_basekernel

    # applying aufs patch
  patch -Np1 -i ${srcdir}/aufs2.patch || return 1
  patch -Np1 -i ${srcdir}/aufs2-standalone.patch || return 1
  patch -Np1 -i ${srcdir}/ecryptfs.patch || return 1
  #patch -Np1 -i ${srcdir}/aufs2-linux-2.6.29.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.29-fbcondecor-1.patch || return 1
  patch -Np1 -i ${srcdir}/utf8-kernel-2.6-fonts-1.patch || return 1

  patch -Np1 -i ${srcdir}/tuxonice-3.0-for-2.6.29.patch #|| return 1

  # 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

  # applying ext4 patch
  patch -Np1 -i ${srcdir}/ext4-flush-on-close.patch #|| return 1

  # applying reiserfs4 patch
  patch -Np1 -i ${srcdir}/reiser4-for-2.6.29.patch #|| return 1

  # applying thinkpad-acpi patch
  patch -Np1 -i ${srcdir}/thinkpad-acpi-0.22-20090318-BETA_v2.6.29.patch #|| return 1

  if [ "$CARCH" = "x86_64" ]; then
    cp ../config.x86_64 ./.config
  else
    cp ../config ./.config
  fi
  
    source ./.config
    _kernver="$_basekernel${CONFIG_LOCALVERSION}"
    
    # configure kernel    
    # use menuconfig, if you want to change the configuration
    # make menuconfig
    yes "" | make config
    
    # build kernel
    make bzImage modules || return 1
    mkdir -p $startdir/pkg/{lib/modules,boot}
    make INSTALL_MOD_PATH=$startdir/pkg modules_install || return 1
    install -D -m644 System.map $startdir/pkg/boot/System.map26
    install -D -m644 arch/$KARCH/boot/bzImage $startdir/pkg/boot/vmlinuz26
    install -D -m644 Makefile $startdir/pkg/usr/src/linux-$_kernver/Makefile
    install -D -m644 kernel/Makefile $startdir/pkg/usr/src/linux-$_kernver/kernel/Makefile
    install -D -m644 .config $startdir/pkg/usr/src/linux-$_kernver/.config
    install -D -m644 .config $startdir/pkg/boot/kconfig26
    mkdir -p $startdir/pkg/usr/src/linux-$_kernver/include
    
    for i in acpi asm-{generic,$KARCH} config linux math-emu media net pcmcia scsi sound video; do
    cp -a include/$i $startdir/pkg/usr/src/linux-$_kernver/include/          
    done
    
    # copy arch includes for external modules
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH    
    cp -a arch/$KARCH/include ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/

    # copy files necessary for later builds, like nvidia and vmware
    cp Module.symvers $startdir/pkg/usr/src/linux-$_kernver
    cp -a scripts $startdir/pkg/usr/src/linux-$_kernver
    
    # fix permissions on scripts dir
    chmod og-w -R $startdir/pkg/usr/src/linux-$_kernver/scripts
    
    mkdir -p $startdir/pkg/usr/src/linux-$_kernver/arch/$KARCH/kernel
    
    cp arch/$KARCH/Makefile $startdir/pkg/usr/src/linux-$_kernver/arch/$KARCH/
    if [ "${CARCH}" = "i686" ]; then
    cp arch/$KARCH/Makefile_32.cpu $startdir/pkg/usr/src/linux-$_kernver/arch/$KARCH/
    fi
    cp arch/$KARCH/kernel/asm-offsets.s $startdir/pkg/usr/src/linux-$_kernver/arch/$KARCH/kernel/
    
    # add headers for lirc package
    mkdir -p $startdir/pkg/usr/src/linux-$_kernver/drivers/media/video
    cp drivers/media/video/*.h  $startdir/pkg/usr/src/linux-$_kernver/drivers/media/video/
    for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301
    do
    mkdir -p $startdir/pkg/usr/src/linux-$_kernver/drivers/media/video/$i
    cp -a drivers/media/video/$i/*.h $startdir/pkg/usr/src/linux-$_kernver/drivers/media/video/$i
    done
    
    # add dm headers
    mkdir -p $startdir/pkg/usr/src/linux-$_kernver/drivers/md
    cp drivers/md/*.h  $startdir/pkg/usr/src/linux-$_kernver/drivers/md
    
    # add inotify.h
    mkdir -p $startdir/pkg/usr/src/linux-$_kernver/include/linux
    cp include/linux/inotify.h $startdir/pkg/usr/src/linux-$_kernver/include/linux/
    
    # add CLUSTERIP file for iptables
    mkdir -p $startdir/pkg/usr/src/linux-$_kernver/net/ipv4/netfilter/
    cp net/ipv4/netfilter/ipt_CLUSTERIP.c $startdir/pkg/usr/src/linux-$_kernver/net/ipv4/netfilter/
    
    # add wireless headers
    mkdir -p $startdir/pkg/usr/src/linux-$_kernver/net/mac80211/
    cp net/mac80211/*.h $startdir/pkg/usr/src/linux-$_kernver/net/mac80211/
    
    # add xfs and shmem for aufs building
    mkdir -p $startdir/pkg/usr/src/linux-$_kernver/fs/xfs
    mkdir -p $startdir/pkg/usr/src/linux-$_kernver/mm
    cp fs/xfs/xfs_sb.h $startdir/pkg/usr/src/linux-$_kernver/fs/xfs/xfs_sb.h
    cp mm/shmem.c $startdir/pkg/usr/src/linux-$_kernver/mm/shmem.c
    
    # add vmlinux
    cp vmlinux $startdir/pkg/usr/src/linux-$_kernver
    
    # copy in Kconfig files
    for i in $(find . -name "Kconfig*")
    do 
    mkdir -p $startdir/pkg/usr/src/linux-$_kernver/$(echo $i | sed 's|/Kconfig.*||')
    cp $i $startdir/pkg/usr/src/linux-$_kernver/$i
    done
    
    cd $startdir/pkg/usr/src/linux-$_kernver/include && ln -s asm-$KARCH asm
    
    chown -R root.root $startdir/pkg/usr/src/linux-$_kernver
    find $startdir/pkg/usr/src/linux-$_kernver -type d -exec chmod 755 {} \;
    cd $startdir/pkg/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}/${_realpkgname}.preset ${pkgdir}/etc/mkinitcpio.d/${_realpkgname}.preset || return 1
  # set correct depmod command for install
  sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" $startdir/kernel26.install
  echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${_realpkgname}.kver
    
    # remove unneeded architectures
    rm -rf $startdir/pkg/usr/src/linux-$_kernver/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
}

http://archlive.googlecode.com
http://archlive-pkg.googlecode.com
Live system and build scripts base on Arch GNU/Linux
基于Arch GNU/Linux的live系统及制作脚本

Offline

#4 2009-04-06 06:34:52

carbonjiao
Member
Registered: 2008-11-07
Posts: 20
Website

Re: [solved]patch 2.6.29-3-ARCH confilict with aufs2

Oh!   
Complied ok!

I will update all my configs (PKGBUILD, patches) to googlecode:
http://archlive-pkg.googlecode.com

download  http://archlive-pkg.googlecode.com/file … 9.1.tar.gz

Last edited by carbonjiao (2009-04-06 06:52:57)


http://archlive.googlecode.com
http://archlive-pkg.googlecode.com
Live system and build scripts base on Arch GNU/Linux
基于Arch GNU/Linux的live系统及制作脚本

Offline

Board footer

Powered by FluxBB