Introduction to Linux device driver

Slides:



Advertisements
Similar presentations
Drivers and the kernel1-1 Drivers and the kernel UNIX system has three layers: m The hardware m The operating system kernel m The user-level programs Kernel.
Advertisements

CIS238/DL1 Chapter 15 Rebuilding the Linux Kernel Preparing the Source Code Locating the Source Code Installing the Source Code Read the Documentation.
 課程網頁 :  講師姓名 : 張苑 ( ㄩㄢˋ ) 瑩  實驗室 : 資電館 734 室 
指導教授:黃仁暐 教 授 專題生:羅允志 陳冠宏 1.  分組討論時 …  多人同時討論的平台 … 2.
SIP Mobiity TA: 洪敏書
1 第一章 Word 的基本觀念 內容概要: Word 的特色 啟動與離開 Word 的方法 滑鼠游標與外型的介紹 基本操作 Word 視窗法則 使用 Word 遭遇問題時, 應如何利用軟體特 性而獲得輔助解說.
第十二章網路規劃與建置. 前言 網路環境的建置必須取決於良好的規劃,一個好的規 劃則必須要有一個清楚的目標。目標的制訂,絕對不是運 用一切最新的網路技術來建置網路環境,而是必須先清楚 瞭解使用者的需求,因為建置網路的目的,絕對不是因為 要有網路而建置網路,應該是使用者的需求必須要經由網 路來達成,因此而建置網路。在明確的目標被訂定出來後,
Fall 與 1 的數位世界 1. Fall 與 1 的數位世界 2 資訊化服務  提供快捷的服務:強大的計算能力、快速的網 路傳遞。  提供便利與便宜的商業服務:跨越地域限制, 輕易的貨比十家;降低空間與人力成本。  提供多元化的服務:新聞、血拼、聊天、數位 圖書館、網路電話.
Introduction to Linux device driver 潘仁義. The role of device driver Flexible Mechanism? Policy? 只提供存取硬體的能力,而不加諸任何限制 介於『應用程式』與『硬體裝置』的軟體層 功能性 ? 簡潔性 ?
第 1 章 認識資料庫系統 著作權所有 © 旗標出版股份有限公司.
最新計算機概論 第 5 章 系統程式. 5-1 系統程式的類型 作業系統 (OS) : 介於電腦硬體與 應用軟體之間的 程式,除了提供 執行應用軟體的 環境,還負責分 配系統資源。
電子計算機概論電子計算機概論 教科書 計算機概論 Introduction to Computers 原著: Peter Norton 審閱: 陳正雄‧趙立本‧簡文山‧林碧蘭 編譯:普羅數位科技 總審閱:林志敏 NT 590 洽助教.
第十四章 TWE-Commerce. 電子商務 劉文良 2 本章學習重點 商務網站建置流程 TWE-Commerce 的作業環境需求 TWE-Commerce 的作業環境建置 安裝 TWE-Commerce TWE-Commerce 後台管理的初步設定.
計算機概論 第 5 章 作業系統 主講人:沈宗南 世新大學多媒體中心
資料結構實習-一 參數傳遞.
專題簡報 曾聖嘉 邱帥軒 指導教授:楊正仁教授.
安全性管理員 Java 學習手冊 p.p SecurityManager 觀念  Java Application 的系統資源存取權限的設 定  可以由 SecurityManager 完全控制 如 : 檔案系統, Thread, 執行外部 process, 網路存取 一旦 Security.
作業系統 Operating System 游宗翰. 大綱 什麼是作業系統 作業系統的功能 載入作業系統 MS-DOS 、 Windows 的歷史 Linux 簡介.
Build Linux Kernel, Add a New System Call to Linux Young Chi-Min
Add a New System Call to Linux. Hw1 Add a New System Call to Linux and Compile Kernel Add a New System Call to Linux by Kernel Module.
網路介紹及其運用 講師陳炯勳. 5-2 IP 協定 ( 一 ) IP 協定運作 (1) – 網路成員:主機 (Host) 與路由器 (Router) – 路由表 – 電報傳輸運作.
無線通訊網路 Mac 層 TDM 通訊模式的操作與效能研究 專題生 : 林書弘、蔡逸祥、毛建翔、王政 華 指導教授 : 黃依賢.
UPnP Architecture Reporter: shi-han wang DCN LAB.
二十一世紀數位化公務員應具備數位化基 本能力 一 應了解每日數位媒體所提供的日常數位 資訊的常識(乃至知識)及常使用的標準 化技能 二 搜尋與公務相關的資訊,相關工作資料 庫的能力 三 快速中文輸入的能力.
Building Embedded Linux System 2005/09/21 Reporter: sih-han wang.
An Introduction to Device Drivers Sarah Diesburg COP 5641 / CIS 4930.
Operating Systems Lab. (#2) University of Tehran – ECE Dept. Fall 2005 Reza Shokri
NCHU System & Network Lab Lab 3 System Call Operating System Lab.
Introduction to Socket Programming Advisor: Quincy Wu Speaker: Kuan-Ta Lu Date: Nov. 25, 2010.
Modifying Network Packet Buffering in Network Layer CS518 Final Presentation and Instruction Guide Li Zhang.
Agile methods: a comparative analysis Diane Strode-University of Wellington the 19 th Annual Conference of the National Advisory Committee on Computing.
CIS 191 – Lesson 2 System Administration. CIS 191 – Lesson 2 System Architecture Component Architecture –The OS provides the simple components from which.
LOGO Linux Installation. Linux Distribution Including shells, libraries, tools, compiler, servers, applications. Redhat, Fedora, Mandrake, SuSE, Debian,
TamKang University Computer Science and Information Engineering Member: 林玫君 資工 3D 李俊毅 資工 2B 陳 懷 資工 2B 李承恩 資工 2B 指導老師 : 石貴平, 張志勇 助教 : Kevin Chang.
Exercise #1: Exploring Open- Source Operating Systems with Virtual Machines J. H. Wang Mar. 9, 2010.
Indigo Virtual Switch(IVS) Speaker : Nillson. HOWTO 功能簡介 發展沿革 安裝說明 基本操作 進階功能 參考文獻.
網路模擬技術 使用長庚 WiMAX 模組 報告人:李宗穎. Outline  Introduction  新增 WiMAX Module  QoS and Network Entry  長庚模組  未實作的功能  DEMO.
實驗二 Linux 下網路驅動程式追蹤 教師: 助教: 1998/10/19 High Speed Network Lab. Department of Computer Information Science, NCTU.
An Introduction to Device Drivers Ted Baker  Andy Wang COP 5641 / CIS 4930.
Exercise #1: Exploring Open- Source Operating Systems with Virtual Machines J. H. Wang Sep. 25, 2015.
NCTUns Emulation 指導教授:潘仁義 報告者:李詩涵、蕭惠陽. Kernel Re-entering Simulation Methodology  Tunnel 網路介面是實現 Kernel Re-entering Simulation Methodology 的關鍵技術  Tunnel.
ICOM Noack Linux kernel structure Kernel code structure How it boots itself All the system calls are available System is configured Process handling.
LOGO Linux Installation. Linux Distribution Including shells, libraries, tools, compiler, servers, applications. Redhat, Fedora, Mandrake, SuSE, Debian,
Linux Kernel Programming (LKP). LKP New sub-course New sub-course We will learn together We will learn together Evaluation of this part of course will.
實驗三 Linux 網路協定程式追蹤 教師: 助教:. 2 Outline Why Linux ? Linux 核心的內部 Linux 開機始末 實驗步驟.
Kernel Modules – Introduction CSC/ECE 573, Sections 001 Fall, 2012.
1 Setup and Compile Linux Kernel Speaker: Yi-Ji Jheng Date:
Lab 1 Introduction MMLAB. Environment Install Linux OS in a computer( VirtualBox or Vmware or Native) It’s all up to you for selecting Ubuntu Server or.
Introduction to the Linux Kernel 國立中正大學 資訊工程研究所 羅習五 老師.
Rebuilding Linux Kernel Dedicated to penguin lovers everywhere 26 September 20161Rebuilding kernel by Visakh M R.
Getting Started with Linux
Add a New System Call to Linux
Onno W. Purbo Ethernet di Linux Onno W. Purbo
Operating System Kernel Compilation
Exercise #1: Exploring Open-Source Operating Systems with Virtual Machines J. H. Wang Sep. 20, 2016.
Getting Started with the Kernel
Linux Details: Device Drivers
An Introduction to Linux
Onno W. Purbo Ethernet di Linux Onno W. Purbo
Drivers and the kernel UNIX system has three layers: Kernel
Exercise #1: Exploring Open-Source Operating Systems with Virtual Machines J. H. Wang Sep. 19, 2017.
Introduction to the Kernel and Device Drivers
An Introduction to Device Drivers
Introduction to Socket Programming
Exercise #1: Exploring Open-Source Operating Systems with Virtual Machines J. H. Wang Sep. 21, 2018.
IS3440 Linux Security Unit 7 Securing the Linux Kernel
Build A New Kernel and Add New System Calls in A Linux OS
Linux Details: Device Drivers
Linux Architecture Overview.
Operating System Kernel Compilation
Presentation transcript:

Introduction to Linux device driver 潘仁義

The role of device driver Flexible Mechanism? Policy? 只提供存取硬體的能力,而不加諸任何限制 介於『應用程式』與『硬體裝置』的軟體層 功能性? 簡潔性?

Splitting the Kernel

Classes of devices and modules Character device Can be accessed as a stream of bytes open, close, read, write /dev/console Block device Can host a filesystem and transfer any number of bytes at a time mount a filesystem Network interface Can exchange data with other hosts packet transmission

Kernel compile and installation Version 2.4.10 above Kernel source http://www.kernel.org/ Make kernel cd /usr/src/linux make clean make menuconfig make dep; make bzImage make modules; make modules_install cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.24 cp .config /boot/config-2.4.24 cp System.map /boot/System.map.2.4.24 lilo; reboot; dmesg

/usr/src/linux directory kernel/ 除了fs, mm, networking外的核心碼 fs/ File system mm/ Memory management net/ Socket library, Protocol stack ipc/ and lib/ Include/ and arch/ driver/ driver/char, driver/block, driver/net

Linux booting process A Guided Tour of a Linux Boot http://ourworld.compuserve.com/homepages/KanjiFlash/BPTour.htm The Linux Boot Process http://oldfield.wattle.id.au/luv/boot.html The Linux Kernel HOWTO http://24.221.230.253/HOWTO/kernel-howto/linux_boot_process.html

Demo example Source Make Run http://www.oreilly.com.tw/chinese/linux/ldd2.html http://www.oreilly.com.tw/bookcode/ldd2-samples-1.0.2.tar.gz Make cd ~/ldd2/misc-modules/ make clean; make Oops? cd /usr/include/ mv linux linux.orig ln –s /usr/src/linux/include/linux/ linux mv asm asm.orig ln –s /usr/src/linux/include/linux/acm/ asm Oops? Again make export.ver #include<slab.h> Run tail –f /var/log/messages insmod ./hello.o MODULE_LICENSE(“GPL”)

作業 裝一台linux, compile kernel, boot 裝上demo code, 執行 eCos eCos home http://www.ecos.sourceware.org/ eCosCentric http://www.ecoscentric.com/ WebCast: A License-Free Alternative RTOS for the G4 PowerPC http://seminar2.techonline.com/~pentek22/sep2303/index.shtml