[Mini-HOWTO] RPMs needed to compile a kernel-module on / for VM Server

In reply to the question I've asked a couple of days ago in this forum
Compile module for Oracle VM Server
I tried to do it myself, since no answer was given.
And it turned out to be fairly easy afterward too!
Just install these RPM-packages from an Oracle Enterprise Linux v5 i386 distribution (v5, NOT v5U1!) in this order:
kernel-headers-2.6.18-8.el5.i386.rpm
glibc-headers-2.5-12.i386.rpm
glibc-devel-2.5-12.i386.rpm
libgomp-4.1.1-52.el5.i386.rpm
cpp-4.1.1-52.el5.i386.rpm
gcc-4.1.1-52.el5.i386.rpmThese 6 RPMs and finally the
kernel-ovs-devel-2.6.18-8.1.6.0.18.el5 RPM, to be found on the VM Server-CD you've burned from the downloaded ISO.
Hope this helps!
At least I was able to recompile the qla2xxx-modules from the HP-provided sources.
Message was updated by:
hbokho

basically it is the same thing as build a normal kernel module i think. some packages need to be installed first for e.g. the kernel source and development packages.
refer to, (just some google results)
http://www.eece.maine.edu/~sheaff/module.html
http://tldp.org/LDP/lkmpg/2.6/html/index.html
The system I installed the OVS on has a network chip
that is not supported by the kernel in OVS 2.1. I
found the source code for the module, but does anyone
have a clue how to set up an environment so I can
compile the module in a way that it'll be accepted on
the OVS server. I downloaded the Source OVS CD, but
I'm not quite sure what to do from there. Anybody has
some hints?

