You are not logged in.

#1 2005-12-31 03:59:02

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Makepkg fails when attempting patch addition 2.6.15-ck1

The PKGBUILD for this activity:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# $Id: PKGBUILD,v 1.77 2005/12/27 14:47:51 tpowa Exp $
# Maintainer: judd <jvinet@zeroflux.org>
pkgname=kernel26
basekernel=2.6.14
pkgver=2.6.14.5
pkgrel=1
pkgdesc="The Linux Kernel and modules (IDE support)"
url="http://www.kernel.org"
backup=('boot/kconfig26')
makedepends=('mkinitrd>=1.01-21')
depends=('module-init-tools' 'mkinitrd>=1.01-21')
# ieee80211 and hostap-driver26 modules are included in kernel26 now
replaces=('kernel26-scsi' 'ieee80211' 'hostap-driver26')
install=kernel26.install
source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$basekernel.tar.bz2
  http://www.kernel.org/pub/linux/kernel/ … pkgver.bz2
  config logo_linux_clut224.ppm
  #ftp://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/release/$basekernel/acpi-20050902-$basekernel.diff.bz2
http://iphitus.loudas.com/arch/ck/2.6.1 … rchck7.bz2
  )


build() {
  cd $startdir/src/linux-$basekernel
  patch -Np1 -i ../patch-$pkgver || return 1
  patch -Np1 -i ../patch-2.6.14-archck7 || return 1                                             #patch -Np1 -i ../acpi-20050902-$basekernel.diff || return 1

  # remove the extraversion from Makefile
  sed -i 's|^EXTRAVERSION = .*$|EXTRAVERSION =|g' Makefile 
  # Arch logo!
  cp ../logo_linux_clut224.ppm drivers/video/logo/
  # get rid of the 'i' in i686
  carch=`echo $CARCH | sed 's|i||'`
  cat ../config | sed "s|#CARCH#|$carch|g" >./.config
  # build the full kernel version to use in pathnames
  . ./.config
  _kernver="${basekernel}${CONFIG_LOCALVERSION}"
  # load configuration
  yes "" | make config
  # build!
  make bzImage modules || 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
  cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26
  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/boot/kconfig26
  mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/include
  mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/arch/i386/kernel
  for i in acpi asm-generic asm-i386 config linux math-emu media net pcmcia scsi sound video; do
    cp -a include/$i $startdir/pkg/usr/src/linux-${_kernver}/include/
  done
  # copy files necessary for later builds, like nvidia and vmware
  cp Module.symvers $startdir/pkg/usr/src/linux-${_kernver}
  cp -a scripts $startdir/pkg/usr/src/linux-${_kernver}
  mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/.tmp_versions
  cp arch/i386/Makefile $startdir/pkg/usr/src/linux-${_kernver}/arch/i386/
  cp arch/i386/kernel/asm-offsets.s
    $startdir/pkg/usr/src/linux-${_kernver}/arch/i386/kernel/
  # add headers for lirc package
  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/
  # add 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/
  # copy in 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
  cd $startdir/pkg/usr/src/linux-${_kernver}/include && ln -s asm-i386 asm
  chown -R root.root $startdir/pkg/usr/src/linux-${_kernver}
  cd $startdir/pkg/lib/modules/${_kernver} &&
    (rm -f source build; ln -sf ../../../usr/src/linux-${_kernver} build)

  # Now generate a fallback init ramdisk
  # NOTE: This backup ramdisk will not work for cryptsetup/raid users, since
  #       we don't have their unique configuration at build-time!
  touch $startdir/pkg/boot/initrd26-full.img
  /sbin/mkinitrd --skip-config --root-dir=$startdir/pkg full || return 1
}
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Aborts at ...include/linux ppp-comp.h 

Basic kernel26 pkgbuild modified to include additional patch-2.6.14arch7.

What error have I made?


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#2 2005-12-31 10:01:22

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

Re: Makepkg fails when attempting patch addition 2.6.15-ck1

archck, as I'm sure you know, is based on the ck patchset, which already includes the .y patches from the vanilla kernel. So you don't need to apply patch-2.6.14.5, just patch-2.6.14-archck7. With both of them in there, you're trying to patch certain pieces of code twice, which won't work.

Offline

#3 2005-12-31 10:32:19

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

Re: Makepkg fails when attempting patch addition 2.6.15-ck1

