Giter Club home page Giter Club logo

Comments (1)

yslys avatar yslys commented on July 16, 2024

The solution is as follows:

  1. Download Linux kernel source, check out any version you want
  2. Add the kernel module to /drivers directory to eliminate the need of compiling it as an out-of-tree kernel module. Detailed steps could be found here: https://stackoverflow.com/questions/11710022/adding-new-driver-code-to-linux-source-code.
  3. The link above targets ARM, not RISCV, so needs to change ARM to RISCV. The link above also mentions you need to modify kernel_source/arch/arm/configs/--defconfig, it just means the file with defconfig as suffix. So you could simply modify the file kernel_source/arch/riscv/configs/defconfig to set CONFIG_YOUR_DRIVER=y.
  4. Re-compile the kernel source, and pass the generated Image file to -kernel option to QEMU, then run QEMU.
  5. The kernel module will be automatically loaded had there been a device supported. Don't forget to mknod as what you would normally do after insmod when dealing with out-of-tree kernel modules.

from freedom-u-sdk.

Related Issues (20)

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.