LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Kernel - basic Slackware packages (http://www.linuxquestions.org/questions/slackware-14/kernel-basic-slackware-packages-870486/)

hua 03-23-2011 09:52 AM

Kernel - basic Slackware packages
 
I get a little understanding about the kernel and the slackware kernel packages by now, but I'm confused about several things?
Please if some of you can find a minute to give me some answers it would be a great help for me.

First questions are about the Slackware packages itself:

GROUP 1. What does the kernel-generic and kernel-huge contain and what does it do when I install them?

1. Does the kernel-huge package just copy the kernel image with System.map-huge and config-huge into the boot directory? And set the symlinks to this files (vmlinuz, config, System.map)???
2. The difference between generic and huge kernel is in the configuration of kernel hardware support? I mean the huge supports almost everything, the generic not and you use the initrd to load the required drivers first?


GROUP 2. What exactly does the kernel-firmware, kernel-headers, kernel-modules, kernel-source packages contain?

3. The kernel-modules package creates the modules for your kernel in /lib/modules and that's it? Or does it something more?
4. The kernel-headers does the same for the header files in /usr/include?
5. The kernel source package just makes an extracted kernel source in /usr/src??
5. Kernel-firmware package - have no idea!?

GROUP 3. Custom kernel compilation - This are the most important questions for me.

6. When I download the source from kernel.org. I apply the config-huge from slackware source on it and I compile my own kernel - will this kernel be the same as the kernel from kernel-huge package.
In this case the kernel-huge package is useless, I can remove it?? And as I build my own modules too (make all, make modules_install), will be the kernel-modules useless too??

7. If there is a patch for the Slackware kernel, can I apply the patch package for my custom kernel?
8. Or how can I apply kernel patches? Do I use a patch on the source and recompile my kernel from the patched source?
9. By the way - when I download the kernel source from kernel.org and put it into /usr/src I can remove the kernel-source package?

GROUP 4. On which packages depends the kernel?
10. glibc, glibc-solibs ... when I upgrade glibc and glibc-solibs (or gcc) should I recompile my kernel? Should I recompile modules?

I think these questions are the most important for me now.
Thanks for your answers.

brianL 03-23-2011 10:08 AM

Not sure about some of these questions, so I'll just enter ?
1: Yes
2: Yes
3: ? Just installs modules?
4: ? Just installs headers?
5: Yes
6: It would be exactly the same (?) as the default huge kernel.
7: ?
8: ?
9: If it's the same release, yes.
10: ?

disturbed1 03-23-2011 10:56 AM

Quote:

Originally Posted by hua (Post 4300450)
7. If there is a parch for the Slackware kernel, can I apply the patch package for my custom kernel?
8. Or how can I apply kernel patches? Do I use a patch on the source and recompile my kernel from the patched source?

No Slackware patch set. Slackware uses vanilla Kernel sources. Slackware provides config files for all kernel versions.
Quote:

GROUP 4. On which packages depends the kernel?
10. glibc, glibc-solibs ... when I upgrade glibc and glibc-solibs (or gcc) should I recompile my kernel? Should I recompile modules?
Slackware updates these at the same time. Take a look at the change log, and look at what is rebuilt each time glibc is updated.

A little more on 1 and 2.
Huge and generic have the same hardware support. Huge has the modules compiled in, generic has most compiled as modules instead. I suppose -generic could be considered modularized ;)

rfernandez 03-23-2011 12:58 PM

It is always a good thing to read Alien's wiki about linux kernel - http://alien.slackbook.org/dokuwiki/...kernelbuilding - it is very well explained and very easy to read.

hua 03-26-2011 05:37 AM

From:
http://www.linuxdocs.org/HOWTOs/Kernel-HOWTO-6.html
Quote:

Incremental upgrades of the kernel are distributed as patches. For example, if you have version 1.1.45, and you notice that there's a `patch46.gz' out there for it, it means you can upgrade to version 1.1.46 through application of the patch.
I compiled my custom kernel from the source located in /usr/src/linux (2.6.33.4 - Slackware 13.1). I think this is a vanila kernel source (no changes in source! - is this true??).

Quote:

Originally Posted by disturbed1 (Post 4300518)
No Slackware patch set. Slackware uses vanilla Kernel sources. Slackware provides config files for all kernel versions.

This is not a patch for the 2.6.33.4 kernel?? - http://ftp.osuosl.org/pub/slackware/...ux-2.6.33.4-2/.

When I compile my own custom kernel I cannot use this package to upgrade the new custom kernel??
What can I do if not??

Should I patch my kernel source like this:
Quote:

Once the patches are uncompressed we can apply them to the kernel sources. Remember that it is important to apply them in order.

$ cd linux-2.6.0-test7
$ patch -p1 <../patch-2.6.0.test8
$ patch -p1 <../patch-2.6.0.test9
On kernel.org there is 2.6.33.8 kernel version (and patch) now. In what differs this patch from the upgrade package in the slackware release (2.6.33.4-2)??

markush 03-26-2011 07:01 AM

Hello hua,

there are two ways to upgrade the kernel, via patch or via downloading the full source. I use to download the full source, but if someone has a slow internetconnection it may be more convenient only to download the patch from kernel.org.

Also don't confuse "patches" and "patches". What I mean is: most sources (not only the kernel) may be upgraded via a patch. A patch is only the difference between the new and the old sources.

Otherwise most Linux-distributions come with a "patched Kernel" which means that they write some additional sourcecode for the kernel in order to adapt it to their system (as an example some distributions have a patch which includes a splash-screen while the system boots). Slackware doesn't do this and this is what we mean with "Slackware comes with a vanilla kernel".

Markus

Richard Cranium 03-26-2011 05:34 PM

Quote:

Originally Posted by hua (Post 4304002)
This is not a patch for the 2.6.33.4 kernel?? - http://ftp.osuosl.org/pub/slackware/...ux-2.6.33.4-2/.

Nope. The files in here are patches for the 2.6.33.4 kernel.

hua 03-31-2011 03:15 AM

Thanks to all.

One more question. If I apply the upgradepkg kernel-source-2.6.33.4-noarch-2.txz - in this case the source is upgraded and every kernel which is built from this source is already upgraded for the required security fixes?

markush 03-31-2011 03:24 AM

Hello,

if you apply
Code:

upgradpkg kernel-source-2.6.33.4-noarch-2.txz
the kernelsources in the /usr/src directory will be substituted with the new sources. This doesn't affect your running kernel.

If you want to upgrade your kernel, you'll have to upgrade the kernelpackages in the a directory or (if you're running your self compiled kernel) you'll have to backup your .config file and copy it into the source-directory (/usr/src/linux-2.6.33.4...) and run
Code:

make oldconfig
then make and make modules_install and install the kernel in the boot directory.

Markus


All times are GMT -5. The time now is 07:48 PM.