You are not logged in.

#1 2009-04-04 18:04:26

Roberth
Member
From: The Pale Blue Dot
Registered: 2007-01-12
Posts: 894

kernel26-git?

Hello

Could someone create a PKGBUILD that pulls a snapshot of the linux kernel from git? Creating a PKGBUILD for the kernel is way beyond my experience.

EDIT: btw the reason because I want this is because I want the latest drm. It to be mainly supported on x86_64.

Last edited by Roberth (2009-04-04 18:06:19)


Use the Source, Luke!

Offline

#2 2009-04-04 19:42:17

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

Re: kernel26-git?

[fackamato@fackamato-pc ~]$ pacman -Qs kernel26zen
local/kernel26zen-git 20090404-1
    Stable and featureful Linux Kernel and modules based on linux-2.6 GIT tree
local/nvidia-beta-zen 180.44-1
    NVIDIA beta drivers for kernel26zen
[fackamato@fackamato-pc ~]$

Perhaps that would work?

Offline

#3 2009-04-04 19:47:02

Roberth
Member
From: The Pale Blue Dot
Registered: 2007-01-12
Posts: 894

Re: kernel26-git?

Isn't that just a PKGBUILD which pulls the kernel from zen-sources' git repo, where they host their version of the stable linux kernel?

And its riddled with patches, I just want the vanilla kernel.

Last edited by Roberth (2009-04-04 19:56:34)


Use the Source, Luke!

Offline

#4 2009-04-04 20:06:03

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

Re: kernel26-git?

Roberth wrote:

Isn't that just a PKGBUILD which pulls the kernel from zen-sources' git repo, where they host their version of the stable linux kernel?

And its riddled with patches, I just want the vanilla kernel.

http://www.zen-sources.org/content/what-zen-sources wrote:

What is zen-sources?
Submitted by CC on Sat, 03/14/2009 - 00:24.