Also the whole initrd and archck thing might not work the greatest, iphitus is working on a release that will so I would wait for that and use that PKGBUILD

Offline

#4 2006-01-07 00:58:01

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Makepkg fails when attempting patch addition 2.6.15-ck1

Was able to modify the PKGBUILD and makepkg the archck7kernel.

I now desire to apply con kolivas patch2.6.15-ck1 to the 2.6.15Kernel26.

I have entered the patch-2.6.15-ck1 in the source of the 2.6.15Kernel26 pkgbuild and into the patch Np1 -i listing.

Thus I intend to add a single patch to the downloaded kernel.

The ...PKGBUILD requires ...pkgvers=(some entry)

If I enter..... 2.6.15-ck1...(the ID of the patch) an error message says I cannot use a dash(hyphen) in that entry.

Is there a way to enable the patching of the kernel with this download


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#5 2006-01-07 10:05:04

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

Re: Makepkg fails when attempting patch addition 2.6.15-ck1

I'm not completely clear on what you're doing, but I think this is it:

You have amended the PKGBUILD for the current Arch kernel package 2.6.15-2 to include the ck1 patch in the source array, and you have added an associated patch command. The only problem you have is that the pkgvers variable does not accept a hyphen.

If I'm right so far, why not just put

pkgvers=2.6.15ck1

Offline

#6 2006-01-07 17:06:19

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Makepkg fails when attempting patch addition 2.6.15-ck1

tomk;
Tried that, too.  I get a fail in making the package....cannot find /2.6.15ck1 in directory...

Re-name of patch to accomodate the hyphen problem gives a ...failure to load module 2.6.15-ck1 (the original name of the patch) after running makepkg for 40 mins.

I surmise that the ID of the patch in arch is paramount, the downloaded patch preamble refers to linux-2.6.15 in all patch items.

Examining iphitus' archck7 shows each patch item has an archck preamble.

I therefore assume the patch has to be modified in order to utilize the PKGBUILD system in arch.

This assumption may be wrong...nothing new...been wrong many times before!!!

Thanks for the reply big_smile


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#7 2006-01-07 18:50:59

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

Re: Makepkg fails when attempting patch addition 2.6.15-ck1

I regularly build ck and archck kernels, and I never have to modify the patch. If you're trying to build an initrd kernel, that could be the difference - I use dibble's PKGBUILD from the wiki, and I don't need initrd.

Can you clarify which PKGBUILD you are using? The current kernel26 PKGBUILD declares pkgver, but doesn't actually use it for anything. This is because it is normally used to handle the .y patches, and 2.6.15 doesn't have .y yet.

Offline

#8 2006-01-07 21:34:37

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Makepkg fails when attempting patch addition 2.6.15-ck1

tomk;
Again, thanks for reply.

I have tried several PKGBUILDS, the latest DTW ..custom kernel.

I also ran using Judd's from the abs download of 2.6.15.

I entered ...config.... and changed the LOCAL VERSION entry.

I placed the untarred patch into the source listing as patch-2.6.15-ck1 which is its ID after untarring.

Some PKGBUILDS have additional entries(Judd's) which further confuse!

Googling says DTW PKGBUILD is no go for initrd kernel.

Wiki says many PKGBUILDS exist and all do the job 8)

Wiki isn't "quick"!  It takes a lot of time to ingest all the possibilities it addresses and sort out what one needs.

I have an additional distress...when the PKGBUILD fails(not considered possible in the Wiki!) I have to remove directory src and directory pkg from the makepkg directory.  When doing this (right click on src/pkg and select delete) the trash system burps up ...cannot rename ,,etc... and I have to repeat the command to get it into trash bin. Right click TRASH ..select empty trash bin... The story doesn't end there because I cannot re-run makepkg without receiving a corrupt linux-2.6.15.tar.bz2 error message.  The saga continues...I find I have to do the following....find / -name linux-2.6.14.tar.bz2...  It lists the /var/cache pacman listing of the tar but also lists the following .../root/.local/share/trash/src/linux2.6.15.tar.bz2.

After rm..the above, I can then re-run PKGBUILD with normal response  to the linux tar.

I have to do this upon every failure.  It may be just my system. 

There is no mention of failure in the wiki which is most likely(failure) in dealing with bleeding-edge i686 OS kernels and patches.  Some indication that removal of the directories is required should appear in the event the user mistypes and causes a failure to build! ( like a WARNING box).

