You are not logged in.

#1 2010-11-11 02:46:40

Hyugga
Member
From: Santiago, Chile
Registered: 2010-03-26
Posts: 335

Compiling and Installing Compiled Kernel

Hi everyone, today i followed the "Kernel Compilation From Source" (https://wiki.archlinux.org/index.php/Ke … rom_Source) ArchWiki to compile a kernel downloaded from kernel.org. And i use the second method to compile and install with makepkg.
When the compilation is done, it can't be installed because the name of the file.
I know i must specify a new name for the new linux image and the System.map to have two or more kernels installed. But "where" in the PKGBUILD i must change the name of the files???
I'm using the PKGBUILD from the wiki:

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

build() {
  LOCAL_VERSION="$(grep "CONFIG_LOCALVERSION=" $startdir/.config | sed 's/.*"\(.*\)"/\1/')"

  cd ..
  make || return 1
  mkdir -p $startdir/pkg/{lib/modules,boot}
  make INSTALL_MOD_PATH=$startdir/pkg modules_install || return 1

  # There's no separation of firmware depending on kernel version - 
  # comment this line if you intend on using the built kernel exclusively,
  # otherwise there'll be file conflicts with the existing kernel
  rm -rf $startdir/pkg/lib/firmware

  install -Dm644 "System.map" "$startdir/pkg/boot/System.map26$LOCAL_VERSION"
  install -Dm644 "arch/x86/boot/bzImage" "$startdir/pkg/boot/vmlinuz26$LOCAL_VERSION"

  # Change the version strings in kernel26.install
  sed -i \
    -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=\"$basekernel\"/" \
    -e "s/LOCAL_VERSION=.*/LOCAL_VERSION=\"$LOCAL_VERSION\"/" \
    $startdir/kernel26.install
}

And also the kernel26.install

KERNEL_VERSION="2.6.32.8"
LOCAL_VERSION="-MINE"

post_install () {
  echo ">>> Updating module dependencies..."
  /sbin/depmod -A -v ${KERNEL_VERSION}${LOCAL_VERSION}
  echo ">>> Creating initial ramdisk..."
  mkinitcpio -k "${KERNEL_VERSION}${LOCAL_VERSION}" -g "/boot/kernel26${LOCAL_VERSION}.img"
}

post_upgrade() {
  echo ">>> Updating module dependencies..."
  /sbin/depmod -A -v ${KERNEL_VERSION}${LOCAL_VERSION}
  echo ">>> Creating initial ramdisk..."
  mkinitcpio -k "${KERNEL_VERSION}${LOCAL_VERSION}" -g "/boot/kernel26${LOCAL_VERSION}.img"
}

Thanks in advance.

Last edited by Hyugga (2010-11-11 02:48:14)

Offline

#2 2010-11-11 02:51:10

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

Re: Compiling and Installing Compiled Kernel

You probably forgot to add your postfix in kernel configuration. Check out the many many kernel26 alternatives in the AUR for guidelines.


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

#3 2010-11-11 03:29:09

Hyugga
Member
From: Santiago, Chile
Registered: 2010-03-26
Posts: 335

Re: Compiling and Installing Compiled Kernel

Sorry, i don't know anything about postfix.
And i compiling the 2.6.29 kernel version to install the propietary ATI driver.
I don't know if there's something i could use from AUR. I found some 2.6.29 images but i'm not sure about them.

Thanks!

Offline

#4 2010-11-11 06:57:18

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

Re: Compiling and Installing Compiled Kernel

I asked you to go and look at their PKGBUILDs to see how they do things. Not look for something which 'just works' for you.

You probably do not need to do this, anyhow. Check out the thread around here about using flgrx on Arch.


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

#5 2010-11-11 07:22:09

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Compiling and Installing Compiled Kernel

Use the default kernel26 PKGBUILD, you can compile your own kernel with it, and 'personalising' it is easy enough. Just did it the other day, if you take your time and read the PKGBUILD carefully it's not hard. It does everything for you - custom name for the kernel image, custom name for the initrd, etc.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#6 2010-11-11 16:31:54

Hyugga
Member
From: Santiago, Chile
Registered: 2010-03-26
Posts: 335

Re: Compiling and Installing Compiled Kernel

ngoonee wrote:

I asked you to go and look at their PKGBUILDs to see how they do things. Not look for something which 'just works' for you.

You probably do not need to do this, anyhow. Check out the thread around here about using flgrx on Arch.

OK.

Offline

#7 2010-11-13 13:41:09

Hyugga
Member
From: Santiago, Chile
Registered: 2010-03-26
Posts: 335

Re: Compiling and Installing Compiled Kernel

When installing the kernel there is some problem when the "mkinitcpio" is running: sd_mod error.
I can install and boot the kernel afterwards but when i get to kdm, the keyboard and the touchpad/mouse doesn't work.
I double checked the .config file and i have enabled the keyboard and the mouse options.
What can i do?

Thanks...

Offline

#8 2010-12-10 13:58:10

Hyugga
Member
From: Santiago, Chile
Registered: 2010-03-26
Posts: 335

Re: Compiling and Installing Compiled Kernel

Nobody has this problem???
I have compile the kernel so many times again...
Which option do i have to include?

Offline

#9 2010-12-10 15:36:29

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: Compiling and Installing Compiled Kernel

Are you using the default Arch config or your own config? If using your own, then run diff to find differences between the configs and that will narrow down which config you need to change.


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

Board footer

Powered by FluxBB