You are not logged in.

#1 2009-02-21 17:40:41

Fackamato
Member
Registered: 2006-03-31
Posts: 579

Realtime kernel, 2.6.29-rc4-rt ?

Is anyone still interested in the realtime kernel? I saw that there's a realtime patch that can be applied to 2.6.29-rc4:

http://www.kernel.org/pub/linux/kernel/ … c4-rt2.bz2

http://thread.gmane.org/gmane.linux.rt.user/3911

I request an update of the kernel26rt PKGBUILD in AUR smile

I just built it myself and made a PKGBUILD (very ugly one) that seemed to work

[fackamato@fackamato-laptop ~]$ uname -a
Linux fackamato-laptop 2.6.29-rc4-rt #1 SMP PREEMPT RT Sat Feb 21 17:17:18 GMT 2009 x86_64 Intel(R) Core(TM)2 Duo CPU T8300 @ 2.40GHz GenuineIntel GNU/Linux
[fackamato@fackamato-laptop ~]$

But that was build in my ramdisk, and I forgot to copy it to my HDD after build+install so I lost the PKGBUILD sad

Last edited by Fackamato (2009-02-21 17:41:10)

Offline

#2 2009-02-26 20:09:38

digitalcrypto
Member
Registered: 2008-01-14
Posts: 21

Re: Realtime kernel, 2.6.29-rc4-rt ?

Hey Fackamato,

I need RT and saw it was outdated.  The maintainer looks like he wants out.  I don't really have time to maintain a kernel package but I need RT for the Linux CNC package I am putting together.

Let me know what you want to do.  I am going to be putting a PKGBUILD together this afternoon if I can get a free moment to work on it.

DC

Offline

#3 2009-02-26 20:12:31

Fackamato
Member
Registered: 2006-03-31
Posts: 579

Re: Realtime kernel, 2.6.29-rc4-rt ?

digitalcrypto wrote:

Hey Fackamato,

I need RT and saw it was outdated.  The maintainer looks like he wants out.  I don't really have time to maintain a kernel package but I need RT for the Linux CNC package I am putting together.

Let me know what you want to do.  I am going to be putting a PKGBUILD together this afternoon if I can get a free moment to work on it.

DC

Hey,

Unfortunately I don't have the time to maintain any packages. Perhaps if you could come up with a PKGBUILD that works and just post it here would be enough wink (and post it as a comment on the aur page)

The PKGBUILD really only needs to apply kernel patches, but I remember I had trouble with kernel naming, localversion etc. There was a localversion-file in one patch (rt I think?) that made the package fail to build because it was expecting the kernel tree with another name etc.

Offline

#4 2009-02-26 20:33:47

digitalcrypto
Member
Registered: 2008-01-14
Posts: 21

Re: Realtime kernel, 2.6.29-rc4-rt ?

I'll see what I can do but no promises.  I'm on a netbook..nuff said.

I grabbed the latest tarball to have a look.

Offline

#5 2009-02-26 20:51:29

digitalcrypto
Member
Registered: 2008-01-14
Posts: 21

Re: Realtime kernel, 2.6.29-rc4-rt ?

Those kernel boys are definitely quick.

Latest is

http://www.kernel.org/pub/linux/kernel/ … c6-rt3.bz2

So I will try building against that for now.

Offline

#6 2009-02-27 04:33:56

digitalcrypto
Member
Registered: 2008-01-14
Posts: 21

Re: Realtime kernel, 2.6.29-rc4-rt ?

I got a PKGBUILD running on make now.  It's 2.6.29-rc6-rt3. 

Do you know where I can host the file so I can put a link in here and people can download it?

Offline

#7 2009-02-27 04:52:22

evr
Arch Linux f@h Team Member
Registered: 2009-01-23
Posts: 554

Re: Realtime kernel, 2.6.29-rc4-rt ?

do you think you could either post the PKGBUILD or post it in the AUR?

Offline

#8 2009-02-27 04:57:40

digitalcrypto
Member
Registered: 2008-01-14
Posts: 21

Re: Realtime kernel, 2.6.29-rc4-rt ?

Yeah.  I wanted to build/install it to make sure it was ok first.  I sent Schiv an email about assuming the role of maintainer for it since I need RT for Linux CNC and I will keep it updated.

I will zip and post to rapidshare and put a link here I guess until Schiv tells me what he wants.  I will do that within the next hour or so.

Offline

#9 2009-02-27 05:04:02

evr
Arch Linux f@h Team Member
Registered: 2009-01-23
Posts: 554

Re: Realtime kernel, 2.6.29-rc4-rt ?

sweet, thanks.

Offline

#10 2009-02-27 05:58:25

digitalcrypto
Member
Registered: 2008-01-14
Posts: 21

Re: Realtime kernel, 2.6.29-rc4-rt ?

Sorry.  I am super tired so this isn't quite done but it will start building the kernel.  I'm still compiling. 

here is the link.  i've not matched up md5sums etc

http://www.divshare.com/download/launch/6667792-72b

If you have problems/suggestions leave me a message and I will get it in the morning when i wake up.

Offline

#11 2009-02-28 14:28:32

Fackamato
Member
Registered: 2006-03-31
Posts: 579

Re: Realtime kernel, 2.6.29-rc4-rt ?

digitalcrypto wrote:

Sorry.  I am super tired so this isn't quite done but it will start building the kernel.  I'm still compiling. 

here is the link.  i've not matched up md5sums etc

http://www.divshare.com/download/launch/6667792-72b

If you have problems/suggestions leave me a message and I will get it in the morning when i wake up.

Downloading PKGBUILD now. smile

Edit:

Here's the PKGBUILD:

# Contributor: Ray Rashif <schivmeister@gmail.com>
# Contributor: timbosa <tinny_tim@dodo.com.au>
# Contributor: DigitalCrypto <digitalcrypto at gmail dot com>

pkgname=kernel26rt
pkgver=2.6.29.rt3
pkgrel=1

_basekernel=2.6.29-rc6
_basever=2.6.29        # actual basekernel eg. for rc builds
_kernpatchset=        # upstream patch version
_patchver=-rc6-rt3    # rt patch version
_localver=-rt        # append to linux ver eg. 2.6.25-rt
_archver=rt        # append to archlinux ver eg. kernel26rt

# If sources are rc, old rc, old rt, rc & old rt, old rc & old rt:
# rc, rc-old, rt-old, rc-rt-old, all-old or blank for default
_source=

pkgdesc="The Linux Kernel and modules with realtime preemption"
arch=(i686 x86_64)
license=('GPL2')
url="http://www.kernel.org/pub/linux/kernel/projects/rt/"
backup=(etc/mkinitcpio.d/$pkgname.preset)
depends=('module-init-tools' 'mkinitcpio>=0.5.18')
replaces=('iwlwifi-rt')
install=$pkgname.install

[ "$_source" = "rc" ] && _rc=testing/
[ "$_source" = "rc-old" ] && _rc=testing/v$_basever/
[ "$_source" = "rt-old" ] && _rt=older/
[ "$_source" = "rc-rt-old" ] && _rc=testing/ && _rt=older/
[ "$_source" = "all-old" ] && _rc=testing/v$_basever/ && _rt=older/
[ -n "$_kernpatchset" ] && \
  
  # Modified _kernpatchurl to get latest testing kernel 2.6.29-rc6.  Will modify once released. 26FEB09 DC
  #_kernpatchurl="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/${_rc}patch-${_basever}${_kernpatchset}.bz2"
   _kernpatchurl="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/${_rc}patch-${_basever}${_kernpatchset}.bz2"


source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/linux-$_basekernel.tar.bz2
    $_kernpatchurl
    ftp://ftp.kernel.org/pub/linux/kernel/projects/rt/${_rt}patch-${_basever}${_kernpatchset}${_patchver}.bz2
    config
        config.x86_64
        $pkgname.preset
    logo_linux_clut224.ppm
    logo_linux_mono.pbm
    logo_linux_vga16.ppm)

