Giter Site home page Giter Site logo

myfirstawesomekernelmodule's Introduction

My First Awesome Kernel Module

Simple kernel module for embedded Linux distros based on Poky.

Tested on Yocto 4.2 (mickledore) with kernel version : 6.1.38-yocto-standard

Installing

  1. Install Yocto. You can read how to install here .

  2. Clone this repo.

  3. cp MyFirstAwesomeKernelModule <poky directory>
  4. source oe-init-bulid-env
  5. Add layer

    bitbake-layers add-layer ../MyFirstAwesomeKernelModule/
  6. Add to end of your local.conf IMAGE_INSTALL:append = " awesome-mod"

  7. Build image with bitbake <image name>

Usage

  1. Install module with
    su
    insmod /lib/modules/$(uname -r)/extra/awesome_module.ko address=<breakpoint address>
  2. For change breakpoint address
    su
    echo <address> > /sys/kernel/address/address 
    For read
    cat /sys/kernel/address/address

Used materials

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Incorporating-Out-of-Tree-Modules-in-YOCTO/ta-p/1373825

https://martin.uy/blog/hardware-breakpoints-in-the-linux-kernel-through-perf_events/

https://stackoverflow.com/questions/19725900/watch-a-variable-memory-address-change-in-linux-kernel-and-print-stack-trace

https://embetronicx.com/tutorials/linux/device-drivers/sysfs-in-linux-kernel/

https://devarea.com/linux-kernel-development-kernel-module-parameters/

myfirstawesomekernelmodule's People

Contributors

l09dm0zgus avatar

Stargazers

Blinc avatar

Watchers

 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.