LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices


Reply
  Search this Thread
Old 09-28-2010, 07:26 AM   #1
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
PKGBUILD wont compile x86 kernel..."CALL scripts/checksyscalls.sh" ?!


so, I'm trying to make my first PKGBUILD for a live kernel

the PKGBUILD builds successfully for x86_64
but this is what happens if I run it on i686 setup
Code:
[bryan@nflux kernel26-livez]$ makepkg -i
==> Making package: kernel26-livez 2.6.35.6-1 (Mon Sep 27 20:59:56 EDT 2010)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
  -> Found linux-2.6.35.6.tar.bz2
  -> Found config
  -> Found config.x86_64
  -> Found kernel26.preset
  -> Found kernel26.install
==> Validating source files with sha256sums...
    linux-2.6.35.6.tar.bz2 ... Passed
    config ... Passed
    config.x86_64 ... Passed
    kernel26.preset ... Passed
    kernel26.install ... Passed
==> Extracting Sources...
  -> Extracting linux-2.6.35.6.tar.bz2 with bsdtar
==> Entering fakeroot environment...
==> Starting build()...

===================================================
You might be prompted below for some config options
===================================================

Do you want to use your running kernel's config? (y/N)
(needs IKCONFIG and IKCONFIG_PROC, run 'modprobe configs'
 as root before hitting <Y>, if uncertain)
n
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/docproc
  HOSTCC  scripts/basic/hash
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/kxgettext.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf -s arch/x86/Kconfig
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  CC      kernel/bounds.s
  GEN     include/generated/bounds.h
  CC      arch/x86/kernel/asm-offsets.s
  GEN     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
    Aborting...
why does it end at " CALL scripts/checksyscalls.sh "

note if I manually try to compile the kernel it builds fine using
make all

heres the PKGBUILD
Code:
# Original PKGBUILD from kernel26-pf
# Maintainer: <thepenandpaper at gmail dot com>

_basekernel=2.6.35.6
_pkgname=kernel26-livez
_pfrel=1
pkgname=kernel26-livez
pkgver=${_basekernel}
pkgrel=${_pfrel}
_kernelname=-livez
arch=(i686 x86_64)
_pkgdesc="Linux kernel and modules with patches (BFS included), tuxonice, BFQ]. Also included: aufs2 and squashfs-lzma."
pkgdesc=${_pkgdesc}
license=('GPL2')
groups=('base')
backup=(etc/mkinitcpio.d/${_pkgname}.preset)
depends=('coreutils' 'module-init-tools' 'linux-firmware' 'mkinitcpio>=0.5.20')
optdepends=('crda: to set the correct wireless channels of your country'
	    'pm-utils: utilities and scripts for suspend and hibernate power management'
	    'tuxonice-userui: TuxOnIce userspace user interface'
	    'hibernate-script: set of scripts for managing TuxOnIce, hibernation and suspend to RAM')
# 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' 'ivtv'
          'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
          'gspcav1' 'atl2' 'wlan-ng26' 'aufs' 'rt2500')
install='kernel26.install'
source=(http://multidistro.com/downloads/kernel26-livez/linux-2.6.35.6.tar.bz2
	config config.x86_64		# the main kernel config files
	kernel26.preset)		# standard config files for mkinitcpio ramdisk
        #kernel26.install               # standard install script
sha256sums=('1badcb5a68d1819381161f1e3e090acd4e7684e52b7881ae6216af59c538cd74'
            'a6a365c5e19deb0cddf8902c533fcea0566e8fb23a4a4838a2f734bab281d503'
            '494daf2371f4d580bef3ae653102f614d2422be2741b8b2019480dde098dae6c'
            'fa87b172659fbf5e7dcbd6cd34f2f3604c0b57e42bcfad1b27e6808281193e5a')
            #'265960b8f6c0fedc6a081dd567ed72bf65a30a0ab6da324280a4459a2ab4bf6c'
provides=(${_pkgname}=${_basekernel})			# for $pkgname-optimized
provides=('kernel26-headers' 'kernel26=$pkgver')	# for when you have no other kernel (which is a bad idea anyway)

build() {
   KARCH=x86
   cd ${srcdir}/linux-${_basekernel}
   sed -i "s/EXTRAVERSION = -${_pfrel}/EXTRAVERSION = ${_kernelname}/" Makefile
   if [ "$CARCH" = "x86_64" ]; then
      cat ../config.x86_64 >./.config
   else
      cat ../config >./.config
   fi
   _arch=$CARCH
   echo
   echo "==================================================="
   echo "You might be prompted below for some config options"
   echo "==================================================="
   echo
   echo "Do you want to use your running kernel's config? (y/N)"
   echo "(needs IKCONFIG and IKCONFIG_PROC, run 'modprobe configs'"
   echo " as root before hitting <Y>, if uncertain)"
   read answer
   shopt -s nocasematch
   if [[ "$answer" = "y" ]]; then
      if [[ -s /proc/config.gz ]]; then
         echo "Extracting config from /proc/config.gz..."
         modprobe configs
         zcat /proc/config.gz > ./.config
      else
         echo "You kernel was not compiled with IKCONFIG_PROC. Using stock ARCH kernel .config (with BFS and TuxOnIce enabled)"
      fi
   fi
   if [ "${_kernelname}" != "" ]; then
      sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"\"|g" ./.config
   fi
   # Make some good use of MAKEFLAGS
   MAKEFLAGS=`grep -v '#' /etc/makepkg.conf | grep MAKEFLAGS= | sed s/MAKEFLAGS=// | sed s/\"//g`
   # get kernel version
   make ${MAKEFLAGS} prepare

   # uncomment to decrease kernel size and compilation time. However, be prepared to deal with missing modules :P
   # make localmodconfig

   # allows you to edit config
   # make menuconfig && cp -v .config ${startdir}/config && msg "Stopping build"

   # load configuration
   # yes "" | make config

   # This allows building cpu-optimized packages with according package names.
   # Useful for repo maintainers.
   CPU=`egrep "MK8=y|MCORE2=y|MPSC=y|MATOM=y|MPENTIUMII=y|MPENTIUMIII=y|MPENTIUMM=y|MPENTIUM4=y|MK7=y|CONFIG_GENERIC_CPU=y|CONFIG_X86_GENERIC=y" ./.config`
   CPU=`sed -e "s/CONFIG_M\(.*\)=y/\1/" <<<$CPU`
   case $CPU in
    CORE2)
        pkgname="${_pkgname}-core2"
        pkgdesc="${_pkgdesc} Intel Core2 optimized."
        ;;
    K8)
        pkgname="${_pkgname}-k8"
        pkgdesc="${_pkgdesc} AMD K8 optimized."
        ;;
    PSC)
        pkgname="${_pkgname}-psc"
        pkgdesc="${_pkgdesc} Intel Pentium4/D/Xeon optimized."
        ;;
    ATOM)
        pkgname="${_pkgname}-atom"
        pkgdesc="${_pkgdesc} Intel Atom optimized."
        ;;
    K7)
        pkgname="${_pkgname}-k7"
        pkgdesc="${_pkgdesc} AMD K7 optimized."
        ;;
    PENTIUMII)
        pkgname="${_pkgname}-p3"
        pkgdesc="${_pkgdesc} Intel Pentium3 optimized."
        ;;
    PENTIUMIII)
        pkgname="${_pkgname}-p2"
        pkgdesc="${_pkgdesc} Intel Pentium2 optimized."
        ;;
    PENTIUMM)
        pkgname="${_pkgname}-pm"
        pkgdesc="${_pkgdesc} Intel Pentium-M optimized."
        ;;
    PENTIUM4)
        pkgname="${_pkgname}-p4"
        pkgdesc="${_pkgdesc} Intel Pentium4 optimized."
        ;;
    default)
        pkgname="${_pkgname}"
        pkgdesc="Linux kernel and modules with pf-kernel patch [-ck patchset (BFS included), tuxonice, BFQ, IMQ]. Also included: aufs2 and squashfs-lzma."
        ;;
  esac

   # build!
   _kernver="$(make kernelrelease)"
   make ${MAKEFLAGS} bzImage modules

   ### package_kernel26
   mkdir -p ${pkgdir}/{lib/modules,boot}
   make INSTALL_MOD_PATH=${pkgdir} modules_install

   cp System.map ${pkgdir}/boot/System.map26${_kernelname}
   cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname}

   # add vmlinux
   # cp vmlinux ${pkgdir}/usr/src/linux-${_kernver}
   install -m644 -D vmlinux ${pkgdir}/usr/src/linux-${_kernver}/vmlinux

   # install fallback mkinitcpio.conf file and preset file for kernel
   install -m644 -D ${srcdir}/kernel26.preset ${pkgdir}/etc/mkinitcpio.d/${_pkgname}.preset

   # set correct depmod command for install
   sed \
      -e  "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
      -e  "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
      -i ${startdir}/kernel26.install
   sed \
      -e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \
      -e "s|default_image=.*|default_image=\"/boot/${_pkgname}.img\"|g" \
      -e "s|fallback_image=.*|fallback_image=\"/boot/${_pkgname}-fallback.img\"|g" \
      -i ${pkgdir}/etc/mkinitcpio.d/${_pkgname}.preset

   echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${_pkgname}.kver

   ### package_kernel26-headers

   install -D -m644 Makefile \
      ${pkgdir}/usr/src/linux-${_kernver}/Makefile
   install -D -m644 kernel/Makefile \
      ${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile
   install -D -m644 .config \
      ${pkgdir}/usr/src/linux-${_kernver}/.config

   mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include
   for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video; do
      cp -a include/$i ${pkgdir}/usr/src/linux-${_kernver}/include/
   done

   # copy arch includes for external modules
   mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/x86
   cp -a arch/x86/include ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/

   # copy files necessary for later builds, like nvidia and vmware
   cp Module.symvers ${pkgdir}/usr/src/linux-${_kernver}
   cp -a scripts ${pkgdir}/usr/src/linux-${_kernver}

   # fix permissions on scripts dir
   chmod og-w -R ${pkgdir}/usr/src/linux-${_kernver}/scripts

   mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions
   mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel

   cp arch/$KARCH/Makefile ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
   if [ "$CARCH" = "i686" ]; then
      cp arch/$KARCH/Makefile_32.cpu ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
   fi
   cp arch/$KARCH/kernel/asm-offsets.s ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel/

   # add headers for lirc package
   mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video
   cp drivers/media/video/*.h  ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/
   for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301; do
      mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
      cp -a drivers/media/video/$i/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
   done

   # add docbook makefile
   install -D -m644 Documentation/DocBook/Makefile \
      ${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile

   # add dm headers
   mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
   cp drivers/md/*.h  ${pkgdir}/usr/src/linux-${_kernver}/drivers/md

   # add inotify.h
   mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/linux
   cp include/linux/inotify.h ${pkgdir}/usr/src/linux-${_kernver}/include/linux/

   # add wireless headers
   mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
   cp net/mac80211/*.h ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/

   # add dvb headers for external modules
   # in reference to:
   # http://bugs.archlinux.org/task/9912
   mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core
   cp drivers/media/dvb/dvb-core/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/

   # add dvb headers for external modules
   # in reference to:
   # http://bugs.archlinux.org/task/11194
   mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
   [[ -e include/config/dvb/ ]] && cp include/config/dvb/*.h ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/

   # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
   # in reference to:
   # http://bugs.archlinux.org/task/13146
   mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
   cp drivers/media/dvb/frontends/lgdt330x.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
   cp drivers/media/video/msp3400-driver.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/

   # add xfs and shmem for aufs building
   mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs
   mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/mm
   cp fs/xfs/xfs_sb.h ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h

   # add headers for virtualbox
   # in reference to:
   # http://bugs.archlinux.org/task/14568
   cp -a include/drm ${pkgdir}/usr/src/linux-${_kernver}/include/

   # add headers for broadcom wl
   # in reference to:
   # http://bugs.archlinux.org/task/14568
   cp -a include/trace ${pkgdir}/usr/src/linux-${_kernver}/include/

   # copy in Kconfig files
   for i in `find . -name "Kconfig*"`; do
      mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/`echo $i | sed 's|/Kconfig.*||'`
      cp $i ${pkgdir}/usr/src/linux-${_kernver}/$i
   done

   chown -R root.root ${pkgdir}/usr/src/linux-${_kernver}
   find ${pkgdir}/usr/src/linux-${_kernver} -type d -exec chmod 755 {} \;
   cd ${pkgdir}/lib/modules/${_kernver} && \
      (rm -f source build; ln -sf ../../../usr/src/linux-${_kernver} build)

   # remove unneeded architectures
   rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
   # remove the firmware
   rm -rf ${pkgdir}/lib/firmware
}

# eof
thanks for any help
 
Old 09-29-2010, 05:05 PM   #2
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
ahhh!!
success
my first official PKGBUILD
http://aur.archlinux.org/packages.php?ID=41353

just either download tarball, unpack and do "makepkg -i" in the folder
or
packer -S kernel26-livez

this kernel 2.6.35.7 is for use with the modified linux-live-6.3.0* I am using in the nFluxOS arch/slackware builds

the purpose is to create live-media from your ARCH x86/x86_64 install

Note that I have to now make the accompanying live-builder kit
and submit it to AUR also

Last edited by linus72; 09-29-2010 at 05:06 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
stop eclipse from re-compile every "debug" (F11) call. ufmale Programming 1 05-01-2010 01:36 AM
weird PHP compile issue- module shows in "php -m" but not in phpinfo call hbbtstar Linux - Software 1 08-28-2009 03:14 PM
Seeking for "Synchronise" and "patients" projects/scripts of Visual Basic LAN-Dominator.nl Programming 2 07-05-2008 07:21 PM
LXer: Sabayon Linux x86/x86-64 1.0 "Business Edition" LXer Syndicated Linux News 0 07-17-2007 11:31 PM
Any way to get "Alice"; "Call of Duty" series and "Descent 3" to work? JBailey742 Linux - Games 13 06-23-2006 01:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch

All times are GMT -5. The time now is 09:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration