GithubHelp home page GithubHelp logo

ft_penguin's Introduction

install cURL, OpenSSL, SSH and then Git git config --global http.sslVerify false

#a00 -> git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ -> make & make modules_install -> cp arch/x86/boot/bzImage /boot/vmlinuz-torvalds-6.9 -> vim /boot/grub/grub.cfg menuentry "GNU/Linux, Linux torvalds" { linux /boot/vmlinuz-torvalds root=/dev/sda2 ro }

#a01

##Makefile obj-m += main.o

all: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

##main.c #include <linux/module.h> #include <linux/kernel.h>

MODULE_LICENSE("MIT"); MODULE_AUTHOR("jperrier"); MODULE_DESCRIPTION("Hello World module");

int init_module(void) { printk(KERN_INFO "Hello world !\n"); return 0; }

void cleanup_module(void) { printk(KERN_INFO "Cleaning up module.\n"); }

insmod main.ko dmesg | tail -1 rmmod main.ko

#a02 -> add -thor_kernel to EXTRAVERSION -> use git format-patch -1 HEAD -> cp arch/x86/boot/bzImage /boot/vmlinuz-torvalds -> boot on it and get /var/log/kern.log

#a03 /usr/src/kernel-6.4.12/scripts/checkpatch.pl module.c -no-tree -file --strict

#a04 -> rules /etc/udev/rules.d ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceProtocol}=="01" RUN+="insmod /root/ft_penguin//a04/keyboard_dd.ko"

ft_penguin's People

Contributors

jb-perrier 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.