build() {
  cd "$srcdir/linux-$_basekernel"
  
  KARCH=x86
  
  # Patches and fixes
  msg "Adding patches and fixes..."

  if [ -n "$_kernpatchset" ]; then
    msg2 "Linux upstream patch"
    patch -Np1 -i ../patch-${_basever}${_kernpatchset} > /dev/null \
      || return 1
  fi

  msg2 "Ingo Molnár's Realtime Preemption patch"
  patch -Np1 -i ../patch-${_basever}${_kernpatchset}${_patchver} \
    > /dev/null || return 1

  msg2 "Proprietary ATI driver compatibility"
  _sym="EXPORT_SYMBOL"
  _rcu="__rcu_read_"
  sed -i "s/${_sym}_GPL(${_rcu}lock);/${_sym}(${_rcu}lock);/g" \
    kernel/rcupreempt.c || return 1
  sed -i "s/${_sym}_GPL(${_rcu}unlock);/${_sym}(${_rcu}unlock);/g" \
    kernel/rcupreempt.c || return 1

  msg2 "Arch Linux logo"
  cp ../logo_linux_clut224.ppm drivers/video/logo/
  cp ../logo_linux_mono.pbm drivers/video/logo/
  cp ../logo_linux_vga16.ppm drivers/video/logo/

  # Configuration
  msg "Configuring the kernel..."
  sed -i "s/EXTRAVERSION = .*/EXTRAVERSION = /" Makefile
  sed -i "s/CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=\"$_localver\"/" \
    ../{config,config.x86_64}
  _kernver=${_basekernel}${_localver}

  [ "$CARCH" = "x86_64" ] && cat ../config.x86_64 > .config
  [ "$CARCH" = "i686" ] && cat ../config > .config
  [ -e ../../config.save ] && cat ../../config.save > .config

  yes "" | make config > /dev/null
  make menuconfig
  #make xconfig
  #make gconfig
  #make oldconfig
  cat .config > ../../config.save

  # Build
  msg "Compiling the kernel modules..."
  make bzImage modules || return 1
  mkdir -p "$pkgdir"/{lib/modules,boot}
  make INSTALL_MOD_PATH="$pkgdir" modules_install || return 1

  msg "Copying files..."
  cp System.map "$pkgdir/boot/System.map26$_archver"
  cp "arch/$KARCH/boot/bzImage" "$pkgdir/boot/vmlinuz26$_archver"
  install -Dm0644 Makefile "$pkgdir/usr/src/linux-$_kernver/Makefile"
  install -Dm0644 kernel/Makefile \
    "$pkgdir/usr/src/linux-$_kernver/kernel/Makefile"
  install -Dm0644 .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

  cp Module.symvers "$pkgdir/usr/src/linux-$_kernver"
  cp -a scripts "$pkgdir/usr/src/linux-$_kernver"
  chmod og-w -R "$pkgdir/usr/src/linux-$_kernver/scripts"

  mkdir -p "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/kernel"

  cp arch/$KARCH/Makefile \
    "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/"
  [ "$CARCH" = "i686" ] && cp arch/$KARCH/Makefile_32.cpu \
    "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/"
  cp arch/$KARCH/kernel/asm-offsets.s \
    "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/kernel/"

  # Headers
  msg2 "lirc headers"
  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

  msg2 "dm headers"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/drivers/md"
  cp drivers/md/*.h "$pkgdir/usr/src/linux-$_kernver/drivers/md"

  msg2 "inotify.h"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/include/linux"
  cp include/linux/inotify.h \
    "$pkgdir/usr/src/linux-$_kernver/include/linux/"
  
  msg2 "CLUSTERIP file for iptables"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/net/ipv4/netfilter/"
  cp net/ipv4/netfilter/ipt_CLUSTERIP.c \
    "$pkgdir/usr/src/linux-$_kernver/net/ipv4/netfilter/"
  
  msg2 "Wireless headers"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/net/mac80211/"
  cp net/mac80211/*.h "$pkgdir/usr/src/linux-$_kernver/net/mac80211/"
  
  msg2 "dvb headers for external modules"
  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/"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/include/config/dvb/"
  cp include/config/dvb/*.h \
    "$pkgdir/usr/src/linux-$_kernver/include/config/dvb/"
  
  msg2 "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"
  
  msg2 "vmlinux"
  cp vmlinux "$pkgdir/usr/src/linux-$_kernver"
  
  msg2 "Source files"
  cp vmlinux "$pkgdir/usr/src/linux-$_kernver"
  
  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)

  msg2 "Arch Linux files"
  sed -i "s/KERNEL_VERSION=.*/KERNEL_VERSION=$_kernver/g" \
    "$startdir/$install"
  sed -i "s/ARCH_VERSION=.*/ARCH_VERSION=${_archver}/g" \
    "$startdir/$install" "$srcdir/$pkgname.preset"

  install -Dm0644 "$srcdir/$pkgname.preset" \
    "$pkgdir/etc/mkinitcpio.d/$pkgname.preset" || return 1
  echo -e "# DO NOT EDIT THIS FILE\nALL_kver='$_kernver'" \
    > "$pkgdir/etc/mkinitcpio.d/$pkgname.kver"

  cd "$pkgdir/usr/src/linux-$_kernver/arch"
  for i in *; do
    [ "$i" != "$KARCH" ] && rm -rf $i
  done
}

md5sums=('2452756b2324dd9544721c0107ef281d'
         '80b938daf5d7fa609adeb87b606c89b0'
         'cceacd08b67d44f587c00ca5e7331228'
         'daa0ed4f2951b00b581521c5aac05057'
         'aa5d29e7b6740bcb6d022d3122e9cf99'
         '6a5a1925501fe20fafd04fdb3cb4f6ed'
         'e8c333eaeac43f5c6a1d7b2f47af12e2'
         'c120adbd9c0daa0136237a83adeabd1e')

Last edited by Fackamato (2009-02-28 14:39:19)

Offline

#12 2009-02-28 15:50:00

Fackamato
Member
Registered: 2006-03-31
Posts: 579

Re: Realtime kernel, 2.6.29-rc4-rt ?

That PKGBUILD didn't work all the way through, this one does though:

[fackamato@fackamato-laptop kernel26rt]$ cat PKGBUILD

# Contributor: Ray Rashif <schivmeister@gmail.com>
# Contributor: timbosa <tinny_tim@dodo.com.au>
# Contributor: DigitalCrypto <digitalcrypto at gmail dot com>

pkgname=kernel26rt
pkgver=2.6.29.rt3
pkgrel=1

_basekernel=2.6.29-rc6
_basever=2.6.29        # actual basekernel eg. for rc builds
_kernpatchset=        # upstream patch version
_patchver=-rc6-rt3    # rt patch version
_localver=-rt        # append to linux ver eg. 2.6.25-rt
_archver=rt        # append to archlinux ver eg. kernel26rt

# If sources are rc, old rc, old rt, rc & old rt, old rc & old rt:
# rc, rc-old, rt-old, rc-rt-old, all-old or blank for default
_source=

pkgdesc="The Linux Kernel and modules with realtime preemption"
arch=(i686 x86_64)
license=('GPL2')
url="http://www.kernel.org/pub/linux/kernel/projects/rt/"
backup=(etc/mkinitcpio.d/$pkgname.preset)
depends=('module-init-tools' 'mkinitcpio>=0.5.18')
replaces=('iwlwifi-rt')
install=$pkgname.install

[ "$_source" = "rc" ] && _rc=testing/
[ "$_source" = "rc-old" ] && _rc=testing/v$_basever/
[ "$_source" = "rt-old" ] && _rt=older/
[ "$_source" = "rc-rt-old" ] && _rc=testing/ && _rt=older/
[ "$_source" = "all-old" ] && _rc=testing/v$_basever/ && _rt=older/
[ -n "$_kernpatchset" ] && \
  
  # Modified _kernpatchurl to get latest testing kernel 2.6.29-rc6.  Will modify once released. 26FEB09 DC
  #_kernpatchurl="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/${_rc}patch-${_basever}${_kernpatchset}.bz2"
   _kernpatchurl="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/${_rc}patch-${_basever}${_kernpatchset}.bz2"


