You are not logged in.
Pages: 1
All right, so I'm trying to compile my own kernel with ABS, but It just doesn't work. I am getting this error message:
WARNING: /var/abs/local/kernel-costum/pkg/lib/modules/2.6.14.4-ARCH/kernel/net/ieee80211/ieee80211_crypt_tkip.ko needs unknown symbol wireless_send_event
./PKGBUILD: line 114: cd: /var/abs/local/kernel-costum/pkg/lib/modules/{2.6.14.4}-whar: No such file or directory
==> ERROR: Build Failed. Aborting...
My PKGBUILD looks like this:
# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org>
pkgname=kernel26144-ARCH
pkgver=2.6.14.4
pkgrel=1
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=(config ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.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 ../patchname || return 1
# Arch logo !
cp ../../archbannerglass3.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
_kernver="{$pkgver}-whar"
# 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${_kernver}
cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26${_kernver}
install -D -m644 Makefile
$startdir/pkg/usr/src/linux-${_kernver}/Makefile
install -D -m644 .config
$startdir/pkg/usr/src/linux-${_kernver}/.config
install -D -m644 .config $startdir/pkg/boot/kconfig26${_kernver}
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 net pcmcia scsi 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/
# 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)
# 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
}
# vim:syntax=sh
I want to name the package like this "kernel26whar-2.6.x.y-z". And all the modules should be put in "/lib/modules/2.6.x.y-whar". But I just can't figure out how.
Arch - It's something refreshing
Offline
Line 114 is almost at the end of the PKGBUILD, so you should have stuff in $startdir/pkg. Have a look in $startdir/pkg/lib/modules and see what's there.
What did you put for CONFIG_LOCALVERSION in your kernel config?
Offline
I'm sorry, but what is that used for? I just based some if it on a old "kernel26archck PKGBUILD".
# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org>
pkgname=kernel26archck
_origver=2.6.13
_patchver=archck8
pkgver=${_origver}.${_patchver}
pkgrel=3
pkgdesc="The Linux Kernel 2.6.13 and modules (IDE support) with -archck8 patchset"
url="http://www.kernel.org"
backup=('boot/kconfig26archck')
depends=('module-init-tools')
install=kernel26.install
source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_origver.tar.bz2 cdburning.patch http://iphitus.loudas.com/arch/ck/2.6.13/patch-$_origver-$_patchver.bz2 config)
md5sums=('560f5fadf59f172973e67939868a4cae' '66b87662e6dd54b6324f874739fa1b99'
'34473117092ac6363dfe4cee20fd8571')
build() {
cd $startdir/src/linux-$_origver
patch -Np1 -i ../patch-$_origver-$_patchver || return 1
patch -Np1 -i ../cdburning.patch || return 1
# remove the extraversion version from Makefile
sed -i 's|^EXTRAVERSION = -archck.*|EXTRAVERSION = -archck|g' Makefile
# get rid of the 'i' in i686
carch=`echo $CARCH | sed 's|i||'`
cat ../config | sed "s|#CARCH#|$carch|g" >./.config
# load configuration
yes "" | make config
# build the full kernel version to use in pathnames
. ./.config
_kernver="${_origver}-archck${CONFIG_LOCALVERSION}"
# 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.map26archck
cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26archck
install -D -m644 Makefile
$startdir/pkg/usr/src/linux-${_kernver}/Makefile
install -D -m644 .config
$startdir/pkg/usr/src/linux-${_kernver}/.config
install -D -m644 .config $startdir/pkg/boot/kconfig26archck
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 net pcmcia scsi 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/
# 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)
Arch - It's something refreshing
Offline
I just made some minor correctnes, and it works allright now.
Arch - It's something refreshing
Offline
And yet not solved... I got an Kernel panic when I tried to boot the kernel. I am not very good at this kernel compilation. :?
Here is the kernel config.
Arch - It's something refreshing
Offline
Posting your config may be useful - the exact error message(s) leading up to the kernel panic would be more informative.
If you haven't already done so, you should read this wiki page - I always use that PKGBUILD for my kernels, and I haven't had any problems. You still need to know how to solve kernel panics though - ABS can only do so much.
Offline
Posting your config may be useful - the exact error message(s) leading up to the kernel panic would be more informative.
Well, if you look at the last post, you will find the config there. About the error messages, it says this:
VFS: Cannot open root device "hda1" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
I seems to me, that it don't understand my filesystem (ReiserFS). But that doesn't make any sence, since I haven't touch the filesystem section in the kernel config.
Arch - It's something refreshing
Offline
What I was trying to say was "your config doesn't help very much here - please post the error message". Sorry I wasn't clearer.
That pastebin link isn't working anymore, so I can't check the following theory, but now that I've seen the error messages, I think you have not included the drivers for your disk controller and/or root file system in your kernel i.e. not as modules. Does that help at all?
If you can fix the link, I'll have a closer look.
Offline
One more thing:
I haven't touch the filesystem section in the kernel config.
Which kernel config did you use as your starting point?
Offline
One more thing:
whargoul wrote:I haven't touch the filesystem section in the kernel config.
Which kernel config did you use as your starting point?
I used the one from the newest kernel. Could that really be the problem?
And here you go.
Arch - It's something refreshing
Offline
Oh yeah - that could really be the problem. This brings me back to my old Debian days......
Question for you (although I think I know the answer ) - have you created an initrd image to go with your new custom kernel? Here's what I'm getting at - the current kernel only works if it has an initrd to load the required modules at boot time. Have a look at your config again - reiserfs is a module, all the IDE controllers are modules, for example. So if you're trying to boot a reiser root file system on an IDE disk, you need initrd.
You have two choices - build the required support into your kernel, or create an initrd.
Offline
Ohh, okay. I'll try that. And if I run into any trouble I just yell.
Thanks tomk.
Arch - It's something refreshing
Offline
I'm interested if you get archck built using wiki pkgbuild .....
I did try wiki build but I was trying to add initrd stuff (bad idea!!)
I used ABS pkgbuild to get archck7 built ... seems ok,, although config is old (I'll get round to fixing that!!!)
If you don't mind I'll hang around this thread & maybe I'll be able to help...
Mr Green
Offline
I'm taking the lazy way myself - waiting for iphitus to release the next archck kernel package with initramfs, then shamelessly rippng it off!
Offline
lol ... /me waits. ....
Mr Green
Offline
Allright, I can boot and all that. I just had problems with ethernet cards. But I don't think it will be very hard.
I let you know if I run into any problems.
Arch - It's something refreshing
Offline
I'll update the custom PKGBUILD to work with initrd soon too
Offline
whargoul - glad it worked out for you. It gets easier the more you do it.
Offline
I'll update the custom PKGBUILD to work with initrd soon too
Nice one dibble - I look forward to it.
Offline
Pages: 1