You are not logged in.

#1 2008-03-22 14:15:25

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 552

kernel26 ZEN (ex kamikaze).

Have anyone tried to make a package for this patchset (kernel26zen)? I am trying to make something good but...

http://forums.gentoo.org/viewtopic-t-616535.html
http://zen.waninkoko.info/patches/2.6.24/


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#2 2008-03-22 15:07:11

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: kernel26 ZEN (ex kamikaze).

Offline

#3 2008-03-22 16:51:32

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 552

Re: kernel26 ZEN (ex kamikaze).

I really didn't see it. But it is git dependent... In my computer I don't have a fast internet connection (only a dial up). I want to download the kernel sources and the zen patches form a different computer of a friend of mine (running windows) and make the compilation to mine (like to the older packages of kamikaze). I will try to modify the PKGBUILD. Could I use the config files from this packet? Thanks you.


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#4 2008-03-23 22:56:19

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 552

Re: kernel26 ZEN (ex kamikaze).

I managed to compile the kernel with the following PKGBUILD file

# Contributor: Patrick Bartels <p4ddy.b@gmail.com>

pkgname="kernel26zen"
pkgver=20082303
_basekernel=2.6.24
pkgrel="1"
pkgdesc="Stable and featureful Linux Kernel and modules based on linux-2.6 GIT tree"
url="http://zen.waninkoko.info"
arch=("i686" "x86_64")
license=("GPL2")
depends=("coreutils" "module-init-tools" "mkinitcpio>=0.5.15")


install=kernel26zen.install
source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
        http://zen.waninkoko.info/patches/2.6.24/linux-2.6.24-zen4.bz2
        config.i686
        config.x86_64
        kernel26zen.preset
        mkinitcpio-kernel26zen.conf
        logo_linux_clut224.ppm
        logo_linux_mono.pbm
        logo_linux_vga16.ppm)

md5sums=('3F23AD4B69D0A552042D1ED0F4399857'
         '2441ABDD4C261A752C90907CF3C90F6F'
         'f4ce52f0015dd3f4b06862c6476d08f4'
         '4eea633e7dee9224d994da8b4e8e9c07'
         '917036ce390cf8303f9104491d5ccd70'
         '36858bd6a0bca63d2aa901b2e42d4a05'
         '5A62BCC7E96601052C7405459B483826'
         'ED6B42FEA2F5D27F7EB920746CCC1EBB'
         'A995EC849EA43D3C89D607BBDD1E7D09')


# Returns 1 if the current branch is a remote one
_is_remote() {
    if [ $# -eq 1 ]; then
        git-config --get branch.$1.remote > /dev/null 2>&1
        if [ $? -eq 0 ]; then
            return 0
        else
            return 1
        fi
    else
        return 1
    fi
}




# Build function called by makepkg

build() {

        cd $startdir/src/linux-$_basekernel
    
        msg "Patching kernel26zen-2.6.24"
        patch -Nsp1 < ../linux-2.6.24-zen4

        msg "Copying Arch icons"
        cp ../logo_linux_clut224.ppm drivers/video/logo/
        cp ../logo_linux_mono.pbm drivers/video/logo/
        cp ../logo_linux_vga16.ppm drivers/video/logo/

    _karch="x86"

    msg "Including package configuration..."
    . $startdir/CONFIG

    
    msg "Testing if current kernel version is supported by this PKGBUILD..."
    vercmp "2.6.24" "$(make kernelversion)" > /dev/null
    if [ $? -eq 1 ]; then
        error "Failed"
        return 1
    fi

    msg "Loading configuration..."
    if [ -e $startdir/config.local ]; then
        msg2 "Using custom kernel config (config.local)..."
        cat $startdir/config.local > .config
    elif [ -e $startdir/config.saved.$CARCH ]; then
        msg2 "Using saved kernel config (config.saved.$CARCH)..."
        cat $startdir/config.saved.$CARCH > .config
    elif [ "$CARCH" = "x86_64" ]; then
        cat ../config.x86_64 > .config
    elif [ "$CARCH" = "i686" ]; then
        cat ../config.i686 > .config
    else
        error "Unsupported architecture: $CARCH"
        return 1
    fi

    if [ "$_date_localversion" = "1" ] && _is_remote $_local; then
        _localversion="$(sed -rn 's/^CONFIG_LOCALVERSION="([^"]*)"$/\1/p' .config)"
        [ -n "$_localversion" ] && msg2 "CONFIG_LOCALVERSION is set to: $_localversion"

        _date="-`date +'%G%m%d'`"
        msg2 "Appending $_date to CONFIG_LOCALVERSION..."
        sed -i "s/^CONFIG_LOCALVERSION=.*$/CONFIG_LOCALVERSION=\"$_localversion$_date\"/" \
            .config
    fi

    msg2 "Updating configuration..."
    yes "" | make config > /dev/null

    case "$_menu_method" in
        menuconfig|xconfig|gconfig)
            msg2 "Running make $_menu_method..."
            make $_menu_method
        ;;
    esac

    msg2 "Determining whether UVesaFB is enabled..."
    if grep "^CONFIG_FB_UVESA=[ym]$" .config > /dev/null; then
        provides=("${provides[@]}" "kernel26zen-uvesafb")
    else
        warning "UVesaFB is disabled, framebuffer consoles and v86d won't work"
    fi

    if [ "$_save_config" = "1" ]; then
        msg "Saving configuration..."
        msg2 "Saving src/$_gitname/.config as config.saved.$CARCH"
        cp .config $startdir/config.saved.$CARCH

        if [ "$_date_localversion" = "1" ] && _is_remote $_local; then
            msg2 "Restoring CONFIG_LOCALVERSION..."
            sed -i "s/^CONFIG_LOCALVERSION=.*$/CONFIG_LOCALVERSION=\"$_localversion\"/" \
                $startdir/config.saved.$CARCH
        fi
    fi

    msg "Building kernel and modules..."
    if ! make V="$_verbose" bzImage modules; then
        error "Failed... Your source tree might be broken. Run 'make mrproper' in src/$_gitname to clean it up"
        return 1
    fi

    _kernver="$(make kernelrelease)"
    _basekernel="${_kernver/-*/}"

    if [ "$_kernel_pkgver" = "1" ]; then
        msg "Updating pkgver..."
        [ 1 ] && pkgver="${_kernver//-/.}"
    fi

    # <3 pacman 3.1.0
    msg "Updating provides array..."
    [ 1 ] && provides=("${provides[@]}" "kernel26zen=${_kernver//-/.}")

    msg "Installing kernel image..."
    install -D -m644 System.map                $startdir/pkg/boot/System.map26zen
    install -D -m644 arch/$_karch/boot/bzImage $startdir/pkg/boot/vmlinuz26zen
    install -D -m644 .config                   $startdir/pkg/boot/kconfig26zen

    msg "Installing kernel modules..."
    make INSTALL_MOD_PATH=$startdir/pkg modules_install

    # Install fake kernel source
    install -D -m644 Module.symvers  $startdir/pkg/usr/src/linux-$_kernver/Module.symvers
    install -D -m644 Makefile        $startdir/pkg/usr/src/linux-$_kernver/Makefile
    install -D -m644 kernel/Makefile $startdir/pkg/usr/src/linux-$_kernver/kernel/Makefile
    install -D -m644 .config         $startdir/pkg/usr/src/linux-$_kernver/.config
    install -D -m644 .config         $startdir/pkg/lib/modules/$_kernver/.config

    # Install scripts directory and fix permissions on it
    cp -a scripts $startdir/pkg/usr/src/linux-$_kernver
    chmod og-w -R $startdir/pkg/usr/src/linux-$_kernver

    # Install kernel headers
    msg "Installing kernel headers..."
    for i in acpi asm-{generic,x86} config linux math-emu media net pcmcia scsi sound video; do
        msg2 "$i"
        mkdir -p $startdir/pkg/usr/src/linux-$_kernver/include/$i
        cp -a include/$i $startdir/pkg/usr/src/linux-$_kernver/include
    done

    msg "Installing headers for lirc..."
    mkdir -p $startdir/pkg/usr/src/linux-$_kernver/drivers/media/video
    cp drivers/media/video/*.h $startdir/pkg/usr/src/linux-$_kernver/drivers/media/video/
    for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301; do
        mkdir -p $startdir/pkg/usr/src/linux-$_kernver/drivers/media/video/$i
        cp -a drivers/media/video/$i/*.h $startdir/pkg/usr/src/linux-$_kernver/drivers/media/video/$i
    done
    
    msg "Installing dm headers..."
    mkdir -p $startdir/pkg/usr/src/linux-$_kernver/drivers/md
    cp drivers/md/*.h $startdir/pkg/usr/src/linux-$_kernver/drivers/md

    msg "Installing inotify.h..."
    mkdir -p $startdir/pkg/usr/src/linux-$_kernver/include/linux
    cp include/linux/inotify.h $startdir/pkg/usr/src/linux-$_kernver/include/linux/

    msg "Installing CLUSTERIP file for iptables..."
    mkdir -p $startdir/pkg/usr/src/linux-$_kernver/net/ipv4/netfilter/
    cp net/ipv4/netfilter/ipt_CLUSTERIP.c $startdir/pkg/usr/src/linux-$_kernver/net/ipv4/netfilter/

    msg "Installing wireless headers..."
    mkdir -p $startdir/pkg/usr/src/linux-$_kernver/net/mac80211/
    cp net/mac80211/*.h $startdir/pkg/usr/src/linux-$_kernver/net/mac80211/
    
    msg "Installing Kconfig files..."
    for i in `find . -name "Kconfig*"`; do
        mkdir -p $startdir/pkg/usr/src/linux-$_kernver/`echo $i | sed 's|/Kconfig.*||'`
        cp $i $startdir/pkg/usr/src/linux-$_kernver/$i
    done
    
    msg "Installing arch files..."
    mkdir -p $startdir/pkg/usr/src/linux-$_kernver/arch/$_karch/kernel
    cp arch/$_karch/kernel/asm-offsets.s $startdir/pkg/usr/src/linux-$_kernver/arch/$_karch/kernel

    cp arch/$_karch/Makefile* $startdir/pkg/usr/src/linux-$_kernver/arch/$_karch
    cp -r arch/$_karch/configs $startdir/pkg/usr/src/linux-$_kernver/arch/$_karch

    if [ "$CARCH" = "x86_64" ]; then
        (cd $startdir/pkg/usr/src/linux-$_kernver/arch && ln -s $_karch x86_64)
    else
        (cd $startdir/pkg/usr/src/linux-$_kernver/arch && ln -s $_karch i386)
    fi

    msg "Fixing permissions..."
    chown -R root:root $startdir/pkg/usr/src/linux-$_kernver
    find $startdir/pkg/usr/src/linux-$_kernver -type d -exec chmod 755 {} \;

    msg "Removing uneeded architectures..."
    cd $startdir/pkg/usr/src/linux-$_kernver/arch
    for i in *; do
        [ "$i" != "$_karch" ] && rm -rf $i
    done

    msg "Creating important symlinks..."
    cd $startdir/pkg/usr/src/linux-$_kernver/include
    ln -s asm-$_karch asm

    cd $startdir/pkg/lib/modules/$_kernver
    rm -rf source build
    ln -sf ../../../usr/src/linux-$_kernver build

    cd $startdir/pkg/usr/src
    ln -s linux-$_kernver linux-$_basekernel-zen

    cd $startdir/pkg/lib/modules
    ln -s $_kernver $_basekernel-zen

    msg "Installing fallback mkinitcpio.conf and preset file..."
    install -D -m644 $startdir/src/mkinitcpio-kernel26zen.conf \
        $startdir/pkg/etc/mkinitcpio.d/kernel26zen-fallback.conf

    install -D -m644 $startdir/src/kernel26zen.preset \
        $startdir/pkg/etc/mkinitcpio.d/kernel26zen.preset

    msg "Setting correct kernel version in install script..."
    sed -i "s/_kernel_version=.*/_kernel_version=$_kernver/g" \
        $startdir/kernel26zen.install

    msg "Generating kernel26zen.kver..."
    echo -e "# DO NOT EDIT THIS FILE\nALL_kver='$_kernver'" \
        > $startdir/pkg/etc/mkinitcpio.d/kernel26zen.kver
}

I have a small problem... What is the "correct" way for graphical boot? I am using gensplash with kernel-2.6.21-viper with no problems. Putting the following line to grub's menu.lst

kernel /boot/vmlinuz26zen root=/dev/hda3 vga=792 video=vesafb:mtrr:3,ywrap splash=silent,kdgraphics,theme:darch console=tty1

It works but not from the beginning... It displays first the initial kernel loading showing the Gentoos Logo and after some seconds  it shows the image of the arch linux logo with the loading bar. Is there any special parameter?

Last edited by firewalker (2008-03-23 22:57:47)


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

Board footer

Powered by FluxBB