You are not logged in.
ok - first - yup teh build is failing cos the patches are failing...and the reason the patches are failing? Cos you are trying to patch a 2.6.11.4 kernel with a 2.6.11 patch? I think this might be what iph was saying in the other thread - i think that is your prob dude.
Offline
yeah i just saw that reply in the gensplash thread :evil:
man that sucks..
ArchLinux (x86_64) w/ kdemod
Offline
Is it true that using this PKGBUILD, or any other as a matter of fact, I can't build kernels that contain hyphen in the source file name e.g. linux-2.6.12-rc1.tar.bz2
The build fails('error: you cannot use hyphens in pkgver') because of the hyphen I have to use in pkgver field in PKGBUILD.('pkgver=2.6.12-rc1' for linux-2.6.12-ck1 kernel)
I'm sure there must be some workaround, maybe it could be added to the wiki entry, which is great btw. Keep up the good work. 8)
EDIT: I've found a possible solution that is used by TheBashar in this thread: http://bbs.archlinux.org/viewtopic.php? … ver+hyphen
He's modifying pkgname and pkgver from within the build function like this:
pkgname=$pkgname$_patchset$_cfgname
pkgver=$kerver$_ker_extraver
I don't know if the idea can be incorporated into dtw's PKGBUILD, but it's certainly worth a try ;-)
Offline
hey dibblethewrecker, nice job with that pkgbuild. I tryed it today, but it scrwed my system...:P
Indeed it screwed maybe because I've tryed modifying a bit the pkgbuild to personaalised a bit things.
In /boot, i like haviing those:
kernel-<kernel version>-arch-custom-<patch>-c<compilation number>
and same with System.map and config. Kernel version is like 2.6.11.5, "arch" because it could be fc3 or gentoo, "custom" because its not a custom build, "patch" for optionaly patches, "-c1" for the first compilation, "-c2" for the second, etc. I often change the .config so I recompile ofter and I liike keeping thos with the "-c<number>".
I've tryed modifying your pkgbuild to reflect this but it really screwed things, as I've posted here : http://bbs.archlinux.org/viewtopic.php?t=11102
Do you think adjusting the pkgbuild with my request is possible? I wasn't really lucky though. Also, do you have a suggestion for my problem?
Thank you very much.
Offline
Stupid of me, I didn't ran "make modules_install". Everything's working now.
I think I'll stick to manually compile the kernel... More trouble, but easier to manage!
Offline
Stupid of me, I didn't ran "make modules_install". Everything's working now.
I think I'll stick to manually compile the kernel... More trouble, but easier to manage!
the PKGBUILD should run make modules_install for you... you shouldn't need to run it by hand...
Offline
big_gie: from what you have said i think it would be fairly easy for you to use EXTRAVERSION in the Makefile and LOCALVERSION - in your kernel config to replicate the naming scheme you have discussed, the PKGBUILD totally accounts for this and it should work well. you can also add lines to the PKGBUILD to automatically update EXTRAVERSION/LOCALVERSION in your Makefile/config. So, really, the scheme you would like is actually already doable - you just need to know how EXTRA/LOCAL-VERSION work - i imagine your build screwed up cos the module or boot names were totally screwed up! but that's a guess
Offline
.:EDITED:.
removed the 2.6.x.y PKGBUILD cos it doesn't work and i don't want people to get confused!
Offline
big_gie: you can convert the above version to your needs by adding these lines.
This will give you kernel-<kernel version>-arch-custom-<patch>-c<compilation number>
# get EXTRAVERSION from Makefile to create unique /lib/modules/ subdirectories
_kernextra=$(getvar "EXTRAVERSION")
_kernextra=-arch-custom${_kernextra}
Add this at the start of the build () function
# set LOCAVERSION in $startdir/src config
compilation_number=
sed -i "s|LOCALVERSION=.*|LOCALVERSION=-c$compilation_number|g" $startdir/src/config
So, that's just an example of what you could do - it's off my head and UNTESTED - but it should all stilll work great
Offline
hey dibblethewrecker, I'm trying your new pkgbuild. Thanx for adapting it to my will! I think I'll be more carefull next time
I just commented to build and sed's commands of the pkgbuild to see how it reacts...
Thanx for the update!
Offline
Ok, I've changed some things.
There seemed to be some bugs I tryed to correct:
-When you sed'ed LOCALVERSION in .config, you forgot quotes, so it didn't worked.
-The location of the line seding .config should be lower.
-You didn't copy config to src/linux-<version>/.config
-I've made some changed to the $patch managing.
-Something seems wrong with the symbolic links in pkg/lib/<version>/modules. You removed "source" and "build", witch points to the same path, but created only "build" after. The first time I've ran it I've checked but something weird happened: both "build" and "source" where present, and where pointing to absolute path (/home/user/.../src/...). I'm trying a different method.
Here is my pkgbuild:
EDIT: Now avaible here:
http://archpackages.coagulateur.homelin … 2/PKGBUILD
With this, I get a "kernel26115-arch-custom-c1-2.6.11.5-1.pkg.tar.gz" or a "kernel26115-arch-custom-patchname-c1-2.6.11.5-1.pkg.tar.gz" if the kernel is patched.
I'm compiling rigth now to verify the files.
Offline
cool - hope it goes well for you
Offline
I've changed my PKGBUILD a bit. With it, here's what I obtain:
-rw-r--r-- 1 nicolas users 1,1M 2005-03-27 19:26 System.map26115-arch-custom-swsusp2-c1
-rw-r--r-- 1 nicolas users 39K 2005-03-27 19:26 config26115-arch-custom-swsusp2-c1
-rw-r--r-- 1 nicolas users 2,0M 2005-03-27 19:26 kernel26115-arch-custom-swsusp2-c1
build -> $startdir/src/linux-2.6.11.5
[...]
source -> $startdir/src/linux-2.6.11.5
-rw-r--r-- 1 nicolas users 4,8K 2005-03-27 20:04 PKGBUILD
-rw-r--r-- 1 nicolas users 4,5K 2005-03-27 18:38 PKGBUILD.start
-rw-r--r-- 1 nicolas users 38K 2005-03-27 18:39 config
-rw-r--r-- 1 nicolas users 39K 2005-03-27 19:07 config-mar27-19h
-rw-r--r-- 1 nicolas users 329K 2005-03-27 19:26 filelist
-rw-r--r-- 1 nicolas users 332 2005-03-27 18:39 kernel26.install
-rw-r--r-- 1 nicolas users 8,5M 2005-03-27 19:26 kernel26115-arch-custom-swsusp2-c1-2.6.11.5-1.pkg.tar.gz
drwxr-xr-x 5 nicolas users 4,0K 2005-03-27 19:26 pkg
drwxr-xr-x 4 nicolas users 4,0K 2005-03-27 20:04 src
I still have 2 problems.
1) First, I'd like to have "pkg/lib/modules/2.6.11.5-arch-custom-swsusp2-c1" and not "pkg/lib/modules/2.6.11.5-c1/"
Where the modification should be? The path is not explicitly in the PKGBUILD I think; there should be a variable somewhere that is set to "pkg/lib/modules/2.6.11.5-c1/" when calling "make INSTALL_MOD_PATH=$startdir/pkg modules_install". The problem is, its not specified. I'll look more closesly to it.
2) Second, I get problems with the symlinks in pkg/lib/modules/2.6.11.5-c1. Is there something wrong with this line:
cd $startdir/pkg/lib/modules/${_kernrel}
rm -f source build
ln -sf ../../../usr/src/linux-${_kernrel} build
ln -sf ../../../usr/src/linux-${_kernrel} source
Because the links are not good, they are absolute:
lrwxrwxrwx 1 nicolas users 101 2005-03-27 19:25 build -> /home/nicolas/Fichiers/Programmes/ArchLinux/PKGBUILDs/Beta/kernel/2.6.11.5-swsusp2/src/linux-2.6.11.5
lrwxrwxrwx 1 nicolas users 101 2005-03-27 19:25 source -> /home/nicolas/Fichiers/Programmes/ArchLinux/PKGBUILDs/Beta/kernel/2.6.11.5-swsusp2/src/linux-2.6.11.5
and they are pointing to the sources in the $startdir/src and not to the sources in $startdir/pkg/usr/src. It should really be something like:
lrwxrwxrwx 1 nicolas users 101 2005-03-27 19:25 build -> /usr/src/linux-2.6.11.5
lrwxrwxrwx 1 nicolas users 101 2005-03-27 19:25 source -> /usr/src/linux-2.6.11.5
I'll continue to work on this
EDIT:
My PKGBUILD is now avaible on a central place :
http://archpackages.coagulateur.homelin … 2/PKGBUILD
Offline
Well good luck
Please could you remove the posts of your PKGBUILD and just provide links to them if possible? Otherwise I am concerned that people will think you PKGBUILDS are the one that the thread is about and I'll get PMs about them rather than about the one I made - it just makes things a bit confusing that's all!
The reason you module naming thing is going wrong is cos the kernel uses the extraversion and localversion vars to do all the naming itself, we don't try to alter that ourselves normally - you need to sed in your new EXTRAVERSION to the Makefile, as you are already doing with the LOCALVERSION
I'll just add that I was really please I managed to simplify this whole process in my PKGBUILD - i'm impressed to see that you have made it hugely complicated for yourself purely so you can get the exact name you want for everything!
Offline
Thanx dibble, I've found the error. Its now corrected.
Offline
big_gie - i'm sincerly glad you got it sorted out and that you found it useful to adapt the current build - thanks for moving your PKGBUILDS - I'm sure you understand the potential complications they might bring up! However, they do serve as a useful guide to people who want to tweak a PKGBUILD so I am glad you have linked to them
Offline
Yeah yeah of course no need to justify! Having 10 PKGBUILDs on the same page is not a great thing.
I've compiled the kernel using my pkgbuild and wasn't able to boot because of the same errors of "can't locate module". I think I've found the problem. modules and installed in /lib/modules/<kernel version><LOCAL VERSION> but I was using something more like /lib/modules/<kernel version><patch><name><LOCAL VERSION>. So it couldn't find the packages.
I think I should, instead of changing config's LOCALVERSION to "-c1", change it to "-arch-custom-patch-c1"... What do you think of this?
Offline
Finaly, it seems to work.
Instead of changing config's LOCALVERSION to "-c1" for the compilation number, I set it as "-vanilla-custom-c1" and now I get:
-(nicolas@di8500:1)-(10 files:8,8M@2.6.11.5)-(0 jobs)-(16:26)-
-(~/Fichiers/Programmes/ArchLinux/PKGBUILDs/Beta/kernel/2.6.11.5:$)-> ls pkg/boot/
total 3,0M
-rw-r--r-- 1 nicolas users 1,1M 2005-03-28 15:59 System.map-2.6.11.5-vanilla-custom-c1
-rw-r--r-- 1 nicolas users 38K 2005-03-28 15:59 config-2.6.11.5-vanilla-custom-c1
-rw-r--r-- 1 nicolas users 2,0M 2005-03-28 15:59 kernel-2.6.11.5-vanilla-custom-c1
-(nicolas@di8500:1)-(10 files:8,8M@2.6.11.5)-(0 jobs)-(16:26)-
-(~/Fichiers/Programmes/ArchLinux/PKGBUILDs/Beta/kernel/2.6.11.5:$)-> ls pkg/lib/modules/2.6.11.5-vanilla-custom-c1/
total 460K
lrwxrwxrwx 1 nicolas users 41 2005-03-28 15:59 build -> /usr/src/linux-2.6.11.5-vanilla-custom-c1
drwxr-xr-x 10 nicolas users 4,0K 2005-03-28 15:59 kernel
-rw-r--r-- 1 nicolas users 88K 2005-03-28 15:59 modules.alias
-rw-r--r-- 1 nicolas users 69 2005-03-28 15:59 modules.ccwmap
-rw-r--r-- 1 nicolas users 67K 2005-03-28 15:59 modules.dep
-rw-r--r-- 1 nicolas users 517 2005-03-28 15:59 modules.ieee1394map
-rw-r--r-- 1 nicolas users 475 2005-03-28 15:59 modules.inputmap
-rw-r--r-- 1 nicolas users 235 2005-03-28 15:59 modules.isapnpmap
-rw-r--r-- 1 nicolas users 53K 2005-03-28 15:59 modules.pcimap
-rw-r--r-- 1 nicolas users 36K 2005-03-28 15:59 modules.symbols
-rw-r--r-- 1 nicolas users 173K 2005-03-28 15:59 modules.usbmap
lrwxrwxrwx 1 nicolas users 41 2005-03-28 15:59 source -> /usr/src/linux-2.6.11.5-vanilla-custom-c1
-(nicolas@di8500:1)-(10 files:8,8M@2.6.11.5)-(0 jobs)-(16:27)-
-(~/Fichiers/Programmes/ArchLinux/PKGBUILDs/Beta/kernel/2.6.11.5:$)-> ls pkg/usr/src/
total 4,0K
drwxr-xr-x 15 nicolas users 4,0K 2005-03-28 15:59 linux-2.6.11.5-vanilla-custom-c1
-(nicolas@di8500:1)-(10 files:8,8M@2.6.11.5)-(0 jobs)-(16:27)-
-(~/Fichiers/Programmes/ArchLinux/PKGBUILDs/Beta/kernel/2.6.11.5:$)-> uname -r
2.6.11.5-vanilla-custom-c1
-(nicolas@di8500:1)-(10 files:8,8M@2.6.11.5)-(0 jobs)-(16:28)-
-(~/Fichiers/Programmes/ArchLinux/PKGBUILDs/Beta/kernel/2.6.11.5:$)->
wich is exactly what I want
Offline
so basically, what you got there is pretty much the original PKGBUILD but you have added some bits to set LOCALVERSION in your config?
Offline
Yeah kind of
The config's LOCALVERSION now contain a bit more information (CONFIG_LOCALVERSION="-<kernel name>-c<compilation number>" witch looks like "-vanilla-custom-c1"). This give the package's kernel a absolutly unique name, resolving the problems I've went thrue earlier.
Mine doesn't make uses of the "EXTRAVERSION" from the makefile though. From a "2.6.11.5" kernel, EXTRAVERSION is ".5" and that was appended to the the packages like this "kernel26115-arch-custom.5-c1" and I didn't like the position of the ".5"...
The logic behind the one I made is this:
kernel<abrev. version>-<kernel name>-<patch>-<compilation number>-<kernel version>-<package version>.pkg.tar.gz
where
*<abrev version> stand for the kernel version, without dots. This is to give a unique name to different version kernels so it is manageable via pacman.
*<kernel name> stand for a name describing the kernel. For exemple I use "vanilla" for a non-patched kernel from kernel.org
*<patch> stand for the patch name set in the PKGBUILD. For suspend2 patch, I've set it to "swsusp2". You could put whatever you like. Note that if no patch is set to be applyed, this field will not come up in the package name. No extra "-" either.
*<compilation number> stand for the .config's version. I often recompile the kernel with different .config, for exemple, testing how things work by using modules instead of built-in or vice-versa. Because it is the same kernel version and name, installing a package named, for example, "kernel26115-vanilla-2.6.11.5-1.pkg.tar.gz" will "conflict" with a package of the same name but different .config file. The majer problem from this comes from the modules' path. With two packages of the same name, the same /lib/modules/<version> will be use. That's what was causing me trouble in the begining. It could be an overkill, but it could save the life of someone not really knowing what he's doing...:P For example, I had first compiled the kernel accydently with SMP support. My modules where built using that option, too. When I've recompiled the same kernel but with a different .config file, disabling the SMP features, since it was looking in the same folder as the other compilation, none of my modules would load and I wasn't able to boot correctly. Now, putting the <compilation number> in the kernel name, I have a unique /lib/modules path for each compilation.
*<kernel version> stand for the kernel version something like "2.6.11.5". This is only used by pacman to differenciate the packages version.
*<package version> stand for the package release number, also for pacman.
I've also put some command into variables, that way the user only have to check the first lines and adjust it for himself instead of playing around in the file. For example, the patch section contains everything necessary for the patch things:
patchname=swsusp2
patchfile=software-suspend-2.1.8-for-2.6.11
patchextension=.tar.bz2
patchurl="http://www.suspend2.net/downloads/all/$patchfile$patchextension"
patchcommand="$startdir/src/$patchfile/apply $startdir/src/$patchfile/"
Just commenting/erasing those lines will prevent anything from the patching, so this can be used for vanilla kernels.
The config method is also set in variable:
configmethod="gconfig"
And the vmlinuz/System.map/.config names entry for /boot :
boot_kernel="kernel-"
boot_systemmap="System.map-"
boot_config="config-"
Maybe your PKGBUILD was doing the same thing from the begining...:P At least that was a highly educational thing for me What do you think of it? Do you think some things are overkill? Something missing? Should be different from a philosophical point of view? Go on with comments!
The PKGBUILD is avaible here:
http://archpackages.coagulateur.homelin … 5/PKGBUILD
Offline
AH! I never knew the new .y is set in EXTRAVERSION! How stupid is that! No wonder pkgs are not quite right with it! I'll take another look
Offline
AN UPDATE
I screwed the pooch a bit with the new 2.6.x.y kernels, the fact that they have put the .y in the EXTRAVERSION makes my suggested fixes a bit crap as you will still get really annoying ".y" instances in you pkgnames.
the only fix for this is to use my PKGBUILD as normal and sed the EXTRAVERSION out of the Makefile
personally, as far as maintaining this kind of thing is concerned, the new .x.y system has made things really complicated - especially as some people are releases against the .x and some against the .x.y - it just make sthinsg doubly confusing and what with the LOCAL and EXTRA vars you get an exponential increase in headaches!
the world hates me!
Offline
big_gie - i just thought to ask - how can a kernel be both vanilla and custom
i'll just also say, for people joining the thread late, that this PKGBUILD was supposed to provide a mechanism to provide simple and logical names for your kernel builds - however, some people have HUGELY customized the build to provide very specific pkgnames for their exact needs, which is against my original philosophy
Offline
big_gie - i just thought to ask - how can a kernel be both vanilla and custom
Hehehe yeah its kind of confusing
It should really be only "vanilla"...
Offline
the only fix for this is to use my PKGBUILD as normal and sed the EXTRAVERSION out of the Makefile
Until I learn how to do that, I'm dealing with the .y problem by removing this line
_kernextra=$(getvar "EXTRAVERSION")
and changing this line
_kerncust="${_kernextra}${CONFIG_LOCALVERSION}"
to
_kerncust="${CONFIG_LOCALVERSION}"
With the 2.6.11.6 source, and my usual LOCALVERSION, that gives me:
Package name
kernel26116.i5ka.20050329-2.6.11.6-1.pkg.tar.gz
/boot
-rw-r--r-- 1 root root 872K 2005-04-03 21:44 System.map26116.i5ka.20050329
-rw-r--r-- 1 root root 30K 2005-04-03 21:44 kconfig26116.i5ka.20050329
-rw-r--r-- 1 root root 1.7M 2005-04-03 21:44 vmlinuz26116.i5ka.20050329
/lib/modules
2.6.11.6.i5ka.20050329
/usr/src
linux-2.6.11.6.i5ka.20050329
That's OK for me, for the moment anyway.
Offline