source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/linux-$_basekernel.tar.bz2
    $_kernpatchurl
    ftp://ftp.kernel.org/pub/linux/kernel/projects/rt/${_rt}patch-${_basever}${_kernpatchset}${_patchver}.bz2
    config
        config.x86_64
        $pkgname.preset
    logo_linux_clut224.ppm
    logo_linux_mono.pbm
    logo_linux_vga16.ppm)

build() {
  cd "$srcdir/linux-$_basekernel"
  
  KARCH=x86
  
  # Patches and fixes
  msg "Adding patches and fixes..."

  if [ -n "$_kernpatchset" ]; then
    msg2 "Linux upstream patch"
    patch -Np1 -i ../patch-${_basever}${_kernpatchset} > /dev/null \
      || return 1
  fi

  msg2 "Ingo Molnr's Realtime Preemption patch"
  patch -Np1 -i ../patch-${_basever}${_kernpatchset}${_patchver} \
    > /dev/null || return 1

  msg2 "Proprietary ATI driver compatibility"
  _sym="EXPORT_SYMBOL"
  _rcu="__rcu_read_"
  sed -i "s/${_sym}_GPL(${_rcu}lock);/${_sym}(${_rcu}lock);/g" \
    kernel/rcupreempt.c || return 1
  sed -i "s/${_sym}_GPL(${_rcu}unlock);/${_sym}(${_rcu}unlock);/g" \
    kernel/rcupreempt.c || return 1

  msg2 "Arch Linux logo"
  cp ../logo_linux_clut224.ppm drivers/video/logo/
  cp ../logo_linux_mono.pbm drivers/video/logo/
  cp ../logo_linux_vga16.ppm drivers/video/logo/

  # Configuration
  msg "Configuring the kernel..."
  sed -i "s/EXTRAVERSION = .*/EXTRAVERSION = /" Makefile
  sed -i "s/CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=\"$_localver\"/" \
    ../{config,config.x86_64}
  _kernver=${_basekernel}${_localver}

  [ "$CARCH" = "x86_64" ] && cat ../config.x86_64 > .config
  [ "$CARCH" = "i686" ] && cat ../config > .config
  [ -e ../../config.save ] && cat ../../config.save > .config

  yes "" | make config > /dev/null
  make menuconfig
  #make xconfig
  #make gconfig
  #make oldconfig
  cat .config > ../../config.save

  # Build
  msg "Compiling the kernel modules..."
  make bzImage modules || return 1
  mkdir -p "$pkgdir"/{lib/modules,boot}
  make INSTALL_MOD_PATH="$pkgdir" modules_install || return 1

  msg "Copying files..."
  cp System.map "$pkgdir/boot/System.map26$_archver"
  cp "arch/$KARCH/boot/bzImage" "$pkgdir/boot/vmlinuz26$_archver"
  install -Dm0644 Makefile "$pkgdir/usr/src/linux-$_kernver/Makefile"
  install -Dm0644 kernel/Makefile \
    "$pkgdir/usr/src/linux-$_kernver/kernel/Makefile"
  install -Dm0644 .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

  cp Module.symvers "$pkgdir/usr/src/linux-$_kernver"
  cp -a scripts "$pkgdir/usr/src/linux-$_kernver"
  chmod og-w -R "$pkgdir/usr/src/linux-$_kernver/scripts"

  mkdir -p "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/kernel"

  cp arch/$KARCH/Makefile \
    "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/"
  [ "$CARCH" = "i686" ] && cp arch/$KARCH/Makefile_32.cpu \
    "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/"
  cp arch/$KARCH/kernel/asm-offsets.s \
    "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/kernel/"

  # Headers
  msg2 "lirc headers"
  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

  msg2 "dm headers"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/drivers/md"
  cp drivers/md/*.h "$pkgdir/usr/src/linux-$_kernver/drivers/md"

  msg2 "inotify.h"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/include/linux"
  cp include/linux/inotify.h \
    "$pkgdir/usr/src/linux-$_kernver/include/linux/"
  
  msg2 "CLUSTERIP file for iptables"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/net/ipv4/netfilter/"
  cp net/ipv4/netfilter/ipt_CLUSTERIP.c \
    "$pkgdir/usr/src/linux-$_kernver/net/ipv4/netfilter/"
  
  msg2 "Wireless headers"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/net/mac80211/"
  cp net/mac80211/*.h "$pkgdir/usr/src/linux-$_kernver/net/mac80211/"
  
  msg2 "dvb headers for external modules"
  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/"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/include/config/dvb/"
  cp include/config/dvb/*.h \
    "$pkgdir/usr/src/linux-$_kernver/include/config/dvb/"
  
  msg2 "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"
  
  msg2 "vmlinux"
  cp vmlinux "$pkgdir/usr/src/linux-$_kernver"
  
  msg2 "Source files"
  cp vmlinux "$pkgdir/usr/src/linux-$_kernver"
  
  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/$_basever-rt" && \
    (rm -f source build; ln -sf \
      ../../../usr/src/linux-$_kernver build)

  msg2 "Arch Linux files"
  sed -i "s/KERNEL_VERSION=.*/KERNEL_VERSION=$_kernver/g" \
    "$startdir/$install"
  sed -i "s/ARCH_VERSION=.*/ARCH_VERSION=${_archver}/g" \
    "$startdir/$install" "$srcdir/$pkgname.preset"

  install -Dm0644 "$srcdir/$pkgname.preset" \
    "$pkgdir/etc/mkinitcpio.d/$pkgname.preset" || return 1
  echo -e "# DO NOT EDIT THIS FILE\nALL_kver='$_kernver'" \
    > "$pkgdir/etc/mkinitcpio.d/$pkgname.kver"

  cd "$pkgdir/usr/src/linux-$_kernver/arch"
  for i in *; do
    [ "$i" != "$KARCH" ] && rm -rf $i
  done
}

md5sums=('2452756b2324dd9544721c0107ef281d'
         '80b938daf5d7fa609adeb87b606c89b0'
         'cceacd08b67d44f587c00ca5e7331228'
         'daa0ed4f2951b00b581521c5aac05057'
         'aa5d29e7b6740bcb6d022d3122e9cf99'
         '6a5a1925501fe20fafd04fdb3cb4f6ed'
         'e8c333eaeac43f5c6a1d7b2f47af12e2'
         'c120adbd9c0daa0136237a83adeabd1e')

Offline

#13 2009-02-28 16:08:56

digitalcrypto
Member
Registered: 2008-01-14
Posts: 21

Re: Realtime kernel, 2.6.29-rc4-rt ?

Cool.  I didn't get that far.  It's taking me about 2h5m to compile this on netbook.

Thanks for fixing that up and let me know how it works.

Would you be so kind to post the package somewhere?

Thanks

Last edited by digitalcrypto (2009-02-28 16:13:24)

Offline

#14 2009-02-28 16:14:29

Fackamato
Member
Registered: 2006-03-31
Posts: 579

Re: Realtime kernel, 2.6.29-rc4-rt ?

Well it didn't work completely. mkinitcpio fails to find any modules because it's looking for 2.6.29-rc6-rt in /lib/modules, where only 2.6.29-rt is. I made a symlink to 2.6.29-rc6-rt but that wasn't enough, I needed to run mkinitcpio -k 2.6.29-rt -c /etc/mkinitcpio.conf -g /boot/kernel26rt.img instead of -k 2.6.29-rc6-rt... there's some quirks left to fix in the PKGBUILD etc to avoid this, but since I fixed these manually, the kernel boots and works with nvidia etc.

However, I forgot to enable my wireless network card wink so I'm on my newly compiled -zen instead. Now food, might compile -rt again later...

[fackamato@fackamato-laptop ~]$ uname -a
Linux fackamato-laptop 2.6.29-rc6-zen1-ARCH-20090228-07741-gfac1be6 #1 SMP PREEMPT Sat Feb 28 15:17:20 GMT 2009 x86_64 Intel(R) Core(TM)2 Duo CPU T8300 @ 2.40GHz GenuineIntel GNU/Linux

Offline

#15 2009-03-03 08:07:32

Fackamato
Member
Registered: 2006-03-31
Posts: 579

Re: Realtime kernel, 2.6.29-rc4-rt ?

I just noticed that there are patches that apply to 2.6.26.8 if someone wants to try them: http://rt.et.redhat.com/download/

Offline

#16 2009-03-03 10:10:46

digitalcrypto
Member
Registered: 2008-01-14
Posts: 21

Re: Realtime kernel, 2.6.29-rc4-rt ?

I saw and I made a PKGBUILD for it.  If my memory is correct, and it's usually not when I am working graveyard, PREEMPT was/is/needs to be removed to be stable.  So no Core2Duo, Quadro multi on it.

But I could be wrong...

Offline

#17 2009-03-06 19:10:36

btartsa
Member
Registered: 2004-07-26
Posts: 222

Re: Realtime kernel, 2.6.29-rc4-rt ?

Fackmato wrote:

Well it didn't work completely. mkinitcpio fails to find any modules because it's looking for 2.6.29-rc6-rt in /lib/modules, where only 2.6.29-rt is. I made a symlink to 2.6.29-rc6-rt but that wasn't enough, I needed to run mkinitcpio -k 2.6.29-rt -c /etc/mkinitcpio.conf -g /boot/kernel26rt.img instead of -k 2.6.29-rc6-rt... there's some quirks left to fix in the PKGBUILD etc to avoid this, but since I fixed these manually, the kernel boots and works with nvidia etc.

I'm pretty sure that means your _kernver variable is screwed up in your pkgbuild.

Offline

#18 2009-03-15 02:32:27

ugkbunb
Member
Registered: 2009-02-26
Posts: 227

Re: Realtime kernel, 2.6.29-rc4-rt ?

I can build the rt kernel (rc7 version) just fine (had what the above mention poster problem but making sure my .config kernel version variable was set right fixed it.) However I can not for the life of me build the nvidia kernel interface.

I have tried the following:

1. wiki instructions of editing the makepkg to my kernel version
2. booting into my new kernel and using `uname -r`  in the kernel version fields
3. attempting to manually install using sudo sh nvidia package.... with -k to signify my kernel and within the new kernel enviroment. I have also tried passing --kernel-source-path as well as setting SYSOUT/SYSSRC in the PKGBUILD.
4. I have attempted to adding the following to the PKGBUILD as well as editing the standard 2.6.28-ARCH pkgbuild to accept the realtime patch.

msg "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/

I can verify that the following exists.
/lib/modules/[my new kernel]
/usr/src/linux-[my new kernel]

file /lib/modules/[my new kernel]/build
properly points to
/usr/src/linux-[my new kernel]

I have also tried the following which someone suggested fixed it for them
sudo ln -sfn /usr/src/linux-[my new kernel] /usr/src/linux

All of the above fail with the same error. Nvidia complains that it can not find the source for the kernel.

==> Making package: nvidia-rt 180.37-1 x86_64 (Sat Mar 14 16:24:27 CDT 2009)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
  -> Found NVIDIA-Linux-x86_64-180.37-pkg0.run in build dir
==> Validating source files with md5sums...
    NVIDIA-Linux-x86_64-180.37-pkg0.run ... Passed
==> Extracting Sources...
==> Removing existing pkg/ directory...
==> Entering fakeroot environment...
==> Starting build()...
Creating directory NVIDIA-Linux-x86_64-180.37-pkg0
The directory 'NVIDIA-Linux-x86_64-180.37-pkg0' already exists.  Please either
move the existing directory out of the way, or specify a
different directory with the '--target' option.
If you are using a Linux 2.4 kernel, please make sure
you either have configured kernel sources matching your
kernel or the correct set of kernel headers installed
on your system.

If you are using a Linux 2.6 kernel, please make sure
you have configured kernel sources matching your kernel
installed on your system. If you specified a separate
output directory using either the "KBUILD_OUTPUT" or
the "O" KBUILD parameter, make sure to specify this
directory with the SYSOUT environment variable or with
the equivalent nvidia-installer command line option.

Depending on where and how the kernel sources (or the
kernel headers) were installed, you may need to specify
their location with the SYSSRC environment variable or
the equivalent nvidia-installer command line option.

*** Unable to determine the target kernel version. ***

EDIT: Fixed it by changing my symbolic link to the source directory I built my source one not the copy of it in /usr/src

Last edited by ugkbunb (2009-03-15 05:28:52)

Offline

#19 2009-03-15 07:19:08

ugkbunb
Member
Registered: 2009-02-26
Posts: 227

Re: Realtime kernel, 2.6.29-rc4-rt ?

Sucess : )

