You are not logged in.

#1 2007-05-13 22:20:40

Urkburk
Member
From: Stockholm, Sweden
Registered: 2007-05-07
Posts: 17

kernel26 compile error (trying to install Synce)

Hi!

I'm trying to patch kernel26 (using files from abs, version 2.6.21.1-8), with this patch: http://synce.svn.sourceforge.net/svnroo … -wm5.patch

I'm following instructions here: http://www.synce.org/index.php/Connecti … is-lite%29

I copied the kernel26 directory from abs tree and added the patch to source(), md5sums() and added a patch-line further down... also changed command to "make menuconfig"... here's the whole PKGBUILD file:

# $Id: PKGBUILD,v 1.224 2007/05/06 18:54:10 tpowa Exp $
# Maintainer: judd <jvinet@zeroflux.org>
pkgname=kernel26
_basekernel=2.6.21
pkgver=2.6.21.1
pkgrel=8
pkgdesc="The Linux Kernel and modules"
arch=(i686 x86_64)
url="http://www.kernel.org"
backup=('boot/kconfig26' etc/mkinitcpio.d/${pkgname}.preset)
depends=('module-init-tools' 'mkinitcpio>=0.5.13')
# pwc, ieee80211 and hostap-driver26 modules are included in kernel26 now
# nforce package support was abandoned by nvidia, kernel modules should cover everything now.
# kernel24 support is dropped since glibc24
replaces=('kernel24' 'kernel24-scsi' 'kernel26-scsi'
          'alsa-driver' 'ieee80211' 'hostap-driver26'
          'pwc' 'nforce' 'squashfs' 'unionfs' )
