Giter VIP home page Giter VIP logo

cmake-kernel-module's Introduction

A simple hello world kernel module, that can be build with cmake. Utilize Kbuild through cmake, and do it in a build directory.

Usage:

  1. clone it.
  2. create a folder: mkdir build
  3. navigate into build: cd build
  4. run cmake: cmake ../
  5. build it: make

Expected behavior:

cmake ../ shall do:

$ cmake ../
-- The C compiler identification is GNU 9.2.1
-- Check for working C compiler: /usr/lib64/ccache/cc
-- Check for working C compiler: /usr/lib64/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Kernel release: 5.3.13-300.fc31.x86_64
-- Kernel headers: /usr/src/kernels/5.3.13-300.fc31.x86_64
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ca/Code/cmake-kernel-module/build

make shall do:

make
Scanning dependencies of target driver
[100%] Generating hello.ko
[100%] Built target driver

Among others the hello.ko is now present.

Thoughts and comments are welcome.

cmake-kernel-module's People

Contributors

enginning avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.