You are not logged in.

#1 2009-02-27 04:45:35

kompu
Member
Registered: 2009-02-26
Posts: 5

Compile one driver only

Is it possible to compile only one driver?
I have tried to compile own kernel with these instructions http://wiki.archlinux.org/index.php/Ker … rom_Source ( With makepkg and pacman)
but i get errors when try to install it.

pacman -Uf kernel26-my-2.6.28-1-i686.pkg.tar.gz
loading package data...
checking dependencies...
(1/1) upgrading kernel26-my                         [############################################] 100%
>>> Updating module dependencies. Please wait ...
error: scriptlet failed to execute correctly

I need only matrox drivers... neutral

Offline

#2 2009-02-27 07:04:20

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Compile one driver only

The scriptlet mentioned in the error message is the *.install file in your build directory. Check it to see why it won't execute. Paste it here if you would like someone else to have a look.

It is possible to compile one driver only, using normal kernel/module build processes. You could even make an Arch package if you wanted, but it would be a bit messy IMO - better to just install the module manually after the build completes.

Offline

#3 2009-02-27 10:03:47

kompu
Member
Registered: 2009-02-26
Posts: 5

Re: Compile one driver only

My kernel source is 2.6.28.7
And i'm using /usr/src/linux directory


Filename is "kernel26.install" like in the instructions

Here it is:

post_install () {
  echo ">>> Updating module dependencies. Please wait ..."
  KERNEL_VERSION=2.6.28
  /sbin/depmod -A -v $KERNEL_VERSION > /dev/null 2>&1
}

post_upgrade() {
  echo ">>> Updating module dependencies. Please wait ..."
  KERNEL_VERSION=2.6.28
  /sbin/depmod -A -v $KERNEL_VERSION > /dev/null 2>&1
}

op=$1
shift

$op $*

And here is PKGBUILD

pkgname=kernel26-my
basekernel=2.6.28
pkgver=2.6.28
pkgrel=1
pkgdesc="The Linux Kernel and modules"
arch=('i686')
url="http://www.kernel.org"
depends=('module-init-tools')
provides=(kernel26)
install=kernel26.install

build() {
  # build!
  cd ..
  _kernver="${basekernel}${CONFIG_LOCALVERSION}"
  make || return 1
  mkdir -p $startdir/pkg/{lib/modules,boot}
  make INSTALL_MOD_PATH=$startdir/pkg modules_install || return 1
  cp System.map $startdir/pkg/boot/System.map26-my
  cp arch/x86/boot/bzImage $startdir/pkg/boot/vmlinuz26-my
  install -D -m644 .config $startdir/pkg/boot/kconfig26-my
  # set correct depmod command for install
  sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" $startdir/kernel26.install
}

Offline

#4 2009-02-27 14:06:23

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Compile one driver only

Please use code tags where appropriate.

I have fixed it for you this time.

Offline

#5 2009-03-04 15:15:22

kompu
Member
Registered: 2009-02-26
Posts: 5

Re: Compile one driver only

I did install 2.6.27 kernel manually. No problems there.

Offline

Board footer

Powered by FluxBB