You are not logged in.

#1 2009-01-27 08:19:31

methuselah
Member
Registered: 2007-10-02
Posts: 570

kernel26parallel for the AUR

I just made this AUR package: http://aur.archlinux.org/packages.php?ID=23467


It's just an easy way to build a parallel kernel using the "make menuconfig" command.

Offline

#2 2009-01-27 09:38:43

VirtualRider
Member
Registered: 2008-08-20
Posts: 134

Re: kernel26parallel for the AUR

Hi,

sounds very interesting to me - but what does it parallize/optimize?

Offline

#3 2009-01-27 18:01:26

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: kernel26parallel for the AUR

VirtualRider wrote:

Hi,

sounds very interesting to me - but what does it parallize/optimize?

There are no optimizations. That is for you to do yourself when it runs the "make menuconfig" command. It should be the exact same as the stock -ARCH kernel until you customize it yourself.


Parallel just mean that it will be built with it's own files and directories without overwriting any default ones:

/lib/modules/2.6.28-ARCHparallel
/usr/src/linux-2.6.28-ARCHparallel
/boot/linuz26ARCHparallel
/boot/System.map26parallel
kernel26parallel.img
kernel26parallel-fallback.img
/etc/mkinitcpio.d/kernel26parallel.kver
/etc/mkinitcpio.d/kernel26parallel.preset


.... so all you have to do is properly add it your "/boot/grub/menu.lst" to have a new kernel to use without ruining your default kernel.

Last edited by methuselah (2009-01-27 18:06:57)

Offline

#4 2009-01-27 18:10:37

VirtualRider
Member
Registered: 2008-08-20
Posts: 134

Re: kernel26parallel for the AUR

Oh it's a PKGBUILD that makes a 2nd kernel - not a special multithread-kernel...

Thanks for enlighting me, well at least it's still interesting tongue

Offline

#5 2009-01-27 18:19:18

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: kernel26parallel for the AUR

VirtualRider wrote:

Oh it's a PKGBUILD that makes a 2nd kernel - not a special multithread-kernel...

Thanks for enlighting me, well at least it's still interesting tongue

It's a modified PKGBUILD to use the new name and the "make menuconfig" command, a modified .preset file, .install file, config/config.x86_64 file, and a modified "-ARCH patch" all using the name "-ARCHparallel" and "26parallel".


I made it real simple for anybody that wants to build a second kernel, all you have to do is download it and run "makepkg" to build it.

Last edited by methuselah (2009-01-27 18:21:03)

Offline

#6 2009-01-27 18:57:42

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: kernel26parallel for the AUR

Sounds very similar to this: http://bbs.archlinux.org/viewtopic.php?id=37579

I've not tried either but I welcome both as they should make custom kernels easier to deal with.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#7 2009-01-27 20:11:48

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: kernel26parallel for the AUR

rson451 wrote:

Sounds very similar to this: http://bbs.archlinux.org/viewtopic.php?id=37579

I've not tried either but I welcome both as they should make custom kernels easier to deal with.

If you notice I was the second person to post on that thread.... I might not of explained myself that well in that post, but instead of making a script all I had to do was change a couple of things....



The way I do it can use any Linux patch like the the "-mm" or the "-zen" patch..... or my modified "-ARCHparallel" patch.... it just takes a bit of editing.



I haven't tried his script..... this is just something that has worked for me over the last 5 months and I figured I would share..... since there have been no errors for me doing it this way for the last 5 months.



After re-reading his post, I would say that his way is way more complex scripting..... where as mine is just a couple of edits that achieve the desired effect..... an -ARCH kernel with a new name that doesn't overwrite anything in the old one.


..... all that needs to be done is the "makepkg" command and an addition into the /boot/grub/menu.lst file.

Last edited by methuselah (2009-01-27 20:18:16)

Offline

#8 2009-01-27 20:24:26

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: kernel26parallel for the AUR

Of course I didn't notice. smile


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#9 2009-01-28 15:27:56

