You are not logged in.

#1 2005-07-31 14:49:43

zimbo
Member
From: Edinburgh, Scotland
Registered: 2005-07-31
Posts: 14

Patching 2.6.10 with fbsplash

Hi, this is my first post. I have just recently installed Arch on my PC having had Gentoo installed previously.

I am trying to set up gensplash and having a bit of difficulty at the very first hurdle, patching the kernel. I only want to patch it with the fbsplash patch from spock's website but am getting nowhere.

I notice that msg43 wrote, on Sat 09 July, that he patched his kernel using one of spock's patches. If you read this can you tell me what you had to do to accomplish this.

The kernel I have is 2.6.10-ARCH and I am trying to apply patch tbsplash-0.9.1-r1-2.6.10.patch using the command

patch -p6 -i

When this executes it stops at a Diff line and prompts with:

File to patch:

I presume that this is because the patch was written for Gentoo and their file directory. I have rem'd out some of the lines in the patch, the ones for the documents, but the next one refers to keyboard.c. What is the equivalent file in Arch?

As you can probably tell my knowledge of Linux is not great, I am on a big learning curve. This is why I installed Gentoo but for various reasons I decided to move over to AL. I did manage to get Gensplash worked with Gentoo.

Thanks for any help you can give me.

Offline

#2 2005-07-31 15:22:02

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Patching 2.6.10 with fbsplash

Get familiar with dibble's ABS patched kernel compilation. fbsplash-2.6.12-r1 or 2.6.11 should patch cleanly against 2.6.12 kernel sources. Ask, if you run into any problems.

http://wiki.archlinux.org/index.php/Cus … n_with_ABS

Offline

#3 2005-07-31 16:25:14

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: Patching 2.6.10 with fbsplash

I split the thread as this is strictly a kernel problem smile

Lucke, i edited your post to fix the URL - which i had to move at the wiki end smile

Offline

#4 2005-07-31 18:37:15

zimbo
Member
From: Edinburgh, Scotland
Registered: 2005-07-31
Posts: 14

Re: Patching 2.6.10 with fbsplash

So Lucke you suggest that I compile the 2.6.12 kernel and add one of the two patches from spock using dibble's kernel26 pkgbuild.

I have already tried using that to patch my existing kernel with the fbsplash patch but without success. I will give it another go with the 2.6.12 kernel but get ready for a few questions!!

Offline

#5 2005-07-31 19:56:23

zimbo
Member
From: Edinburgh, Scotland
Registered: 2005-07-31
Posts: 14

Re: Patching 2.6.10 with fbsplash

Here are the changes, in blue, that I think I need to make to kernel26 PKGBUILD. Can someone indicate if they are correct, or not.


# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org>
pkgname=kernel26
pkgver=2.6.12.3
pkgrel=$LOCALVERSION
pkgdesc="The Linux Kernel 2.6.12.3 with fbsplash"
url="http://www.kernel.org"
depends=('module-init-tools')
install=kernel26.install

##### add any patch sources to this section
source=(config ftp://ftp.kernel.org/pub/linux/kernel/v … er.tar.bz2; http://dev.gentoo.org/~spock/projects/g … -rc1.patch)

# Function to grab var from src
getvar() {
  old=$(cat Makefile | grep "^$1")
  echo $(echo ${old/"$1 ="/} | sed -e "s/[ ]*(.*)[ ]*/1/g")
  return 0
}

build() {
  cd $startdir/src/linux-$pkgver

  ##### Uncomment and apply any patches here
  patch -Np1 -i ../fbsplash-0.9.2-2.6.12-rc1.patch || return 1

  # get rid of the 'i' in i686
  carch=`echo $CARCH | sed 's|i||'`
  cat ../config | sed "s|#CARCH#|$carch|g" >./.config

  ##### Load config - uncomment your preferred config method
  #yes "" | make config
  #make oldconfig || return 1
  make menuconfig
  #make xconfig
  #make gconfig


Have I got the patch source array correct I inserted a semi-colon between the two entries?


My further questions:

1. If I am placing this PKGBUILD in /var/abs/local/kernel do I also need to created a src and src/linux-2.6.12.3 directory?

2. I also need to place the default Arch config file and kernel26.install file in /var/abs/local/kernel, is that correct?

3. There are two other patches in /var/abs/kernels/kernel26; cdburning and ndevfs. I presume my default 2.6.10-ARCH kernel was patched with them. Do I therefore need to point to them and add them under the patches to be applied section? Or, move them to /var/abs/local/kernel and they will be patched automatically?

4. I presume I run makepkg -g >>PKGBUILD before makepkg?

Offline

#6 2005-07-31 22:04:28

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: Patching 2.6.10 with fbsplash

zimbo wrote:

Here are the changes, in blue, that I think I need to make to kernel26 PKGBUILD. Can someone indicate if they are correct, or not.


# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org>
pkgname=kernel26
pkgver=2.6.12.3
pkgrel=$LOCALVERSION

leave that as one smile - the LOCALVERSION part will be added automatically

zimbo wrote:

pkgdesc="The Linux Kernel 2.6.12.3 with fbsplash"
url="http://www.kernel.org"
depends=('module-init-tools')
install=kernel26.install

##### add any patch sources to this section
source=(config ftp://ftp.kernel.org/pub/linux/kernel/v … er.tar.bz2; http://dev.gentoo.org/~spock/projects/g … -rc1.patch)

# Function to grab var from src
getvar() {
  old=$(cat Makefile | grep "^$1")
  echo $(echo ${old/"$1 ="/} | sed -e "s/[ ]*(.*)[ ]*/1/g")
  return 0
}

build() {
  cd $startdir/src/linux-$pkgver

  ##### Uncomment and apply any patches here
  patch -Np1 -i ../fbsplash-0.9.2-2.6.12-rc1.patch || return 1

  # get rid of the 'i' in i686
  carch=`echo $CARCH | sed 's|i||'`
  cat ../config | sed "s|#CARCH#|$carch|g" >./.config

  ##### Load config - uncomment your preferred config method
  #yes "" | make config
  #make oldconfig || return 1
  make menuconfig
  #make xconfig
  #make gconfig


Have I got the patch source array correct I inserted a semi-colon between the two entries?

No - all entries in the source array need to be separated by spaces with no new lines but you can use a  to escape a new line

e.g.

source=(config ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2 
http://dev.gentoo.org/~spock/projects/gensplash/archive/fbsplash-0.9.2-2.6.12-rc1.patch)
zimbo wrote:

My further questions:

1. If I am placing this PKGBUILD in /var/abs/local/kernel do I also need to created a src and src/linux-2.6.12.3 directory?

No the PKGBUILD will do it all

zimbo wrote:

2. I also need to place the default Arch config file and kernel26.install file in /var/abs/local/kernel, is that correct?

yes

zimbo wrote:

3. There are two other patches in /var/abs/kernels/kernel26; cdburning and ndevfs. I presume my default 2.6.10-ARCH kernel was patched with them. Do I therefore need to point to them and add them under the patches to be applied section? Or, move them to /var/abs/local/kernel and they will be patched automatically?

move them to the /var/abs/local/kernel dir, include the patch names in the source array, then add the patch commands below the patch command you have included - you can copy the commands from the stock kernel PKGBUILD

zimbo wrote:

4. I presume I run makepkg -g >>PKGBUILD before makepkg?

yup - to store the md5sums

Offline

#7 2005-07-31 22:54:53

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

Re: Patching 2.6.10 with fbsplash

I haven't used this particular patch, but I have had difficulty in the past applying 2.6.x patches to 2.6.x.y kernel source. If it still doesn't work, try 2.6.12 instead of 2.6.12.3.

Offline

#8 2005-08-01 21:16:25

zimbo
Member
From: Edinburgh, Scotland
Registered: 2005-07-31
Posts: 14

Re: Patching 2.6.10 with fbsplash

I make the changes to the PKGBUILD file as mentioned by dibbletw.

When I ran makepkg -g >>PKGBUILD the patches were downloaded and the md5sum calculated and appended to the end of the file.

Next I ran makepkg and the ouptut of every line while extracting linux-2.6.12.3.tar.bz2 said:

Cannot open: No such file or directory

The last two lines were:

ERROR: Failed to extract linux-2.6.12.3.tar.bz2
Aborting...

Any ideas? Have I missed something simple out?

Offline

#9 2005-08-01 21:26:03

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: Patching 2.6.10 with fbsplash

Check you do not have all the ftp program output appended to teh end of your PKGBUILD!

Offline

#10 2005-08-03 19:38:04

zimbo
Member
From: Edinburgh, Scotland
Registered: 2005-07-31
Posts: 14

Re: Patching 2.6.10 with fbsplash

The problem I had was not running makepkg as root. Once I realised that mistake I got the following results:

==> Making package: kernel26  (Wed Aug  3 20:33:01 BST 2005)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
==>     Found config in build dir
==>     Using local copy of linux-2.6.12.3.tar.bz2
==>     Using local copy of fbsplash-0.9.2-2.6.12-rc1.patch
==>     Found ndevfs.patch in build dir
==> Validating source files with MD5sums
    config ... Passed
    linux-2.6.12.3.tar.bz2 ... Passed
    fbsplash-0.9.2-2.6.12-rc1.patch ... Passed
    ndevfs.patch ... Passed
==> Extracting Sources...
==>     tar --use-compress-program=bzip2 -xf linux-2.6.12.3.tar.bz2
==> Starting build()...
patching file Documentation/fb/00-INDEX
patching file Documentation/fb/splash.txt
patching file drivers/Makefile
patching file drivers/video/Kconfig
Hunk #1 succeeded at 1501 (offset 35 lines).
patching file drivers/video/Makefile
patching file drivers/video/cfbsplash.c
patching file drivers/video/console/bitblit.c
Hunk #3 succeeded at 391 (offset 1 line).
patching file drivers/video/console/fbcon.c
Hunk #2 succeeded at 213 with fuzz 1 (offset 4 lines).
Hunk #4 succeeded at 287 (offset 4 lines).
Hunk #5 succeeded at 411 (offset 2 lines).
Hunk #6 succeeded at 819 (offset 10 lines).
Hunk #7 succeeded at 915 with fuzz 2 (offset 6 lines).
Hunk #8 succeeded at 1067 (offset 17 lines).
Hunk #9 succeeded at 1080 (offset 6 lines).
Hunk #10 succeeded at 1115 (offset 17 lines).
Hunk #11 succeeded at 1590 (offset 6 lines).
Hunk #12 succeeded at 1687 (offset 17 lines).
Hunk #13 succeeded at 1820 (offset 6 lines).
Hunk #14 succeeded at 1892 (offset 17 lines).
Hunk #15 succeeded at 1928 with fuzz 1 (offset 5 lines).
Hunk #16 succeeded at 1976 (offset 17 lines).
Hunk #17 succeeded at 1996 with fuzz 2.
Hunk #18 succeeded at 2098 (offset 8 lines).
Hunk #20 FAILED at 2380.
Hunk #21 succeeded at 2414 (offset 11 lines).
1 out of 22 hunks FAILED -- saving rejects to file drivers/video/console/fbcon.c.rej
patching file drivers/video/fbcmap.c
Hunk #2 succeeded at 239 (offset 3 lines).
Hunk #3 succeeded at 295 (offset 25 lines).
patching file drivers/video/fbsplash.c
patching file drivers/video/fbsplash.h
patching file include/linux/console_splash.h
patching file include/linux/console_struct.h
patching file include/linux/fb.h
Hunk #3 succeeded at 747 (offset 1 line).
patching file include/linux/sysctl.h
patching file kernel/sysctl.c
==> ERROR: Build Failed.  Aborting...

I then thought I would try Lucke's suggestion of patching the 2.6.12 kernel but this gave me exactly the same output and error as above.

There is one failed Hunk, not sure if this will cause any problems (this is where my level of Linux is a handicap), and then the build just fails.

Any suggestions on how to get this build to complete successfully?

Offline

#11 2005-08-03 20:35:48

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Patching 2.6.10 with fbsplash

Does the fbsplash-0.9.2-2.6.11.patch fail as well?

Offline

#12 2005-08-03 20:42:38

zimbo
Member
From: Edinburgh, Scotland
Registered: 2005-07-31
Posts: 14

Re: Patching 2.6.10 with fbsplash

Ok, done some investigation of my own and came across the thread "Problem using more than one patchset for Kernels"  where dibbletw explains failed hunks.

The failed hunk I got was when patching driver/video/console/fbcon.c, at 2380, and the reject was saved to fbcon.c.rej

Here are the relevant parts of both these files

fbcon.c

    int i, j, k, depth;
    u8 val;

    if (fbcon_is_inactive(vc, info))
        return -EINVAL;

    if (!CON_IS_VISIBLE(vc))
        return 0;

    depth = fb_get_color_depth(&info->var);
    if (depth > 3) {
        for (i = j = 0; i < 16; i++) {


and from fbcon.c.rej

*** 2323,2331 ****
      int i, j, k, depth;
      u8 val;
 
-     if (fbcon_is_inactive(vc, info))
          return -EINVAL;
-
      depth = fb_get_color_depth(&info->var);
      if (depth > 3) {
          for (i = j = 0; i < 16; i++) {
--- 2380,2388 ----
      int i, j, k, depth;
      u8 val;
 
+     if (fbcon_is_inactive(vc, info) || vc->vc_num != fg_console)
          return -EINVAL;
+    
      depth = fb_get_color_depth(&info->var);
      if (depth > 3) {
          for (i = j = 0; i < 16; i++) {

I presume the top part of the rej file shows the fbcon.c code, but why are the lines

    if (!CON_IS_VISIBLE(vc))
        return 0;

not shown? And the second part of the rej file shows how the existing code differs, am I correct?

From the rej file I would say that the offending part is

|| vc->vc_num != fg_console)

Am I top of the class or the dunce in the corner?

So my next question is where do I go to make the necessary changes to get this hunk to succeed?

Offline

#13 2005-08-03 20:46:07

zimbo
Member
From: Edinburgh, Scotland
Registered: 2005-07-31
Posts: 14

Re: Patching 2.6.10 with fbsplash

Lucke,

I doesn't seem as though it has got far enough to even start patching fbsplash-0.9.2-2.6.11.patch

Offline

#14 2005-08-03 22:09:16

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: Patching 2.6.10 with fbsplash

Hmmm - fbsplash is not applying cleanly on it's own - so don't worry about the two patches issue yet.

http://dev.gentoo.org/~spock/projects/g … -rc3.patch

try that patch smile

Offline

#15 2005-08-04 21:12:40

zimbo
Member
From: Edinburgh, Scotland
Registered: 2005-07-31
Posts: 14

Re: Patching 2.6.10 with fbsplash

Dibbletw,

I complied the 2.6.12.3 kernel with the suggested patch, fbsplash-0.9.2-r2-2.6.12-rc3.patch, and it completed without any errors. How did you know that this patch would work?

At the config stage I followed the settings in the "gensplash for Arch Linux" document but there did not seem to be the VESA driver type option for selecting between vesafb and vesafb-tng. Should it have been there?

The strange thing is I don't know what items in the config the fbsplash patch adds but when I earlier ran make menuconfig for my default kernel I am sure the same config options were there and set as per the "gensplash for Arch Linux" document. Can this be right as I have never applied the fbsplash patch to this kernel?

After running makepkg the instructions say to " install your new pkg as normal" does this just mean copying the new kernel files to /boot and amending grub?

Offline

#16 2005-08-04 23:14:22

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: Patching 2.6.10 with fbsplash

No, no, you crazy person! To install the pkg just run:

pacman -U pkgname

pkgname in this case being kernel2612... something - i hope you changed LOCALVERSION in the config or it will overwrite your stock Arch kernel smile  however, that would save you changing grub smile

I _thought_ that patch would work! Your first patch was for rc1 and this patch was for rc3 - rc3 would be closer to the final release version and therefore more likely to wrk.

Don't worry about the vesa driver option.

And as far as the configs magically having the correct settings I think the patch creates defaults to use itself.

Offline

#17 2005-08-05 10:22:10

mpie
Member
From: 404 Not found
Registered: 2005-03-06
Posts: 649

Re: Patching 2.6.10 with fbsplash

pacman -A pkgname

Offline

#18 2005-08-05 11:09:15

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: Patching 2.6.10 with fbsplash

Either works wink

Offline

#19 2005-08-06 16:00:56

zimbo
Member
From: Edinburgh, Scotland
Registered: 2005-07-31
Posts: 14

Re: Patching 2.6.10 with fbsplash

Thanks for all the help. I am now running the 2.6.12.3 kernel.

Now I just need to follow the "gensplash for Arch Linux" Wiki and the "gensplash framebuffer boot splash screens for 2.6.x" thread to set up gensplash and get it working. Any questions I will post in that thread.

Offline

Board footer

Powered by FluxBB