Similar Messages

  • How to compile a kernel module without recompiling the whole kernel?

    Hi,
    I'm pretty sure my question is a bit newbish, still I haven't been able to found any information/solution to my problem in 3days.
    The kernel I use doesn't come with the module I need for my hardware and I would like to know if there's a way to compile it without having to make a new kernel myself (since compiling the kernel takes ages on my machine).
    Even if your answer is a "Let me Google that for you", I'm so desperate that I'll be happy to see it.
    Thank you all in advance for your answers!

    Do you have a /proc/config.gz that you could use? Otherwise I don't know. I mean, many modules should be compilable simply with the system-installed kernel headers, but not all native modules might follow that rule.
    Unfortunatel most of what you find on the web talks about how to create new modules which can be compild against the installed kernel tree, not about how to compile one of the native kernel modules against it.
    Actually, try what those links suggest.
    Skip the configuration part, and just do:
    make -C /lib/modules/`uname -r`/build M=$(PWD)/drivers/video modules
    (maybe `make -C /lib/modules/`uname -r`/build M=$(PWD)/drivers/video clean` first )
    EDIT: Meh, that uses your config and won't build that driver... there must be some way though
    EDIT2: Try:
    make -C /lib/modules/`uname -r`/build M=$(PWD)/drivers/video modules CONFIG_FB_VT8623=m CONFIG_FB_SVGALIB=m
    The problem though is, that they might have removed some of the dependencies of the module, so if it doesn't compile, you'll have to recompile the kernel.
    Good thing is though, you can use their .config as base (found in /usr/src/linux-..../.config)
    You can also check if your config "supports" your module by putting it into the kernel source tree, running `make menuconfig` and typing /8623 and pressing enter.
    The last line in that screen should read:
    Selects: <list of options>
    As long as all of those options are either =y or =m, you're good. SVGALIB can be =n because it's part of drivers/video/ and you can compile it together with  your module.
    Last edited by Blµb (2012-03-02 15:14:16)

  • Compile radeonfb kernel module

    what I want to do, is to compile just radeonfb as a module (so that I could use it), without rebuilding anything else because the entire kernel takes way too long (like an hour or so).
    How about this possibility;
    a pkgbuild that builds the module seperately off of cvs or whatever the kernel is hosted on, (so that the 40 MB tarball doesn't have to get downloaded?)
    not sure exactly how that works out, but it's probably possible, or is it all just not worth the effort?

    Do you have a /proc/config.gz that you could use? Otherwise I don't know. I mean, many modules should be compilable simply with the system-installed kernel headers, but not all native modules might follow that rule.
    Unfortunatel most of what you find on the web talks about how to create new modules which can be compild against the installed kernel tree, not about how to compile one of the native kernel modules against it.
    Actually, try what those links suggest.
    Skip the configuration part, and just do:
    make -C /lib/modules/`uname -r`/build M=$(PWD)/drivers/video modules
    (maybe `make -C /lib/modules/`uname -r`/build M=$(PWD)/drivers/video clean` first )
    EDIT: Meh, that uses your config and won't build that driver... there must be some way though
    EDIT2: Try:
    make -C /lib/modules/`uname -r`/build M=$(PWD)/drivers/video modules CONFIG_FB_VT8623=m CONFIG_FB_SVGALIB=m
    The problem though is, that they might have removed some of the dependencies of the module, so if it doesn't compile, you'll have to recompile the kernel.
    Good thing is though, you can use their .config as base (found in /usr/src/linux-..../.config)
    You can also check if your config "supports" your module by putting it into the kernel source tree, running `make menuconfig` and typing /8623 and pressing enter.
    The last line in that screen should read:
    Selects: <list of options>
    As long as all of those options are either =y or =m, you're good. SVGALIB can be =n because it's part of drivers/video/ and you can compile it together with  your module.
    Last edited by Blµb (2012-03-02 15:14:16)

  • Kernel module pointer for modctl structures

    Hi,
    Can anybody tell me where is the kernel module pointer that is pointing at the modctl structure? How can I use the module pointer?
    Thanks.

    Welcome to Arch Linux
    That looks like it is a 2.6 kernel module
    http://sourceforge.net/p/omnibook/bugs/58/
    Did you try either of these AUR offerings?
    ewaller$@$odin ~ 1001 %packer -Ss omnibook
    aur/omnibook-git 20110911-9 (7)
    Kernel module for HP OmniBook,Pavilion,Toshiba and Compal ACL00 laptops
    aur/omnibook-svn-zen 268-1 (1)
    Kernel module for HP OmniBook, Pavilion, Toshiba and Compal ACL00 laptops
    ewaller$@$odin ~ 1002 %
    Last edited by ewaller (2014-08-23 23:33:53)

  • Compiling Modified Kernel Module

    Hi,
    I want to recompile the cx231xx USB tv capture card driver to include a small modification to the driver code. This driver can be found in src/drivers/media/video/cx231xx
    Is there any way I can grab the current v4l source tree for arch and compile it?
    I have tried compiling a custom kernel with the source code modified after the download/patching but it aborts the compile halfway through. This is time-consuming as my laptop takes 3 hours to get to the abort...
    I previously built and installed my own v4l-tree on Ubuntu to use this modification (enables output instead of blue screen with no sync signal). However the source tree I used does not compile with the newer kernel in arch.
    Thanks,
    Phil

    It is part of the kernel already, but I need to modify the driver to enable the output. (I use it with Amateur Television Receivers.)
    I have tried several of methods, but none seem to work:
    I installed the kernel26-headers, so have a tree at /usr/src/linux-2.6.37-ARCH/
    I put a Makefile in /usr/src/linux-2.6.37-ARCH/drivers/media/video/cx231xx/Makefile:
    --EDIT: There are no code files in the module directory, where do I get these??
    obj-m = cx231xx.o
    KVERSION = $(shell uname -r)
    all:
    make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
    clean:
    make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
    and now I try:
    [root@#blanked# linux-2.6.37-ARCH]# make M=drivers/media/video/cx231xx/
    make[1]: *** No rule to make target `drivers/media/video/cx231xx/cx231xx.c', needed by `drivers/media/video/cx231xx/cx231xx.o'. Stop.
    make: *** [_module_drivers/media/video/cx231xx] Error 2
    Last edited by craagmeister (2011-03-11 14:21:58)

  • Having trouble compiling netmap kernel module

    Hey everyone,
    First time poster here. Hopefully this question isn't too stupid but I've been having a hard time figuring this out.
    I'm trying to install the netmap drivers for Arch. I've downloaded the header files through pacman, but the configure script for netmap spits out an error stating it requires the full kernel source.
    This is where I'm unsure of what to do. I've gone to kernel.org and downloaded this tar ball: http://mirrors.kernel.org/archlinux/sou … src.tar.gz
    I unpacked it to /usr/src/ and, as instructed in the configure script's error, I run the script with an option to point to the kernel source as such:
    ./configure --kernel-sources=/usr/src/linux/
    ********************************** ERROR **********************************
    *** Cannot find full kernel sources.
    *** We need the full kernel sources to build the netmap-enabled drivers.
    *** Please note that most distributions provide separate packages for kernel
    *** headers and sources. Once you know the path to kernel sources, you can
    *** rerun this script with the additional
    *** --kernel-sources=/path/to/sources
    *** option.
    *** If you are only interested in VALE and pipes, you can rerun the script
    *** now with the '--no-drivers' option. Hardware devices will then be accessed
    *** via a generic adapter at reduced performance."
    *** Current configuration values:
    *** kernel directory /lib/modules/3.18.6-1-ARCH/build
    *** [/usr/lib/modules/3.18.6-1-ARCH/build]
    *** linux version 31206 [3.18.6]
    *** module file netmap.ko
    *** subsystems generic monitor pipe vale
    *** no-drivers
    But it keeps giving me the same error! Did I not download the kernel source? I feel like I'm so close...
    - Cory
    Last edited by burning_flag (2015-03-19 05:28:36)

    Step by Step to fix your Mac

  • How to compile virtualbox host modules dkms for chroot in android x86?

    Hi all,
    I am running arch linux using chroot method in android phone (asus zenfone 5 intel processor). I want to install and run virtualbox in that environment. I have kernel source of my phone, I do not know how to get kernel headers and install them in chroot environment, can anyone guide me on how to compile virtualbox modules and run virtualbox in chrooted environment on android x86?

    Hi all,
    I am running arch linux using chroot method in android phone (asus zenfone 5 intel processor). I want to install and run virtualbox in that environment. I have kernel source of my phone, I do not know how to get kernel headers and install them in chroot environment, can anyone guide me on how to compile virtualbox modules and run virtualbox in chrooted environment on android x86?

  • Btsco does not install kernel module snd_bt_sco for current kernel

    Hey,
    When installing package btsco, the only snd_bt_sco module installed is for kernel version 2.6.19-ARCH.
    So as it stands, bluetooth headset functionality on current is broken. All other bluetooth related features seem to function ok.
    Sarton

    I've been doing some research to get my bluetooth headset to work. Theres been changes lately to the packages which affect the wiki article on getting bluetooth headsets to work. btsco is deprecated afaik. supposedly the plugz project is where its at now. I am having trouble finding any solid information on this subject.  I am going to make a PKGBUILD for plugz from cvs, and see what happens from there.
    http://bluetooth-alsa.sourceforge.net/index.html

  • Compiling kernel module on 64bit Solaris10  amd64 platform

    Hi,
    i m compiling my kernel module in Solaris10 booted in 64bit on amd64 platform.
    i m using two extra flags: -xarch=amd64 -xmodel=kernel
    But i m getting error s as follows:
    ld: fatal: file -c : open failed: No sich file or directory.
    ld: fatal: symbol '_fini' is multiply defined.
    (file /opt/SUNWspro/prod/lib/ctri.o type=FUNC; file bcmod.o type=FUNC) ;
    ld: fatal: symbol '_init' is multiply defined.
    (file /opt/SUNWspro/prod/lib/ctri.o type=FUNC; file bcmod.o type=FUNC) ;
    ld: fatal: file processing errors: No output written to a.out
    can somebody give hint .

    I think you need to take this question to an Open Solaris community forum at http://www.opensolaris.org
    Your question is not about the C compiler, but about how to build the Solaris kernel.

  • [SOLVED] nVidia 87.76 Drivers installer fails to build kernel module

    Hey,
    I have a nVidia GeForce2 Integrated graphics card on my Asus A7N266 motherboard. According to the nVidia site, http://www.nvidia.com/object/IO_32667.html, the most recent driver that supports this is the 96.xx series. Yet as shown here, http://www.nvnews.net/vbulletin/showthread.php?t=87332, many people have found that the 96.xx series drivers cause graphical corruption when using a GeForce2 IGP.
    Before coming to Arch, I had used Xubuntu 7.04 and managed to compile the last known working drivers, version 87.76, following the instructions here: http://kmandla.wordpress.com/2007/03/25 … 20-12-386/
    That all went well but now I'm using Arch. I tried using the nvidia-96.xx driver in the repos just for testing sake but I still got the same graphical corruption.
    Thus I have been trying to install the 87.76 drivers on Arch, but it always fails at the kernel module building stage. I had first applied this patch here, http://www.nvnews.net/vbulletin/showthr … ost1086669, before compling as the plain driver wont compile against recent kernels.
    Here is the output from the installer:
    nvidia-installer log file '/var/log/nvidia-installer.log'
    creation time: Sun Aug 5 11:57:53 2007
    option status:
    license pre-accepted : false
    update : false
    force update : false
    expert : false
    uninstall : false
    driver info : false
    precompiled interfaces : true
    no ncurses color : false
    query latest version : false
    OpenGL header files : true
    no questions : false
    silent : false
    no recursion : false
    no backup : false
    kernel module only : false
    sanity : false
    add this kernel : false
    no runlevel check : false
    no network : false
    no ABI note : false
    no RPMs : false
    no kernel module : false
    force SELinux : default
    force tls : (not specified)
    X install prefix : (not specified)
    X library install path : (not specified)
    X module install path : (not specified)
    OpenGL install prefix : (not specified)
    OpenGL install libdir : (not specified)
    utility install prefix : (not specified)
    utility install libdir : (not specified)
    doc install prefix : (not specified)
    kernel name : (not specified)
    kernel include path : (not specified)
    kernel source path : (not specified)
    kernel output path : (not specified)
    kernel install path : (not specified)
    proc mount point : /proc
    ui : (not specified)
    tmpdir : /tmp
    ftp mirror : ftp://download.nvidia.com
    RPM file list : (not specified)
    Using: nvidia-installer ncurses user interface
    -> License accepted.
    -> No precompiled kernel interface was found to match your kernel; would you li
    ke the installer to attempt to download a kernel interface for your kernel f
    rom the NVIDIA ftp site (ftp://download.nvidia.com)? (Answer: Yes)
    -> No matching precompiled kernel interface was found on the NVIDIA ftp site;
    this means that the installer will need to compile a kernel interface for
    your kernel.
    -> Performing CC sanity check with CC="cc".
    -> Performing CC version check with CC="cc".
    -> Kernel source path: '/lib/modules/2.6.22-ARCH/build'
    -> Kernel output path: '/lib/modules/2.6.22-ARCH/build'
    -> Performing rivafb check.
    -> Performing nvidiafb check.
    -> Cleaning kernel module build directory.
    executing: 'cd ./usr/src/nv; make clean'...
    rm -f -f nv.o nv-vm.o os-agp.o os-interface.o os-registry.o nv-i2c.o nv.o nv
    -vm.o os-agp.o os-interface.o os-registry.o nv-i2c.o nvidia.mod.o
    rm -f -f build-in.o nv-linux.o *.d .*.{cmd,flags}
    rm -f -f nvidia.{o,ko,mod.{o,c}} nv_compiler.h *~
    rm -f -f stprof stprof.o symtab.h
    rm -f -rf .tmp_versions
    -> Building kernel module:
    executing: 'cd ./usr/src/nv; make module SYSSRC=/lib/modules/2.6.22-ARCH/bui
    ld SYSOUT=/lib/modules/2.6.22-ARCH/build'...
    NVIDIA: calling KBUILD...
    make CC=cc KBUILD_VERBOSE=1 -C /lib/modules/2.6.22-ARCH/build SUBDIRS=/home
    /kris/Source/nVidia GLX 87.76 Driver/NVIDIA-Linux-x86-1.0-8776-pkg1/usr/src/
    nv modules
    test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
    echo; \
    echo " ERROR: Kernel configuration is invalid."; \
    echo " include/linux/autoconf.h or include/config/auto.conf are mis
    sing."; \
    echo " Run 'make oldconfig && make prepare' on kernel src to fix it
    echo; \
    /bin/false)
    make[2]: *** No rule to make target `GLX'. Stop.
    NVIDIA: left KBUILD.
    nvidia.ko failed to build!
    make[1]: *** [mdl] Error 1
    make: *** [module] Error 2
    -> Error.
    ERROR: Unable to build the NVIDIA kernel module.
    ERROR: Installation has failed. Please see the file
    '/var/log/nvidia-installer.log' for details. You may find suggestions
    on fixing installation problems in the README available on the Linux
    driver download page at www.nvidia.com.
    Any ideas as to how I can get the kernel module to build?
    I am using 'kernel26 2.6.22.1-4' with the 'kernel-headers 2.6.22.1-1' from the testing repo.
    Last edited by Nameless One (2007-08-10 07:08:38)

    make CC=cc  KBUILD_VERBOSE=1 -C /lib/modules/2.6.22-ARCH/buildSUBDIRS=/home/kris/Source/nVidia GLX 87.76 Driver/NVIDIA-Linux-x86-1.0-8776-pkg1/usr/src/
    The name of the directory you placed the driver in contains spaces. That is  why you get the no rule to make target GLX error.
    It would be better not to circumvent pacman. I am using the following PKGBUILDs for the 8776 driver:
    nvidia-8776:
    pkgname=nvidia-8776
    pkgver=1.0.8776
    _nver=1.0-8776
    _kernver='2.6.22-ARCH'
    pkgrel=1
    pkgdesc="NVIDIA drivers for Arch kernel."
    arch=(i686 x86_64)
    [ "$CARCH" = "i686" ] && ARCH=x86
    [ "$CARCH" = "x86_64" ] && ARCH=x86_64
    url="http://www.nvidia.com/"
    depends=(kernel26 nvidia-8776-utils)
    conflicts=('nvidia' 'nvidia-96xx' 'nvidia-71xx' 'nvidia-legacy')
    install=nvidia.install
    source=(http://download.nvidia.com/XFree86/Linux-$ARCH/${_nver}/NVIDIA-Linux-$ARCH-${_nver}-pkg0.run NVIDIA_kernel-1.0-8776-20061203.diff.txt)
    md5sums=('93ad45fe7b974a5a80348e1890f9b7c9' '70e669f06ee4881c2583261672de292a')
    [ "$CARCH" = "x86_64" ] && md5sums=('f5340e4bbce811add994b1685cdea03b' '70e669f06ee4881c2583261672de292a')
    build()
    # Extract
    cd $startdir/src/
    sh NVIDIA-Linux-$ARCH-${_nver}-pkg0.run --extract-only
    cd NVIDIA-Linux-$ARCH-${_nver}-pkg0
    # Any extra patches are applied in here...
    patch -p0 < $startdir/NVIDIA_kernel-1.0-8776-20061203.diff.txt ||return 1
    cd usr/src/nv/
    ln -s Makefile.kbuild Makefile
    make SYSSRC=/lib/modules/$_kernver/build module || return 1
    # install kernel module
    mkdir -p $startdir/pkg/lib/modules/${_kernver}/kernel/drivers/video/
    install -m644 nvidia.ko $startdir/pkg/lib/modules/${_kernver}/kernel/drivers/video/
    sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/*.install
    Place the patch (NVIDIA_kernel-1.0-8776-20061203.diff.txt) and nvidia.install in the same directory as the PKGBUILD.
    nvidia-utils:
    pkgname=nvidia-8776-utils
    pkgver=1.0.8776
    _nver=1.0-8776
    pkgrel=1
    pkgdesc="NVIDIA drivers utilities and libraries."
    arch=(i686 x86_64)
    [ "$CARCH" = "i686" ] && ARCH=x86
    [ "$CARCH" = "x86_64" ] && ARCH=x86_64
    url="http://www.nvidia.com/"
    depends=(xorg-server)
    conflicts=('libgl' 'libgl-dri' 'ati-fglrx-utils' 'nvidia-legacy-utils' 'nvidia-71xx-utils' 'nvidia-96xx-utils')
    provides=('libgl' )
    #install=nvidia.install
    source=(http://download.nvidia.com/XFree86/Linux-$ARCH/${_nver}/NVIDIA-Linux-$ARCH-${_nver}-pkg0.run)
    md5sums=('93ad45fe7b974a5a80348e1890f9b7c9')
    [ "$CARCH" = "x86_64" ] && md5sums=('f5340e4bbce811add994b1685cdea03b')
    build()
    # override nvida install routine and do it the long way.
    cd $startdir/src/
    sh NVIDIA-Linux-${ARCH}-${_nver}-pkg0.run --extract-only
    cd NVIDIA-Linux-${ARCH}-${_nver}-pkg0/usr/
    mkdir -p $startdir/pkg/usr/{lib,bin,share/applications,share/pixmaps,man/man1}
    mkdir -p $startdir/pkg/usr/lib/xorg/modules/{extensions,drivers}
    mkdir -p $startdir/pkg/usr/share/licenses/nvidia/
    install `find lib/ -iname \*.so\*` $startdir/pkg/usr/lib/
    install lib/tls/* $startdir/pkg/usr/lib
    install share/man/man1/* $startdir/pkg/usr/man/man1/
    rm $startdir/pkg/usr/man/man1/nvidia-installer.1.gz
    install X11R6/lib/libXv* $startdir/pkg/usr/lib/
    install share/applications/nvidia-settings.desktop $startdir/pkg/usr/share/applications/
    # fix nvidia .desktop file
    sed -e 's:__UTILS_PATH__:/usr/bin:' -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' -i $startdir/pkg/usr/share/applications/nvidia-settings.desktop
    install share/pixmaps/nvidia-settings.png $startdir/pkg/usr/share/pixmaps/
    install X11R6/lib/modules/drivers/nvidia_drv.so $startdir/pkg/usr/lib/xorg/modules/drivers
    install X11R6/lib/modules/extensions/libglx.so.$pkgver $startdir/pkg/usr/lib/xorg/modules/extensions
    install -m755 bin/nvidia-{settings,xconfig,bug-report.sh} $startdir/pkg/usr/bin/
    cd $startdir/pkg/usr/lib/;
    ln -s /usr/lib/libGL.so.$pkgver libGL.so
    ln -s /usr/lib/libGL.so.$pkgver libGL.so.1
    ln -s /usr/lib/libGLcore.so.$pkgver libGLcore.so.1
    ln -s /usr/lib/libnvidia-cfg.so.$pkgver libnvidia-cfg.so.1
    ln -s /usr/lib/libnvidia-tls.so.$pkgver libnvidia-tls.so.1
    cd $startdir/pkg/usr/lib/xorg/modules/extensions;
    ln -s /usr/lib/xorg/modules/extensions/libglx.so.$pkgver libglx.so
    install $startdir/src/NVIDIA-Linux-${ARCH}-${_nver}-pkg0/LICENSE $startdir/pkg/usr/share/licenses/nvidia/
    find $startdir/pkg/usr -type d -exec chmod 755 {} \;
    # phew :)
    Last edited by kappa (2007-08-09 11:14:42)

  • Trying to register the VirtualBox kernel modules using DKMS [FAILED]

    Hi,
    I am getting the following error while installing Oracle VirtualBox on OEL 5.2, 64-bit.
    I am able to see Virtual Machine Wizard from "Applications > System Tools > Oracle VM VirtualBox". Can I go ahead and do 11gR2 RAC installation using Oracle VirtualBox ???
    If I need to install DKMS kernel modules please let me know how to do that.
    ====================================================================================
    [root@linux2 OracleVM]# rpm -Uvh VirtualBox-4.1-4.1.18_78361_rhel5-1.x86_64.rpm
    warning: VirtualBox-4.1-4.1.18_78361_rhel5-1.x86_64.rpm: Header V4 DSA signature: NOKEY, key ID 98ab5139
    Preparing... ########################################### [100%]
    1:VirtualBox-4.1 ########################################### [100%]
    Creating group 'vboxusers'. VM users must be member of that group!
    No precompiled module for this kernel found -- trying to build one. Messages
    emitted during module compilation will be logged to /var/log/vbox-install.log.
    Stopping VirtualBox kernel modules [ OK ]
    Uninstalling old VirtualBox DKMS kernel modules [ OK ]
    Trying to register the VirtualBox kernel modules using DKMS [FAILED]
    (Failed, trying without DKMS)
    Recompiling VirtualBox kernel modules [ OK ]
    Starting VirtualBox kernel modules [ OK ]
    ====================================================================================
    Thanks.
    -Joy.

    And this relates to RAC, ASM, and Clusterware installation in what way?
    Please lock this thread and open one in the appropriate forum. Thanks.

  • [Kernel module development ]Makefile issue with .cpp

    Hi all,
    I'm currently in the process of rewriting an external kernel module, that shares a big part of its code with the Windows version of the driver.  The common files are C-code, but for some Windows-related obscure reason their extension is .cpp.  In the previous version of the driver, we had to run a small script on the files to convert the .cpp to .c files for the linux driver.  Not very elegant.  So I'd like to be able to work directly on the .cpp files, but compile them as "pure C" files.  This would allow us to directly work on the files fetched from the VCS, and it's a lot nicer!
    Unfortunately, when compiling a kernel module, it's ultimately the kernel's Makefile that's called to actually do the compilation, and no rule is defined in it to handle .cpp files, even when they contain pure-C code.  So my source files are never found, and I get a nice "no rule to make target".
    Would any of you know a way to do this?  I know of the "-x c" gcc option, but as I don't really master Makefiles, I don't know if I can pass it to the kernel Makefile, and no more how...  I looked all over the internet (took me a long time to read all of it...) and found nothing so far.
    Thanks a lot

    It's a bash check ([), it tells the script to add a conditional makedepends (if the kernel has that name, add that package as a dependency to build). It's optional, so it doesn't do any harm.
    Thanks for looking though .

  • Time which pentium G860 needs to compile the latest linux kernel

    Hi
    I'm going to buy intel G860 processor but I wonder how long it takes to compile latest stable kernel (3.7.5) using this processor. Whether anybody who has this processor can check it? Kernel compilling is kind of benchmark for me.
    Please use
    make defconfig
    Last edited by Linkas (2013-01-28 17:57:20)

    Many criticisms of Xen can be found with a simple Google search. The biggest one seems to be the need to modify guest OS code to make it run properly with Xen, but that is going away as Xen adds support for AMD-V and Intel VT technologies. KVM is coming on strong in the virtualization market now and seems to be the accepted choice.
    That said, I'm not sure how you would setup the machine to properly host VMs with KVM.
    Also, you may want to Google kexec to research that restarting the kernel without rebooting idea.

  • Compiling a Kernel. Benefits / Risks / Tips & Tricks ?

    I plan on compiling my kernel for arch from scratch.  I have backed everything up on my computer and I am going to format the partitions and install a fresh copy of Arch.
    I intend on following this guide to do it.
    Doing some Googling and general research on the subject of compiling the kernel I mixed messages about what it can actually do for you.  I am going to do it either way, for the learning experience (and bragging rights) and so I can say I have done it at least once.  I also wan't to know more about the kernel, it seems like a good way to find out.
    Anyways, Any advice is appreciated.
    Thank you,
    Daniel

    @iamdanhenry,
    The very first thing you should do is follow ewaller's suggestion and learn how to have multiple kernels with Arch.  I don't know how to do that yet as I'm an Arch newbie: my experience with compiling kernel's is on Debian.  The reason you want multiple kernels is exactly as ewaller said: what if your shiny new kernel won't even boot the system.
    As for the modules being listed: that's just the hardware in your machine.  Not all modules you may need may be loaded until you actually need them.  Remember my USB/NTFS example?  Well, there's also the "character encoding" needed to mount an NTFS volume.  You can have both USB and NTFS support compiled into your kernel and still not be able to plug a thumbdrive successfully with an NTFS filesystem because your kernel doesn't have another piece: the character encoding used on the filesystem.
    If you are unsure of which modules you need then there's perhaps do not use localmodconfig and instead just use the jobs number.  More jobs will still compile the kernel faster and if you don't use localmodconfig you'll just have a resulting "and the kitchen sink" kernel.
    Now the link karol gave might be useful too.  From my gross understanding of it is that it has an option to keep a record of "all modules ever modprobed."  This could - if I'm understanding it right - help greatly in building a successful localmodconfig kernel that has everything you need.  You'd just have to build up a history of using your system day-to-day and have that package build up a list of everything you happen to need.  Once you have that history then compile a minimal kernel.
    Another thing to explore - and I'm not certain of the compiler flags: perhaps someone else can help - is to enable specific compilation options for your machine.  For example, if your CPU flags include SSE2 support then compile your kernel with that flag set.  The benefit of setting compilation flags based on your actual processor's abilities is that in the end you may end up with a slightly faster overall machine.

  • Compiled kernel module fails to install

    A few moments ago finished compiling my own kernel, but still I can not boot with the new kernel.
    When installing modules:
    make modules_install
    I get this:
    Warning: you may need to install module-init-tools
    The kernel was compiled in the traditional manner, and I get no error with mkinitcpio:
    ----> mkinitcpio -k 3.2.9 New -g /boot/initramfs-New.img
    ==> Starting build: 3.2.9
    -> Running build hook: [base]
    -> Running build hook: [udev]
    -> Running build hook: [autodetect]
    -> Running build hook: [pata]
    -> Running build hook: [scsi]
    -> Running build hook: [sata]
    -> Running build hook: [filesystems]
    -> Running build hook: [usbinput]
    -> Running build hook: [fsck]
    -> Running build hook: [fglrx]
    Building fglrx module for 3.2.9 kernel ...
    Ok.
    ==> Generating module dependencies
    ==> Creating gzip initcpio image: /boot/initramfs-New.img
    ==> Image generation successful
    I have the entry in grub and I can enter without problem, but there comes a point where you do not start:
    Waiting 10 seconds for device /dev/sda4 ...
    ERROR: Unable to find root device '/dev/sda4'.
    You are being dropped to a recovery shell
    Type 'exit' to try and continue booting
    sh: can't access tty: job control turned off
    [rootfs /]#
    And if my partition /root is /dev/sda4,I found a topic like this, but even I can not fix the problem:
    https://bbs.archlinux.org/viewtopic.php?id=135851

    I compiled the kernel old version that I have problems with the battery life on the newer versions.
    The battery only lasts me one hour, but that is another problem.
    fdisk:
    Disk /dev/sda: 500.1 GB, 500107862016 bytes, 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Identificador del disco: 0x5d8c0991
    Disposit. Inicio Comienzo Fin Bloques Id Sistema
    /dev/sda1 * 2048 409599 203776 7 HPFS/NTFS/exFAT
    /dev/sda2 409600 147210239 73400320 7 HPFS/NTFS/exFAT
    /dev/sda3 147219660 862304939 357542640 5 Extendida
    /dev/sda4 * 862304940 976773167 57234114 83 Linux
    /dev/sda5 147219723 859477499 356128888+ 7 HPFS/NTFS/exFAT
    /dev/sda6 859477563 862304939 1413688+ 82 Linux swap / Solaris
    /lib/modules:
    drwxr-xr-x 4 root root 4096 oct 3 20:40 3.2.9
    drwxr-xr-x 3 root root 4096 oct 3 08:55 3.5.4-1-ARCH
    drwxr-xr-x 2 root root 4096 oct 3 08:55 extramodules-3.5-ARCH
    /boot:
    drwxr-xr-x 6 root root 4096 oct 3 06:20 grub
    -rw-r--r-- 1 root root 12612222 oct 3 08:55 initramfs-linux-fallback.img
    -rw-r--r-- 1 root root 3098536 oct 3 08:55 initramfs-linux.img
    -rw-r--r-- 1 root root 2016551 oct 3 20:40 initramfs-New.img
    -rw-r--r-- 1 root root 2081862 oct 3 19:37 System.map-New
    -rw-r--r-- 1 root root 3444736 sep 15 00:15 vmlinuz-linux
    -rw-r--r-- 1 root root 4434400 oct 3 19:35 vmlinuz-New
    I install grub-legacy of AUR, but I have to change to syslinux.
    For now this is my menu.lst:
    # (0) Arch Linux
    title Arch Linux
    root (hd0,3)
    kernel /boot/vmlinuz-linux root=/dev/sda4 nomodeset vga=773 ro
    initrd /boot/initramfs-linux.img
    # (0) Arch Linux
    title Arch Linux NK
    root (hd0,3)
    kernel /boot/vmlinuz-New root=/dev/sda4 nomodeset ro
    initrd /boot/initramfs-New.img

Maybe you are looking for

  • The "Normal Brush Tip" cursor is appearing as the "Full Brush Tip" cursor in Photoshop CC.

    In spite of resetting all presets, restarting, etc., the Normal Brush Tip cursor is appearing as the Full Brush Tip cursor in Photoshop CC. The Full Brush Tip cursor is working as it should. Photoshop CC 14.1.2 x64 OS X 10.9

  • ESata - is that a seperate bus from the FW800 port?

    I'm thinking of sometimes booting from an external FW800 drive, and having video data on another such external drive. One using the FW800 port, the other the eSata port with a FW800 card. If I were to daisy chain them they will be using the same data

  • How to hide the Parameters?

    Hi all,          I Have two parameters in a report. I need to hide one paramerter when another one is selected and vice versa. Kindly give me the solution. Thanks for your support in advance. Thanks  & Regards, Shiva

  • Problem with the Process chain

    Hi, I created a Process chain and moved to Q for testing. The transport was failed because some objects are locked in BQ system. I unlocked them and moved the TR again. Now the transport was successful but the changes to the process chain are not ref

  • Cannot perform in-place upgrade from WS2012 to WS 2012 R2

    Trying to upgrade from Windows Server 2012 to Windows Server 2012 R2 The following occurs: Copy install files to install directory on local system Click Setup.exe. UAC requires acceptance. Windows Server 2012 R2 appears. Click Install Now Button. Mes