The Official HWF Kernel Repo

Discussion in 'Linux, BSD and Other OS's' started by Anti-Trend, Jan 26, 2008.

  1. Anti-Trend

    Anti-Trend Nonconformist Geek Staff Member

    Likes Received:
    118
    Trophy Points:
    63
    HardwareForums.com Custom Kernels

    Hardwareforums.com is now hosting architecturally-optimized Linux kernels! Currently I'm packaging custom kernels for Debian “Lenny”, which should also work with many Debian-derivative distributions of Linux. These kernels are based off of the latest stable source from kernel.org, and will be updated as frequently as my schedule allows. There are some advantages to running a custom Linux kernel, but also some disadvantages which should be taken into account.

    Advantages:

    • Optimized for extremely low-latency desktop usage.
    • Will behave responsively even under excessively heavy resource loads.
    • Perfect for gaming (e.g. Enemy Territory: Quake Wars) and multimedia work (audio, video, etc).
    • Built with CPU-specific optimizations to make the most of modern hardware.
    • Supports multi-CPU architectures and up to 64gb RAM on modern architectures.
    • More current kernels support more hardware and provide bugfixes which may not be present in distro-maintained kernels.
    • The depreciated OSS (Open Sound System) is entirely removed in favor of ALSA (Advanced Linux Sound Architecture) and its reverse-compatibility with OSS.

    Disadvantages:

    Pre-packaged binaries of proprietary video drivers, etc which are built against the vendor-provided kernel will not work; they will need to be built and installed manually.
    • Receiving support from official distributor-specific channels may be hindered by using an unsupported kernel.
    • The vanilla kernel source from kernel.org is newer and therefore not as well-tested as the distro-provided kernel.
    • Only 32-bit builds are provided (with 64-bit optimizations where applicable), since this currently makes the most sense for desktops.
    • This kernel enjoys no official support, nor even the suggestion of any warranty whatsoever. They are to be used strictly at one's own risk, and are supported only on a friendly capacity here at hardwareforums.com

    Downloads:

    ⇒ Should you decide our custom kernels are for you, they can be found here: HWF Custom Kernel Wiki
    If you have any questions, problems or suggestions please feel free to post them here.

    Best regards,
    -AT
     
  2. Anti-Trend

    Anti-Trend Nonconformist Geek Staff Member

    Likes Received:
    118
    Trophy Points:
    63
    About The Kernel Configuration

    The kernel configurations for Debian Lenny on Debian's latest official kernel configurations, with some key modifications by myself. These changes center around architecture-specific optimizations, and pruning out some stuff that doesn't apply in that context. For example, Intel-specific options don't make sense for an AMD Athlon kernel and vise-versa. The timing settings were also changed from the default 250Hz to 1000Hz, and the schedulers set to be aggressively desktop-friendly. This will incur a very slight amount of overhead in the raw amount of potential CPU horsepower, but the payoff is a huge boost in responsiveness when multitasking or placing the system under a heavy CPU workload. This is especially noticeable in games, multimedia, and heavy multitasking environments, so I feel it's well justified for a non-server environment. So fundamentally, the largest differences between the official configs and my own are the CPU-specific optimizations and the scheduler settings. Each respective kernel was also compiled with the highest known-safe CPU optimizations relative to each architecture.


    About The Various CPU Architectures
    • atom -- Best for the Intel ATOM CPU family.
    • centrino -- Built specifically for the "Pentium M" processor, which is essentially a modernized P3. Use this if you have a Pentium M, Centrino, or Celeron-M that's based on a pre-P4 architecture.
    • core2 -- Newer Intel multi-core CPUs, including quad-cores, i7's and recent Xeons.
    • k7 -- Any AMD Athlon, Duron, or 32-bit Sempron CPUs.
    • k8 -- AMD64, 64FX, 64-bit-capable Sempron, Turion or Opteron CPUs.
    • p3 -- Optimized for Katmai, Coppermine, Coppermine-T and Tualatin Pentium 3 processors.
    • p4 -- Any Pentium 4 or P4-based Celeron CPUs. Optimizations for newer P4s such as the Prescott are also included, but not required for this kernel to work on your system.
    • phenom -- Later AMD K10-based CPUs, such as Deneb, Heka, Agena, and Toliman.
    • prescott -- Built specifically for Prescott or later Pentium4 CPU's before the Core2, such as the Pentium-D.
    • x2 – Early multi-core AMD processors such as Manchester, Toledo, Windsor, Brisbane, and Kuma.
    Compiling Other Things With CPU Optimizations

    Now that you've got a shiny new kernel that's been built to take advantage of your CPU's advanced features, you may as well build anything else you build from day to day (video drivers, games, whatever) using those same optimizations. This will give a noticeable boost in speed and responsiveness in some packages, and at worst doesn't hurt performance in others. In 32-bit x86 builds of Debian (or derivatives such as Sidux), you can accomplish this by adding the following lines to your /etc/environment file:
    Code:
    CHOST="i686-pc-linux-gnu"
    CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
    CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
    
    Note that with GCC version 4.1 or higher, using the "-march=native" option will cause GCC to detect your CPU's capabilities at runtime and automatically choose the best optimizations available. If you're using an earlier distro than Lenny, make sure you have GCC 4.1 or newer before using the native flag. Otherwise, you will have to specify your CFLAGS and CXXFLAGS manually based on your CPU hardware. If you have an earlier version of GCC and want to build with optimizations, check out Gentoo's list of safe CFLAGS: Safe Cflags - Gentoo Linux Wiki
     
  3. Big B

    Big B HWF Godfather

    Likes Received:
    145
    Trophy Points:
    63
    Nice move.
     
  4. max12590

    max12590 Masterful Geek

    Likes Received:
    51
    Trophy Points:
    0
    Ok, so, would you recommend that I use this as a secondary operating system to my current Mint installation. As you know I'm new to Linux and am definitely not prepared for building and installing drivers and the like. Would this hinder my ability to install things such as Java support, Flash support, etc?
     
  5. Anti-Trend

    Anti-Trend Nonconformist Geek Staff Member

    Likes Received:
    118
    Trophy Points:
    63
    Java, Flash, etc. are standalone binaries, not kernel modules (e.g. drivers), and so are not affected by changing the kernel. Things like Madwifi, ATI, Nvidia, etc. are built against specific kernel headers, so you'd have to install them manually using the official way rather than the *ubuntu/Mint way. If you're going to be building kernel modules such as those, make sure you have also installed the kernel header package that corresponds with your kernel image. :)
     
  6. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    as a Feisty user i installed a new Gutsy DL to another HDD (obviously keeping my existing Feisty install alone) and Gutsy booted about twice as fast as before with the default / generic kernel, after i selected AT kernel at the boot menu, thankies AT, i owe you a he11 of a lot[ot]please ask your wife to give you a lot more than a big kiss, i'll leave it to her what she actually does[/ot]BTW: BIG thanks for the kernel
     
  7. max12590

    max12590 Masterful Geek

    Likes Received:
    51
    Trophy Points:
    0
    Well, I currently have Vista installed to run DX10 games. Seeing as how neither Flight Simulator X or Lost Planet runs properly on Vista, I think I have a free 40 GB partition.
     
  8. Anti-Trend

    Anti-Trend Nonconformist Geek Staff Member

    Likes Received:
    118
    Trophy Points:
    63
    Just to reiterate, this is a custom kernel, not a custom distro. You don't need 40gb, you just install it into your existing *ubuntu "Gutsy" or Debian "Lenny" operating system, respectively. ...Unless I'm totally misunderstanding and you're just talking about installing Lenny or Gutsy on your spare 40gb partition. :p

    No problem, just want to help everybody get the most out of Linux! You should thank Sniper for letting us host this repo here; he's the one who pays the bills.
     
  9. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    yeah, thankies Sniper

    BTW: just noticed Gutsy is actually DLing @ 60kbp/s instead of my usual speed of 50kbp/s
     
  10. Impotence

    Impotence May the source be with u!

    Likes Received:
    6
    Trophy Points:
    38
    Thanks AT (and sniper for the bandwidth).
     
  11. Matt555

    Matt555 iMod

    Likes Received:
    98
    Trophy Points:
    48
    Good move dude, when I get more time to catch-up with my PC-based life I'm going to be looking into these - you the man!
     
  12. Impotence

    Impotence May the source be with u!

    Likes Received:
    6
    Trophy Points:
    38
    Don't take this the wrong way, i'm trying to look out for your best interests here!

    The GPL does not seem to be very clear on this point... section 3 suggests that you will have to host the source code used to build the binaries or include a "written offer" (with the binaries, so in the same directory?) to provide the source if requested.

    If you don't follow the license to the letter then it is void, and you no longer have a license to use the source code / derived works. Which could really ruin your day if your not to the letter... so i would suggest going further than your obligations to be on the safe side (host the source, linking directly to it might be enough... IANAL!).
     
  13. Anti-Trend

    Anti-Trend Nonconformist Geek Staff Member

    Likes Received:
    118
    Trophy Points:
    63
    The source code isn't modified from that at kernel.org whatsoever. For this reason, it's best that those interested in the raw source pick it up there rather than here. It's arguably a more trustworthy source for the kernel sources then our little site for those who don't trust binary distribution. Even so, the raw kernel source is actually up there. :) I've moved it to a more convenient location so it's right in your face if you're looking for it.

    BTW, since we're on the topic of kernel sources, I've chosen to skip 2.6.24. If you skim kernel trap and other such sites, you'll see a myriad of reports of problems compiling proprietary drivers against it. I had similar experiences myself. Many of the kernel developers have been travelling to a conference or something similar, so it may not be addressed for a while yet. When the kernel works without needing to overhaul too many other things, I'll package it as the next HWF build.
     
  14. max12590

    max12590 Masterful Geek

    Likes Received:
    51
    Trophy Points:
    0
    Ok, so if Mint is a repackage of Ubuntu and you have a kernel for Ubuntu does that mean I can use this kernel in Mint (sorry if I sound like I have no idea what I'm talking about, it's probably because I don't)? Or should install Gutsy in my spare partition to make things easier on myself?
     
  15. Anti-Trend

    Anti-Trend Nonconformist Geek Staff Member

    Likes Received:
    118
    Trophy Points:
    63
    According to this, Mint is currently based off of Gutsy and uses the same kernel. So, you should be able to install the kernel on Mint without problems. Let me know how it goes.
     
  16. Anti-Trend

    Anti-Trend Nonconformist Geek Staff Member

    Likes Received:
    118
    Trophy Points:
    63
    Gutsy users with ATI or NVidia graphics: READ THIS

    Gutsy users with ATI or NVidia graphics: READ THIS

    Since there's been a lot of confusion on the issue of Nvidia and ATI video drivers and our custom kernel, I thought some clarification was necessary. The ATI or NVidia drivers which are automatically installed from Gutsy's 'Restricted' repo will not work with our custom kernel. Since those drivers in the restricted repo are built specifically against Gutsy's default kernel, they won't work with any other kernel but that one. As a result, you'll need to build your video driver modules manually. This is a simple process which yields faster, more stable and more recent video drivers.

    NOTE: Make sure to backup your xorg.conf! Ubuntu may break your xorg.conf, and it's always nice to have a point of reference.


    If you have an ATI card:
    1. Put the following in your /etc/environment file:
      Code:
      CHOST="i686-pc-linux-gnu"
      CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
      CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
      (If you have a Pentium-1 class CPU such as an AMD K6, substitute i586 for i686)
    2. The "build-essential" metapackage is required for the installation process. If it's not installed:
      Code:
      sudo apt-get install build-essential
    3. Be sure to remove any ATI software previously installed via your package manager.
    4. Make sure the kernel header package for your custom kernel is installed in addition to the kernel image package.
    5. Download and install the latest drivers from ATI. You can do this from within your normal desktop environment.

    If you've got an NVidia card:
    1. Put the following in your /etc/environment file:
      Code:
      CHOST="i686-pc-linux-gnu"
      CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
      CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
      (If you have a Pentium-1 class CPU such as an AMD K6, substitute i586 for i686)
    2. Be sure to remove any NVidia software previously installed via your package manager.
    3. Make sure the kernel header package for your custom kernel is installed in addition to the kernel image package.
    4. Follow the directions here: Howto Install NVidia drivers In Debian or Ubuntu
    You've just installed a custom kernel and CPU-optimized video drivers. If you get through it with no issues, congratulations! But if you still have issues after carefully following the above steps, please feel free to post a new thread.
     
  17. sabashuali

    sabashuali Ani Ma'amin

    Likes Received:
    6
    Trophy Points:
    38
    Thanks AT and Sniper!
    I have 'Debian Testing' running on my D600 laptop (Pentium M). Boot is with Lilo.
    When I installed both (not together.... one at a time....) the P4 (thinking that the PM is a castrated, L2 cach enlarged, P4) or the generic image -
    On boot I got the following message:
    "This kernel requires the following features not present on the CPU: 0: 6"

    The boot goes no further.

    Any ideas?
     
  18. Anti-Trend

    Anti-Trend Nonconformist Geek Staff Member

    Likes Received:
    118
    Trophy Points:
    63
    Hey Saba, thanks for bringing this up. The Pentium M is a beefed up P3, so in theory it should have worked with the generic kernel. The first thing I'd do is make dead sure you're not accidentally trying to boot one of the Gutsy kernels, and it's definitely the Lenny one. That said, I've recompiled the generic kernel with less aggressive CPU optimizations and I'll re-upload it shortly. If that still doesn't work for you, I'll go ahead and build a Pentium M specific kernel for you.
     
  19. sabashuali

    sabashuali Ani Ma'amin

    Likes Received:
    6
    Trophy Points:
    38
    Hey AT. Many thanks for responding so quickly! And thanks for the clarification regarding the PM architecture....

    I have but two entries in my Lilo screen (only accessible by pressing 'Esc' during boot) when I have one of your image installed - Linux and LinuxOLD.
    I go with the LinuxOLD to boot properly. I am assuming the first entry is for the newly installed, but not booting, 2.6.23 image.

    I will give it another look though.... will keep you updated. Have a good weekend!

    Saba
     
  20. Anti-Trend

    Anti-Trend Nonconformist Geek Staff Member

    Likes Received:
    118
    Trophy Points:
    63
    When you finish booting to the working kernel, type
    Code:
    uname -a
    to see which kernel you're running. If it's 2.6.23.14-something, it's the custom one. :)
     

Share This Page