How to update or prepare a particular kernel for my distro?

Guides, tutorials & docs
Locked
User avatar
NicCo
Amministratore
Amministratore
Posts: 4765
Joined: 6 December 2007, 19:54

How to update or prepare a particular kernel for my distro?

Post by NicCo »

Situation updated to Mar 18 2013:
currently this GUIDE is only a Draft and Work in progress...
This Guide aims to be a complete Tutorial about:
  1. What is a kernel and why is important updating it
  2. Features available in MIB kernels: nrj and nrjQL
  3. How to choose a kernel flavour for our purposes
  4. How is organized and to update regularly a kernel
  5. How to update the needed drivers for new kernels
  6. How to delete all old and unused kernel versions
  7. How to prepare a kernel by making own rebuild
  8. Advanced: How to ad some specific patch I need
  1. What is a kernel and why is important updating it
http://en.wikipedia.org/wiki/Kernel_(computing)
In computing, the kernel is the main component of most computer operating systems; it is a bridge between applications and the actual data processing done at the hardware level. The kernel's responsibilities include managing the system's resources (the communication between hardware and software components).[1] Usually, as a basic component of an operating system, a kernel can provide the lowest-level abstraction layer for the resources (especially processors and I/O devices) that application software must control to perform its function. It typically makes these facilities available to application processes through inter-process communication mechanisms and system calls.

Operating system tasks are done differently by different kernels, depending on their design and implementation. While monolithic kernels execute all the operating system code in the same address space to increase the performance of the system, microkernels run most of the operating system services in user space as servers, aiming to improve maintainability and modularity of the operating system.[2] A range of possibilities exists between these two extremes.
When we call a Linux distribution simply Linux, we are making a mistake... we should use the term: Gnu/Linux
where GNU project are all the free programs, while the Linux represents the main and inner part of the core

so we should not say "I'm using a Linux DIstro" but rather "I'm using a GNU/Linux Distro"

Each new kernels series contains new drivers: new upated versions of old drivers, new drivers of new hardware devices:
we can generally say that a new hardware, for example one PC, works fine or better with a new and recent kernel series,
while with old hardware we can use properly old kernel series, but often a new kernel works better also for old hardware.

Within Linux there are a very lot number of included drivers, but for some of them is different, they stay out of the kernel
for example, all the video drivers
there are two different kind of video drivers:
a> xorg free and opensource drivers, for example VESA, Intel, SIS, VIA, Matrox, ecc...
b> closed source and proprietary drivers , for example ATI, NVidia

with the xorg free driver, there are never problems when you want to update a kernel from a minor to a major series, example from 3.7 to 3.8
with proprietary drivers, we need to inform about, because many time the ABI compatibiliy can change and we need to satisfate new versions...
ImageImageImageImageImageImage
ImageImageImageImageImageImageImageImageImage


Kernel Farm with drivers for Mandriva Linux and ROSA viewtopic.php?f=38&t=3384

From a discussion in Mandriva Forum, i'm forwarding here such interesting argument
http://forum.mandriva.com/en/viewtopic. ... 25#p860272
trencan wrote:How do I rebuild kernel from srpms? Are there any instructions how to do it?


In ABF we are storing kernels organized in different folders per branch number,
so. for example, we have one folder for all the kernel versions of 3.0.xx serie...
For all the Kernel LTS versions, we are preparing also the Kernel-RT flavour

All versions prepared to install and work starting from MDV 2010 & 2011 upto ROSA 2012LTS & 2012.1
starting from Kernel 3.8, srpms can be rebuilt also for cooker developments

IMPORTANT CONSIDERATION (taken by a user comment I've found in the mandriva international forum):
Nym wrote:Kernels install separately, they don't overwrite one another. A kernel upgrade does change the default kernel, but the old one will still be on the list at the boot splash, you'd use the arrow keys to select the older one.
So it's not a system killer to try an upgraded kernel. If it doesn't work, select and older one, and remove the newer. I mention this because you may want to try one of the 3.x kernels packaged by MIB. I'm using MIB kernels on a couple laptops because wifi didn't work with the stock kernel. MIB fixed the problems.
The group folders are organized like repositories, so you could also add them using the 'urpmi.addmedia' commands
So, if you feel good, for example, with kernel 3.2 branch, you can leave this repository enabled to receive updates...

Here are the paths of different kernels for MDV2011, RM2012, ROSA2012.1
kernels 3.0.xx >>> http://abf.rosalinux.ru/downloads/kerne ... epository/
kernels 3.1.xx >>> http://abf.rosalinux.ru/downloads/kerne ... epository/
kernels 3.2.xx >>> http://abf.rosalinux.ru/downloads/kerne ... epository/
kernels 3.3.xx >>> http://abf.rosalinux.ru/downloads/kerne ... epository/
kernels 3.4.xx >>> http://abf.rosalinux.ru/downloads/kerne ... epository/
kernels 3.5.xx >>> http://abf.rosalinux.ru/downloads/kerne ... epository/
kernels 3.6.xx >>> http://abf.rosalinux.ru/downloads/kerne ... epository/
kernels 3.7.xx >>> http://abf.rosalinux.ru/downloads/kerne ... epository/
kernels 3.8.xx >>> http://abf.rosalinux.ru/downloads/kerne ... epository/

Microcode firmwares for cpu AMD / INTEL
viewtopic.php?f=38&t=3424


If you want to have the most recent kernel, now you can add Kernel 3.8 repository

below, some examples:

urpmi.addmedia Kernel_3.8 http://abf.rosalinux.ru/downloads/kerne ... epository/

to add Kernel 3.8 repository for ROSA Marathon x86_64

Code: Select all

urpmi.addmedia Kernel_3.8 http://abf.rosalinux.ru/downloads/rosa2012lts/repository/x86_64/main/release/
to add Kernel 3.8 repository for ROSA Marathon i586

Code: Select all

urpmi.addmedia Kernel_3.8 http://abf.rosalinux.ru/downloads/rosa2012lts/repository/i586/main/release/



to add Kernel 3.8 repository for ROSA Fresh x86_64

Code: Select all

urpmi.addmedia Kernel_3.8 http://abf.rosalinux.ru/downloads/rosa2012.1/repository/x86_64/main/release/
to add Kernel 3.8 repository for ROSA Fresh i586

Code: Select all

urpmi.addmedia Kernel_3.8 http://abf.rosalinux.ru/downloads/rosa2012.1/repository/i586/main/release/


to add Kernel 3.8 repository for Cooker x86_64

Code: Select all

urpmi.addmedia Kernel_3.8 http://abf.rosalinux.ru/downloads/cooker/repository/x86_64/main/release/
to add Kernel 3.8 repository for Cooker i586

Code: Select all

urpmi.addmedia Kernel_3.8 http://abf.rosalinux.ru/downloads/cooker/repository/i586/main/release/




http://forum.mandriva.com/en/viewtopic. ... 25#p860272
trencan wrote:How do I rebuild kernel from srpms? Are there any instructions how to do it?
[/quote]

You must have the necessary ambient to rebuild, it should be:

Code: Select all

urpmi rpmrebuild
Affer having installed the suggested rpms, you can rebuild all

and so

1>download the SRPMS
for example, all SRPMS about kernel 3.6 serie are here:
http://abf.rosalinux.ru/downloads/kerne ... n/release/

so you can get the latest versions saving into /your_local_path/

for kernel mainline (nrj), the latest version is:
http://abf.rosalinux.ru/downloads/kerne ... -1.src.rpm

for kernel advanced (nrjQL), the latest version is:
http://abf.rosalinux.ru/downloads/kerne ... 69.src.rpm


2>You need to satisfate their Buildrequires

Code: Select all

urpmi --buildrequires /your_local_path/kernel-3.6.11-1.src.rpm
install all suggested rpms


3> now you can rebuild, executing from user konsole/terminal

Code: Select all

rpmbuild --rebuild /your_local_path/kernel-3.6.11-1.src.rpm
after many hours, depending on your PC Cpu, you should see that rpms are ready and stored into your hd, in the path

Code: Select all

/$home/rpmbuild/RPMS
now, you can install whatever kernel flavour you prefer, even more than one


I hope my explaination is clear
bye, NicCo
.
--- Professional experience ---
Kernel designer, engineer, maintainer and tester for ROSA Desktop and OpenMandriva Lx O.S.

--- currently I'm playing with ---
LTS Kernels > Linux 4.1.12-nrjQL <<< Linux 3.18.17-nrjQL <<< Linux 3.14.46-nrjQL
EOL Kernels > Linux 3.19.8-nrjQL <<< Linux 3.17.8-nrjQL <<< Linux 3.15.10-nrjQL

Locked