LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 09-08-2008, 04:26 PM   #1
crako
LQ Newbie
 
Registered: Sep 2008
Posts: 1

Rep: Reputation: 0
Talking pb compiling kernel 2.6.10


Hello I am a newbie,

I've downloaded a guide about writing device drivers for linux that looks
nice .

The book refers to kernel 2.6.10, thus I'd like to compile it to practice
the examples of this book .

I downloaded the sources of the kernel and put it in /usr/src/linux-2.6.10

then I got to /usr/src/linux-2.6.10 and did
make O=~cedric/ordinateur/kernel/2.6.10 menuconfig without pb

After that, I did :
make O=~cedric/ordinateur/kernel/2.6.10

and then I got pbs, here are the last lines :

In file included from include2/asm/mpspec.h:5,
from include2/asm/smp.h:18,
from /usr/src/linux-2.6.10/include/linux/smp.h:17,
from /usr/src/linux-2.6.10/include/linux/sched.h:23,
from /usr/src/linux-2.6.10/arch/i386/kernel/process.c:17:
include2/asm/mpspec_def.h:78: attention : «packed" attribute ignored for field of type «unsigned char[6]"
/usr/src/linux-2.6.10/arch/i386/kernel/process.c: In function «show_regs":
/usr/src/linux-2.6.10/arch/i386/kernel/process.c:259: attention : pointer targets in passing argument 2 of «show_trace" differ in signedness
{standard input}: Assembler messages:
{standard input}:1393: Error: suffix or operands invalid for `mov'
{standard input}:1395: Error: suffix or operands invalid for `mov'
{standard input}:1743: Error: suffix or operands invalid for `mov'
{standard input}:1745: Error: suffix or operands invalid for `mov'
{standard input}:1855: Error: suffix or operands invalid for `mov'
{standard input}:1856: Error: suffix or operands invalid for `mov'
{standard input}:2197: Error: suffix or operands invalid for `mov'
{standard input}:2210: Error: suffix or operands invalid for `mov'
make[2]: *** [arch/i386/kernel/process.o] Erreur 1



So I googled a little bit and found a link

where someone gives the advice to download linux-2.6-seg-5.patch
and then do :
patch -Np1 -i linux-2.6-seg-5.patch

But that doesn't work from the directory where I downloaded linux-2.6-seg-5.patch

I went to /usr/src and made linux point
to linux-2.6.10 , and from /usr/src I typed :

root@lachez-moi:/usr/src# patch -Np1 -i linux-2.6-seg-5.patch
patch: **** Can't open patch file linux-2.6-seg-5.patch : No such file or directory
root@lachez-moi:/usr/src# patch -Np1 -i ~cedric/telechargements/linux-2.6-seg-5.patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- linux/arch/i386/kernel/process.c.seg 2005-03-27 13:07:14.000000000 -0800
|+++ linux/arch/i386/kernel/process.c 2005-03-28 10:28:47.000000000 -0800
--------------------------
File to patch:


I checked that linux/arch/i386/kernel/process.c
exists,
Have you got an idea ?
Thanks in advance
 
Old 09-24-2008, 01:56 PM   #2
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Smile

Please have a nice look on threads already opened for the same topic. These were for my notes.

See these links http://www.linuxquestions.org/questi...rhel-5-618474/

http://www.justlinux.com/nhf/Compiling_Kernels/20_Steps_to_a_New_Kernel_with_Grub.html

http://voidmain.is-a-geek.net/redhat...nel_build.html
http://www.howtoforge.com/kernel_compilation_suse
http://www.digitalhermit.com/linux/K...FIGURATION-2-6

Install yum first, it will and freshly install all need softwares, this will help resolving software conflicts.
Now,

Code:
yum install ncurses-devel
yum groupinstall "Java Development"

1. cd /usr/src
2. wget -c http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2
3. tar xvfj linux-2.6.20.tar.bz2
4. cd linux-2.6.20
5. make clean && make mrproper
6. make oldconfig (this will get you very close to a working kernel as supplied by Red Hat)
7. make menuconfig (or config or xconfig);this is where one can tweak the configuration
8. make
9. make modules_install
10. make install
11. mkinitrd /boot/initrd-2.6.20.img 2.6.20 
12. cp .config /boot/config-2.6.20
13. cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.20
14. cp System.map /boot/System.map-2.6.20
15. ln -s /boot/System.map-KERNEL_VERSION /boot/System.map
I hope you will get success.

Cheers,
VIKAS
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling a module separately without compiling entire kernel kushalkoolwal Linux - Kernel 8 08-06-2008 01:45 AM
/lib/modules/2.4.33.3/kernel/sound folder is missing after compiling kernel Paulo Góes Slackware - Installation 2 04-15-2007 08:42 PM
Where Is Kernel Directory In Rh9(kernel 2.4.20-8), For Compiling HSP56 MR(pctel) Mode rudy3107 Linux - Software 1 07-25-2004 04:17 AM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 05:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 08:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration