{"id":20978768,"url":"https://github.com/holmanb/lkm","last_synced_at":"2025-03-13T09:46:46.555Z","repository":{"id":111428437,"uuid":"163337761","full_name":"holmanb/lkm","owner":"holmanb","description":"linux kernel driver playground","archived":false,"fork":false,"pushed_at":"2021-03-22T13:13:21.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T06:19:00.831Z","etag":null,"topics":["character-devices","ioctl","linux-driver"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/holmanb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-27T21:32:31.000Z","updated_at":"2024-08-15T21:15:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1c966de-0beb-455c-8b6f-08c16b79eae3","html_url":"https://github.com/holmanb/lkm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holmanb%2Flkm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holmanb%2Flkm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holmanb%2Flkm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holmanb%2Flkm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/holmanb","download_url":"https://codeload.github.com/holmanb/lkm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243382783,"owners_count":20282007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["character-devices","ioctl","linux-driver"],"created_at":"2024-11-19T05:07:35.294Z","updated_at":"2025-03-13T09:46:46.532Z","avatar_url":"https://github.com/holmanb.png","language":"C","readme":"kernel play\n===========\n\n*testing grounds for loadable kernel modules (LKM)*\n\n\n\n### Dependencies\n\n**Fedora**\n\n```\nsudo dnf install git gcc make kernel-devel\n```\n\n**Arch**\n\n```\nsudo pacman -S git gcc make linux-headers\n```\n\n\n### Install\n\ngit clone https://github.com/holmanb/lkm.git\n\n### Usage\n\neach directory contains a Makefile for running tests\n\neach Makefile implements `all`/`clean`/`test`\n\nto quickly test out modules in a VM, one can get up and running quickly with u-root + qemu + kvm\n\n\n#### Usage\n```\n# initial setup\ngo get github.com/u-root/u-root\n\ncd \u003cproject directory\u003e\nmake all\nu-root -files \u003ckernel_module\u003e.ko  core boot\nqemu-system-x86_64 -kernel /boot/vmlinuz-$(uname -r) -initrd /tmp/initramfs.linux_amd64.cpio\n...\n\u003cin vm\u003e\n...\ninsmod \u003ckernel_module\u003e.ko\n...\n\u003cinteract with module\u003e\n...\nrmmod \u003ckernel_module\u003e.ko\n```\n\n\n### Resources\n\nSource of Truth\n\nhttps://github.com/torvalds/linux\n\n\nVery Dated (2.6) But Valuable\n\nhttp://tldp.org/LDP/lkmpg/2.6/html/index.html\n\n\nA Short Character Device Blog Post\n\nhttps://blog.sourcerer.io/writing-a-simple-linux-kernel-module-d9dc3762c234\n\n\nBlog Post By Dr. Derek Molloy of Dublin City University, Ireland\n\nwww.derekmolloy.ie/writing-a-linux-kernel-module-part-1-introduction\n\n\nRegister A Device Class and Driver of a Dynamically Allocated Major Number From Kernel Space\n\nwww.derekmolloy.ie/writing-a-linux-kernel-module-part-2-a-character-device\n\n\nShows How To Add Ioctl To Char Device\n\nhttps://www.tldp.org/LDP/lkmpg/2.4/html/x856.html\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholmanb%2Flkm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fholmanb%2Flkm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholmanb%2Flkm/lists"}