You are not logged in.

#1 2011-02-08 14:40:03

Viper_Scull
Member
From: London, UK
Registered: 2011-01-15
Posts: 153

Need help with custom kernel without initrd

I'm trying to compile and install my custom 2.6.37 kernel without initrd. I've used localmodconfig and localyesconfig, and then the final manual touch via xconfig.

Filesystems are built in, as well as the processor (generic in this case). Build directory is /tmp mounted as tmpfs in RAM.

These are my PKGBUILD and kernel26.install:

PKGBUILD wrote:

pkgname=kernel26-custom
basekernel=2.6.37
pkgver=2.6.37
pkgrel=5
pkgdesc="My custom kernel"
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
}

kernel26.install wrote:

KERNEL_VERSION="2.6.37"
LOCAL_VERSION="-ck-custom"

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


I succesfully compiled and installed, but when i boot it tries to load RS780 microcode and it freezes.

I checked /lib/firmware/radeon booting with arch kernel and there they are the firmwares.

Do i need to add somehow the firmware when not using initrd?

Last edited by Viper_Scull (2011-02-08 14:42:45)


Athlon II X4 620 + Gigabyte 785GPM-UD2H + 4GB DDR3 + SSD OCZ Vertex2 60GB

Archlinux x86_64 + Openbox

Offline

#2 2011-02-15 04:43:43

andrewthomas
Member
Registered: 2010-05-08
Posts: 52

Re: Need help with custom kernel without initrd

Viper_Scull wrote:

I succesfully compiled and installed, but when i boot it tries to load RS780 microcode and it freezes.

I checked /lib/firmware/radeon booting with arch kernel and there they are the firmwares.

Do i need to add somehow the firmware when not using initrd?

You need to add configure your kernel to point to the /lib/firmware/radeon directory and load the specific file that you need

See:

http://en.gentoo-wiki.com/wiki/Radeon#K … E.3D2.6.33

Device Drivers  --->
    Graphics support  --->
        <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)  --->
            <*> ATI Radeon
                [] Enable modesetting on radeon by default
General setup  --->
    [*] Enable PCI quirk workarounds

It is usually easier to edit your .config by hand for the firmware blobs. The key is CONFIG_EXTRA_FIRMWARE.

Device Drivers --->
    Generic Driver Options --->
        [*]  Include in-kernel firmware blobs in kernel binary
        # RadeonHD 2000, 3000, and 4000 series cards:
        (radeon/R600_rlc.bin 
                 radeon/R700_rlc.bin) External firmware blobs
        # RadeonHD 5000, a.k.a Evergreen, and newer cards:
        (radeon/CEDAR_me.bin 
                 radeon/CEDAR_pfp.bin 
                 radeon/CEDAR_rlc.bin
                 radeon/CYPRESS_me.bin
                 radeon/CYPRESS_pfp.bin 
                 radeon/CYPRESS_rlc.bin 
                 radeon/JUNIPER_me.bin 
                 radeon/JUNIPER_pfp.bin 
                 radeon/JUNIPER_rlc.bin
         radeon/REDWOOD_me.bin 
                 radeon/REDWOOD_pfp.bin 
         radeon/REDWOOD_rlc.bin) External firmware blobs
        (/lib/firmware/) Firmware blobs root directory

If this helped you, please take the time to rate the value of this post:
http://rate.affero.net/andrewthomas/

Offline

Board footer

Powered by FluxBB