You are not logged in.

#1 2005-07-02 18:43:53

tbuitenh
Member
Registered: 2004-03-08
Posts: 55

compiled a kernel, no more swap, no more http, but can ping

I compiled my own kernel with the PKGBUILD from the wiki. Here it is with my customizations:

# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org>
pkgname=kernel261110-TACO
pkgver=2.6.11.10
pkgrel=3
pkgdesc="The Linux Kernel 2.6.x.y and modules (IDE support)"
url="http://www.kernel.org"
depends=('module-init-tools')
install=kernel26.install

##### add any patch sources to this section
source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2 
  config logo_linux_clut224.ppm 
  #http://www.acm.rpi.edu/~dilinger/patches/2.6.10/as2/patch-2.6.10-as2.gz 
  http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/release/2.6.11/acpi-20050408-2.6.11.diff.bz2 
  http://ck.kolivas.org/patches/2.6/2.6.11/2.6.11-ck1/patches/nvidia_6111-6629_compat2.diff 
  http://gaugusch.at/acpi-dsdt-initrd-patches/acpi-dsdt-initrd-patch-v0.7d-2.6.9.patch)
md5sums=('6a66a372a1f8395f241f248f5fe8222a' '5c64b6b7e156d2b5ed8a2c4efcf8c129'
         '5a62bcc7e96601052c7405459b483826' 'f232ed4e2d825d2d7f47de0fc7c93ce8'
         '82488604906bbba37a412c78d7b5c5f0' '977bc6069e122e5f07b0311e094b5733')

# 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 ../patchname || return 1
  patch -Np1 -i ../acpi-20050408-2.6.11.diff || return 1
  patch -Np1 -i ../nvidia_6111-6629_compat2.diff || return 1
  patch -Np1 -i ../acpi-dsdt-initrd-patch-v0.7d-2.6.9.patch || return 1
  # various fixes by Andres Salomon
  #patch -Np1 -i ../patch-$pkgver-as2 || return 1
  # remove the -as2 tag
  #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

  ##### 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!
  echo
  echo -n "Do you want to make clean (default YES)? (YES/NO): "
  read choice
  echo
  echo -n "Press any key to start make or CTRL+C to quit"
  read anykey

  if [ "${choice}" = "NO" ] ; then
        make bzImage modules || return 1
  else
        make clean bzImage modules || return 1
  fi

  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 net pcmcia scsi 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 -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
}

All other files were taken from kernel26 from abs.

That should give me a kernel exaclty like the arch kernel, right? The only things I changed to the kernel configuration are:

localversion changed from -ARCH to -TACO (my first name)
processor family changed to pentium M
symmetric multiprocessing switched off
high memory support switched off

on previous tries I changed a lot more things, now I was being careful :-)

When booting, it fails on mounting swap. Also, I can ping any machine in the world, but I can't surf the web. When using the arch kernel26, everything works like charm.

What could be the problem?


I wish life was as simple as editing config files

Offline

#2 2005-07-02 20:13:41

tbuitenh
Member
Registered: 2004-03-08
Posts: 55

Re: compiled a kernel, no more swap, no more http, but can ping

Well... I recompiled again, but this time ONLY changed localversion. No problems! Posting from that kernel!
I suspect I misunderstand what high memory support does...
By the way, I installed distcc, so it should take much less time to find out now :-)


I wish life was as simple as editing config files

Offline

#3 2005-07-02 21:02:40

tbuitenh
Member
Registered: 2004-03-08
Posts: 55

Re: compiled a kernel, no more swap, no more http, but can ping

OK, so it was not the high memory. But that means it's either the processor family or the symmetric multiprocessing. That doesn't make any sense!

And I feel extremely unimpressed by ccache.

after two kernel compiles with nearly identical configuration:
cache hit                            139
cache miss                          7480
shouldn't the first be about half the second?

I'm calling it a day, we'll see tomorrow which of the remaining possibilities was killing my kernel.


I wish life was as simple as editing config files

Offline

#4 2005-07-03 10:25:21

tbuitenh
Member
Registered: 2004-03-08
Posts: 55

Re: compiled a kernel, no more swap, no more http, but can ping

a-ha! It was the symmetric multi-processing! Now how does that make sense...??? Maybe one of the arch patches has something to do with that? Next try: no patches, same config (after make oldconfig of course).

Wash, rinse, repeat.


I wish life was as simple as editing config files

Offline

#5 2005-07-03 10:59:15

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

Re: compiled a kernel, no more swap, no more http, but can ping

nice use of my PKGBUILD, good to see someone making the most of it smile

Offline

#6 2005-07-03 13:38:40

arael
Member
From: Poland, Katowice
Registered: 2004-02-25
Posts: 75

Re: compiled a kernel, no more swap, no more http, but can ping

I'm using love patchset compiled by Dibble's PKGBUILDs. And few days ago my kernel just stoped to work properly. Every connection attempt gives "can't assign requested address" or something like that.

Following upgrades occured near the day my custom kernel stoped working:
[07/01/05 12:40] upgraded azureus (2.3.0.2-1 -> 2.3.0.4-1)
[07/01/05 12:41] upgraded bin86 (0.16.16-1 -> 0.16.17-1)
[07/01/05 12:41] upgraded file (4.13-1 -> 4.14-1)
[07/01/05 12:42] upgraded man-pages (2.04-1 -> 2.05-1)
[07/01/05 12:43] upgraded procps (3.2.5-1 -> 3.2.5-2)

bin86 and procps are suspected.

Any ideas?


jabber id: arael (at) fov (dot) pl

Offline

#7 2005-07-03 14:05:16

T-Dawg
Forum Fellow
From: Wilmington, NC
Registered: 2005-01-29
Posts: 2,734

Re: compiled a kernel, no more swap, no more http, but can ping

try downgrading procps. Some people have been having connectivity problems with it. Judd is working on a fix for it.

Offline

#8 2005-07-04 09:54:37

tbuitenh
Member
Registered: 2004-03-08
Posts: 55

Re: compiled a kernel, no more swap, no more http, but can ping

Disregard my previous statements about ccache. If it happens a lot that you compile a kernel, find a problem, make some small changes to the configuration, and recompile, you definitely should use ccache. I didn't measure the improvement in compile time, but it works.

About the kernel I was compiling: I took a configuration from someone who has almost the same laptop as I do, modified it a bit (put everything in modules, as loading the kernel is very slow for some reason, and loading modules isn't, and removed some things I know for sure I don't need), and now everything works just fine. And it boots like lightning. big_smile


I wish life was as simple as editing config files

Offline

Board footer

Powered by FluxBB