Forums

Resolved
0 votes
I think this post is addressed to Nick but if someone want to comment your welcome. :)

I like to build drivers on a ClearOS system. In this case i like to build the mvsas drivers. Nick did this for me but i like to learn how this is done. Nick can you give me pointers, guidance?

I did this before a long time ago but i'm not remember totally how I did it and if it was the correct way.

So i think i have to install virtual box on my machine and install ClearOS Community with the developers environment. Correct?
Sunday, April 26 2015, 07:24 AM
Share this post:
Responses (4)
  • Accepted Answer

    Monday, April 27 2015, 07:38 PM - #Permalink
    Resolved
    0 votes
    Tim Burgess wrote:

    Don't forget to setup your build environment first ;-)

    EDIT: Developer env page on clearos.com doesn't exist yet


    Tim, I found the developers documentation on clearos.com site. It's under Community --> Developers (on the right).
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 27 2015, 07:03 PM - #Permalink
    Resolved
    0 votes
    Thanks for the reply's!

    Okay, first step done. The build environment is installed in a virtual machine. If I have some time tomorrow evening I will follow the example and try to build a rpm. Now some reading...
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, April 26 2015, 09:05 PM - #Permalink
    Resolved
    0 votes
    Don't forget to setup your build environment first ;-)

    EDIT: Developer env page on clearos.com doesn't exist yet
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, April 26 2015, 09:10 AM - #Permalink
    Resolved
    0 votes
    You can use a virtual machine for safety or a separate user in your build environment. I use a user called "build" so the build environment is under /home/build so from root user, to get in as my "build" user, I do:
    su - build
    The "-" is important.

    I then use a couple of mini scripts to build the kmod drivers. A generic one, /home/build/kmod-Update:
    #!/bin/bash

    Package=$1
    Version=$2
    TARGET=x86_64

    cd ~/rpmbuild/SOURCES

    wget http://elrepo.reloumirrors.net/elrepo/el6/SRPMS/$Package-kmod-$Version.el6.elrepo.src.rpm
    rpmbuild --rebuild --define "kversion `uname -r`" --define 'packager Nick Howitt' $Package-kmod-$Version.el6.elrepo.src.rpm
    I actually have a few more lines in it just for the igb and e1000e drivers because they have a specific problem with backward compatibility.

    I call this from another program or manually, e.g. /home/build/kmod-mvsas-Update:
    #!/bin/bash

    PACKAGE=mvsas
    VERSION=0.8.16-1

    ./kmod-Update $PACKAGE $VERSION
    They are "Mickey Mouse" but they work.

    In my /home/build/.rpmmacros file I have:
    %dist .clearos6.njh
    %_topdir /home/build/rpmbuild
    %debug_package %{nil}
    %dist governs what your rpm gets called after compilation.
    The reply is currently minimized Show
Your Reply