../downloads/PKGBUILDS]$ sudo ./preempt-test
Starting test with 98 threads on 2 cpus
0 -> p:97 a: -1 l: 3/2 t: 20003/20620/617
1 -> p:98 a: -1 l: 2/2 t: 20002/20624/622
2 -> p:96 a: -1 l: 3/3 t: 39935/40546/611
3 -> p:95 a: -1 l: 3/3 t: 39942/40547/605
4 -> p:94 a: -1 l: 3/2 t: 59853/60452/599
5 -> p:93 a: -1 l: 4/2 t: 59860/60454/594
6 -> p:92 a: -1 l: 4/2 t: 79770/80358/588
7 -> p:91 a: -1 l: 4/2 t: 79779/80361/582
8 -> p:90 a: -1 l: 3/2 t: 99688/100263/575
9 -> p:89 a: -1 l: 3/2 t: 99698/100267/569
10 -> p:88 a: -1 l: 3/2 t: 119605/120168/563
11 -> p:87 a: -1 l: 4/2 t: 119616/120173/557
12 -> p:86 a: -1 l: 3/2 t: 139522/140073/551
13 -> p:85 a: -1 l: 4/2 t: 139533/140078/545
14 -> p:84 a: -1 l: 4/2 t: 159439/159978/539
15 -> p:83 a: -1 l: 4/2 t: 159450/159983/533
16 -> p:82 a: -1 l: 5/2 t: 179356/179883/527
17 -> p:81 a: -1 l: 3/2 t: 179369/179889/520
18 -> p:80 a: -1 l: 3/2 t: 199274/199788/514
19 -> p:79 a: -1 l: 3/3 t: 199287/199795/508
20 -> p:78 a: -1 l: 3/2 t: 219193/219695/502
21 -> p:77 a: -1 l: 3/2 t: 219205/219701/496
22 -> p:76 a: -1 l: 3/2 t: 239110/239600/490
23 -> p:75 a: -1 l: 4/2 t: 239122/239606/484
24 -> p:74 a: -1 l: 4/2 t: 259027/259505/478
25 -> p:73 a: -1 l: 4/2 t: 259040/259512/472
26 -> p:72 a: -1 l: 4/2 t: 278944/279410/466
27 -> p:71 a: -1 l: 4/2 t: 278961/279421/460
28 -> p:70 a: -1 l: 4/2 t: 298866/299320/454
29 -> p:69 a: -1 l: 4/2 t: 298879/299327/448
30 -> p:68 a: -1 l: 4/2 t: 318783/319225/442
31 -> p:67 a: -1 l: 4/2 t: 318796/319232/436
32 -> p:66 a: -1 l: 3/2 t: 338701/339130/429
33 -> p:65 a: -1 l: 4/2 t: 338714/339137/423
34 -> p:64 a: -1 l: 4/2 t: 358618/359035/417
35 -> p:63 a: -1 l: 4/2 t: 358632/359043/411
36 -> p:62 a: -1 l: 4/2 t: 378536/378941/405
37 -> p:61 a: -1 l: 4/2 t: 378549/378948/399
38 -> p:60 a: -1 l: 4/2 t: 398453/398846/393
39 -> p:59 a: -1 l: 3/2 t: 398468/398854/386
40 -> p:58 a: -1 l: 3/2 t: 418371/418751/380
41 -> p:57 a: -1 l: 3/2 t: 418386/418760/374
42 -> p:56 a: -1 l: 3/2 t: 438288/438656/368
43 -> p:55 a: -1 l: 4/2 t: 438304/438666/362
44 -> p:54 a: -1 l: 4/2 t: 458205/458561/356
45 -> p:53 a: -1 l: 3/3 t: 458223/458572/349
46 -> p:52 a: -1 l: 4/2 t: 478123/478466/343
47 -> p:51 a: -1 l: 4/2 t: 478141/478478/337
48 -> p:50 a: -1 l: 4/2 t: 498041/498371/330
49 -> p:49 a: -1 l: 4/2 t: 499214/499538/324
50 -> p:48 a: -1 l: 3/3 t: 517962/518279/317
51 -> p:47 a: -1 l: 4/2 t: 519196/519507/311
52 -> p:46 a: -1 l: 4/2 t: 537879/538184/305
53 -> p:45 a: -1 l: 4/2 t: 539305/539604/299
54 -> p:44 a: -1 l: 4/2 t: 557802/558094/292
55 -> p:43 a: -1 l: 4/2 t: 559223/559509/286
56 -> p:42 a: -1 l: 3/2 t: 577723/578002/279
57 -> p:41 a: -1 l: 4/2 t: 579142/579415/273
58 -> p:40 a: -1 l: 4/2 t: 597643/597910/267
59 -> p:39 a: -1 l: 4/2 t: 599216/599477/261
60 -> p:38 a: -1 l: 4/2 t: 617572/617826/254
61 -> p:37 a: -1 l: 4/2 t: 619165/619413/248
62 -> p:36 a: -1 l: 4/2 t: 637490/637732/242
63 -> p:35 a: -1 l: 4/2 t: 639148/639383/235
64 -> p:34 a: -1 l: 5/2 t: 657409/657638/229
65 -> p:33 a: -1 l: 5/2 t: 659236/659458/222
66 -> p:32 a: -1 l: 4/2 t: 677329/677544/215
67 -> p:31 a: -1 l: 4/2 t: 679194/679403/209
68 -> p:30 a: -1 l: 4/2 t: 697247/697450/203
69 -> p:29 a: -1 l: 4/2 t: 699112/699308/196
70 -> p:28 a: -1 l: 4/2 t: 717169/717359/190
71 -> p:27 a: -1 l: 3/2 t: 719557/719740/183
72 -> p:26 a: -1 l: 4/2 t: 737089/737266/177
73 -> p:25 a: -1 l: 4/2 t: 739474/739645/171
74 -> p:24 a: -1 l: 4/3 t: 757008/757172/164
75 -> p:23 a: -1 l: 4/2 t: 759646/759804/158
76 -> p:22 a: -1 l: 4/2 t: 776927/777078/151
77 -> p:21 a: -1 l: 4/2 t: 779565/779710/145
78 -> p:20 a: -1 l: 4/2 t: 796851/796989/138
79 -> p:19 a: -1 l: 4/2 t: 799788/799920/132
80 -> p:18 a: -1 l: 3/2 t: 816779/816904/125
81 -> p:17 a: -1 l: 4/8 t: 819713/819826/113
82 -> p:16 a: -1 l: 4/2 t: 836705/836811/106
83 -> p:15 a: -1 l: 4/2 t: 839647/839747/100
84 -> p:14 a: -1 l: 3/3 t: 856626/856719/93
85 -> p:13 a: -1 l: 4/2 t: 859567/859654/87
86 -> p:12 a: -1 l: 4/2 t: 876544/876625/81
87 -> p:11 a: -1 l: 4/2 t: 879538/879612/74
88 -> p:10 a: -1 l: 4/3 t: 896465/896532/67
89 -> p:9 a: -1 l: 4/2 t: 899460/899521/61
90 -> p:8 a: -1 l: 4/2 t: 916385/916439/54
91 -> p:7 a: -1 l: 4/2 t: 919381/919428/47
92 -> p:6 a: -1 l: 3/3 t: 936306/936346/40
93 -> p:5 a: -1 l: 4/3 t: 939301/939335/34
94 -> p:4 a: -1 l: 4/2 t: 956225/956253/28
95 -> p:3 a: -1 l: 4/2 t: 959221/959242/21
96 -> p:2 a: -1 l: 6/2 t: 976146/976160/14
97 -> p:1 a: -1 l: 4/3 t: 979234/979239/5

---------------------------
Stats: [min: 2us @ row 0] [max: 8us @ row 81] {ave: 2us]
---------------------------
Test PASSED

Offline

#20 2009-03-15 11:10:20

Fackamato
Member
Registered: 2006-03-31
Posts: 579

Re: Realtime kernel, 2.6.29-rc4-rt ?

Which rt patch did you use? Any PKGBUILD?

Offline

#21 2009-03-16 05:32:33

ugkbunb
Member
Registered: 2009-02-26
Posts: 227

Re: Realtime kernel, 2.6.29-rc4-rt ?

^^
I edited the one posted. I did make a hackish one from the stanard kernel PKGBUILD in the ABS and it did install fine just had the same issue with the unable to find the source. I used teh rt-rc7 patch and patched the rc7 source I assume it does not apply cleanly to the newer rc8 source (did not test).

Offline

#22 2009-04-06 02:19:27

Fackamato
Member
Registered: 2006-03-31
Posts: 579

Re: Realtime kernel, 2.6.29-rc4-rt ?

The latest patch can now be found here: http://www.kernel.org/pub/linux/kernel/ … .1-rt4.bz2 . I assume it can be applied to 2.6.29.1, but I haven't tried.

Someone should report back if things work, I don't do any audio stuff myself. Are there any other areas the rt patch might help? Desktop responsiveness?

Edit: Here's a PKGBUILD for the daring people. Can probably be used with kernel26rt in AUR:

# Contributor: Ray Rashif <schivmeister@gmail.com>
# Contributor: timbosa <tinny_tim@dodo.com.au>
# Contributor: Mathias Burén <mathias.buren@gmail.com>

pkgname=kernel26rt
pkgver=2.6.29.1_rt4
pkgrel=1

_basekernel=2.6.29
_basever=2.6.29        # actual basekernel eg. for rc builds
_kernpatchset=.1    # upstream patch version
_patchver=-rt4        # rt patch version
_localver=-rt        # append to linux ver eg. 2.6.29-rt
_archver=rt        # append to archlinux ver eg. kernel26rt

# If sources are rc, old rc, old rt, rc & old rt, old rc & old rt:
# rc, rc-old, rt-old, rc-rt-old, all-old or blank for default
_source=

pkgdesc="The Linux Kernel and modules with realtime preemption"
arch=(i686 x86_64)
license=('GPL2')
url="http://www.kernel.org/pub/linux/kernel/projects/rt/"
backup=(etc/mkinitcpio.d/$pkgname.preset)
depends=('module-init-tools' 'mkinitcpio>=0.5.18')
replaces=('iwlwifi-rt')
install=$pkgname.install

[ "$_source" = "rc" ] && _rc=testing/
[ "$_source" = "rc-old" ] && _rc=testing/v$_basever/
[ "$_source" = "rt-old" ] && _rt=older/
[ "$_source" = "rc-rt-old" ] && _rc=testing/ && _rt=older/
[ "$_source" = "all-old" ] && _rc=testing/v$_basever/ && _rt=older/
[ -n "$_kernpatchset" ] && \
  _kernpatchurl="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/${_rc}patch-${_basever}${_kernpatchset}.bz2"

source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
    $_kernpatchurl
    ftp://ftp.kernel.org/pub/linux/kernel/projects/rt/${_rt}patch-${_basever}${_kernpatchset}${_patchver}.bz2
    config
        config.x86_64
        $pkgname.preset
    logo_linux_clut224.ppm
    logo_linux_mono.pbm
    logo_linux_vga16.ppm)

build() {
  cd "$srcdir/linux-$_basekernel"
  
  KARCH=x86
  
  # Patches and fixes
  msg "Adding patches and fixes..."

  if [ -n "$_kernpatchset" ]; then
    msg2 "Linux upstream patch"
    patch -Np1 -i ../patch-${_basever}${_kernpatchset} > /dev/null \
      || return 1
  fi

  msg2 "Ingo Molnár's Realtime Preemption patch"
  patch -Np1 -i ../patch-${_basever}${_kernpatchset}${_patchver} \
    > /dev/null || return 1

  msg2 "Proprietary ATI driver compatibility"
  _sym="EXPORT_SYMBOL"
  _rcu="__rcu_read_"
  sed -i "s/${_sym}_GPL(${_rcu}lock);/${_sym}(${_rcu}lock);/g" \
    kernel/rcupreempt.c || return 1
  sed -i "s/${_sym}_GPL(${_rcu}unlock);/${_sym}(${_rcu}unlock);/g" \
    kernel/rcupreempt.c || return 1

  msg2 "Arch Linux logo"
  cp ../logo_linux_clut224.ppm drivers/video/logo/
  cp ../logo_linux_mono.pbm drivers/video/logo/
  cp ../logo_linux_vga16.ppm drivers/video/logo/

  # Configuration
  msg "Configuring the kernel..."
  sed -i "s/EXTRAVERSION = .*/EXTRAVERSION = /" Makefile
  sed -i "s/CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=\"$_localver\"/" \
    ../{config,config.x86_64}
  _kernver=${_basekernel}${_localver}

  [ "$CARCH" = "x86_64" ] && cat ../config.x86_64 > .config
  [ "$CARCH" = "i686" ] && cat ../config > .config
  [ -e ../../config.save ] && cat ../../config.save > .config

  yes "" | make config > /dev/null
  make menuconfig
  #make xconfig
  #make gconfig
  #make oldconfig
  cat .config > ../../config.save

  # Build
  msg "Compiling the kernel modules..."
  make bzImage modules || return 1
  mkdir -p "$pkgdir"/{lib/modules,boot}
  make INSTALL_MOD_PATH="$pkgdir" modules_install || return 1

  msg "Copying files..."
  cp System.map "$pkgdir/boot/System.map26$_archver"
  cp "arch/$KARCH/boot/bzImage" "$pkgdir/boot/vmlinuz26$_archver"
  install -Dm0644 Makefile "$pkgdir/usr/src/linux-$_kernver/Makefile"
  install -Dm0644 kernel/Makefile \
    "$pkgdir/usr/src/linux-$_kernver/kernel/Makefile"
  install -Dm0644 .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

  cp Module.symvers "$pkgdir/usr/src/linux-$_kernver"
  cp -a scripts "$pkgdir/usr/src/linux-$_kernver"
  chmod og-w -R "$pkgdir/usr/src/linux-$_kernver/scripts"

  mkdir -p "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/kernel"

  cp arch/$KARCH/Makefile \
    "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/"
  [ "$CARCH" = "i686" ] && cp arch/$KARCH/Makefile_32.cpu \
    "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/"
  cp arch/$KARCH/kernel/asm-offsets.s \
    "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/kernel/"

  # Headers
  msg2 "lirc headers"
  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

  msg2 "dm headers"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/drivers/md"
  cp drivers/md/*.h "$pkgdir/usr/src/linux-$_kernver/drivers/md"

  msg2 "inotify.h"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/include/linux"
  cp include/linux/inotify.h \
    "$pkgdir/usr/src/linux-$_kernver/include/linux/"
  
  msg2 "CLUSTERIP file for iptables"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/net/ipv4/netfilter/"
  cp net/ipv4/netfilter/ipt_CLUSTERIP.c \
    "$pkgdir/usr/src/linux-$_kernver/net/ipv4/netfilter/"
  
  msg2 "Wireless headers"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/net/mac80211/"
  cp net/mac80211/*.h "$pkgdir/usr/src/linux-$_kernver/net/mac80211/"
  
  msg2 "dvb headers for external modules"
  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/"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/include/config/dvb/"
  cp include/config/dvb/*.h \
    "$pkgdir/usr/src/linux-$_kernver/include/config/dvb/"
  
  msg2 "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"
  
  msg2 "vmlinux"
  cp vmlinux "$pkgdir/usr/src/linux-$_kernver"
  
  msg2 "Source files"
  cp vmlinux "$pkgdir/usr/src/linux-$_kernver"
  
  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)

  msg2 "Arch Linux files"
  sed -i "s/KERNEL_VERSION=.*/KERNEL_VERSION=$_kernver/g" \
    "$startdir/$install"
  sed -i "s/ARCH_VERSION=.*/ARCH_VERSION=${_archver}/g" \
    "$startdir/$install" "$srcdir/$pkgname.preset"

  install -Dm0644 "$srcdir/$pkgname.preset" \
    "$pkgdir/etc/mkinitcpio.d/$pkgname.preset" || return 1
  echo -e "# DO NOT EDIT THIS FILE\nALL_kver='$_kernver'" \
    > "$pkgdir/etc/mkinitcpio.d/$pkgname.kver"

  cd "$pkgdir/usr/src/linux-$_kernver/arch"
  for i in *; do
    [ "$i" != "$KARCH" ] && rm -rf $i
  done
}

md5sums=('64921b5ff5cdadbccfcd3820f03be7d8'
         '87c6fbf4096b644d66d4da8bb00641a5'
         '93e532c80167ea829d54c387d8a8019e'
         'cceacd08b67d44f587c00ca5e7331228'
         'daa0ed4f2951b00b581521c5aac05057'
         'aa5d29e7b6740bcb6d022d3122e9cf99'
         '6a5a1925501fe20fafd04fdb3cb4f6ed'
         'e8c333eaeac43f5c6a1d7b2f47af12e2'
         'c120adbd9c0daa0136237a83adeabd1e')

Last edited by Fackamato (2009-04-06 02:30:49)

Offline

#23 2009-04-07 23:10:57

Fackamato
Member
Registered: 2006-03-31
Posts: 579

Re: Realtime kernel, 2.6.29-rc4-rt ?

And here is a PKGBUILD that works:

# Contributor: Ray Rashif <schivmeister@gmail.com>
# Contributor: timbosa <tinny_tim@dodo.com.au>

pkgname=kernel26rt
pkgver=2.6.29.1_rt4
pkgrel=1

_basekernel=2.6.29
_basever=2.6.29        # actual basekernel eg. for rc builds
_kernpatchset=.1    # upstream patch version
_patchver=-rt4        # rt patch version
_localver=-rt        # append to linux ver eg. 2.6.25-rt
_archver=rt        # append to archlinux ver eg. kernel26rt

# If sources are rc, old rc, old rt, rc & old rt, old rc & old rt:
# rc, rc-old, rt-old, rc-rt-old, all-old or blank for default
_source=

pkgdesc="The Linux Kernel and modules with realtime preemption"
arch=(i686 x86_64)
license=('GPL2')
url="http://www.kernel.org/pub/linux/kernel/projects/rt/"
backup=(etc/mkinitcpio.d/$pkgname.preset)
depends=('module-init-tools' 'mkinitcpio>=0.5.18')
replaces=('iwlwifi-rt')
install=$pkgname.install

[ "$_source" = "rc" ] && _rc=testing/
[ "$_source" = "rc-old" ] && _rc=testing/v$_basever/
[ "$_source" = "rt-old" ] && _rt=older/
[ "$_source" = "rc-rt-old" ] && _rc=testing/ && _rt=older/
[ "$_source" = "all-old" ] && _rc=testing/v$_basever/ && _rt=older/
[ -n "$_kernpatchset" ] && \
  _kernpatchurl="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/${_rc}patch-${_basever}${_kernpatchset}.bz2"

source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
    $_kernpatchurl
    ftp://ftp.kernel.org/pub/linux/kernel/projects/rt/${_rt}patch-${_basever}${_kernpatchset}${_patchver}.bz2
    config
        config.x86_64
        $pkgname.preset
    logo_linux_clut224.ppm
    logo_linux_mono.pbm
    logo_linux_vga16.ppm)

build() {
  cd "$srcdir/linux-$_basekernel"
  
  KARCH=x86
  
  # Patches and fixes
  msg "Adding patches and fixes..."

  if [ -n "$_kernpatchset" ]; then
    msg2 "Linux upstream patch"
    patch -Np1 -i ../patch-${_basever}${_kernpatchset} > /dev/null \
      || return 1
  fi

  msg2 "Ingo Molnár's Realtime Preemption patch"
  patch -Np1 -i ../patch-${_basever}${_kernpatchset}${_patchver} \
    > /dev/null || return 1

    msg2 "Arch Linux logo"
  cp ../logo_linux_clut224.ppm drivers/video/logo/
  cp ../logo_linux_mono.pbm drivers/video/logo/
  cp ../logo_linux_vga16.ppm drivers/video/logo/

  # Configuration
  msg "Configuring the kernel..."
  sed -i "s/EXTRAVERSION = .*/EXTRAVERSION = /" Makefile
  sed -i "s/CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=\"$_localver\"/" \
    ../{config,config.x86_64}
  _kernver=${_basekernel}${_localver}

  [ "$CARCH" = "x86_64" ] && cat ../config.x86_64 > .config
  [ "$CARCH" = "i686" ] && cat ../config > .config
  [ -e ../../config.save ] && cat ../../config.save > .config

  yes "" | make config > /dev/null
  make menuconfig
  #make xconfig
  #make gconfig
  #make oldconfig
  cat .config > ../../config.save

  # Build
  msg "Compiling the kernel modules..."
  make bzImage modules || return 1
  mkdir -p "$pkgdir"/{lib/modules,boot}
  make INSTALL_MOD_PATH="$pkgdir" modules_install || return 1

  msg "Copying files..."
  cp System.map "$pkgdir/boot/System.map26$_archver"
  cp "arch/$KARCH/boot/bzImage" "$pkgdir/boot/vmlinuz26$_archver"
  install -Dm0644 Makefile "$pkgdir/usr/src/linux-$_kernver/Makefile"
  install -Dm0644 kernel/Makefile \
    "$pkgdir/usr/src/linux-$_kernver/kernel/Makefile"
  install -Dm0644 .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

  cp Module.symvers "$pkgdir/usr/src/linux-$_kernver"
  cp -a scripts "$pkgdir/usr/src/linux-$_kernver"
  chmod og-w -R "$pkgdir/usr/src/linux-$_kernver/scripts"

  mkdir -p "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/kernel"

  cp arch/$KARCH/Makefile \
    "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/"
  [ "$CARCH" = "i686" ] && cp arch/$KARCH/Makefile_32.cpu \
    "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/"
  cp arch/$KARCH/kernel/asm-offsets.s \
    "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/kernel/"

  # Headers
  msg2 "lirc headers"
  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

  msg2 "dm headers"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/drivers/md"
  cp drivers/md/*.h "$pkgdir/usr/src/linux-$_kernver/drivers/md"

  msg2 "inotify.h"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/include/linux"
  cp include/linux/inotify.h \
    "$pkgdir/usr/src/linux-$_kernver/include/linux/"
  
  msg2 "CLUSTERIP file for iptables"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/net/ipv4/netfilter/"
  cp net/ipv4/netfilter/ipt_CLUSTERIP.c \
    "$pkgdir/usr/src/linux-$_kernver/net/ipv4/netfilter/"
  
  msg2 "Wireless headers"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/net/mac80211/"
  cp net/mac80211/*.h "$pkgdir/usr/src/linux-$_kernver/net/mac80211/"
  
  msg2 "dvb headers for external modules"
  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/"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/include/config/dvb/"
  cp include/config/dvb/*.h \
    "$pkgdir/usr/src/linux-$_kernver/include/config/dvb/"
  
  msg2 "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"
  
  msg2 "vmlinux"
  cp vmlinux "$pkgdir/usr/src/linux-$_kernver"
  
  msg2 "Source files"
  cp vmlinux "$pkgdir/usr/src/linux-$_kernver"
  
  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)

  msg2 "Arch Linux files"
  sed -i "s/KERNEL_VERSION=.*/KERNEL_VERSION=$_kernver/g" \
    "$startdir/$install"
  sed -i "s/ARCH_VERSION=.*/ARCH_VERSION=${_archver}/g" \
    "$startdir/$install" "$srcdir/$pkgname.preset"

  install -Dm0644 "$srcdir/$pkgname.preset" \
    "$pkgdir/etc/mkinitcpio.d/$pkgname.preset" || return 1
  echo -e "# DO NOT EDIT THIS FILE\nALL_kver='$_kernver'" \
    > "$pkgdir/etc/mkinitcpio.d/$pkgname.kver"

  cd "$pkgdir/usr/src/linux-$_kernver/arch"
  for i in *; do
    [ "$i" != "$KARCH" ] && rm -rf $i
  done
}

You can probably take the config files from kernel26rt in aur and do make oldconfig. Something is not right though, in order for NVIDIA to build I had to manually specify --kernel-source-path=/path/to/kernel26rt/src/linux-2.6.29 , but then it built fine.

kernel26rt.th.png

Offline

#24 2009-04-09 05:42:21

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: Realtime kernel, 2.6.29-rc4-rt ?

ugkbunb wrote:

I can build the rt kernel (rc7 version) just fine (had what the above mention poster problem but making sure my .config kernel version variable was set right fixed it.) However I can not for the life of me build the nvidia kernel interface.
*snip*
EDIT: Fixed it by changing my symbolic link to the source directory I built my source one not the copy of it in /usr/src

Thank you sir! I was going crazy trying to figure this one out. In the end a simple

rm /lib/modules/$(uname -r)/build
ln -s /<path_to_src>/linux-2.6.29 /lib/modules/$(uname -r)/build

did the trick. Wonder what's different about the RT PKGBUILD.

Unfortunately, package makes, but installing gives the error that module 'nvidia' is not found in /proc/modules, and I can't boot with nvidia in the xorg.conf. Any advise, seeing as you've solved it?

EDIT: when I try to modprobe nvidia I get:-

FATAL: Error inserting nvidia (/lib/modules/2.6.29-rt/kernel/drivers/video/nvidia.ko): Invalid module format

Nvidia forums suggest that the kernel and module were compiled using different gcc versions, which isn't possible because I just finished compiling the kernel before trying to install the driver.

Last edited by ngoonee (2009-04-09 07:56:59)


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#25 2009-04-11 17:24:51

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: Realtime kernel, 2.6.29-rc4-rt ?

So, I believe my previous error was from having ARCH being 2.6.28, now that ARCH is at 2.6.29 it doesn't happen anymore.

Anyway, I've been examining the PKGBUILD, and have made some changes which allow compilation of nvidia kernel module without the hackish linking of /lib/modules/$_kern. Only 2 changes, first is adding 'trace' to the list of include directories copied, second is copying arch/x86/includes over. Both of which I believe are needed, the 2nd of which doesn't work without the first. Its late here, so I haven't tried if the first will work without the second. I've indented the relevant lines for ease of use, the rest of the PKGBUILD is exactly the same as the current one.

Anyway, if schivmeister could modify the PKGBUILD with these changes it would be great. Thanks so much for uploading this package, by the way.

# Contributor: Ray Rashif <schivmeister@gmail.com>
# Contributor: timbosa <tinny_tim@dodo.com.au>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Thomas Baechler <thomas@archlinux.org>

pkgname=kernel26rt
pkgver=2.6.29.1_rt7
pkgrel=1