* Although not technically a "patchset", zen-sources is a linux kernel variant based on stable linux kernel releases, but primarily maintained through a git repository which tracks linus-2.6.git (linus's latest git repository).
* You may recall some popular kernel patchsets such as "love-sources", "no-sources", "kamikaze-sources", "skunk-sources", "viper-sources", "emission-sources", "nitro-sources", "nicus-sources", "dark-sources", "beyond-sources", or perhaps some more. All of the previous mentioned patchsets were either during or slightly before the infamous "patchset wars", basically a time period where there were numerous kernel patchsets who people would have very different opinions on.
* Founded by waninkoko (of kamikaze-sources) and rmh3093 (of skunk-sources)
* Zen-Sources is not a patchset, but rather is managed through a live git repository, unlike any of the other patchsets were during their days. Zen is managed through one central branch "master", but all actual code is put in their separate branches, so origin/branch1, origin/branch2, etc. This allows for both the use of patches (like patchsets used), and the merging of git repositories directly. Later, the branches are merged into the "master" branch. This also benefits the user, who does no longer need to use ebuilds but can now update simply by a "git pull", and then recompiling as desired.

I actually don't know if it's the latest git or the latest stable. They say it tracks Linus' latest git repository, but is based on the latest stable version. Not sure here... someone?

Offline

#5 2009-04-05 12:23:13

Roberth
Member
From: The Pale Blue Dot
Registered: 2007-01-12
Posts: 894

Re: kernel26-git?

No one?


Use the Source, Luke!

Offline

#6 2009-04-05 15:34:20

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

Re: kernel26-git?

Roberth wrote:

No one?

Hm, doesn't look like it! Perhaps I'll try something...

Offline

#7 2009-04-05 21:43:55

Roberth
Member
From: The Pale Blue Dot
Registered: 2007-01-12
Posts: 894

Re: kernel26-git?

An alternative could be a PKGBUILD of kernel 2.6.30rc1 as soon as its out.


Use the Source, Luke!

Offline

#8 2009-04-05 21:57:52

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

Re: kernel26-git?

Well, there's http://git.kernel.org/?p=linux/kernel/g … ;a=summary which is stable, and http://git.kernel.org/?p=linux/kernel/g … ;a=summary which is the latest snapshot (I think). Which one do you want?

Offline

#9 2009-04-05 23:05:54

Roberth
Member
From: The Pale Blue Dot
Registered: 2007-01-12
Posts: 894

Re: kernel26-git?


Use the Source, Luke!

Offline

#10 2009-04-05 23:54:40

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

Re: kernel26-git?

Offline

#11 2009-04-06 02:14:05

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

Re: kernel26-git?

http://aur.archlinux.org/packages.php?ID=25304

There it is now... please report any problems!

Edit: Updated the package (fixed typo). It builds and installs fine on x86_64. Please *do* change the kernel config when you compile! The configs are based off kernel26 from ABS.

Last edited by Fackamato (2009-04-06 08:24:17)

Offline

#12 2009-04-06 18:28:46

Roberth
Member
From: The Pale Blue Dot
Registered: 2007-01-12
Posts: 894

Re: kernel26-git?

Erm, the name of the folder that appears in pkg/lib/modules is "2.6.29-git-04516-g0221c81, which isnt $_kernver, could you fix this?

Last edited by Roberth (2009-04-06 19:07:20)


Use the Source, Luke!

Offline

#13 2009-04-06 19:45:29

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

Re: kernel26-git?

Roberth wrote:

Erm, the name of the folder that appears in pkg/lib/modules is "2.6.29-git-04516-g0221c81, which isnt $_kernver, could you fix this?

I'll try wink, compiling now to see the error...

Offline

#14 2009-04-06 20:48:47

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

Re: kernel26-git?

Roberth wrote:

Erm, the name of the folder that appears in pkg/lib/modules is "2.6.29-git-04516-g0221c81, which isnt $_kernver, could you fix this?

What if you try to recompile with CONFIG_LOCALVERSION_AUTO=n ? My compilation isn't done yet...

Offline

#15 2009-04-06 21:32:34

Roberth
Member
From: The Pale Blue Dot
Registered: 2007-01-12
Posts: 894

Re: kernel26-git?

Fackamato wrote:
Roberth wrote:

Erm, the name of the folder that appears in pkg/lib/modules is "2.6.29-git-04516-g0221c81, which isnt $_kernver, could you fix this?

What if you try to recompile with CONFIG_LOCALVERSION_AUTO=n ? My compilation isn't done yet...

Where do I find that option?


Use the Source, Luke!

Offline

#16 2009-04-06 21:36:14

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

Re: kernel26-git?

Roberth wrote:
Fackamato wrote:
Roberth wrote:

Erm, the name of the folder that appears in pkg/lib/modules is "2.6.29-git-04516-g0221c81, which isnt $_kernver, could you fix this?

What if you try to recompile with CONFIG_LOCALVERSION_AUTO=n ? My compilation isn't done yet...

Where do I find that option?

Hold on, that won't help. I'm revising the PKGBUILD now...

Edit: updated in AUR...

Last edited by Fackamato (2009-04-06 22:58:48)

Offline

#17 2009-04-07 19:46:42

Roberth
Member
From: The Pale Blue Dot
Registered: 2007-01-12
Posts: 894

Re: kernel26-git?

drivers/staging/go7007/go7007-driver.c: In function 'go7007_register_encoder':
drivers/staging/go7007/go7007-driver.c:284: error: 'TUNER_SET_TYPE' undeclared (first use in this function)
drivers/staging/go7007/go7007-driver.c:284: error: (Each undeclared identifier is reported only once
drivers/staging/go7007/go7007-driver.c:284: error: for each function it appears in.)
make[3]: *** [drivers/staging/go7007/go7007-driver.o] Error 1
make[2]: *** [drivers/staging/go7007] Error 2
make[1]: *** [drivers/staging] Error 2
make: *** [drivers] Error 2
==> ERROR: Failed... Your source tree might be broken. Run 'make mrproper' in src/kernel26-git to clean it up
==> ERROR: Build Failed.
    Aborting...

What might cause this?


Use the Source, Luke!

Offline

#18 2009-04-07 19:54:36

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

Re: kernel26-git?

Roberth wrote:
drivers/staging/go7007/go7007-driver.c: In function 'go7007_register_encoder':
drivers/staging/go7007/go7007-driver.c:284: error: 'TUNER_SET_TYPE' undeclared (first use in this function)
drivers/staging/go7007/go7007-driver.c:284: error: (Each undeclared identifier is reported only once
drivers/staging/go7007/go7007-driver.c:284: error: for each function it appears in.)
make[3]: *** [drivers/staging/go7007/go7007-driver.o] Error 1
make[2]: *** [drivers/staging/go7007] Error 2
make[1]: *** [drivers/staging] Error 2
make: *** [drivers] Error 2
==> ERROR: Failed... Your source tree might be broken. Run 'make mrproper' in src/kernel26-git to clean it up
==> ERROR: Build Failed.
    Aborting...

What might cause this?

Anything, really.. did you try with a clean source directory?

Also, since it's -git, things break every now and then. Do you really need that driver? Try compiling without it.

Offline

#19 2009-04-08 22:18:05

Roberth
Member
From: The Pale Blue Dot
Registered: 2007-01-12
Posts: 894

Re: kernel26-git?

Hm, this kernel won't even boot for me, the bootup process stalls after loading the cd/dvd-room.


Use the Source, Luke!

Offline

#20 2009-04-08 22:21:33

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

Re: kernel26-git?

Roberth wrote:

Hm, this kernel won't even boot for me, the bootup process stalls after loading the cd/dvd-room.

Did you troubleshoot it? Booting into single user mode for example (add single at the end of your kernel line)

Offline

#21 2009-04-09 12:20:17

Roberth
Member
From: The Pale Blue Dot
Registered: 2007-01-12
Posts: 894

Re: kernel26-git?

Okay, I think I'll give up the git snapshots, so I'll try 2.6.30rc1, Ive tried to edit the PKGBUILD for arch's stock kernel, but 2.6.30rc1 is only provided as a patchset, how do I do it then?

pkgname=kernel26-devel       # Build kernel with a different name
_kernelname=${pkgname#kernel26}
_basekernel=2.6.30rc1
pkgver=${_basekernel}
pkgrel=1
_patchname="patch-${pkgver}-3-ARCH"
pkgdesc="The Linux Kernel and modules"
arch=(i686 x86_64)
license=('GPL2')
groups=('base')
url="http://www.kernel.org"
backup=(etc/mkinitcpio.d/${pkgname}.preset)
depends=('coreutils' '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
replaces=('kernel24' 'kernel24-scsi' 'kernel26-scsi'
          '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=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
        ftp://ftp.archlinux.org/other/kernel26/testing/${_patchname}.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=()

build() {
  KARCH=x86

  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

  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
  # get kernel version  
  make prepare
  _kernver="$(make kernelrelease)"
  # 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/${pkgname}.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/${pkgname}.img\"|g" \
    -e "s|fallback_image=.*|fallback_image=\"/boot/${pkgname}-fallback.img\"|g" \
    -i ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset

  echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${startdir}/pkg/etc/mkinitcpio.d/${pkgname}.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
}

Use the Source, Luke!

Offline

Board footer

Powered by FluxBB