Submit Search
Upload
Linux device driver for dummies
•
4 likes
•
1,238 views
Hirohito Kato
Follow
これからLinuxデバイスドライバ開発をする方に向けて、最初の一歩になる内容をまとめました。
Read less
Read more
Software
Report
Share
Report
Share
1 of 24
Download now
Download to read offline
Recommended
Ci system part i
Ci system part i
振維 李
Ci system part ii
Ci system part ii
振維 李
Ищем уязвимости нулевого дня в ядре Linux
Ищем уязвимости нулевого дня в ядре Linux
Positive Hack Days
Davide Berardi - Linux hardening and security measures against Memory corruption
Davide Berardi - Linux hardening and security measures against Memory corruption
linuxlab_conf
Optimizing the Design and Implementation of KVM/ARM - SFO17-403
Optimizing the Design and Implementation of KVM/ARM - SFO17-403
Linaro
如何利用 Docker 強化網站安全
如何利用 Docker 強化網站安全
Tim Hsu
Bz backtrack.usage
Bz backtrack.usage
djenoalbania
Docker deploy
Docker deploy
Eric Ahn
Recommended
Ci system part i
Ci system part i
振維 李
Ci system part ii
Ci system part ii
振維 李
Ищем уязвимости нулевого дня в ядре Linux
Ищем уязвимости нулевого дня в ядре Linux
Positive Hack Days
Davide Berardi - Linux hardening and security measures against Memory corruption
Davide Berardi - Linux hardening and security measures against Memory corruption
linuxlab_conf
Optimizing the Design and Implementation of KVM/ARM - SFO17-403
Optimizing the Design and Implementation of KVM/ARM - SFO17-403
Linaro
如何利用 Docker 強化網站安全
如何利用 Docker 強化網站安全
Tim Hsu
Bz backtrack.usage
Bz backtrack.usage
djenoalbania
Docker deploy
Docker deploy
Eric Ahn
Automating Mendix application deployments with Nix
Automating Mendix application deployments with Nix
Sander van der Burg
Teste de software Desafios e oportunidades no mundo da Virtualizacao, dos Con...
Teste de software Desafios e oportunidades no mundo da Virtualizacao, dos Con...
PotiLivre Sobrenome
Xorg.Confb
Xorg.Confb
guest131699a
Installation of CaudalFin E1/T1 (PRI) Boards on Asterisk & CentOS
Installation of CaudalFin E1/T1 (PRI) Boards on Asterisk & CentOS
CaudalFin Technologies
窺探職場上所需之資安專業技術與能力 Tdohconf
窺探職場上所需之資安專業技術與能力 Tdohconf
jack51706
Angelo Compagnucci - Upgrading buildroot based devices with swupdate
Angelo Compagnucci - Upgrading buildroot based devices with swupdate
linuxlab_conf
Pusk
Pusk
Bruno Cornec
Présentation Clever Audit
Présentation Clever Audit
clevernetsystemsgeneva
Iphone ifuse
Iphone ifuse
guest8a79502
How to Connect MQTT Broker on ESP8266 WiFi
How to Connect MQTT Broker on ESP8266 WiFi
Naoto MATSUMOTO
Installation of DAHDI, libpri and Asterisk
Installation of DAHDI, libpri and Asterisk
CaudalFin Technologies
ERP System Implementation Kubernetes Cluster with Sticky Sessions
ERP System Implementation Kubernetes Cluster with Sticky Sessions
Chanaka Lasantha
Linux 系統管理與安全:系統防駭與資訊安全
Linux 系統管理與安全:系統防駭與資訊安全
維泰 蔡
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
維泰 蔡
Nagios Conference 2014 - Mike Weber - Expanding NRDS Capabilities on Linux Sy...
Nagios Conference 2014 - Mike Weber - Expanding NRDS Capabilities on Linux Sy...
Nagios
Mosquito Attack
Mosquito Attack
Hirohito Kato
Kernel overview
Kernel overview
Kai Sasaki
Linux Char Device Driver
Linux Char Device Driver
Gary Yeh
yidev第七回勉強会:「Assets Library手習い」発表資料
yidev第七回勉強会:「Assets Library手習い」発表資料
Hirohito Kato
functional programming & c++
functional programming & c++
Hirohito Kato
10分で分かるLinuxブロックレイヤ
10分で分かるLinuxブロックレイヤ
Takashi Hoshino
Programming Embedded linux
Programming Embedded linux
Liran Ben Haim
More Related Content
What's hot
Automating Mendix application deployments with Nix
Automating Mendix application deployments with Nix
Sander van der Burg
Teste de software Desafios e oportunidades no mundo da Virtualizacao, dos Con...
Teste de software Desafios e oportunidades no mundo da Virtualizacao, dos Con...
PotiLivre Sobrenome
Xorg.Confb
Xorg.Confb
guest131699a
Installation of CaudalFin E1/T1 (PRI) Boards on Asterisk & CentOS
Installation of CaudalFin E1/T1 (PRI) Boards on Asterisk & CentOS
CaudalFin Technologies
窺探職場上所需之資安專業技術與能力 Tdohconf
窺探職場上所需之資安專業技術與能力 Tdohconf
jack51706
Angelo Compagnucci - Upgrading buildroot based devices with swupdate
Angelo Compagnucci - Upgrading buildroot based devices with swupdate
linuxlab_conf
Pusk
Pusk
Bruno Cornec
Présentation Clever Audit
Présentation Clever Audit
clevernetsystemsgeneva
Iphone ifuse
Iphone ifuse
guest8a79502
How to Connect MQTT Broker on ESP8266 WiFi
How to Connect MQTT Broker on ESP8266 WiFi
Naoto MATSUMOTO
Installation of DAHDI, libpri and Asterisk
Installation of DAHDI, libpri and Asterisk
CaudalFin Technologies
ERP System Implementation Kubernetes Cluster with Sticky Sessions
ERP System Implementation Kubernetes Cluster with Sticky Sessions
Chanaka Lasantha
Linux 系統管理與安全:系統防駭與資訊安全
Linux 系統管理與安全:系統防駭與資訊安全
維泰 蔡
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
維泰 蔡
Nagios Conference 2014 - Mike Weber - Expanding NRDS Capabilities on Linux Sy...
Nagios Conference 2014 - Mike Weber - Expanding NRDS Capabilities on Linux Sy...
Nagios
What's hot
(15)
Automating Mendix application deployments with Nix
Automating Mendix application deployments with Nix
Teste de software Desafios e oportunidades no mundo da Virtualizacao, dos Con...
Teste de software Desafios e oportunidades no mundo da Virtualizacao, dos Con...
Xorg.Confb
Xorg.Confb
Installation of CaudalFin E1/T1 (PRI) Boards on Asterisk & CentOS
Installation of CaudalFin E1/T1 (PRI) Boards on Asterisk & CentOS
窺探職場上所需之資安專業技術與能力 Tdohconf
窺探職場上所需之資安專業技術與能力 Tdohconf
Angelo Compagnucci - Upgrading buildroot based devices with swupdate
Angelo Compagnucci - Upgrading buildroot based devices with swupdate
Pusk
Pusk
Présentation Clever Audit
Présentation Clever Audit
Iphone ifuse
Iphone ifuse
How to Connect MQTT Broker on ESP8266 WiFi
How to Connect MQTT Broker on ESP8266 WiFi
Installation of DAHDI, libpri and Asterisk
Installation of DAHDI, libpri and Asterisk
ERP System Implementation Kubernetes Cluster with Sticky Sessions
ERP System Implementation Kubernetes Cluster with Sticky Sessions
Linux 系統管理與安全:系統防駭與資訊安全
Linux 系統管理與安全:系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Nagios Conference 2014 - Mike Weber - Expanding NRDS Capabilities on Linux Sy...
Nagios Conference 2014 - Mike Weber - Expanding NRDS Capabilities on Linux Sy...
Viewers also liked
Mosquito Attack
Mosquito Attack
Hirohito Kato
Kernel overview
Kernel overview
Kai Sasaki
Linux Char Device Driver
Linux Char Device Driver
Gary Yeh
yidev第七回勉強会:「Assets Library手習い」発表資料
yidev第七回勉強会:「Assets Library手習い」発表資料
Hirohito Kato
functional programming & c++
functional programming & c++
Hirohito Kato
10分で分かるLinuxブロックレイヤ
10分で分かるLinuxブロックレイヤ
Takashi Hoshino
Programming Embedded linux
Programming Embedded linux
Liran Ben Haim
Yocto bspを作ってみた
Yocto bspを作ってみた
wata2ki
自動並列化コンパイラをAndroidに適用してみた
自動並列化コンパイラをAndroidに適用してみた
magoroku Yamamoto
React native
React native
Liran Ben Haim
オペレーティングシステム 第1回-公開用
オペレーティングシステム 第1回-公開用
Ruo Ando
subversion hacks (create a commit template)
subversion hacks (create a commit template)
Hirohito Kato
Linux IO
Linux IO
Liran Ben Haim
DMA Survival Guide
DMA Survival Guide
Kernel TLV
Yocto Project ハンズオン プレゼン用資料
Yocto Project ハンズオン プレゼン用資料
Nobuhiro Iwamatsu
Linux scheduler
Linux scheduler
Liran Ben Haim
linux device driver
linux device driver
Rahul Batra
Fighting history of CGFloat in Swift
Fighting history of CGFloat in Swift
Hirohito Kato
Git flowの活用事例
Git flowの活用事例
Hirohito Kato
English for programmers
English for programmers
Hirohito Kato
Viewers also liked
(20)
Mosquito Attack
Mosquito Attack
Kernel overview
Kernel overview
Linux Char Device Driver
Linux Char Device Driver
yidev第七回勉強会:「Assets Library手習い」発表資料
yidev第七回勉強会:「Assets Library手習い」発表資料
functional programming & c++
functional programming & c++
10分で分かるLinuxブロックレイヤ
10分で分かるLinuxブロックレイヤ
Programming Embedded linux
Programming Embedded linux
Yocto bspを作ってみた
Yocto bspを作ってみた
自動並列化コンパイラをAndroidに適用してみた
自動並列化コンパイラをAndroidに適用してみた
React native
React native
オペレーティングシステム 第1回-公開用
オペレーティングシステム 第1回-公開用
subversion hacks (create a commit template)
subversion hacks (create a commit template)
Linux IO
Linux IO
DMA Survival Guide
DMA Survival Guide
Yocto Project ハンズオン プレゼン用資料
Yocto Project ハンズオン プレゼン用資料
Linux scheduler
Linux scheduler
linux device driver
linux device driver
Fighting history of CGFloat in Swift
Fighting history of CGFloat in Swift
Git flowの活用事例
Git flowの活用事例
English for programmers
English for programmers
Similar to Linux device driver for dummies
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
biicode
Oracle11g On Fedora14
Oracle11g On Fedora14
kmsa
Oracle11g on fedora14
Oracle11g on fedora14
Khalid Matar Albuflasah
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to Android
Vlatko Kosturjak
Linux Device Driver’s
Linux Device Driver’s
Rashmi Warghade
Android for Embedded Linux Developers
Android for Embedded Linux Developers
Opersys inc.
syzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzer
Dmitry Vyukov
Debugging webOS applications
Debugging webOS applications
fpatton
Linux device driver
Linux device driver
chatsiri
Linux
Linux
Kavi Bharathi R
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Pierre-jean Texier
Reverse Engineering and Bug Hunting on KMDF Drivers - Enrique Nissim - 44CON ...
Reverse Engineering and Bug Hunting on KMDF Drivers - Enrique Nissim - 44CON ...
44CON
Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2
Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2
Adil Khan
Building
Building
Satpal Parmar
Introduction to docker
Introduction to docker
Christophe Muller
Embedded Linux Odp
Embedded Linux Odp
ghessler
Linux
Linux
SiliconExpert Technologies
IT Automation with Ansible
IT Automation with Ansible
Rayed Alrashed
Basic Linux Internals
Basic Linux Internals
mukul bhardwaj
Conan.io - The C/C++ package manager for Developers
Conan.io - The C/C++ package manager for Developers
Uilian Ries
Similar to Linux device driver for dummies
(20)
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
Oracle11g On Fedora14
Oracle11g On Fedora14
Oracle11g on fedora14
Oracle11g on fedora14
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to Android
Linux Device Driver’s
Linux Device Driver’s
Android for Embedded Linux Developers
Android for Embedded Linux Developers
syzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzer
Debugging webOS applications
Debugging webOS applications
Linux device driver
Linux device driver
Linux
Linux
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Reverse Engineering and Bug Hunting on KMDF Drivers - Enrique Nissim - 44CON ...
Reverse Engineering and Bug Hunting on KMDF Drivers - Enrique Nissim - 44CON ...
Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2
Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2
Building
Building
Introduction to docker
Introduction to docker
Embedded Linux Odp
Embedded Linux Odp
Linux
Linux
IT Automation with Ansible
IT Automation with Ansible
Basic Linux Internals
Basic Linux Internals
Conan.io - The C/C++ package manager for Developers
Conan.io - The C/C++ package manager for Developers
Recently uploaded
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
Anusha Are
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
masabamasaba
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
masabamasaba
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
Jittipong Loespradit
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
kalichargn70th171
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
masabamasaba
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
Delhi Call girls
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
ThousandEyes
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
masabamasaba
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
shikhaohhpro
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
Delhi Call girls
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
Fatema Valibhai
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
Willy Marroquin (WillyDevNET)
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
Mind IT Systems
Define the academic and professional writing..pdf
Define the academic and professional writing..pdf
PearlKirahMaeRagusta1
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
kalichargn70th171
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Steffen Staab
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
masabamasaba
Recently uploaded
(20)
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
Define the academic and professional writing..pdf
Define the academic and professional writing..pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
Linux device driver for dummies
1.
Linux Device Driver for
Dummies 2016/2
2.
• What’s device
driver? • Setup • Hello, device driver world! • The next steps to driver developer
3.
What is device
driver?
4.
• OS Application Hardware device driver
5.
• • • •
6.
… • API • printf()
API only C • • ➡
7.
Setup
8.
• • α • • yum kernel-devel,
kernel-headers apt-get linux-headers-generic, linux-source
9.
Hello, device driver
world!
10.
#include <linux/module.h> #include <linux/init.h> MODULE_LICENSE("Dual
BSD/GPL"); static int hello_init(void) { printk(KERN_ALERT "driver loaded.n"); return 0; } static void hello_exit(void) { printk(KERN_ALERT "driver unloaded.n"); } module_init(hello_init); module_exit(hello_exit);
11.
#include <linux/module.h> #include <linux/init.h> MODULE_LICENSE("Dual
BSD/GPL"); static int hello_init(void) { printk(KERN_ALERT "driver loaded.n"); return 0; } static void hello_exit(void) { printk(KERN_ALERT "driver unloaded.n"); } module_init(hello_init); module_exit(hello_exit);
12.
• stdio.h, iostream #include
<linux/module.h> #include <linux/init.h>
13.
• MODULE_LICENSE("Dual BSD/GPL"); $ insmod
hello.ko $ dmesg | tail -1 [ XX.XXX] hello: module verification failed: signatureand/or required key missing - tainting kernel
14.
module_init()/exit() • • insmod/rmmod • main() • module_init(hello_init); module_exit(hello_exit);
15.
.ko insmod, rmmod
16.
.ko Makefile • .ko
Makefile • -C dir = make obj-m := hello.o all: make -C /lib/modules/$(shell uname -r)/build M=$(CURDIR) modules clean: make -C /lib/modules/$(shell uname -r)/build M=$(CURDIR) clean
17.
• • KBuild/ KConfig
18.
$ insmod hello.ko $
dmesg | tail -1 [ XX.XXX] driver loaded $ rmmod hello.ko $ dmesg | tail -1 [ XX.XXX] driver unloaded
19.
The next steps
to driver developer
20.
… mknod struct file_operations copy_{from/to}_user()
21.
• • mknod $ ls
-l /dev/ttyS0 crw-rw---- 1 root dialout 4, 64 2 29 16:39 /dev/ttyS0
22.
• Linux • MMU(Memory
Management Unit) • • struct map_desc • Primula arch/arm/mach-epson13/epson13.c
23.
• • ARM memcpy() unsigned long
copy_from_user(void *to, const void __user *from, unsigned long n) unsigned long copy_to_user(void __user *to, const void *from, unsigned long n)
24.
try! linux device
driver
Download now