kernel help

Discussion in 'Linux, BSD and Other OS's' started by donkey42, May 11, 2009.

  1. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    ok, i've thought i'd try (again) but now i can't even apply a patch

    i do
    Code:
    patch -p1 < patch-2.6.20.1
    and get
    Code:
    even tryed [code]sudo bzcat patch-2.6.20.1.bz2 | patch -p1
    returned
    Code:
    patching file Makefile
    Hunk #1 FAILED at 1.
    1 out of 1 hunk FAILED -- saving rejects to file Makefile.rej
    can't find file to patch at input line 18
    Perhaps you used the wrong -p or --strip option?
    The text leading up to this was:
    --------------------------
    |diff --git a/fs/nfsd/nfs2acl.c b/fs/nfsd/nfs2acl.c
    |index edde5dc..b617428 100644
    |--- a/fs/nfsd/nfs2acl.c
    |+++ b/fs/nfsd/nfs2acl.c
    --------------------------
    File to patch:  Makefile
    patching file Makefile
    Hunk #1 FAILED at 287.
    Hunk #2 FAILED at 329.
    2 out of 2 hunks FAILED -- saving rejects to file Makefile.rej
    obviously i know Makefile.org - prepatched Makefile & Makefile.rej - contains the differences between Makefile & Makfile.org

    i got grx using sgfxi & nvidia-config on my old Geforce2 Ti, gave up on the 6200

    i must be missing something, & yes i have the souces & patch (compressed & uncropressed - worth a try, even though i know it doesn't matter) in /usr/src/linux (ok, a sym link to headers 2.6.26.2)

    please disregard this post, realized the :swear: up

    Edit: knocking off for tonite, sort it tomorrow
     
  2. Anti-Trend

    Anti-Trend Nonconformist Geek

    Likes Received:
    118
    Trophy Points:
    63
    I'd love to help, but first a few questions for you:
    1. Why are you patching an old kernel?
    2. What is the patch you're trying to apply?
    3. What are you ultimately trying to accomplish?
     
  3. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    i realized my mistake
    an old 1 :doh:
    i was trying to ultimately compile kernel
     
  4. Anti-Trend

    Anti-Trend Nonconformist Geek

    Likes Received:
    118
    Trophy Points:
    63
    Yeah, hehe, I see now. Here's more or less how I do it:

    1. Download the latest stable from kernel.org
    2. Untar it
    3. Grab the latest kernel config for my distro (Debian)
    4. gunzip the config into the kernel source dir, rename to .config
    5. 'make menuconfig'
    6. tweak to my heart's content
    7. build architecture-specific kernel (here are my build scripts)
    8. 'dpkg -i' the new kernel & header deb files
    9. reboot
    10. enjoy!
     
  5. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    thankies, was getting myself in a bit of a state, cos i wanna roll my own, but every time i try i fail miserably & it's p1ssing me off, big time

    again, thanks AT
     
  6. tuxified

    tuxified Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    I was wondering, have you made an initrd image out of the new compiled modules ? Because most of the time, you won't be able to boot correctly a new kernel unless the new accompanying LKMs were properly incorporated within the initrd image. These bootstrap modules, basically contain drivers for your hard drive, file systems and some other mandatory components.
     
  7. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    no, not yet, i'm just reading stuff / filling in some of the gaps that i usually skip[ot]i usually just say B0LL0CKS to it and go forward using my intuition, but not this time[/ot]
     
  8. sabashuali

    sabashuali Ani Ma'amin

    Likes Received:
    6
    Trophy Points:
    38
    Hehe, Donkey on the edge.... well welcome to the club...
    I tried this malarky once or twice and stopped as I was getting very frustrated. I tried to follow a few tutorrials from a number of places but in the end found it too time consuming. Saying this, I never saw instructions such as AT listed. Perhaps I should have another go? I think it is a nice goal to put under your belt... your very own kernel....

    AT - do you still maintain the HWF kernels? Also, where would I find a script for Pentium M (not on the list in your link)?
     
  9. Anti-Trend

    Anti-Trend Nonconformist Geek

    Likes Received:
    118
    Trophy Points:
    63
    I haven't really had time to build kernels, since I'm a full time sysadmin for a tech company, which keeps me pretty busy... not to mention a husband and father. :) That said, I may get back into it once I have the time and capital to build myself a decent quad-core so I can get more builds out in a shorter time frame.

    As for the build scripts, you could use P3. The P3 and M are pretty much the same in terms of optimizations. Or just change the gcc cflags around so that they call M-specific flags explicitly.
     
  10. tuxified

    tuxified Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    Yeah, running on top of your self compiled peace of code is just exciting, might seem to be time demanding, frustrating at the begining, but it's worth the effort, and as they said : once you got it, you won it ;)

    Once you get a working .config file, you're almost done with it (at least for your current machine) And whenever there are new releases available ... you just modify some specific options.

    Note that some times generic kernel that come out with most distros would leave your compiled kernel in the dust. Speaking of which, compiling a new kernel doesnt always mean getting all the power off of your computer :p but need just more practice.

    The advantages behind a home compiled kernel are tremendous, For example optimize for one's specific architecture, REmove the initrd and gently embed those start up modules directly in the kernel, Compile for desktop computer (rapid acknowlegement) disable automatic modules loading (save some memory), Bug tracking ...


    There is another usefull approach to consider while dealing with this issue: Virtualization, for example
    HTML:
    www.qemu.org
    which is actually a hella speedy emulator, based on Dynamic translation, got some good features that enable you to boot a Linux kernel, even with Initrd Images.. It's often considered a practical idea in order to test candidate releases, or other available kernels let's say GNU HURD, BSD flavours, Minix.. that actually might lack to your machine specific drivers, hence save you the whole hassle of rebooting the computer each time a kernel is being ready.

    Go ahead and good luck :)
     
  11. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    thankies Saba, it's scary to think of all the crap HWF has taught me (a big thankies to all HWF members)
    :agree:, i think AT has described it so even a plank like me can understand
    true

    just thinking; about 3 years ago i was a complete noob & now theres so much crap in my head, i nearly have to break up the arguments i have with myself & wear ear plugs at night to stop any crap from escaping from my ears
    tell me about it, i've attempted kernel compilation many times (as AT knows) but i'm determined to sort it

    i am reading as i go so i understand exactly what i'm doing (for a change)
     
  12. tuxified

    tuxified Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    No probs bro, you can PM me whenever you need to;)

    There are a bunch of HOWTO's out there dealing with the topic, but only few of them are quiet pragmatic and go straight ahead to the target.

    BTW, you gotta first get a look at your hardware configuration.. in order to be more specific about what to include and what to exlude in the kernel.

    there are many tools can help you get informations outta your computer component, as far as I can see,
    Code:
    lshw
    is a good tool to begin with.

    keep in touch
     
  13. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    cheers :beer: that means a lot

    you can say that again[ot]not literally[/ot]

    figures, like amount grx mem in kb :doh:

    cheers, hardware lister looks :good: from here

    i hope i don't need anymore help (no offense) assuming i sort it soon & you don't live too far away from me, you'll no doubt hear when i get kernel running
     
  14. Anti-Trend

    Anti-Trend Nonconformist Geek

    Likes Received:
    118
    Trophy Points:
    63
    Hey, just an update. I've got parts for a budget quad core box on the way. Guess that means I'll have the hardware to start building kernels again if anybody still wants 'em. :)
     
  15. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    well, i for one would be eternally grateful, cos i keep trying to roll my own and fail spectacularly every time

    the last attempt resulted in a dead Debi, it did boot eventually, but hardly anything worked including net & mount

    so, i would very much love an AT rolled kernel

    :pray: thankies :pray: (in advance)
     
  16. sabashuali

    sabashuali Ani Ma'amin

    Likes Received:
    6
    Trophy Points:
    38
    Oh, yes please - Pentium M.

    Although in the past the HWF pentium M image did not work for me, I am always hopeful. I have two hypothetical questions here:
    • What benefit will I see if I use my current Sidux latest kernel's (2.6.29-3.slh.1-sidux) 'config' file and simply change the CPU architecture and then build a kernel from the latest offering from Kernel.org?
    • Am I better off just staying with Sidux's own kernel without trying to make any changes?

    Does this makes any sense?
     
  17. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    i'll try to aswer them
    Sidux is based on "Sid" release of Debian, (a Lenny based version won't appear until about September) so i'm unsure if a "Lenny" kernel would work at all
    if you only want to do it so you can say you have, then go ahead

    but you would (i think) be wasting your time, as the default kernel is more than adiquate for 99% of people
     
  18. Anti-Trend

    Anti-Trend Nonconformist Geek

    Likes Received:
    118
    Trophy Points:
    63
    A bit, but the single largest impact for a desktop-oriented system will be changes to the scheduler and timer resolution.

    If you want the package manager to handle the kernel, yes. If you'd prefer a more responsive/current build, roll your own.
     
  19. Anti-Trend

    Anti-Trend Nonconformist Geek

    Likes Received:
    118
    Trophy Points:
    63
    FYI, the kernel repo is back with the latest kernel builds... and yes Saba, there are Pentium-M (Centrino) builds. :)

    HWF Custom Kernel Wiki

    Regards,
    -AT
     
  20. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    typical, the story of my life, i roll a kernel last night & now i can't find .debs, think i need to read more

    Anyway thankies AT

    BTW: rolled in ~/kernel/
     

Share This Page