Course Code: ldd
Duration: 35 hours
Prerequisites:
- GNU/리눅스 시스템을 일반 사용자로서 사용하는 데 대한 기본 지식
- 명령줄 쉘 사용에 대한 기본 지식
- 유저스페이스(애플리케이션) 개발에 대한 기본 지식
- C 프로그래밍 중급 지식
- 이전에 임베디드 GNU/리눅스 시스템 아키텍처 과정을 수강했거나(강력히 권장), 해당 과정에서 다루는 주제에 대해 잘 이해하고 있어야 합니다.
Overview:
개요
이 5일 과정은 실습 과제와 강의를 결합하여 GNU/리눅스 커널 내부 구조와 장치 드라이버 개발의 개념을 설명합니다. 이 과정은 여러분이 빠르게 핵심 기술을 습득할 수 있도록 설계되었습니다. 이론과 현장 훈련을 조합하여 GNU/리눅스 장치 드라이버를 작성하는 데 필요한 프로세스, 개념 및 명령어를 설명합니다.
바퀴를 재발명하지 마십시오. 경험 많은 강사의 조언을 듣고, 실제 작업에 바로 활용할 수 있는 실무 지식과 능력을 배워 임베디드 개발 프로젝트에 효과적으로 적용하세요.
대상学员
소프트웨어 엔지니어, 필드 엔지니어, (프로젝트) 매니저, 하드웨어 엔지니어 등 GNU/리눅스 장치 드라이버 개발 또는 평가에 관심이 있거나 관련 업무를 맡은 사람들에게 적합합니다.
Course Outline:
소개
- GNU/리눅스의 간단한 역사
- 라이선싱
- 커널 버전 관리
- 릴리스 주기
- 커널 트리는(Kernel Trees)
- 메인라인(Mainline)
- 커널 vs. 유저스페이스
- 메커니즘 vs. 정책
- 커널 드라이버 대안
- RTOS vs. 리눅스
메모리 관리
- 가상 메모리 vs. 물리 메모리
- 커널에서의 메모리 할당
- 페이지(Page)
- 존(Zone)
- API
- 슬랩(Slab)
커널 패치
- 수명 주기
- git
- 커널 소스
- 패치 생성
- 패치 검사
- 패치 수정
- 패치 배포
- 감사가 완료된 코드(Audited Code)
커널 모듈
- 커널 소스 가져오기
- 구성/빌드/설치
- 장치 드라이버 (정적 링크, 런타임 로딩)
- 초기화/종료
- 라이선싱
- EXPORT_SYMBOL GPL
- 아웃 오브 트리는(Out of Tree) Makefile
- module-init-tools
- 커널 트리 내의 모듈
- Kconfig
- 매개변수 전달
- Sparse
캐릭터 드라이버(Char Drivers)
- 아키텍처
- 유저/커널 인터페이스
- I/O 서브시스템
- VFS
- sysfs (디바이스, 버스, 드라이버, 클래스),
- kobject/ktype/kset
- 리눅스 커널 드라이버 모델
- 장치 파일
-
캐릭터 드라이버
- 초기화
- 등록
- 오픈, 리리즈
- cdev, cdev_add, cdev_del, ...
- 메이저/마이너 넘버
- udev, udevmonitor, udevadm
고급 캐릭터 드라이버 작업
- ioctl
- unlocked ioctl
- compat ioctl
- 유저스페이스 API
- 커널스페이스 API
- 프로세스 수명 주기
- 대기/블로킹
- 대기/각성
- 대기 큐(Wait Queue)
- 번떼리드 허드(Thundering Herd)
- poll/select
커널 디버깅
- 디버깅
-
커널 디버깅
- git를 이용한 이진 탐색(Binary Search)
- 커널의 디버깅 지원 기능
- printk, syslogd, klogd, 로그 레벨, 레이트 리미트, 디버그 레벨, 선택적 서브시스템 디버깅
- debugfs 쿼리를 통한 디버깅
- Oops 디버깅, Oops 발생시키기
- 매직 SysRq 키
- kgdb/kdb
- JTAG
트레이싱(Tracing)
- gcov
- lcov
- oprofile
-
ftrace
- nop tracer
- function tracer
- sched switch tracer
- function graph tracer
- dynamic tracer
- trace-cmd/kernelshark
- perf
- LTTng
인터럽트(Interrupts)
- 인터럽트 vs. 폴링(Polling)
- 인터럽트
- 프로그램 섹션
- 재진입성(Reentrancy)
- 이벤트
- 인터럽트 핸들러
- 공유 인터럽트 핸들러
- 인터럽트 흐름
- 인터럽트 제어
작업 지연(Deferring Work)
- 상부/하부 절반(Top/Bottom Halves)
- softirq
- tasklet
- 작업 큐(Work Queues)
- 스레드형 인터럽트(Threaded Interrupts)
동시성(Concurrency)
- 임계 영역/섹션
- 원자성(Atomic)
- 래스 컨디션(Race Condition)
- 동기화
- 락(Locking)
- 락 솔루션
- 데드락(Deadlock)
- 컨테션(Contention)
- 무엇을 잠가야 할까?
-
무엇을 사용할 수 있을까?
- 원자 연산(Atomic Operations)
- 스핀 잠금(Spin Locks)
- 리더-라이터 스핀 잠금
- 세마포어(Semaphore)
- 바이너리 세마포어
- 뮤텍스(Mutex)
- 리더-라이터 세마포어
- 완료 변수(Completion Variables)
- 시퀀셜 잠금(Sequential Locks)
- 프리에뎁션(Preemption) 비활성화
- 순서 지정 및 장벽(Ordering and Barriers)
시간(Time)
- HZ
- Jiffies
- 대/소 지연
- 커널 타이머
하드웨어 I/O
- I/O 포트
- I/O 메모리
- 레지스터에 접근할 때 부수 효과(Side Effects)를 어떻게 처리할까?
유저-커널 통신
- put(get)_user()
- copy to(from)_user()
- 커널 I/O
- 메모리 매핑
- procfs
- sysfs
- debugfs
- relayfs
- netlink
- ioctl
이식성(Portability)
- 워드 사이즈
- 불투형 타입(Opaque Types)
- 부호 있는/없는 문자
- 데이터 정렬
- 정수 승격(Integral Promotion)
- 코드 재사용
- 엔디anness
- 시스템 틱(System Tick)
- 페이지 크기
- 명령어 순서
- SMP/프리에뎁션/하이 메모리
별도로 명시되지 않는 한, 이 콘텐츠와 과정 구성표는 크리에이티브 커먼즈 저작자표시-비영리-동일조건변경허락 4.0 국제(CCBY-NC-SA 4.0).에 따라 라이선스되었습니다.
United Arab Emirates - Embedded GNU/Linux Kernel Internals and Device Drivers
Qatar - Embedded GNU/Linux Kernel Internals and Device Drivers
Egypt - Embedded GNU/Linux Kernel Internals and Device Drivers
Saudi Arabia - Embedded GNU/Linux Kernel Internals and Device Drivers
South Africa - Embedded GNU/Linux Kernel Internals and Device Drivers
Brasil - Integridade do Kernel GNU/Linux Embarcado e Drivers de Dispositivo
Canada - Embedded GNU/Linux Kernel Internals and Device Drivers
香港 - Embedded GNU/Linux Kernel Internals and Device Drivers
澳門 - Embedded GNU/Linux Kernel Internals and Device Drivers
台灣 - Embedded GNU/Linux Kernel Internals and Device Drivers
USA - Embedded GNU/Linux Kernel Internals and Device Drivers
Österreich - Interne Struktur des GNU/Linux-Kernels und Gerätetreiber
Schweiz - Interne Struktur des GNU/Linux-Kernels und Gerätetreiber
Deutschland - Interne Struktur des GNU/Linux-Kernels und Gerätetreiber
Czech Republic - Interní struktura jádra GNU/Linuxu a ovladače zařízení
Denmark - Embedded GNU/Linux Kernel Internals and Device Drivers
Estonia - Embedded GNU/Linux Kernel Internals and Device Drivers
Finland - Embedded GNU/Linux Kernel Internals and Device Drivers
Greece - Εσώτερο Λειτουργικό των Πυρήνων GNU/Linux και Οδηγοί Συσκευών
Magyarország - Beágyazott GNU/Linux Kernel Belső Működése és Eszközmeghajtók
Ireland - Embedded GNU/Linux Kernel Internals and Device Drivers
Luxembourg - Embedded GNU/Linux Kernel Internals and Device Drivers
Latvia - Embedded GNU/Linux Kernel Internals and Device Drivers
España - Integridades internas del kernel y controladores de dispositivos GNU/Linux integrados
Italia - Interni del kernel GNU/Linux e driver di dispositivo
Lithuania - Embedded GNU/Linux Kernel Internals and Device Drivers
Nederland - Inwendige werking van de GNU/Linux-kernel en apparaatstuurprogramma's
Norway - Inne i Linux-kjernen for innbygde systemer og enhetsdrivere
Portugal - Integridade do Kernel GNU/Linux Embarcado e Drivers de Dispositivo
România - Internele Nucleului GNU/Linux și Driverele de Dispozitive
Sverige - Inbyggd GNU/Linux-kärninterna funktioner och enhetsdrivrutiner
Türkiye - Gömülü GNU/Linux Çekirdek İç Yapıları ve Cihaz Sürücüleri
Malta - Embedded GNU/Linux Kernel Internals and Device Drivers
Belgique - Internalités du noyau GNU/Linux et pilotes de périphériques intégrés
France - Internalités du noyau GNU/Linux et pilotes de périphériques intégrés
日本 - 埋め込み GNU/Linux カーネルの内部構造とデバイスドライバ
Australia - Embedded GNU/Linux Kernel Internals and Device Drivers
Malaysia - Embedded GNU/Linux Kernel Internals and Device Drivers
New Zealand - Embedded GNU/Linux Kernel Internals and Device Drivers
Philippines - Embedded GNU/Linux Kernel Internals and Device Drivers
Singapore - Embedded GNU/Linux Kernel Internals and Device Drivers
Thailand - Embedded GNU/Linux Kernel Internals and Device Drivers
Vietnam - Kiến trúc Nhân GNU/Linux Nhúng và Trình điều khiển Thiết bị
India - Embedded GNU/Linux Kernel Internals and Device Drivers
Argentina - Integridades internas del kernel y controladores de dispositivos GNU/Linux integrados
Chile - Integridades internas del kernel y controladores de dispositivos GNU/Linux integrados
Costa Rica - Integridades internas del kernel y controladores de dispositivos GNU/Linux integrados
Ecuador - Integridades internas del kernel y controladores de dispositivos GNU/Linux integrados
Guatemala - Integridades internas del kernel y controladores de dispositivos GNU/Linux integrados
Colombia - Integridades internas del kernel y controladores de dispositivos GNU/Linux integrados
México - Integridades internas del kernel y controladores de dispositivos GNU/Linux integrados
Panama - Integridades internas del kernel y controladores de dispositivos GNU/Linux integrados
Peru - Integridades internas del kernel y controladores de dispositivos GNU/Linux integrados
Uruguay - Integridades internas del kernel y controladores de dispositivos GNU/Linux integrados
Venezuela - Integridades internas del kernel y controladores de dispositivos GNU/Linux integrados
Polska - Wewnętrzne mechanizmy jądra GNU/Linux i sterowniki urządzeń
United Kingdom - Embedded GNU/Linux Kernel Internals and Device Drivers
South Korea - 임베디드 GNU/리눅스 커널 내부 구조 및 장치 드라이버
Pakistan - Embedded GNU/Linux Kernel Internals and Device Drivers
Sri Lanka - Embedded GNU/Linux Kernel Internals and Device Drivers
Bulgaria - Вградени вътрешни принципи на ядрото GNU/Linux и драйвери на устройства
Bolivia - Integridades internas del kernel y controladores de dispositivos GNU/Linux integrados
Indonesia - Embedded GNU/Linux Kernel Internals and Device Drivers
Kazakhstan - Embedded GNU/Linux Kernel Internals and Device Drivers
Moldova - Internele Nucleului GNU/Linux și Driverele de Dispozitive
Morocco - Embedded GNU/Linux Kernel Internals and Device Drivers
Tunisia - Embedded GNU/Linux Kernel Internals and Device Drivers
Kuwait - Embedded GNU/Linux Kernel Internals and Device Drivers
Oman - Embedded GNU/Linux Kernel Internals and Device Drivers
Slovakia - Embedded GNU/Linux Kernel Internals and Device Drivers
Kenya - Embedded GNU/Linux Kernel Internals and Device Drivers
Nigeria - Embedded GNU/Linux Kernel Internals and Device Drivers
Botswana - Embedded GNU/Linux Kernel Internals and Device Drivers
Slovenia - Embedded GNU/Linux Kernel Internals and Device Drivers
Croatia - Embedded GNU/Linux Kernel Internals and Device Drivers
Serbia - Embedded GNU/Linux Kernel Internals and Device Drivers
Bhutan - Embedded GNU/Linux Kernel Internals and Device Drivers
Nepal - Embedded GNU/Linux Kernel Internals and Device Drivers
Uzbekistan - Embedded GNU/Linux Kernel Internals and Device Drivers
US Government - Embedded GNU/Linux Kernel Internals and Device Drivers