_basekernel=2.6.29
_basever=2.6.29        # actual basekernel eg. for rc builds
_kernpatchset=.1    # upstream patch version
_patchver=-rt7        # rt patch version
_localver=-rt        # append to linux ver eg. 2.6.25-rt
_archver=rt        # append to archlinux ver eg. kernel26rt

# If sources are rc, old rc, old rt, rc & old rt, old rc & old rt:
# rc, rc-old, rt-old, rc-rt-old, all-old or blank for default
_source=

pkgdesc="The Linux Kernel and modules with realtime preemption"
arch=(i686 x86_64)
license=('GPL2')
url="http://www.kernel.org/pub/linux/kernel/projects/rt/"
backup=(etc/mkinitcpio.d/$pkgname.preset)
depends=('module-init-tools' 'mkinitcpio>=0.5.20')
replaces=('iwlwifi-rt')
install=$pkgname.install

[ "$_source" = "rc" ] && _rc=testing/
[ "$_source" = "rc-old" ] && _rc=testing/v$_basever/
[ "$_source" = "rt-old" ] && _rt=older/
[ "$_source" = "rc-rt-old" ] && _rc=testing/ && _rt=older/
[ "$_source" = "all-old" ] && _rc=testing/v$_basever/ && _rt=older/
[ -n "$_kernpatchset" ] && \
  _kernpatchurl="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/${_rc}patch-${_basever}${_kernpatchset}.bz2"

source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
    $_kernpatchurl
    ftp://ftp.kernel.org/pub/linux/kernel/projects/rt/${_rt}patch-${_basever}${_kernpatchset}${_patchver}.bz2
    config
    config.x86_64
    $pkgname.preset
    logo_linux_clut224.ppm
    logo_linux_mono.pbm
    logo_linux_vga16.ppm)

build() {
  cd "$srcdir/linux-$_basekernel"

  KARCH=x86

  # Patches and fixes
  msg "Adding patches and fixes..."

  if [ -n "$_kernpatchset" ]; then
    msg2 "Linux upstream patch"
    patch -Np1 -i ../patch-${_basever}${_kernpatchset} > /dev/null \
      || return 1
  fi

  msg2 "Ingo Molnár's Realtime Preemption patch"
  patch -Np1 -i ../patch-${_basever}${_kernpatchset}${_patchver} \
    > /dev/null || return 1

  msg2 "Proprietary ATI driver compatibility"
  _sym="EXPORT_SYMBOL"
  _rcu="__rcu_read_"
  sed -i "s/${_sym}_GPL(${_rcu}lock);/${_sym}(${_rcu}lock);/g" \
    kernel/rcupreempt.c || return 1
  sed -i "s/${_sym}_GPL(${_rcu}unlock);/${_sym}(${_rcu}unlock);/g" \
    kernel/rcupreempt.c || return 1

  msg2 "Arch Linux logo"
  cp ../logo_linux_clut224.ppm drivers/video/logo/
  cp ../logo_linux_mono.pbm drivers/video/logo/
  cp ../logo_linux_vga16.ppm drivers/video/logo/

  # Configuration
  msg "Configuring the kernel..."
  sed -i "s/EXTRAVERSION = .*/EXTRAVERSION = /" Makefile
  sed -i "s/CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=\"$_localver\"/" \
    ../{config,config.x86_64}
  _kernver=${_basekernel}${_localver}

  [ "$CARCH" = "x86_64" ] && cat ../config.x86_64 > .config
  [ "$CARCH" = "i686" ] && cat ../config > .config
  [ -e ../../config.save ] && cat ../../config.save > .config

  yes "" | make config > /dev/null
  make menuconfig
  #make xconfig
  #make gconfig
  #make oldconfig
  cat .config > ../../config.save

  # Build
  msg "Compiling the kernel modules..."
  make bzImage modules || return 1
  mkdir -p "$pkgdir"/{lib/modules,boot}
  make INSTALL_MOD_PATH="$pkgdir" modules_install || return 1

  msg "Copying files..."
  cp System.map "$pkgdir/boot/System.map26$_archver"
  cp "arch/$KARCH/boot/bzImage" "$pkgdir/boot/vmlinuz26$_archver"
  install -Dm0644 Makefile "$pkgdir/usr/src/linux-$_kernver/Makefile"
  install -Dm0644 kernel/Makefile \
    "$pkgdir/usr/src/linux-$_kernver/kernel/Makefile"
  install -Dm0644 .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 trace 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/

  cp Module.symvers "$pkgdir/usr/src/linux-$_kernver"
  cp -a scripts "$pkgdir/usr/src/linux-$_kernver"
  chmod og-w -R "$pkgdir/usr/src/linux-$_kernver/scripts"

  mkdir -p "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/kernel"

  cp arch/$KARCH/Makefile \
    "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/"
  [ "$CARCH" = "i686" ] && cp arch/$KARCH/Makefile_32.cpu \
    "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/"
  cp arch/$KARCH/kernel/asm-offsets.s \
    "$pkgdir/usr/src/linux-$_kernver/arch/$KARCH/kernel/"

  # Headers
  msg2 "lirc headers"
  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

  msg2 "dm headers"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/drivers/md"
  cp drivers/md/*.h "$pkgdir/usr/src/linux-$_kernver/drivers/md"

  msg2 "inotify.h"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/include/linux"
  cp include/linux/inotify.h \
    "$pkgdir/usr/src/linux-$_kernver/include/linux/"

  msg2 "CLUSTERIP file for iptables"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/net/ipv4/netfilter/"
  cp net/ipv4/netfilter/ipt_CLUSTERIP.c \
    "$pkgdir/usr/src/linux-$_kernver/net/ipv4/netfilter/"

  msg2 "Wireless headers"
  mkdir -p "$pkgdir/usr/src/linux-$_kernver/net/mac80211/"
  cp net/mac80211/*.h "$pkgdir/usr/src/linux-$_kernver/net/mac80211/"

  msg2 "dvb headers for external modules"
  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/"

  mkdir -p "$pkgdir/usr/src/linux-$_kernver/include/config/dvb/"
  cp include/config/dvb/*.h "$pkgdir/usr/src/linux-$_kernver/include/config/dvb/"

  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/"

  msg2 "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"

  msg2 "vmlinux"
  cp vmlinux "$pkgdir/usr/src/linux-$_kernver"

  msg2 "Source files"
  cp vmlinux "$pkgdir/usr/src/linux-$_kernver"

  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)

  msg2 "Arch Linux files"
  sed -i "s/KERNEL_VERSION=.*/KERNEL_VERSION=$_kernver/g" \
    "$startdir/$install"
  sed -i "s/ARCH_VERSION=.*/ARCH_VERSION=${_archver}/g" \
    "$startdir/$install" "$srcdir/$pkgname.preset"

  install -Dm0644 "$srcdir/$pkgname.preset" \
    "$pkgdir/etc/mkinitcpio.d/$pkgname.preset" || return 1
  echo -e "# DO NOT EDIT THIS FILE\nALL_kver='$_kernver'" \
    > "$pkgdir/etc/mkinitcpio.d/$pkgname.kver"

  cd "$pkgdir/usr/src/linux-$_kernver/arch"
  for i in *; do
    [ "$i" != "$KARCH" ] && rm -rf $i
  done

  rm -rf "$pkgdir/lib/firmware"
}
md5sums=('64921b5ff5cdadbccfcd3820f03be7d8'
         '87c6fbf4096b644d66d4da8bb00641a5'
         '40133e6f0ede75dd86c833ecfd34200c'
         '9b54f1b18fbb33f50e946190d9482570'
         '50127091aefe106c484f5db929a39bea'
         'aa5d29e7b6740bcb6d022d3122e9cf99'
         '6a5a1925501fe20fafd04fdb3cb4f6ed'
         'e8c333eaeac43f5c6a1d7b2f47af12e2'
         'c120adbd9c0daa0136237a83adeabd1e')

Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

Board footer

Powered by FluxBB