Opensuse 11..2 Need some advise compiling new Kernel 2.6.35.4 from source

Hi Team,

  I had a couple questions with regards to compiling kernels from source, 

http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.35.4.tar.bz2

Using the following guide, as a reference -
OpenSUSE 11.2 - How to compile a Kernel for Newbies - Linux Tweaking - http://linuxtweaking.blogspot.com

After extracting the tar safely to the destination /usr/src/linux I had the following the directory /usr/src/linux/linux-2.6.35.4/ wondering should I have extracted the files so that all sub folders listed below fall under /usr/src/linux instead of having
/usr/src/linux/linux-2.6.35.4/ be the parent directory?

drwxr-xr-x 23 root root 4096 2010-08-26 16:47 ./
drwxr-xr-x 3 root root 4096 2010-08-27 12:45 …/
drwxr-xr-x 25 root root 4096 2010-08-26 16:47 arch/
drwxr-xr-x 2 root root 4096 2010-08-26 16:47 block/
-rw-r–r-- 1 root root 18693 2010-08-26 16:47 COPYING
-rw-r–r-- 1 root root 94031 2010-08-26 16:47 CREDITS
drwxr-xr-x 3 root root 4096 2010-08-26 16:47 crypto/
drwxr-xr-x 85 root root 12288 2010-08-26 16:47 Documentation/
drwxr-xr-x 89 root root 4096 2010-08-26 16:47 drivers/
drwxr-xr-x 36 root root 4096 2010-08-26 16:47 firmware/
drwxr-xr-x 72 root root 4096 2010-08-26 16:47 fs/
-rw-r–r-- 1 root root 936 2010-08-26 16:47 .gitignore
drwxr-xr-x 20 root root 4096 2010-08-26 16:47 include/
drwxr-xr-x 2 root root 4096 2010-08-26 16:47 init/
drwxr-xr-x 2 root root 4096 2010-08-26 16:47 ipc/
-rw-r–r-- 1 root root 2440 2010-08-26 16:47 Kbuild
drwxr-xr-x 8 root root 4096 2010-08-26 16:47 kernel/
drwxr-xr-x 6 root root 4096 2010-08-26 16:47 lib/
-rw-r–r-- 1 root root 4021 2010-08-26 16:47 .mailmap
-rw-r–r-- 1 root root 174535 2010-08-26 16:47 MAINTAINERS
-rw-r–r-- 1 root root 51256 2010-08-26 16:47 Makefile
drwxr-xr-x 2 root root 4096 2010-08-26 16:47 mm/
drwxr-xr-x 50 root root 4096 2010-08-26 16:47 net/
-rw-r–r-- 1 root root 17459 2010-08-26 16:47 README
-rw-r–r-- 1 root root 3371 2010-08-26 16:47 REPORTING-BUGS
drwxr-xr-x 7 root root 4096 2010-08-26 16:47 samples/
drwxr-xr-x 12 root root 4096 2010-08-26 16:47 scripts/
drwxr-xr-x 7 root root 4096 2010-08-26 16:47 security/
drwxr-xr-x 21 root root 4096 2010-08-26 16:47 sound/
drwxr-xr-x 4 root root 4096 2010-08-26 16:47 tools/
drwxr-xr-x 2 root root 4096 2010-08-26 16:47 usr/
drwxr-xr-x 3 root root 4096 2010-08-26 16:47 virt/

Of course with all this being said and done while in root, prior to making the makeconfig file.

Should I’ve made a sybmolic link to the source ln -s /usr/src/linux/linux-2.6.35.4/ linux

Then I had issue with the make cloneconfig? the was concern without making the symbolic link to the directory I received the following message -

/usr/src/linux/linux-2.6.35.4 # make cloneconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/basic/hash
make[1]: *** No rule to make target `cloneconfig’. Stop.
make: *** [cloneconfig] Error 2

Which brings to the next message in the tutorial it asked to check off under yast->software management-> view by patterns-> The Linux Kernel Development>

However by doing so, the only package required is patterns-openSUSE-devel_kernel wondering should I need the following packages, in addition -

cscope - Interactive Tool for Browsing C Source Code
diffstat - Utility That Provides Statistics Based on the Output of diff
git-core - Core git tools
gitk - Git revision tree visualiser
indent - Indent Formats C Source Code
kernel-syms - Kernel Symbol Versions (modversions)
patchutils - A Collection of Tools for Manipulating Patch Files
quilt - A Tool for Working with Many Patches

And Under Base Development Packages-
build - A Script to Build SUSE Linux RPMs

Please keep in mind GCC is already installed, and sources files should come from /usr/src/linux or should I need the source from my current
kernel-default-.6.31.12-0.2

Any support regarding this matter would be great?

Hi
No need to do any of that, plus compiling as root user is just asking
for problems…

See user lwfingers simple method here;
http://forums.opensuse.org/english/get-help-here/pre-release-beta/421320-questions-help-regarding-kernel-2-6-31-a.html#post2036276

Else look at using the one from kernel head


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.3 (x86_64) Kernel 2.6.34-12-default
up 7 days 1:18, 2 users, load average: 0.00, 0.03, 0.00
GPU GeForce 8600 GTS Silent - Driver Version: 256.44

However simple in approach, still abit narrow

<Rick is a little pessimistic. I have been compiling kernels for a long
time. If you follow a few simple rules, then you will have no difficulty.

(1) NEVER build a kernel as root. It may not cause a problem;
however, the kernel build scripts are quite complicated. At one time,
anyone building their kernel as root had the system file /dev/null
corrupted. That caused all kinds of funny things to happen.

(2) After you load the source onto your computer, change directory to
the root of that source and execute the following code:

Code:
cp /proc/config.gz .
gunzip config.gz
cp config .configThese steps will create a configuration that matches your running
kernel. It is not the most efficient, but it will work. Once you have
it working, you can reconfigure and eliminate pieces you don’t need.
That will compile faster and reduce the size. BTW, I am deliberately
not telling you what the above commands represent. That is homework.

(3) Build and install the new kernel with the following:

Code:
make
sudo make modules_install install(4) The second of the above commands will install the kernel and add
it to the GRUB menu. Leave the standard kernel in the menu just in
case the new one will not boot.

(5) Be prepared to have to “build from scratch” any out-of-kernel
drivers that you use. This list will include the 3D acceleration for
ATI or nVidia graphics cards. In addition, a standard kernel will not
have AppArmor available.>

I would have rather have Opensuse 11.2 make rpm allowing the systems linker to automaticly take care of any dependencies it may have. I would also have an easier method of the uninstalling the kernel any incase I needed to do so? And yes your right with regards to compiling things as root.

Qoute:
To build your kernel as an RPM package type the following,

make rpm
You can watch the compile if you wish, maybe have a cup of tea…and biscuits!

When the compile has finished, the new kernel needs to be installed.

cd /usr/src/packages/RPMS/x86_64

End Qoute:

How so?, download the kernel-source in your working directory, say
~/kernel_work/ cd to it and run the commands…


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.3 (x86_64) Kernel 2.6.34-12-default
up 7 days 2:57, 2 users, load average: 0.17, 0.20, 0.12
GPU GeForce 8600 GTS Silent - Driver Version: 256.44