I have made many attempts...most failed because of the DELETE until I discovered it..but I guess now it is initrd, since you reminded me of the possibility..  It may have caused the patch-2.6.15-ck1 to be rejected as a module during one of my builds after 40 minutes of activity!!!!

Have no idea what elements I can delete from PKGBUILD to enable a custom kernel to be built.

I had hopes of a 2.6.15 kernel patched-ck1 but I suspect I have to wait until the dust settles


roll


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#9 2006-01-07 22:21:56

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

Re: Makepkg fails when attempting patch addition 2.6.15-ck1

TBH, lilsirecho, I've no idea why you're having so many problems, but maybe this will help.

The following is the PKGBUILD that I use for my server kernels, which run the server variant of the ck patch. It's a slightly modified version of dibble's one, and this particular one builds 2.6.15-cks1, but I just change the kernel version and ck version as required. I have automated the CONFIG_LOCALVERSION entry, as I always put <hostname.date> in there, but you can comment that and do it manually either. As I mentioned above, I don't use initrd, so make sure your kernel config allows for that.

# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org>
pkgname=kernel26
pkgver=2.6.15
_ck=cks1
pkgrel=1
pkgdesc="The Linux Kernel 2.6.15 and modules (IDE support) compiled with -cks1 patchset"
url="http://www.kernel.org"
depends=('module-init-tools')
install=kernel26.install

