Find the answer to your Linux question:
Results 1 to 5 of 5
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2008
    Posts
    11

    kernel compilation pb


    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

  2. #2
    Just Joined!
    Join Date
    Aug 2008
    Posts
    9
    Hi, you should have the following document to compile the kernel.
    http://www.digitalhermit.com/linux/K...ild-HOWTO.html
    Follow it.. would work without any issue.

  3. #3
    Just Joined!
    Join Date
    Sep 2008
    Posts
    11
    Thanks for the advice,
    actually the commands that I type are those written in the README included
    with the tar.bz2 file containing the 2.6.10 kernel files .

    Rather than trying other commands, I'd prefer help on the pb that stucks me.
    Do you have idea about it ?

  4. #4
    Just Joined!
    Join Date
    Sep 2008
    Posts
    11
    Anyway not to be too much stubborn, I've had a look at this tutorial,

    They give the advice to do make bzImage, at the point where I was doing make .

    And I get the same error ( skipping the first lines ) :

    include/asm/mpspec_def.h:78: attention : «packed" attribute ignored for field of type «unsigned char[6]"
    arch/i386/kernel/process.c: In function «show_regs":
    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[1]: *** [arch/i386/kernel/process.o] Erreur 1
    make: *** [arch/i386/kernel] Erreur 2

  5. #5
    Just Joined!
    Join Date
    Sep 2008
    Posts
    11
    I found the solution, I just had to get into /usr/src/linux and then type
    patch -Np1 -i ~cedric/telechargements/linux-2.6-seg-5.patch

    From /usr/src , it didn't work .

    Now the kernel 2.6.10 boots but it doesn't mount /home which is on LVM .

    On my usual kernel 2.6.15, there's no pb with /home registered as a LVM that is automatically mounted .

    Does someone knows how to do the same with the 2.6.10 kernel ?
    Thanks in advance

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •