Giter Club home page Giter Club logo

linuxkernelmodule's Introduction

LinuxKernelModule

Thành viên:

  • Nguyễn Quý Thanh - 18127210.
  • Nguyễn Thị Tâm Phúc - 18127182.
  • Nguyễn Phạm Thanh Vy - 18127258 (đang nằm viện - đã xin phép).

Yêu cầu:

  • Tìm hiểu về Linux Kernel Module.
  • Tìm hiểu về hệ thống quản lý file và device trong linux.
  • Giao tiếp giữa tiến trình ở user space và kernel space.

Kết quả:

  • Module sinh ra một số ngẫu nhiên.
  • Tạo một character device cho phép tiến trình ở user space có thể open và read các số ngẫu nhiên.

Môi trường sử dụng:

  • Ubuntu 20.04 LTS.
  • Kernel phiên bản 5.4.0-26-generic.
  • Ngôn ngữ C với các thư viện hỗ trợ của Linux.
  • Cài đặt thêm gói build-essential bằng lệnh sudo apt-get install build-essential.

Hướng dẫn sử dụng module:

1. Cách 1: sử dụng lệnh make all

  • Mở terminal và cd vào thư mục chứa source code.
  • Chạy lệnh make all.
  • Cài đặt module bằng lệnh sudo insmod Random.ko.
  • Xem số ngẫu nhiên được sinh ra bằng lệnh sudo ./random.
  • Gỡ cài đặt module bằng lệnh sudo rmmod Random.
  • Chạy lệnh dmesg để xem các bước thực hiện của module.

2. Cách 2: sử dụng lệnh make auto

  • Mở terminal và cd vào thư mục chứa source code.
  • Chạy lệnh make auto để thực hiện tự động toàn bộ các bước bên trên.
  • Chạy lệnh dmesg để xem các bước thực hiện của module.

linuxkernelmodule's People

Contributors

thanhqng1510 avatar vyvyhcmus avatar

Stargazers

 avatar  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.