##### add any patch sources to this section
source=(config ftp://ftp.ie.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2 
        http://ck.kolivas.org/patches/cks/patch-$pkgver-$_ck.bz2)
md5sums=('946bcb862918e652194aded894153afa' 'cdf95e00f5111e31f78e1d97304d9522'
         '3af70243e199fb70d5c80a05dfe0e904')

# 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 ../patch-$pkgver-$_ck || return 1

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

  # Update LOCALVERSION based on hostname/date
  _locver=.`echo $HOSTNAME | cut -d "-" -f 2`.`date +%Y%m%d`
  . ./.config
  sed -i -e "s:$CONFIG_LOCALVERSION:$_locver:g" .config

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

  ##### NO USER CHANGES BELOW HERE #####

  # save the current pkgname
  old_pkgname=$pkgname

  # set pkgname for build purposes - DO NOT alter!
  pkgname=kernel26

  # save the updated config to build with today's date
  cp ./.config $startdir/config-$(date +%b%d-%Hh)

  # get EXTRAVERSION from Makefile to create a unique pkgname and /usr/src directory
  _kernextra=$(getvar "EXTRAVERSION")
  # grab the 2.6.x.y version suffix from pkgver
  _y="`echo $pkgver | cut --delim "." --fields 4`"
  # remove .y version suffix from _kernextra
  _kernextra="`echo $_kernextra | sed "s|.$_y||g"`"

  # Read the full kernel version info from new config to use in pathnames and pkgname
  . ./.config

  # Kernel custom - to create a unique pkgname (see below)
  _kerncust="${_kernextra}${CONFIG_LOCALVERSION}"
  # Kernel release - will be the same as Makefile
  _kernrel="${pkgver}${_kerncust}"
  # Get the pkgver suffix for unique pkgname and /boot file suffices
  _pkgversuf="`echo $pkgver | sed "s|2.6.||g" | sed "s|.||g"`"
  # Set /boot file suffices from kernel release and pkgver suffix
  _kernboot="${_pkgversuf}${_kerncust}"

  # Set a new pkgname from  kernel release and pkgver suffix
  pkgname="${pkgname}${_pkgversuf}${_kerncust}"

  # build!
  make clean bzImage modules || 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${_kernboot}
  cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26${_kernboot}
  install -D -m644 Makefile 
    $startdir/pkg/usr/src/linux-${_kernrel}/Makefile
  install -D -m644 .config 
    $startdir/pkg/usr/src/linux-${_kernrel}/.config
  install -D -m644 .config $startdir/pkg/boot/kconfig26${_kernboot}
  mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/include
  mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel
  for i in acpi asm-generic asm-i386 config linux math-emu media net pcmcia scsi sound video; do
    cp -a include/$i $startdir/pkg/usr/src/linux-${_kernrel}/include/
  done
  # copy files necessary for later builds, like nvidia and vmware
  cp Module.symvers $startdir/pkg/usr/src/linux-${_kernrel}
  cp -a scripts $startdir/pkg/usr/src/linux-${_kernrel}
  mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/.tmp_versions
  cp arch/i386/Makefile $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/
  cp arch/i386/kernel/asm-offsets.s 
    $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel/
  # copy in Kconfig files
  for i in `find . -name "Kconfig*"`; do
    mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/`echo $i | sed 's|/Kconfig.*||'`
    cp $i $startdir/pkg/usr/src/linux-${_kernrel}/$i
  done
  cd $startdir/pkg/usr/src/linux-${_kernrel}/include && ln -s asm-i386 asm
  chown -R root.root $startdir/pkg/usr/src/linux-${_kernrel}
  cd $startdir/pkg/lib/modules/${_kernrel} && 
    (rm -f source build; ln -sf /usr/src/linux-${_kernrel} build)

  # Read the full kernel version info from new config to use in pathnames and pkgname
  . ./.config

  # Kernel custom - to create a unique pkgname (see below)
  _kerncust="${_kernextra}${CONFIG_LOCALVERSION}"
  # Kernel release - will be the same as Makefile
  _kernrel="${pkgver}${_kerncust}"
  # Get the pkgver suffix for unique pkgname and /boot file suffices
  _pkgversuf="`echo $pkgver | sed "s|2.6.||g" | sed "s|.||g"`"
  # Set /boot file suffices from kernel release and pkgver suffix
  _kernboot="${_pkgversuf}${_kerncust}"

  # Set a new pkgname from  kernel release and pkgver suffix
  pkgname="${pkgname}${_pkgversuf}${_kerncust}"

  # build!
  make clean bzImage modules || 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${_kernboot}
  cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26${_kernboot}
  install -D -m644 Makefile 
    $startdir/pkg/usr/src/linux-${_kernrel}/Makefile
  install -D -m644 .config 
    $startdir/pkg/usr/src/linux-${_kernrel}/.config
  install -D -m644 .config $startdir/pkg/boot/kconfig26${_kernboot}
  mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/include
  mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel
  for i in acpi asm-generic asm-i386 config linux math-emu media net pcmcia scsi sound video; do
    cp -a include/$i $startdir/pkg/usr/src/linux-${_kernrel}/include/
  done
  # copy files necessary for later builds, like nvidia and vmware
  cp Module.symvers $startdir/pkg/usr/src/linux-${_kernrel}
  cp -a scripts $startdir/pkg/usr/src/linux-${_kernrel}
  mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/.tmp_versions
  cp arch/i386/Makefile $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/
  cp arch/i386/kernel/asm-offsets.s 
    $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel/
  # copy in Kconfig files
  for i in `find . -name "Kconfig*"`; do
    mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/`echo $i | sed 's|/Kconfig.*||'`
    cp $i $startdir/pkg/usr/src/linux-${_kernrel}/$i
  done
  cd $startdir/pkg/usr/src/linux-${_kernrel}/include && ln -s asm-i386 asm
  chown -R root.root $startdir/pkg/usr/src/linux-${_kernrel}
  cd $startdir/pkg/lib/modules/${_kernrel} && 
    (rm -f source build; ln -sf /usr/src/linux-${_kernrel} build)

  # Correct the pkgname in our PKGBUILD - this allows correct gensync operation
  # NOTE: pkgname variable must be declared with first 10 lines of PKGBUILD!
  cd $startdir
  sed -i "1,11 s|pkgname=$old_pkgname|pkgname=$pkgname|" ./PKGBUILD
}

Offline

#10 2006-01-07 23:10:31

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Makepkg fails when attempting patch addition 2.6.15-ck1

tomk; 

Will give this code a try and report back ....   later......or later....


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#11 2006-01-07 23:50:52

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Makepkg fails when attempting patch addition 2.6.15-ck1

Tomk;
Ran this PKGBUILD and downloaded the kernel tar OK in eight minutes.

Build failed to download the patch-2.6.15-ck1.bz2.

Have I made a bad reference to that patch?
===========================================================
Code:
  # Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org>
pkgname=kernel26
pkgver=2.6.15
_ck=ck1
pkgrel=1
pkgdesc="The Linux Kernel 2.6.15 and modules (IDE support) compiled with -cks1 patchset"
url="http://www.kernel.org"
depends=('module-init-tools')
install=kernel26.install

