Fedora 12

This is a discussion on Fedora 12 within the Tech Board forums, part of the Community Boards category; make -C <path to kernel source> M=<module directory> is a command I know. The thing is, when I tried this ...

  1. #16
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    make -C <path to kernel source> M=<module directory> is a command I know. The thing is, when I tried this (the kernel source was already linked via the build directory to /usr/src/kernel/2.6.31.6-145.fc12.i686 -- again, kinda odd and not what I'm used to, but was acceptable. In fact, the module I attempted expected this type of structure and attempted to link to that location. The problem is always the same:

    make: No rule to make "missing-syscalls". A google search reveals that this is a corrupt kernel tree. So, I attempted to get the kernel-devel package. yum reports that this package is installed and is up to date. So, I start hacking. I get all the packages required (downloaded from the Mirror a Ga Tech) for the kernel-devel, and I force the reinstall using rpm. Same thing. Lather, rinse, repeat (as my wife likes to say).

  2. #17
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,265
    make -C <path to kernel source> M=<module directory> is a command I know
    In this case, <path to kernel source> must be /lib/modules/`uname -r`/build. You cannot attempt this with the kernel source in /usr/src/kernel.
    bit∙hub [bit-huhb] n. A source and destination for information.

  3. #18
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by bithub View Post
    In this case, <path to kernel source> must be /lib/modules/`uname -r`/build. You cannot attempt this with the kernel source in /usr/src/kernel.
    You can, however, make "build" a softlink to /usr/whatever/whereever
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  4. #19
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,265
    Quote Originally Posted by MK27 View Post
    You can, however, make "build" a softlink to /usr/whatever/whereever
    Yes, but I think that Kennedy was doing the command:
    make -C <path to kernel headers> M=`pwd`
    Where <path to kernel headers> is in /usr/src. When I do that, I get the same error that he did regarding the missing syscalls. You need to instead use the build environment that gets installed in /lib/modules, and yes, you can symlink that to any other directory you wish.
    bit∙hub [bit-huhb] n. A source and destination for information.

  5. #20
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    bithub, that is NOT the path to headers:
    Code:
    #ls -ld 2.6.31.6-145.fc12.i686
    lrwxrwxrwx.  1 root root 47 2009-12-03 23:31 build -> ../../../usr/src/kernels/2.6.31.6-145.fc12.i686
    This command was executed from /lib/modules/2.6.31.6-145.fc12.i686, thus this link is to /usr/src/kernels/2.6.31.6-145.fc12.i686. There is also a symlink from source to build.

    That ain't the problem. I know how symlinks work. What I've done (mentioned previously) seems to work, so far. The main problem with it is that I'll have a booger of a time writing the procedure for the team that requested my help.

  6. #21
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Kennedy View Post
    The main problem with it is that I'll have a booger of a time writing the procedure for the team that requested my help.
    Not to keep harping on a point, but wouldn't delivering them a normal kernel source with fedora patches applied help? Then you throw in the source for the module too and just tell them to do a straight configure-make-install.
    Last edited by MK27; 12-08-2009 at 09:46 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  7. #22
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,265
    Quote Originally Posted by Kennedy View Post
    bithub, that is NOT the path to headers:
    Code:
    #ls -ld 2.6.31.6-145.fc12.i686
    lrwxrwxrwx.  1 root root 47 2009-12-03 23:31 build -> ../../../usr/src/kernels/2.6.31.6-145.fc12.i686
    This command was executed from /lib/modules/2.6.31.6-145.fc12.i686, thus this link is to /usr/src/kernels/2.6.31.6-145.fc12.i686. There is also a symlink from source to build.

    That ain't the problem. I know how symlinks work. What I've done (mentioned previously) seems to work, so far. The main problem with it is that I'll have a booger of a time writing the procedure for the team that requested my help.
    You're right, I missed that symlink.

    Quote Originally Posted by MK27 View Post
    Not to keep harping on a point, but wouldn't delivering them a normal kernel source with fedora patches applied help? Then you throw in the source for the module too and just tell them to do a straight configure-make-install.
    If he does this, then he may also need to deliver new kernel sources every time they update.

    At any rate, I have no idea why the module building procedure I gave you doesn't work. I just ran a quick test on my system. I downloaded the kernel source from kernel.org to my home directory and untar'd it.
    cd /home/bithub/downloaded_kernel/fs/ext2
    make -C /usr/src/kernels/`uname -r` M=`pwd`

    It looks like I can build any arbitrary module from the downloaded kernel against the Fedora build environment.
    bit∙hub [bit-huhb] n. A source and destination for information.

  8. #23
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by bithub View Post
    If he does this, then he may also need to deliver new kernel sources every time they update.
    Do distros update the kernel? I guess I have never noticed this because I always roll my own.

    It seems like a risky prospect -- pretty sure I occasionally run into a non-module source that needs to build against the kernel headers. Because of that, I always worry using a custom kernel will screw something up, altho AFAIK it never has.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  9. #24
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,265
    Quote Originally Posted by MK27 View Post
    Do distros update the kernel? I guess I have never noticed this because I always roll my own.

    It seems like a risky prospect -- pretty sure I occasionally run into a non-module source that needs to build against the kernel headers. Because of that, I always worry using a custom kernel will screw something up, altho AFAIK it never has.
    Yeah, distros update the kernel all the time (some more than others). You probably won't run into issues using a custom kernel. As long as you keep the headers that match what you're running, you should be ok.
    bit∙hub [bit-huhb] n. A source and destination for information.

  10. #25
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    The problem with this is that the driver that is on this box for the video acceleration is make by the boys at RedHat. I attempted to patch the kernel from Kernel.org with these patches from FC12, but I couldn't get these in the right order (apparently). I looked through attempting to find the patch order (didn't look but for a minute) and couldn't find it. The way I've got it, however, so far is a least reproducible.

    Bottom line MK27 -- I wish it were that simple. I found out that we have been told to use FC12 and make it as mainstream as possible (so my initial assumption was correct).

  11. #26
    Registered User
    Join Date
    Dec 2009
    Posts
    1
    I think this is going off target. I have ~12 years linux with many kernel compilations. This is my 1st dead end - which it appears others have encountered. It occurs with any of the full sets of Fedora provided fc12 & fc11 kernel rpm's for x86_64 (e.g., 2.6.31.5-127.fc12.x86_64 or 2.6.31.6-162.fc12.x86_64). Using installed .config or any config I modify always gives

    make all
    CHK include/linux/version.h
    CHK include/linux/utsrelease.h
    SYMLINK include/asm -> include/asm-x86
    HOSTCC scripts/basic/fixdep
    HOSTCC scripts/basic/docproc
    HOSTCC scripts/basic/hash
    make[1]: *** No rule to make target `missing-syscalls'. Stop.
    make: *** [prepare0] Error

    Any suggestions?

  12. #27
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    Well, what I did (completed it today -- so you're not really too far OT) is to follow the instructions that bithub gave me. This failed, BUT, I was left with the directory structure <path>/rpmbuild/BUILD/kernel-2.6.31.new which was patched to linux-2.6.31.6 and then with the patches that FC12 had as well. Then, I had to do a make menuconfig to remove all occurances that referenced the DEBUG information (and removed the Load all symbols under configure for small kernels -- this should be not configured by default, however, from the .config that I got from /boot, it was) -- Sorry, I don't remember what all I had to remove support for, but I know at least it was all the TRACE information which is stored in about 6 different locations.

    After that, you can do the "normal" make menuconfig etc, under that directory.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Fedora 9 - Instability
    By Mario F. in forum Tech Board
    Replies: 16
    Last Post: 09-30-2008, 10:55 PM
  2. Is this me or Windows?
    By carrotcake1029 in forum C Programming
    Replies: 9
    Last Post: 05-07-2008, 10:18 AM
  3. working out
    By ZakkWylde969 in forum A Brief History of Cprogramming.com
    Replies: 35
    Last Post: 11-29-2003, 01:17 PM
  4. Heaps...
    By Nutshell in forum C Programming
    Replies: 14
    Last Post: 04-23-2002, 09:54 AM
  5. Can't figure out why?
    By kwigibo in forum C Programming
    Replies: 10
    Last Post: 10-14-2001, 11:58 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21