LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Compiling a distribution unspecific kernel on two different distributions (https://www.linuxquestions.org/questions/linux-kernel-70/compiling-a-distribution-unspecific-kernel-on-two-different-distributions-925617/)

Aquarius_Girl 01-25-2012 05:48 AM

Compiling a distribution unspecific kernel on two different distributions
 
I downloaded kernel 3.2.1 from the kernel.org.
Compiled it "successfully" on OpenSuse 11.3 64 bit.

When I tried to compile the same on Ubuntu 11.10, I got:
Code:

ERROR: "__modver_version_show" [drivers/staging/rts5139/rts5139.ko] undefined
I copied the .config from the default kernel present on that machine to the kernel 3.2.1's folder.
Did make menuconfig again, saved it without any changes.
But, the same error prevailed. Also, tried with .config.old but that didn't help either.

Anyway, my question here is that if the kernel is unbiased and untouched, then why would the compilation results differ on different distributions assuming:
1. Both the machines are x bits?
2. Both the machines are latest, so is the kernel.

Doesn't the kernel read the .config in its own folder and decides on that basis which module to load and which not to?
What has that to do with existing distribution during the compilation period?

bigrigdriver 01-25-2012 03:18 PM

Quote:

Anyway, my question here is that if the kernel is unbiased and untouched, then why would the compilation results differ on different distributions assuming:
Both machines must also have the same kernel supporting software to compile the kernel. Some software, such as kernel development, are included in some distro installations, and not in others.

Here are Ubunut community instructions for compiling the kernel:https://help.ubuntu.com/community/Kernel/Compile.

Aquarius_Girl 01-26-2012 07:18 AM

Quote:

Originally Posted by bigrigdriver (Post 4584425)
Both machines must also have the same kernel supporting software to compile the kernel. Some software, such as kernel development, are included in some distro installations, and not in others.

Which are the "kernel supporting software"/"kernel development software" that you are talking of, may I know?

Example of these packages in a Distro. of your choice?

brianL 01-27-2012 07:51 AM

Debian, and probably Ubuntu, have something called something like "module-init-tools", can't remember exactly, to aid in building modules. Those are the only ones I can think of.
Yeah, I was right (as usual ;) ), here they are:
http://packages.debian.org/search?ke...ule-init-tools
https://launchpad.net/ubuntu/+source/module-init-tools

knudfl 01-27-2012 08:02 AM

Post # 2 : Shows kernel building prerequisites for older Ubuntu versions :
https://help.ubuntu.com/community/Kernel/Compile

For your actual Ubuntu version : sudo apt-get build-dep linux

The build scripts for 3.2.x are in the package linux_3.2.0-11.19.diff.gz
http://archive.ubuntu.com/ubuntu/poo...-11.19.diff.gz
Ref. http://packages.ubuntu.com/source/precise/linux 3.2.0-11.19

If you want to do a test build on version 3.2.0-11.19 :
1) Add a line to /etc/apt/sources.list , like : deb src <url> precise main
1a) sudo apt-get update ( To include the new source repo.)

2) cd <new-folder> ( Like /home/Anisha/test1/ ).
Reason for a "new folder" : A lot of packages etc. will be generated.
2a) ( No sudo ) : apt-get -b source linux=3.2.0-11.19

.


All times are GMT -5. The time now is 03:00 PM.