##### add any patch sources to this section
source=(config ftp://ftp.ie.kernel.org/pub/linux/kerne … er.tar.bz2 
         http://ck.kolivas.org/patches/ck1/patch … -$_ck.bz2)


# 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 ../patch-$pkgver-$_ck || return 1

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

   # Update LOCALVERSION based on hostname/date
   _locver=.`echo $HOSTNAME | cut -d "-" -f 2`.`date +%Y%m%d`
   . ./.config
   sed -i -e "s:$CONFIG_LOCALVERSION:$_locver:g" .config

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

   ##### NO USER CHANGES BELOW HERE #####

   # save the current pkgname
   old_pkgname=$pkgname

   # set pkgname for build purposes - DO NOT alter!
   pkgname=kernel26

   # save the updated config to build with today's date
   cp ./.config $startdir/config-$(date +%b%d-%Hh)

   # get EXTRAVERSION from Makefile to create a unique pkgname and /usr/src directory
   _kernextra=$(getvar "EXTRAVERSION")
   # grab the 2.6.x.y version suffix from pkgver
   _y="`echo $pkgver | cut --delim "." --fields 4`"
   # remove .y version suffix from _kernextra
   _kernextra="`echo $_kernextra | sed "s|.$_y||g"`"

   # Read the full kernel version info from new config to use in pathnames and pkgname
   . ./.config

   # Kernel custom - to create a unique pkgname (see below)
   _kerncust="${_kernextra}${CONFIG_LOCALVERSION}"
   # Kernel release - will be the same as Makefile
   _kernrel="${pkgver}${_kerncust}"
   # Get the pkgver suffix for unique pkgname and /boot file suffices
   _pkgversuf="`echo $pkgver | sed "s|2.6.||g" | sed "s|.||g"`
"
   # Set /boot file suffices from kernel release and pkgver suffix
   _kernboot="${_pkgversuf}${_kerncust}"

   # Set a new pkgname from  kernel release and pkgver suffix
   pkgname="${pkgname}${_pkgversuf}${_kerncust}"

   # build!
   make clean bzImage modules || 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${_kernboot}
   cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26${_kernboot}
   install -D -m644 Makefile 
     $startdir/pkg/usr/src/linux-${_kernrel}/Makefile
   install -D -m644 .config 
     $startdir/pkg/usr/src/linux-${_kernrel}/.config
   install -D -m644 .config $startdir/pkg/boot/kconfig26${_kernboot}
   mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/include
   mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel
   for i in acpi asm-generic asm-i386 config linux math-emu media net pcmcia scsi sound video; do
     cp -a include/$i $startdir/pkg/usr/src/linux-${_kernrel}/include/
   done
   # copy files necessary for later builds, like nvidia and vmware
   cp Module.symvers $startdir/pkg/usr/src/linux-${_kernrel}
   cp -a scripts $startdir/pkg/usr/src/linux-${_kernrel}
   mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/.tmp_versions
   cp arch/i386/Makefile $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/
   cp arch/i386/kernel/asm-offsets.s 
     $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel/
   # copy in Kconfig files
   for i in `find . -name "Kconfig*"`; do
     mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/`echo $i | sed 's|/Kconfig.*||'`
     cp $i $startdir/pkg/usr/src/linux-${_kernrel}/$i
   done
   cd $startdir/pkg/usr/src/linux-${_kernrel}/include && ln -s asm-i386 asm
   chown -R root.root $startdir/pkg/usr/src/linux-${_kernrel}
   cd $startdir/pkg/lib/modules/${_kernrel} && 
     (rm -f source build; ln -sf /usr/src/linux-${_kernrel} build)

   # Read the full kernel version info from new config to use in pathnames and pkgname
   . ./.config

   # Kernel custom - to create a unique pkgname (see below)
   _kerncust="${_kernextra}${CONFIG_LOCALVERSION}"
   # Kernel release - will be the same as Makefile
   _kernrel="${pkgver}${_kerncust}"
   # Get the pkgver suffix for unique pkgname and /boot file suffices
   _pkgversuf="`echo $pkgver | sed "s|2.6.||g" | sed "s|.||g"`"
   # Set /boot file suffices from kernel release and pkgver suffix
   _kernboot="${_pkgversuf}${_kerncust}"

   # Set a new pkgname from  kernel release and pkgver suffix
   pkgname="${pkgname}${_pkgversuf}${_kerncust}"

   # build!
   make clean bzImage modules || 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${_kernboot}
   cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26${_kernboot}
   install -D -m644 Makefile 
     $startdir/pkg/usr/src/linux-${_kernrel}/Makefile
   install -D -m644 .config 
     $startdir/pkg/usr/src/linux-${_kernrel}/.config
   install -D -m644 .config $startdir/pkg/boot/kconfig26${_kernboot}
   mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/include
   mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel
   for i in acpi asm-generic asm-i386 config linux math-emu media net pcmcia scsi sound video; do
     cp -a include/$i $startdir/pkg/usr/src/linux-${_kernrel}/include/
   done
   # copy files necessary for later builds, like nvidia and vmware
   cp Module.symvers $startdir/pkg/usr/src/linux-${_kernrel}
   cp -a scripts $startdir/pkg/usr/src/linux-${_kernrel}
   mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/.tmp_versions
   cp arch/i386/Makefile $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/
   cp arch/i386/kernel/asm-offsets.s 
     $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel/
   # copy in Kconfig files
   for i in `find . -name "Kconfig*"`; do
     mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/`echo $i | sed 's|/Kconfig.*||'`
     cp $i $startdir/pkg/usr/src/linux-${_kernrel}/$i
   done
   cd $startdir/pkg/usr/src/linux-${_kernrel}/include && ln -s asm-i386 asm
   chown -R root.root $startdir/pkg/usr/src/linux-${_kernrel}
   cd $startdir/pkg/lib/modules/${_kernrel} && 
     (rm -f source build; ln -sf /usr/src/linux-${_kernrel} build)

   # Correct the pkgname in our PKGBUILD - this allows correct gensync operation
   # NOTE: pkgname variable must be declared with first 10 lines of PKGBUILD!
   cd $startdir
   sed -i "1,11 s|pkgname=$old_pkgname|pkgname=$pkgname|" ./PKGBUILD
}
=========================================================
I didn't change the description I notice!


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#12 2006-01-08 01:09:01

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Makepkg fails when attempting patch addition 2.6.15-ck1

Ran the makepkg again after changing the PKGBUILD to put the untarred patch in the source= listing instead of the download...installed patch in PKGBUILD directory and did makepkg.

Result:  after 40 minutes of activity...if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map -b /var/abs/local4/kernel26/pkg -r 2.6.15.n6re.20060107; fi
./PKGBUILD: line 86: /var/abs/local4/kernel26/pkg/usr/src/linux-2.6.15.n6re.20060107/Makefile: No such file or directory
./PKGBUILD: line 88: /var/abs/local4/kernel26/pkg/usr/src/linux-2.6.15.n6re.20060107/.config: No such file or directory
./PKGBUILD: line 101: /var/abs/local4/kernel26/pkg/usr/src/linux-2.6.15.n6re.20060107/arch/i386/kernel/: is a directory
./PKGBUILD: line 109:  : command not found
./PKGBUILD: line 113: ./.config: No such file or directory
make: *** No rule to make target `clean'.  Stop.
==> ERROR: Build Failed.  Aborting...
[root@n6re kernel26]#                           
===============================================================

I am trying to make fixes for these errors..............................................
============================================================


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#13 2006-01-08 02:43:29

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Makepkg fails when attempting patch addition 2.6.15-ck1

The following error occurs often when attempting PKGBUILD-makepkg...
=============================================================
--18:26:27--  ftp://ftp.ie.kernel.org/pub/linux/kerne … 15.tar.bz2
           => `linux-2.6.15.tar.bz2'
Resolving ftp.ie.kernel.org... 193.120.14.242
Connecting to ftp.ie.kernel.org|193.120.14.242|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /pub/linux/kernel/v2.6 ... done.
==> PASV ... done.    ==> RETR linux-2.6.15.tar.bz2 ... done.
Length: 39,832,836 (38M) (unauthoritative)

100%[====================================>] 39,832,836    88.44K/s    ETA 00:00