LeoSolaris
Member
From: South Carolina
Registered: 2008-03-30
Posts: 354

Re: kernel26parallel for the AUR

Cool!

I was starting to think about building my own kernel just to test out, and tweak to death.

I recently ran across "Tweaking for a faster boot time" in the wiki, and noticed that the guy is using the same laptop I am, (woohoo! I'm in a minority of a minority of a minority! to quote another part of the wiki.) so it got me off center and tweaking my boot time.

I figure this would be a great addition to that effort!

Thank you for making kernel customizing so very simple! (comparatively)

By the way, does this work with yaourt? Should I stop it at the edit spots to make my changes or will it stop automatically?


I keep getting distracted from my webserver project...

huh? oooh...  shiny!

Offline

#10 2009-01-28 15:53:47

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: kernel26parallel for the AUR

LeoSolaris wrote:

Cool!

I was starting to think about building my own kernel just to test out, and tweak to death.

I recently ran across "Tweaking for a faster boot time" in the wiki, and noticed that the guy is using the same laptop I am, (woohoo! I'm in a minority of a minority of a minority! to quote another part of the wiki.) so it got me off center and tweaking my boot time.

I figure this would be a great addition to that effort!

Thank you for making kernel customizing so very simple! (comparatively)

By the way, does this work with yaourt? Should I stop it at the edit spots to make my changes or will it stop automatically?

Sorry, I have never used a frontend to pacman. I'm not sure how yaourt handles the "make menuconfig" ncurses-based configuration menu.

Offline

#11 2009-01-28 18:45:38

LeoSolaris
Member
From: South Carolina
Registered: 2008-03-30
Posts: 354

Re: kernel26parallel for the AUR

Alright, then I will just do it by hand rather than risk the potential screw up.

Thanks!


I keep getting distracted from my webserver project...

huh? oooh...  shiny!

Offline

#12 2009-02-05 04:22:17

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: kernel26parallel for the AUR

methuselah wrote:

After re-reading his post, I would say that his way is way more complex scripting..... where as mine is just a couple of edits that achieve the desired effect..... an -ARCH kernel with a new name that doesn't overwrite anything in the old one.

Wel it is not that much scripting.

My suggestion was to include the possibility to build a custom kernel, installable side-by-side with Arch's kernel, from Arch's kernel26 PKGBUILD.

The advantage of this is that, if it is accepted by the devs, would allow anybody to build a kernel based on dev's long experience of kernel packaging but with there own modifications.

For example, you want to try a patch for your hardware, but don't know nothing about kernels. Then you would just change the "pkgname" to something like "pkgname=kernel26-myownkernel", just add your patching command at the right place, and then makepkg.

I do this for 3 machines of mine. One desktop, one laptop powerhouse, and for my EeePC netbook.

Offline

#13 2009-02-10 09:37:25

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: kernel26parallel for the AUR

I like big_gie's approach and I really hope it gets implemented. Untill then I think I'll try methuselah's kernel26parallel. It looks like pretty much the same as the way I've been doing it with all the name changing. Actually it's not so bad converting the stock kernel pkgbuild and files after youv'e done it a few times. Takes me about 10 mins minus build time.


-- archlinux 是一个极好的 linux

Offline

#14 2009-02-11 09:50:03

sultanoswing
Member
Registered: 2008-07-23
Posts: 317

Re: kernel26parallel for the AUR

methuselah - thanks for (adopting) this fantastic package!

I messed about for three days compiling from source and trying to install 'the traditional way' (have compiled and installed custom kerenels in Ubuntu), then trying the ABS and various scripts from the wiki - none of which worked for me. All these methods gave various compile errors, or due to my inadequate fiddling renaming in the scripts, I couldn't build the ramdisk or it would boot and be unable to find the root drive etc. etc.).

As a last resort, I tried your kernel26parallel and it worked first time with no error messages on compile or install (including the famous "/lib/firmware already exists" one). All files appeared in /boot as expected. A simple GRUB edit and boom - running the new kernel.

I still couldn't get the nvidia package to install via the wiki instructions ("unable to determine the target kernel version") - /usr/src/linux-2.6.28-ARCHparallel/include/asm only contains the file 'asm-offsets.h'. So I resorted to downloading the driver from NVidia's site and installing from the shell, which worked fine.

The only thing I had to manually edit was the PKGBUILD file, uncommenting the line '#make menuconfig' so that I could customise the kernel.

Last edited by sultanoswing (2009-02-11 15:45:25)


Arch on: ASUS Pro-PRIME x470, AMD 5800X3D, AMD 6800XT, 32GB, | ThinkPad X1 | ASUS ux303ua | Surface Laptop 2 | Minisforum UM780

Offline

#15 2009-02-11 20:34:08

kludge
Member
Registered: 2008-08-03
Posts: 294

Re: kernel26parallel for the AUR

hey y'all, i'm now mainting the PKGBUILD in the aur, at least until methuselah asks for it back.  at the very least, i'll be actively working with this PKGBUILD for the foreseeable future as i need it for my kernel.  (grumble, mesa and kernel drm incompatibilities, grumble, mach64 video hardware, grumble...)  i'm subscribed to this thread, but please do use the comments on the AUR to report bugs or submit patches.

i'm also actively working on a script the likes of which has been talked about above.  it will use this package as a template to create an infinite series of persistent package builds for custom, parallel kernels... essentially a "tagging" system for custom kernels.  you'll feed it a new LOCALVERSION or LOCALVERSION suffix, configure the kernel, and--hey presto!--you'll have a PKGBUILD for your custom kernel that you can maintain with version bumps from there on out.  it's tentatively called "PABST: PABST is an Arch-kernel Building System with Tagging."  i've got most of the core logic down, and will make a full-on announcement when it's ready to share.


[23:00:16]    dr_kludge | i want to invent an olfactory human-computer interface, integrate it into the web standards, then produce my own forked browser.
[23:00:32]    dr_kludge | can you guess what i'd call it?
[23:01:16]    dr_kludge | nosilla.
[23:01:32]    dr_kludge | i really should be going to bed.  i'm giggling madly about that.

Offline

#16 2009-02-11 20:42:24

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: kernel26parallel for the AUR

@kludge
Have you taken a look at the bug report http://bugs.archlinux.org/task/12384 ?

Offline

#17 2009-02-11 22:13:59

kludge
Member
Registered: 2008-08-03
Posts: 294

Re: kernel26parallel for the AUR

big_gie wrote:

Have you taken a look at the bug report http://bugs.archlinux.org/task/12384 ?

i have, though not *that* closely because i've been using this PGKBUILD.  it's definitely on my mind to make PABST general enough to eventually work with *any* kernel PGKBUILD (maybe even any PKGBUILD *period).  for the time being, though, i'm concentrating on writing it against this AUR PKGBUILD since--as the maintainer--i can change both to suit one another if i need to.

even with the changes to the ABS PKGBUILD, PABST will be useful because it will generate a new PKGBUILD with the user's config file and patchset(s) (this is my next big challenge).  that way, the user doesn't have to reconfigure if they only need to bump the package version.  it will also allow you to easily create "child" kernels from your existing custom kernels.  an example use-case, from my own situation:

[user@host]$ abs && cp -Rv /var/abs/core/kernel26 ~/abs/ && cd ~/abs/kernel26
<snip />
[user@host kernel26]pabst --suffix "noDrm" --append --config-method "menu"
creating new PKGBUILD directory...  /home/user/abs/kernel26-noDrm
creating new PKGBUILD...                pkgname="kernel26-noDRM"
creating modified local sources...
  config... LOCALVERSION set to "-ARCH-noDrm"
  config.x86_64... LOCALVERSION set to "-ARCH-noDRM"
  kernel26-noDRM.preset
  kernel26-noDRM.install
  patch-2.6.28.4-1-ARCH-noDRM
downloading sources... [DONE]
unpacking sources...    [DONE]
patching sources...       [DONE]
configuring with 'make menuconfig'...
<snip />
writing new config...     [DONE]
cleaning up (removing src/)... [DONE]
[user@host kernel26-noDRM]$

(nb: this is simulated output)

and i have a "parallelized" PKGBUILD for my new custom kernel.  then if i wanted to add a patchset to kernel26-noDrm, or enable some kernel debugging and have *that* kernel installed in parallel (so i only used it when i wanted to futz around with debugging, or test the new patches), i'd run pabst again in ~/abs/kernel26-noDrm, and so on.

the ultimate goal is automate a lot of the manual steps you describe in the feature request.

also, the kernel26parallel 2.6.28.4-1 PKGBUILD includes:

  # remove firmwares already installed
  if [ -d /lib/firmware ]; then
    for fw in $(find /lib/firmware/ -type f); do
      rm ${pkgdir}/${fw}
    done;
  fi

which pretty cleanly deals with firmware collisions, and a slightly improved version of that logic will be in pkgrel 2 when i get there.

Last edited by kludge (2009-02-12 00:39:08)


[23:00:16]    dr_kludge | i want to invent an olfactory human-computer interface, integrate it into the web standards, then produce my own forked browser.
[23:00:32]    dr_kludge | can you guess what i'd call it?
[23:01:16]    dr_kludge | nosilla.
[23:01:32]    dr_kludge | i really should be going to bed.  i'm giggling madly about that.

Offline

#18 2009-02-16 15:14:05

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: kernel26parallel for the AUR

kludge wrote:

an example use-case, from my own situation:

[user@host]$ abs && cp -Rv /var/abs/core/kernel26 ~/abs/ && cd ~/abs/kernel26
<snip />
[user@host kernel26]pabst --suffix "noDrm" --append --config-method "menu"
creating new PKGBUILD directory...  /home/user/abs/kernel26-noDrm
creating new PKGBUILD...                pkgname="kernel26-noDRM"
creating modified local sources...
  config... LOCALVERSION set to "-ARCH-noDrm"
  config.x86_64... LOCALVERSION set to "-ARCH-noDRM"
  kernel26-noDRM.preset
  kernel26-noDRM.install
  patch-2.6.28.4-1-ARCH-noDRM
downloading sources... [DONE]
unpacking sources...    [DONE]
patching sources...       [DONE]
configuring with 'make menuconfig'...
<snip />
writing new config...     [DONE]
cleaning up (removing src/)... [DONE]
[user@host kernel26-noDRM]$

(nb: this is simulated output)

That seems really complicated... Good luck wink

kludge wrote:

and i have a "parallelized" PKGBUILD for my new custom kernel.  then if i wanted to add a patchset to kernel26-noDrm, or enable some kernel debugging and have *that* kernel installed in parallel (so i only used it when i wanted to futz around with debugging, or test the new patches), i'd run pabst again in ~/abs/kernel26-noDrm, and so on.

Well.... thats the goal of the patch I propose smile You want to update the kernel? Just bump pkgver/pkgrel and makepkg. If you want to try something, just add something to pkgname, like pkgname=kernel26-custom-second, add the patch/config and makepkg.

kludge wrote:

also, the kernel26parallel 2.6.28.4-1 PKGBUILD includes:

  # remove firmwares already installed
  if [ -d /lib/firmware ]; then
    for fw in $(find /lib/firmware/ -type f); do
      rm ${pkgdir}/${fw}
    done;
  fi

which pretty cleanly deals with firmware collisions, and a slightly improved version of that logic will be in pkgrel 2 when i get there.

That's a good idea. But it can lead to unpredictable behaviour... You don't really know if you'll have the firmwares or not. But then for a custom kernel its fine... smile Just make sure it does not remove a firmware you need! For example if you have the stock kernel. Firmwares will be there. So the parallel kernel wont have the firmwares.  But if you remove the stock kernel, you loose all the firmwares because the parallel kernel does not provide them.

Offline

#19 2009-02-17 11:25:20

sultanoswing
Member
Registered: 2008-07-23
Posts: 317

Re: kernel26parallel for the AUR

Hurm. The latest version (2.6.28-5.1) is building kernal26.img and kernel26-fallback instead of kernal26parallel and kernel26parallel-fallback.

The only mods to the tarball files I've made are to uncomment "make menuconfig" and comment out "# yes "" | make config".


Arch on: ASUS Pro-PRIME x470, AMD 5800X3D, AMD 6800XT, 32GB, | ThinkPad X1 | ASUS ux303ua | Surface Laptop 2 | Minisforum UM780

Offline

#20 2009-02-17 17:38:11

kludge
Member
Registered: 2008-08-03
Posts: 294

Re: kernel26parallel for the AUR

fixed.  not sure where that came from.

btw, would you mind posting bugs, etc to on the comment age on the aur instead of here?  thanks.


[23:00:16]    dr_kludge | i want to invent an olfactory human-computer interface, integrate it into the web standards, then produce my own forked browser.
[23:00:32]    dr_kludge | can you guess what i'd call it?
[23:01:16]    dr_kludge | nosilla.
[23:01:32]    dr_kludge | i really should be going to bed.  i'm giggling madly about that.

Offline

#21 2009-02-19 11:58:37

sultanoswing
Member
Registered: 2008-07-23
Posts: 317

Re: kernel26parallel for the AUR

kludge wrote:

fixed.  not sure where that came from.

btw, would you mind posting bugs, etc to on the comment age on the aur instead of here?  thanks.

Sure thing & thanks for the fix smile


Arch on: ASUS Pro-PRIME x470, AMD 5800X3D, AMD 6800XT, 32GB, | ThinkPad X1 | ASUS ux303ua | Surface Laptop 2 | Minisforum UM780

Offline

#22 2009-03-08 20:45:00

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: kernel26parallel for the AUR

I just wanted to say that the stock pkgbuild has been modified to address the bug @ http://bugs.archlinux.org/task/12384 A signoff request for a new kernel has been posted by tobias:

Tobias Powalowski wrote:

Hi guys, new kernel adresses the following things:
- changes for better customizing the default kernel included
http://bugs.archlinux.org/task/12384
--> firmware needed to be split off the package.
       It is now called kernel26-firmware
[...]

This is great news!  It means anybody will be able to compile a custom kernel easily! This kernel is actually in testing.

I installed the stock kernel, I'll reboot in a couple of hours. I'll try to compile the stock -ARCH kernel, and a -custom one. Please test also! big_smile

Offline

#23 2009-04-11 01:18:57

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: kernel26parallel for the AUR

Just finished rebuilding my custom kernel using the new 2.6.29.1-3 kernel pkgbuild in core. The option tp build under a new name worked great.  Although I didn't have time to install this kernel yet. It did build ok with no errors. The only edits I had to make, other than the name change in pkgbuild, and customizing the config, were to kernel26.preset, so it generates default and fallback img's under the custom name. I'll install tonight and hopefully all will be good. : )


-- archlinux 是一个极好的 linux

Offline

#24 2009-04-11 04:07:08

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: kernel26parallel for the AUR

Did you copy the PKGBUILD only? Because the kernel26.preset is supposed to already have been modified to follow the pkgname. You should be able to copy everything from /var/abs/core/kernel26 somewhere else and edit only the pkgbuild. If not, then it is a bug.

Offline

#25 2009-04-11 11:56:18

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: kernel26parallel for the AUR

You're right. All that's needed is to edit the name in the pkgbuild. I did a rebuild with a custom config and didn't need to edit anything else. This is so much easier than before!


-- archlinux 是一个极好的 linux

Offline

Board footer

Powered by FluxBB