install=kernel26.install
source=(linux-2.6.21-rndis_host-wm5.patch
    #ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
    http://www.port80-se.lkams.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2

        #http://www.kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.21-rc7.bz2
    #http://www.kernel.org/pub/linux/kernel/v2.6/snapshots/patch-2.6.21-rc7-git5.bz2
    ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-$pkgver.bz2
        config config.x86_64
        logo_linux_clut224.ppm
        logo_linux_mono.pbm
        logo_linux_vga16.ppm
        kernel26.preset
        mkinitcpio-$pkgname.conf
        acpi-dsdt-initrd-v0.8.4-2.6.21.patch
        toshiba-bluetooth.patch
    toshiba-acpi.patch
        usb-storage-unusual-devs.patch
        mactel-linux-2.6.21.patch
        coretemp.patch
    atkbd.patch
    alsa-20070506.patch.bz2
    alsa-include.patch.bz2
    patch_realtek.patch
    sis900.patch
    zd1211.patch
    acpi-buggy-bios.patch
    bluetooth-alsa.patch
    revert_sky2.patch
    http://heanet.dl.sourceforge.net/sourceforge/squashfs/squashfs3.2-r2.tar.gz
    ftp://ftp.fsl.cs.sunysb.edu/pub/unionfs/unionfs-2.x/linux-2.6.21-u2.diff.gz)
md5sums=('d590b4ddeb2901ee2f0ab6b32777140f'\
    '1b515f588078dfa7f4bab2634bd17e80' 'c4c368f173af267a564948065ffc1689'\
         'dd0ab2770aa77868a0ca73822daecdfe' '89af4e2eceaf6e0c2d01567438fcc961'\
         '5a62bcc7e96601052c7405459b483826' 'ed6b42fea2f5d27f7eb920746ccc1ebb'\
         'a995ec849ea43d3c89d607bbdd1e7d09' '2365779022389399c5c705004cdbc583'\
         '36858bd6a0bca63d2aa901b2e42d4a05' '493137566bc397ec762c86e64bd96849'\
         '695d8578a0334fa9bb140917561f03d4' 'f6978eca251dfca21ffa46f1169583a4'\
         '3ed791c3af3099489faf0d22cbcc55a8' '55e6fb0b0778db4ffea45c75565e1f28'\
         '197453581bf03bd8f6cb50a4cbcc8685' '3f72c692c7c9cf596680bc3ce0cb84ec'\
         '9db585806016b338a11886b2cbba84de' '5e00933ee60f7e1af44225e785de6820'\
         '00bc768e40b48bbbcea4466289af29fc' 'f0c3200fde468a1ed37b363f0fb60c9c'\
         'bec19952e53d01fc5f4e6f48ce3fa856' 'bbc730a590d4e09b3d937b257e5a4bfe'\
         'b68adb3c52eeff2d441ca41c380382b7' '34980076fbd8e745d9345b42f6457fa4'\
         'bf360b92eba9e6d5610196ce2e02fcd1' '4964894a3f406d600226b62de570605b')

build() {
  [ "${CARCH}" = "i686" ]   && KARCH=i386
  [ "${CARCH}" = "x86_64" ] && KARCH=x86_64

  cd $startdir/src/linux-$_basekernel
  # add upstream patch from 2.6.21 series
  patch -Np1 -i ../patch-$pkgver || return 1
  #patch -Np1 -i ../patch-$pkgver-rc7 || return 1
  #patch -Np1 -i ../patch-2.6.21-rc7-git5 || return 1
  # add acpi custom dsdt patch
  patch -Np1 -i ../acpi-dsdt-initrd-v0.8.4-2.6.21.patch || return 1
  # fix enabling of bluetooth on some toshiba notebooks
  patch -Np1 -i ../toshiba-bluetooth.patch || return 1
  # fix hotkeys on some toshiba notebooks
  patch -Np1 -i ../toshiba-acpi.patch || return 1
  # fix I/O errors with Teac HD-35PU devices
  patch -Np1 -i ../usb-storage-unusual-devs.patch || return 1
  # add mactel patch
  patch -Np1 -i ../mactel-linux-2.6.21.patch || return 1
  # add coretemp and additional sensors
  patch -Np1 -i ../coretemp.patch || return 1
  # fix atkbd issue on some laptops
  patch -Np1 -i ../atkbd.patch || return 1
  # add latest alsa fixes ftp://ftp.suse.com/pub/projects/alsa/snapshot/driver/
  # status is 20070506!
  patch -Np1 -i ../alsa-20070506.patch || return 1
  patch -Np0 -i ../alsa-include.patch || return 1
  # fix patch_realtek for new asus and lenovo
  patch -Np1 -i ../patch_realtek.patch || return 1
  # fix sis900 oops
  patch -Np1 -i ../sis900.patch || return 1
  # fix zd1211 driver to support more cards
  patch -Np1 -i ../zd1211.patch || return 1
  # fix buggy bios acpi to get c states
  patch -Np1 -i ../acpi-buggy-bios.patch || return 1
  # revert sky2 change, it breaks some nics that actually work fine, sigh
  patch -Rp1 -i ../revert_sky2.patch || return 1
  # fix alsa bluetooth, http://bluetooth-alsa.cvs.sourceforge.net/bluetooth-alsa/plugz/patches/
  patch -Np1 -i ../bluetooth-alsa.patch || return 1
  # add sqashfs
  patch -Np1 -i ../squashfs3.2-r2/kernel-patches/linux-2.6.20/squashfs3.2-patch || return 1
  # add unionfs
  patch -Np1 -i ../linux-2.6.21-u2.diff || return 1

  patch -Np1 -i ../linux-2.6.21-rndis_host-wm5.patch || return 1

  # remove the extraversion from Makefile
  #sed -i 's|^EXTRAVERSION = .*$|EXTRAVERSION =-rc7|g' Makefile
  sed -i 's|^EXTRAVERSION = .*$|EXTRAVERSION =|g' Makefile
  # Arch logo!
  cp ../logo_linux_clut224.ppm drivers/video/logo/
  cp ../logo_linux_mono.pbm drivers/video/logo/
  cp ../logo_linux_vga16.ppm drivers/video/logo/
if [ "$CARCH" = "x86_64" ]; then
  cat ../config.x86_64 >./.config
 else
  # get rid of the 'i' in i686
  carch=`echo $CARCH | sed 's|i||'`
  cat ../config | sed "s|#CARCH#|$carch|g" >./.config
fi
  # build the full kernel version to use in pathnames
  . ./.config
  #_kernver="2.6.21-rc7${CONFIG_LOCALVERSION}"
  _kernver="${_basekernel}${CONFIG_LOCALVERSION}"

  # load configuration
  #yes "" | make config
  make menuconfig

  # 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/$KARCH/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/$KARCH/kernel
  for i in acpi asm-generic asm-$KARCH 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}
  # fix permissions on scripts dir
  chmod og-w -R $startdir/pkg/usr/src/linux-${_kernver}/scripts
  mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/.tmp_versions
  
  cp arch/$KARCH/Makefile $startdir/pkg/usr/src/linux-${_kernver}/arch/$KARCH/
  if [ "$CARCH" = "i686" ]; then
    cp arch/$KARCH/Makefile.cpu $startdir/pkg/usr/src/linux-${_kernver}/arch/$KARCH/
  fi
  cp arch/$KARCH/kernel/asm-offsets.s $startdir/pkg/usr/src/linux-${_kernver}/arch/$KARCH/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/
  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
  # add dm headers
  mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/drivers/md
  cp drivers/md/*.h  $startdir/pkg/usr/src/linux-${_kernver}/drivers/md
  # 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/
  # add 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/
  # add vmlinux
  cp vmlinux $startdir/pkg/usr/src/linux-${_kernver}
  # 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

  if [ "${KARCH}" = "i386" ]; then
    mkdir ${startdir}/pkg/usr/src/linux-${_kernver}/include/asm-x86_64
    cp -a include/asm-x86_64/tsc.h ${startdir}/pkg/usr/src/linux-${_kernver}/include/asm-x86_64
  else
    mkdir ${startdir}/pkg/usr/src/linux-${_kernver}/include/asm-i386
    cp -a include/asm-i386/tsc.h ${startdir}/pkg/usr/src/linux-${_kernver}/include/asm-i386
  fi

  cd $startdir/pkg/usr/src/linux-${_kernver}/include && ln -s asm-$KARCH 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)
  # for binary modules make prepare
  cd $startdir/pkg/lib/modules/${_kernver}/build
  make prepare
  # install fallback mkinitcpio.conf file and preset file for kernel
  install -m644 -D $startdir/src/${pkgname}.preset $startdir/pkg/etc/mkinitcpio.d/${pkgname}.preset || return 1
  install -m644 -D $startdir/src/mkinitcpio-$pkgname.conf $startdir/pkg/etc/mkinitcpio.d/$pkgname-fallback.conf || return 1
  # set correct depmod command for install
  sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" $startdir/kernel26.install
  echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${startdir}/pkg/etc/mkinitcpio.d/${pkgname}.kver
}

When compiling it goes smoothly for quite some time, then this happens:

........lots of compiling stuff.......
  CC [M]  lib/zlib_inflate/inflate_syms.o
  LD [M]  lib/zlib_inflate/zlib_inflate.o
  CC      arch/i386/lib/msr-on-cpu.o
  LD      arch/i386/lib/built-in.o
  CC      arch/i386/lib/bitops.o
  AS      arch/i386/lib/checksum.o
  CC      arch/i386/lib/delay.o
  AS      arch/i386/lib/getuser.o
  CC      arch/i386/lib/memcpy.o
  CC      arch/i386/lib/mmx.o
  AS      arch/i386/lib/putuser.o
  AS      arch/i386/lib/semaphore.o
  CC      arch/i386/lib/strstr.o
  CC      arch/i386/lib/usercopy.o
  AR      arch/i386/lib/lib.a
  GEN     .version
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
drivers/built-in.o: In function `usbnet_set_settings':
(.text+0x897f5): undefined reference to `mii_ethtool_sset'
drivers/built-in.o: In function `usbnet_get_settings':
(.text+0x897c0): undefined reference to `mii_ethtool_gset'
drivers/built-in.o: In function `usbnet_get_link':
(.text+0x89858): undefined reference to `mii_link_ok'
drivers/built-in.o: In function `usbnet_nway_reset':
(.text+0x89870): undefined reference to `mii_nway_restart'
make: *** [.tmp_vmlinux1] Error 1
==> ERROR: Build Failed.  Aborting...

I really don't get anything out of that error message! But I can see it has something to do with usbnet... And I need CONFIG_USB_USBNET=y... Well, can someone please help me? smile

...if you need I can show the .config file created by make menuconfig, but it could not be posted here (was too long)..

Last edited by Urkburk (2007-05-14 19:31:02)

Offline

#2 2007-05-14 19:29:11

Urkburk
Member
From: Stockholm, Sweden
Registered: 2007-05-07
Posts: 17

Re: kernel26 compile error (trying to install Synce)

Well... I marked every item in the USB Networking category, and that compile error went away... But the kernel still doesn't recognize my Windows Mobile 5 Qtek 9100 device =/

Offline

#3 2007-05-14 19:52:55

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: kernel26 compile error (trying to install Synce)

I'm not sure what the exact option is in menuconfig, but i guess you have to be sure that

# grep CONFIG_MII .config

either yields "m" or "y"

It's probable somewhere under "device drivers" -> "Network devices" -> "Ethernet (10 or 100Mbit)" or something like that...


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

#4 2007-05-14 19:59:35

Urkburk
Member
From: Stockholm, Sweden
Registered: 2007-05-07
Posts: 17

Re: kernel26 compile error (trying to install Synce)

klixon wrote:

I'm not sure what the exact option is in menuconfig, but i guess you have to be sure that

# grep CONFIG_MII .config

either yields "m" or "y"

It's probable somewhere under "device drivers" -> "Network devices" -> "Ethernet (10 or 100Mbit)" or something like that...

Oh, the output was:

[simon@urkburk kernel26]$ grep CONFIG_MII config
CONFIG_MII=m

I wonder what the name of that module is... this is a really annoying problem when compiling modules =/ I run into this problem too often, not knowing the name of some module. Is there a good way to find the name of the CONFIG_MII module?

Edit:
...strange... when I tried to recompile the package this is what was set in the make menuconfig:

 CONFIG_MII:                                                             
                                                                         
 Most ethernet controllers have MII transceiver either as an external    
 or internal device.  It is safe to say Y or M here even if your         
 ethernet card lack MII.                                                 
                                                                         
 Symbol: MII [=y]
 Prompt: Generic Media Independent Interface device support              
   Defined at drivers/net/Kconfig:183                                    
   Depends on: NET && NETDEVICES && !UML && NET_ETHERNET                 
   Location:                                                             
     -> Device Drivers                                                   
       -> Network device support                                         
         -> Network device support (NETDEVICES [=y])                     
           -> Ethernet (10 or 100Mbit)                                   
             -> Ethernet (10 or 100Mbit) (NET_ETHERNET [=y])             
   Selected by: MACB && NET && NETDEVICES && !UML && NET_ETHERNET && (AV

...note the "Symbol: MII [=y]", so it should already be compiled in to the kernel =/

I really don't understand why it shows no difference in dmesg from before I plug the (Qtek 9100 WM5) device in, and after... Nothing happens...

Last edited by Urkburk (2007-05-14 20:49:17)

Offline

Board footer

Powered by FluxBB