18:33:58 (86.69 KB/s) - `linux-2.6.15.tar.bz2' saved [39832836]

==>     Found patch-2.6.15-ck1 in build dir
==> WARNING: MD5sums are missing or incomplete.  Cannot verify source integrity.
==> Extracting Sources...
==>     tar --use-compress-program=bzip2 -xf linux-2.6.15.tar.bz2
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers

bzip2: Data integrity error when decompressing.
        Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

tar: Child returned status 2
tar: Error exit delayed from previous errors
==> ERROR: Failed to extract linux-2.6.15.tar.bz2
==> Aborting...
[root@n6re kernel26]#                                 

=============================================================

Prior to this makepkg run, I deleted /var/cache/pacman/pkg-2.6.15.tar.bz2 and all the /root/.local/share/trash....etc references to linux-2.6.15.pkg.tar.bz2.  Thus, I had to download a fresh tar pkg.

The result was the package was downloaded but the above error was encountered upon starting ...makepkg.

I have seen this error at least a dozen times.

I received several error messages with other trials of this PKGBUILD which occured after long periods of install activity.  None of the error messages were consistent with the same error.  The only exception is the error that occurs before the build gets started as shown in the error message above.

I still get the goofy action when trying to delete /src and /pkg.

I am in archck7 kernel.  I will move to 2.6.15 kernel and try again.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#14 2006-01-08 03:34:20

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Makepkg fails when attempting patch addition 2.6.15-ck1

Tomk;
Ran in 2.6.15 booted system and got the following error after about 40 mins of makepkg activity;
===========================================================
if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map -b /var/abs/local4/kernel26/pkg -r 2.6.15.n6re.20060107; fi
./PKGBUILD: line 86: /var/abs/local4/kernel26/pkg/usr/src/linux-2.6.15.n6re.20060107/Makefile: No such file or directory
./PKGBUILD: line 88: /var/abs/local4/kernel26/pkg/usr/src/linux-2.6.15.n6re.20060107/.config: No such file or directory
./PKGBUILD: line 101: /var/abs/local4/kernel26/pkg/usr/src/linux-2.6.15.n6re.20060107/arch/i386/kernel/: is a directory
./PKGBUILD: line 109:  : command not found
./PKGBUILD: line 113: ./.config: No such file or directory
make: *** No rule to make target `clean'.  Stop.
==> ERROR: Build Failed.  Aborting...
[root@n6re kernel26]#     
============================================================

I am not getting it done...............


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#15 2006-01-08 10:24:49

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

Re: Makepkg fails when attempting patch addition 2.6.15-ck1

Man, you're unlucky. AFAICS, makepkg is trying to execute lines 86, 88 etc as commands, when they are actually the destination parameter for install or cp commands on the previous line - the line feed is escaped () but for some reason it's not working properly.

Here's something else to try - I've amended my original PKGBUILD to do exactly what you want i.e. get the 2.6.15 source and the ck1 patch, run make oldconfig, and build. I've put it in a bzipped tarball here.
Create a new directory, download and extract the PKGBUILD (don't be tempted to edit it!), copy in your config, and run makepkg.

If that doesn't work, send me your config and I'll build your kernel for you here.

Offline

#16 2006-01-08 17:29:37

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Makepkg fails when attempting patch addition 2.6.15-ck1

Downloaded the PKGBUILD and starting up a directory now.
Cul big_smile

Thanks for help!


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#17 2006-01-08 18:50:13

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Makepkg fails when attempting patch addition 2.6.15-ck1

Success with PKGBUILD a la' TOMK!!!!

Generated Kernel2615-ck1 with the PKGBUILD.

I entered thePKGBUILD into /var/absl/local5 , transferred config into that location, transferred kernel26.install into that location and also linux_clut224.ppm.  I then ran makepkg on that directory

I will study the diff with respect to my original PKGBUILD in order to understand the process better.

I have modified kernels before via config changes but this run was my first patch of a kernel with a local PKGBUILD construction.  I havefile:///root/Desktop/bashcomp.gif kernel26archk7 installed but that was via iphitus PKGBUILD.

I intend to practice this procedure on another HDD in order that I more fully understand how to make it go.

I commend you for sticking with me and providing a solution big_smile


[img]

The arch system is certainly "bleeding edge" on my keyboard!!!![/img]


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#18 2006-01-08 19:10:48

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Makepkg fails when attempting patch addition 2.6.15-ck1

Installed kernel, edited lilo (with initrd), ran /sbin/lilo and rebooted.

Result: Busy box..can't access tty control turned off....

I assume this is caused by the initrd entry in lilo.

Perhaps I should try removing it?


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#19 2006-01-08 19:24:47

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

Re: Makepkg fails when attempting patch addition 2.6.15-ck1

Yeah - this is not an initrd kernel.

Offline

Board footer

Powered by FluxBB