You are not logged in.
I tried to build kernel 2.6.22-rc6-mm1, using the pkgbuild example provided in the wiki, however I run into some trouble
First:
When I issue makepkg an error pops up:
==> ERROR: pkgver is not allowed to contain hyphens.
I found out that cutting part of this section fixes the problem:
#############################################
#DO NOT CHANGE INSIDE THIS BLOCK
pkgver=$_kerver
if [ ! -z "$_extraver" ]; then
_scratch="_$_extraver"
pkgver=$pkgver$_scratch
_extraver=`echo "-$_extraver" | sed 's|_|-|'`
fi
pkgdesc="$_desc - ver: $_kerver$_extraver;"
pkgname=$_pkg_base
if [ ! -z "$_patchset" ]; then
pkgdesc="$pkgdesc pset: $_patchset;"
_patchset="-$_patchset"
pkgname="$pkgname$_patchset"
fi
if [ ! -z "$_cfgname" ]; then
pkgdesc="$pkgdesc cfg: $_cfgname;"
_cfgname="-$_cfgname"
pkgname="$pkgname$_cfgname"
fi
pkgdesc="$pkgdesc bld: $pkgrel"
_idstr="$_kerver$_extraver$_patchset$_cfgname"
#############################################
If I remove the lines containing pkgver this is fixed, however later on (assuming I've cut several lines and countinued building) After everything is patched an error pop up and I have absolutely no clue what is causing it, or how to fix it:
(These are the final lines of the patching)
patching file sound/usb/usbmixer.c
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file sound/usb/usbmixer.c.rej
patching file sound/usb/usbquirks.h
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file sound/usb/usbquirks.h.rej
patching file usr/Kconfig
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file usr/Kconfig.rej
==> ERROR: Build Failed. Aborting...
Here is my PKGBUILD:
#############################################
# Linux Kernel and Modules PKGBUILD prototype
#
# This PKBUILD provides a structure to build, install, and remove
# versions of kernels from different trees and with different options
# enabled in the config file.
_desc="Linux Kernel and Modules"
_pkg_base="kernel"
_patchset="mm"
_cfgname=""
_kerver=2.6.22
_basepatch=2.6.22-rc6
_extraver="${_basepatch}-mm1" # Use _ instead of - in _extraver! Ex: mm4_ck7
pkgrel=1
url="http://www.kernel.org"
license="GPL"
depends=('module-init-tools')
makedepends=('bzip2' 'gcc')
arch=('i686')
# PAGE DOWN TWO PAGES FOR PATCHES AND MD5 SUMS
#
#
# The preceding information is used to configure the build:
#
# _desc:
# This is the base of the package description. It should be
# okay to leave the default value of "Linux Kernel and Modules"
#
# _pkg_base:
# This is the base of the pkgname. It should be okay to leave
# this with the default value of "kernel"
#
# _patchset: [optional - set to "" to not use]
# This value is an identifier which you can use to indicate
# what patches are being applied to the kernel. Examples would be:
# ck - Indicates following Con Kolivas' patch sets
# mm - Indicates kernel is patched with Andrew Morton's tree
# acpi - Indicates patches have been added for acpi
# ck_acpi_no_r4 - Indicates the source is patched with Kon Colivas'
# patchset, acpi patches are applied, and reiser4 patches have
# been removed.
# Recommendation: Add an identifier for any tree you follow, but don't
# get too carried away. You may include hypens, but I strongly
# recommend underscores instead.
#
# _cfgname: [optional - set to "" to not use]
# This value is an identifier used to indicate how the kernel is
# configured. Whereas patchset should indicate manipluations to then
# source tree, here you should indicate changes to the default config.
# Examples:
# sn45g - The kernel is configured with drivers and modules found in
# Shuttle's SN45G XPC.
# test - This kernel is a test of a different or new configuration
# Recommendation: You may use hypens but I strongly suggest underscores
# instead. Leave blank ("") to indicate the kernel is configured
# with the same options as the current Arch stock kernel package.
#
# _kerver:
# This is the version of the kernel source tree that is going to be
# downloaded. (ex: 2.6.5 or 2.6.8.1)
#
# _extraver:
# This is additional version information for the kernel. This should
# reflect any kernel version modifiers that will be applied by the
# patches you are going to apply. Example:
# ck7 - This kernel version will have "-ck7" appended to indicate it is
# patched with the 7th release of Con Kolivas' patches against the
# current (_kerver) kernel version.
# Recommendation: Including a ck7 here may seem redundant to including
# a ck in the _patchset value. I strongly recommend doing it in
# both places. A ck in the _patchset indicates the nature of then
# source tree, but is not used in the arch pkgver. The ck7 inside
# _extraver will be applied as part of the pkgver.
#
# pkgrel:
# This is the standard Arch plgrel value. Start at one for each
# release of a new combination of _patchset, _cfgname, _kerver, and
# _extraver. Increment by one for each repackaging where those four
# values remain the same.
#
# The generated package will have the following properties:
# name: $_pkg_base-$_patchset-$_cfgname
# version: $_kerver_$_extraver-#pkgrel
# pkg: kernel-$_patchset-$_cfgname-$_kerver_$_extraver-$pkgrel.pkg.tar.gz
# vmlinuz-$_kerver-$_extraver-$_patchset-$_cfgname
# System.map-$_kerver-$_extraver-$_patchset-$_cfgname
# kconfig-$_kerver-$_extraver-$_patchset-$_cfgname
# /lib/modules/$_kerver-$_extraver-$_patchset-$_cfgname
# /usr/src/linux-$_kerver-$_extraver-$_patchset-$_cfgname
# /usr/src/linux -> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# /usr/src/linux/config.stock = a stock arch kernel config file
# A copy of the .config use to build the kernel will be copied to
# the abs build directory.
#
#############################################
#DO NOT CHANGE INSIDE THIS BLOCK
pkgver=$_kerver
if [ ! -z "$_extraver" ]; then
_scratch="_$_extraver"
pkgver=$pkgver$_scratch
_extraver=`echo "-$_extraver" | sed 's|_|-|'`
fi
pkgdesc="$_desc - ver: $_kerver$_extraver;"
pkgname=$_pkg_base
if [ ! -z "$_patchset" ]; then
pkgdesc="$pkgdesc pset: $_patchset;"
_patchset="-$_patchset"
pkgname="$pkgname$_patchset"
fi
if [ ! -z "$_cfgname" ]; then
pkgdesc="$pkgdesc cfg: $_cfgname;"
_cfgname="-$_cfgname"
pkgname="$pkgname$_cfgname"
fi
pkgdesc="$pkgdesc bld: $pkgrel"
_idstr="$_kerver$_extraver$_patchset$_cfgname"
#############################################
###### Add patchfiles to the source array. Make sure the config file matches
###### the configuration for the kernel you intend to package. Make sure the
###### config.stock matches the .config from the current Arch stock kernel.
source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kerver.tar.bz2 \
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/patch-${_basepatch}.bz2 \
ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/${_basepatch}/${_extraver}/${_extraver}.bz2 \
config logo_linux_clut224.ppm logo_linux_mono.pbm logo_linux_vga16.ppm mkinitcpio-kernel26mm.conf kernel26mm.preset
)
###### Add md5 checksums here:
# md5sums=()
getvar() {
old=$(cat Makefile | grep "^$1")
echo $(echo ${old/"$1 ="/} | sed -e "s/[ ]*\(.*\)[ ]*/\1/g")
return 0
}
build() {
echo "_pkg_base: $_pkg_base"
echo "_patchset: $_patchset"
echo "_cfgname: $_cfgname"
echo "_kerver: $_kerver"
echo "_extraver: $_extraver"
echo "pkgrel: $pkgrel"
echo "_desc: $_desc"
echo "url: $url"
echo "license: $license"
echo "pkgver: $pkgver"
echo "pkgdesc: $pkgdesc"
echo "_idstr: $_idstr"
#read KEY
cd $startdir/src/linux-$_kerver
###### apply patches here
# patch -p1 < ../patch1 || return 1
patch -Np1 -i ../patch-${_basepatch} || return 1
patch -Np1 -i ../${_extraver} || return 1
cp ../logo_linux_clut224.ppm drivers/video/logo/
cp ../logo_linux_mono.pbm drivers/video/logo/
cp ../logo_linux_vga16.ppm drivers/video/logo/
#get rid of i in i686 in default config
carch=`echo $CARCH | sed 's|i||'`
cat ../config | sed "s|#CARCH#|$carch|g" >./.config
###### Choose one of the following configuration types
#make oldconfig || return 1
#make menuconfig || return 1
#make xconfig || return 1 #### (BROKEN?)
make gconfig || return 1
#############################################
# NO CHANGES BELOW THIS POINT
# Save the configuration file to a backup in the build directory
cp ./.config ../../config$_cfgname.bak
# set EXTRAVERSION to help use unique /lib/modules/ subdirectories
_ker_make_ver=$(getvar "VERSION").$(getvar "PATCHLEVEL").$(getvar "SUBLEVEL")
_ker_extraver=`echo $_idstr | sed "s|^$_ker_make_ver||"`
# update EXTRAVERSION in the Makefile by adding our (for modules location)
_oldline=$(cat Makefile | grep "^EXTRAVERSION")
cat Makefile | sed "s|$_oldline|EXTRAVERSION\ =\ $_ker_extraver$_patchset$_cfgname|" > tmpMake
mv tmpMake Makefile
make clean bzImage modules || return 1
mkdir -p $startdir/pkg/{lib/modules,boot}
make INSTALL_MOD_PATH=$startdir/pkg modules_install || return 1
# create unique names in /boot/
cp System.map $startdir/pkg/boot/System.map-$_idstr
cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz-$_idstr
install -D -m644 Makefile $startdir/pkg/usr/src/linux-$_idstr/Makefile
install -D -m644 .config $startdir/pkg/usr/src/linux-$_idstr/.config
install -D -m644 ../config.stock $startdir/pkg/usr/src/linux-$_idstr/config.stock
install -D -m644 .config $startdir/pkg/boot/kconfig-$_idstr
mkdir -p $startdir/pkg/usr/src/linux-$_idstr/include
mkdir -p $startdir/pkg/usr/src/linux-$_idstr/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-$_idstr/include/
done
# copy files necessary for later builds, like nvidia and vmware
cp -a scripts $startdir/pkg/usr/src/linux-$_idstr/
mkdir -p $startdir/pkg/usr/src/linux-$_idstr/.tmp_versions
cp arch/i386/Makefile $startdir/pkg/usr/src/linux-$_idstr/arch/i386/
cp arch/i386/kernel/asm-offsets.s $startdir/pkg/usr/src/linux-$_idstr/arch/i386/kernel/
# copy in Kconfig files
for i in `find . -name "Kconfig*"`; do
mkdir -p $startdir/pkg/usr/src/linux-$_idstr/`echo $i | sed 's|/Kconfig.*||'`
cp $i $startdir/pkg/usr/src/linux-$_idstr/$i
done
cd $startdir/pkg/usr/src/linux-$_idstr/include && ln -s asm-i386 asm
chown -R root.root $startdir/pkg/usr/src/linux-$_idstr
cd $startdir/pkg/lib/modules/$_idstr && \
(rm -f build; ln -sf /usr/src/linux-$_idstr build)
ln -sf /usr/src/linux-$_idstr $startdir/pkg/usr/src/linux
cp $startdir/src/config.stock $startdir/pkg/usr/src/linux-$_idstr/config.stock
}
My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...
Offline
I'd suggest you use the kernel26mm PKGBUILD - you can get it by following the CVS link on the kernel26mm page at archlinux.org/packages.
Also, you can't patch 2.6.22-rc6 on to 2.6.22 - 2.6.22 is final, and already includes everything from -rc6 ("previously applied", get it?).
Finally, that PKGBUILD includes a comment about the use of _ instead of - in the _extraver variable.
Offline
I tried using the cvs pkgbuild for the mm kernel, however the same error pops up after patches are finished to apply.
==> ERROR: Build Failed. Aborting.
What causes this error?
My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...
Offline
The error you have posted is generated by makepkg, and indicates that something went wrong. You need to look at the output before that to see what actually went wrong, as you did in your first post.
Offline
Which output should I look at, so that I can find my error?
My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...
Offline
The output before the error message.
Please note that although makepkg automates package building, you still need to understand what it is doing. In other words, please make sure that you have read and understood every step in the build function, and are familiar with each command and what it is supposed to achieve.
This is particularly important for something as complicated, and critical, as a kernel build. If you haven't already done so, you might consider building some simpler packages first, to gain experience.
For this particular build, I woud also suggest that you read about the function and application of the -mm patchset.
Offline
Well... the output is the same:
(last lines of the patching)
patching file sound/sh/aica.h
patching file sound/soc/Kconfig
patching file sound/soc/Makefile
patching file sound/soc/s3c24xx/Kconfig
patching file sound/soc/s3c24xx/Makefile
patching file sound/soc/s3c24xx/lm4857.h
patching file sound/soc/s3c24xx/neo1973_wm8753.c
patching file sound/soc/s3c24xx/s3c2443-ac97.c
patching file sound/soc/s3c24xx/s3c24xx-ac97.h
patching file sound/soc/s3c24xx/smdk2443_wm9710.c
patching file sound/soc/sh/Kconfig
patching file sound/soc/sh/Makefile
patching file sound/soc/sh/dma-sh7760.c
patching file sound/soc/sh/hac.c
patching file sound/soc/sh/sh7760-ac97.c
patching file sound/soc/sh/ssi.c
patching file sound/usb/usbquirks.h
patching file sound/usb/usx2y/usbusx2yaudio.c
patching file usr/gen_init_cpio.c
==> ERROR: Build Failed. Aborting...
[dheart@lightbringer kernel-mm]$
I've built simpler packages like moc (music on console), wine, qbittorrent, and I've built kernel (but I never managed to build a patched kernel...)
Maybe there is something wrong while applying the patch... Thanks for the suggestions tomk, I would seem like I cannot build patched kernel on my own, yet so I'm going to read some documentation or something...
My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...
Offline
You need to check the entire output. Use makepkg -L to create a build log, so you can do a thorough check for errors.
Offline
You need to check the entire output. Use makepkg -L to create a build log, so you can do a thorough check for errors.
There is no -l or -L option for makepkg
[dheart@lightbringer kernel-mm]$ makepkg -l
/usr/bin/makepkg: illegal option -- l
makepkg version 2.9.8
Usage: /usr/bin/makepkg [options]
Options:
-b, --builddeps Build missing dependencies from source
-B, --noccache Do not use ccache during build
-c, --clean Clean up work files after build
-C, --cleancache Clean up source files from the cache
-d, --nodeps Skip all dependency checks
-e, --noextract Do not extract source files (use existing src/ dir)
-f, --force Overwrite existing package
-g, --genmd5 Generate MD5sums for source files
-h, --help This help
-i, --install Install package after successful build
-j <jobs> Set MAKEFLAGS to "-j<jobs>" before building
-m, --nocolor Disable colorized output messages
-n, --nostrip Do not strip binaries/libraries
-o, --nobuild Download and extract files only
-p <buildscript> Use an alternate build script (instead of PKGBUILD)
-r, --rmdeps Remove installed dependencies after a successful build
-s, --syncdeps Install missing dependencies with pacman
-S, --sudosync Install missing dependencies with pacman and sudo
-w <destdir> Write package to <destdir> instead of the working dir
These options can be passed to pacman:
--noconfirm Do not ask for confirmation when resolving dependencies
--noprogressbar Do not show a progress bar when downloading files
If -p is not specified, makepkg will look for ./PKGBUILD
[dheart@lightbringer kernel-mm]$ makepkg -L
/usr/bin/makepkg: illegal option -- L
makepkg version 2.9.8
Usage: /usr/bin/makepkg [options]
Options:
-b, --builddeps Build missing dependencies from source
-B, --noccache Do not use ccache during build
-c, --clean Clean up work files after build
-C, --cleancache Clean up source files from the cache
-d, --nodeps Skip all dependency checks
-e, --noextract Do not extract source files (use existing src/ dir)
-f, --force Overwrite existing package
-g, --genmd5 Generate MD5sums for source files
-h, --help This help
-i, --install Install package after successful build
-j <jobs> Set MAKEFLAGS to "-j<jobs>" before building
-m, --nocolor Disable colorized output messages
-n, --nostrip Do not strip binaries/libraries
-o, --nobuild Download and extract files only
-p <buildscript> Use an alternate build script (instead of PKGBUILD)
-r, --rmdeps Remove installed dependencies after a successful build
-s, --syncdeps Install missing dependencies with pacman
-S, --sudosync Install missing dependencies with pacman and sudo
-w <destdir> Write package to <destdir> instead of the working dir
These options can be passed to pacman:
--noconfirm Do not ask for confirmation when resolving dependencies
--noprogressbar Do not show a progress bar when downloading files
If -p is not specified, makepkg will look for ./PKGBUILD
I keep my system up to date...
EDIT: PRoblem solved: I needed to use the 2.6.21 version of the kernel, patch it to 2.6.22-rc6 and then patch with the mm patch and now it is compiling )
Last edited by Dheart (2007-07-17 17:57:36)
My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...
Offline
Again problems... After kernel was configured an error poped up:
(these are the last lines of the configuration)
LD arch/i386/boot/compressed/vmlinux
OBJCOPY arch/i386/boot/vmlinux.bin
HOSTCC arch/i386/boot/tools/build
BUILD arch/i386/boot/bzImage
Root device is (8, 19)
Setup is 10820 bytes (padded to 11264 bytes).
System is 1916 kB
Kernel: arch/i386/boot/bzImage is ready (#1)
Building modules, stage 2.
MODPOST 1176 modules
ERROR: "check_signature" [drivers/input/misc/wistron_btns.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
==> ERROR: Build Failed. Aborting...
[dheart@lightbringer kernel-mm]$
What does this error mean?
Also other question: I have a Pentium 4 processor so in the configuration I chose
Pentium 4/P4 based celeron/p4 mobile/ old xeon
option rather than the Pentium pro. Is that a better choice?
My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...
Offline
Glad you worked it out.
However, your system is not up to date. The current pacman version is 3.0.5, and it provides the -L option.
Offline
Hmm... I forgot, that pacman needed to be upgraded manualy... pacman -S pacman -f did the trick...
Now about the error... I found out some information on the internet, and a fix, however I have no clue how to apply (neither where) the fix:
http://www.gossamer-threads.com/lists/l … nel/788567
On Thu, 28 Jun 2007 14:08:49 +0200 Gabriel C <nix.or.die[at]googlemail.com> wrote:
> Andrew Morton wrote:
> > ftp://ftp.kernel.org/pub/linux/kernel/p … 2-rc6-mm1/
> >
> >
>
> Compile error here.
>
> ...
>
> Kernel: arch/i386/boot/bzImage is ready (#1)
> ERROR: "check_signature" [drivers/input/misc/wistron_btns.ko] undefined!
> ERROR: "check_signature" [drivers/block/xd.ko] undefined!
> make[1]: *** [__modpost] Error 1
> make: *** [modules] Error 2
>grrr.
--- a/lib/Makefile~uninline-check_signature-fix
+++ a/lib/Makefile
@@ -5,8 +5,7 @@
lib-y := ctype.o string.o vsprintf.o cmdline.o \
rbtree.o radix-tree.o dump_stack.o \
idr.o int_sqrt.o bitmap.o extable.o prio_tree.o \
- sha1.o irq_regs.o reciprocal_div.o argv_split.o \
- check_signature.o
+ sha1.o irq_regs.o reciprocal_div.o argv_split.olib-$(CONFIG_MMU) += ioremap.o pagewalk.o
lib-$(CONFIG_SMP) += cpumask.o
@@ -14,7 +13,7 @@ lib-$(CONFIG_SMP) += cpumask.o
lib-y += kobject.o kref.o kobject_uevent.o klist.oobj-y += div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
- bust_spinlocks.o hexdump.o
+ bust_spinlocks.o hexdump.o check_signature.oifeq ($(CONFIG_DEBUG_KOBJECT),y)
CFLAGS_kobject.o += -DDEBUG
_
tomk, can you please explain me what to do?
P.S.
I'm very grateful that you replied to all my newbish questions.
My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...
Offline
The text from, and including,
--- a/lib/Makefile~uninline-check_signature-fix
down to, and including,
CFLAGS_kobject.o += -DDEBUG
is a patch. Put it into a file, and apply it in the PKGBUILD, after the -mm patch.
Offline
Thanks for the reply, I'll let the kernel build itself while I sleep and I'll post whether I was successful tomorrow, early in the morning.
My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...
Offline
Arghtdfajjg!
I finished with the configuration of the kernel arround 2:00 AM and went to bed, expecting that when I got up, my new kernel would be ready. But NOOOOO
My machine crashed at 4:36 (I suppose my hard drive is overheating - since such crashes happen only in the summer and only after I've got my machine up for a cople of days (three in my case)).
I got up, saw that my machine has crashed and rebooted it. The first thing I did was to see whether there was a .pkg.tar.gz in the dir... And there wasn't. I also went to check the pkg dir... it wasn't empty... The compilation had needed a few minutes more (((
Anyway since there were files in the pkg directory everything goes fine so the kernel had compiled succesfully thanks to tomk.
I don't expect any other problems from now on.
My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...
Offline