Kernel Internals. Course Duration: 5 days. Pre-Requisites : Course Objective: Course Outline

Similar documents
EMBEDDED LINUX ON ARM9 Weekend Workshop

Software Development & Education Center

LINUX INTERNALS & NETWORKING Weekend Workshop

Table of Contents. Preface... xi

LINUX DEVICE DRIVERS Weekend Workshop

Linux Driver and Embedded Developer

Linux Kernel Architecture

- Knowledge of basic computer architecture and organization, ECE 445

Embedded Linux system development training 5-day session

Here to take you beyond. ECEP Course syllabus. Emertxe Information Technologies ECEP course syllabus

Software Development & Education Center

Embedded Linux kernel and driver development training 5-day session

Embedded Engineering

EMBEDDED TRAINING IN BANGALORE

UNIT I Linux Utilities

Introduction p. 1 Why Linux? p. 2 Embedded Linux Today p. 3 Open Source and the GPL p. 3 Free Versus Freedom p. 4 Standards and Relevant Bodies p.

Community Enterprise Operating System (CentOS 7) Courses

Outline Background Jaluna-1 Presentation Jaluna-2 Presentation Overview Use Cases Architecture Features Copyright Jaluna SA. All rights reserved

Noorul Islam College Of Engineering, Kumaracoil MCA Degree Model Examination (October 2007) 5 th Semester MC1642 UNIX Internals 2 mark Questions

IBM AIX Operating System Courses

D1 - Embedded Linux. Building and installing an embedded and real-time Linux platform. Objectives. Course environment.

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Design Overview of the FreeBSD Kernel CIS 657

Design Overview of the FreeBSD Kernel. Organization of the Kernel. What Code is Machine Independent?

Operating Systems. II. Processes

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

Process Concepts. CSC400 - Operating Systems. 3. Process Concepts. J. Sumey

SKILL-SET & PROJECT DETAILS Trained Embedded Engineers

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Embedded Linux Architecture

ECE 471 Embedded Systems Lecture 12

Embedded System Curriculum

Linux+ Guide to Linux Certification, Third Edition. Chapter 2 Linux Installation and Usage

Chapter 12 IoT Projects Case Studies. Lesson-01: Introduction

UNIT I Linux Utilities and Working with Bash

Kernel Module Programming

Advanced Operating Systems and Virtualization. Alessandro Pellegrini A.Y. 2017/2018

VEOS high level design. Revision 2.1 NEC

Timers 1 / 46. Jiffies. Potent and Evil Magic

St. MARTIN S ENGINEERING COLLEGE Dhulapally,Secunderabad DEPARTMENT OF INFORMATION TECHNOLOGY Academic year

CL020 - Advanced Linux and UNIX Programming

Module 9 ARM 7 Microcontroller LPC2148 Programming ARM Architecture, LPC2148 specifications, Register architecture, Special function registers, KEIL I

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

PG Certificate. Embedded, Internet Of Things & Android

Introduction. Yolanda Becerra Fontal Juan José Costa Prats

Operating Systems. Review ENCE 360

Developing Environment for Intel Mainstone Board

Embedded Linux System Internals

ECE 598 Advanced Operating Systems Lecture 10

Lecture 15: I/O Devices & Drivers

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Overview. This Lecture. Interrupts and exceptions Source: ULK ch 4, ELDD ch1, ch2 & ch4. COSC440 Lecture 3: Interrupts 1

ECE 471 Embedded Systems Lecture 16

Hands-on with the Sitara Linux SDK

CS 3723 Operating Systems: Final Review

TQ2440 Development Platform Manual

Problem Set: Processes

MARUTHI SCHOOL OF BANKING (MSB)

CS 423 Operating System Design: Introduction to Linux Kernel Programming (MP1 Q&A)

Yocto Project and OpenEmbedded training 3-day session

Mastering Linux. Paul S. Wang. CRC Press. Taylor & Francis Group. Taylor & Francis Croup an informa business. A CHAPMAN St HALL BOOK

UFCETW-20-2 Examination Answer all questions in Section A (60 marks) and 2 questions from Section B (40 marks)

BRDS ( , WS 2017) Ulrich Schmid

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING ACADEMIC YEAR / ODD SEMESTER

Course Content Embedded Systems

Problem Set: Processes

CPSC/ECE 3220 Fall 2017 Exam Give the definition (note: not the roles) for an operating system as stated in the textbook. (2 pts.

SHRI ANGALAMMAN COLLEGE OF ENGINEERING AND TECHNOLOGY (An ISO 9001:2008 Certified Institution) SIRUGANOOR, TIRUCHIRAPPALLI

CSC209 Review. Yeah! We made it!

January 28 29, 2014San Jose. Engineering Workshop

ECE 471 Embedded Systems Lecture 16

Virtual Memory COMPSCI 386

Linux Operating System

D1S - Embedded Linux with Ac6 System Workbench

Linux+ Guide to Linux Certification, Third Edition. Chapter 6 Advanced Installation

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files. Compiler vs.

Department of Computer Science and Technology

DSX - Digital Systems Using Embedded Linux

Lecture 17. Log into Linux. Copy two subdirectories in /home/hwang/cs375/lecture17/ $ cp r /home/hwang/cs375/lecture17/*.

Lecture Topics. Announcements. Today: Threads (Stallings, chapter , 4.6) Next: Concurrency (Stallings, chapter , 5.

Computer Systems A Programmer s Perspective 1 (Beta Draft)

High Performance Computing Lecture 11. Matthew Jacob Indian Institute of Science

1. Draw and explain program flow of control without and with interrupts. [16]

PROCESS MANAGEMENT Operating Systems Design Euiseong Seo

SNS COLLEGE OF ENGINEERING

Kernel Modules. Kartik Gopalan

Systems Programming/ C and UNIX

CSCE 548 Building Secure Software Dirty COW Race Condition Attack

3. Process Management in xv6

CS2028 -UNIX INTERNALS

Chapter 1 Introduction

What is an Operating System? A Whirlwind Tour of Operating Systems. How did OS evolve? How did OS evolve?

Midterm Exam CPS 210: Operating Systems Spring 2013

Notes to Instructors Concerning the BLITZ Projects

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester

The Linux IPL Procedure

Android System Development Training 4-day session

Virtual Memory Outline

I/O Management Software. Chapter 5

Transcription:

Course Duration: 5 days Pre-Requisites : Good C programming skills. Required knowledge Linux as a User Course Objective: To get Kernel and User Space of Linux and related programming Linux Advance Programming To get real-world exposure to embedded Linux using different demo boards ARM for Labs To develop an application to run on an embedded Linux system To understand what is required to set-up a Linux cross development environment To understand the different approaches to making Linux realtime Delegates will learn: How to configure a standard Linux kernel for use in a cross development system. The steps to write, compile, download and debug an embedded Linux application with real hardware. How threaded applications fit into Linux. How drivers work in x86 and embedded environment. Course Outline Kernel Internals Introduction to Kernel - History of Linux - Types of Kernel - The Linux kernel - Kernel Facilities www.embeddedact.com 1 page out of 10

- Kernel Architecture - Kernel Version Numbers - Configure, Compile Kernel The File System - Virtual File system & its role - Files associated with a process - System Calls Process management - Process Defined - Process Descriptor Structures in the kernel - Process States - Process Scheduling - Process Creation - System calls related to process management Memory Management - malloc, calloc, alloca, free - Demand Paging defined - Process Organization in Memory - Virtual Memory Management - Address Translation and page fault handling - Buddy System Algorithm - Slab Allocator - Swapping Memory Areas - Memory Mapping - Block Device Caching Interrupts - Conceptual Understanding About Interrupts Interrupt Handlers Softirqs Tasklets Work Queues Device Drivers Conceptual understanding Character Device Drivers Block Device Driers Network Device Drivers Kernel Configuration and Compilation - Kernel Building System - Patching the Kernel - Kernel Configuration - Compiling the Linux Kernel www.embeddedact.com 2 page out of 10

Kernel Parameters - Build-Time Parameters - Boot-Time Parameters - Run-Time Parameters Boot Process - understanding Power ON to login prompt process - BIOS Level - Boot Loader Setup, startup_32 functions Available Bootloaders GRUB, UBoot, etc. Role of a Bootloader Bootloader Phase - Kernel Initialisation Phase The start_kernel() function - System Initialisation Phase Linux Advanced Programming Understanding Runlevels Various initialization scripts & customizing them Kernel Command-Line Boot Parameters Arguments, the environment, and popular system functions - Arguments to a program. - Retrieving information from the environment. - Discovering the date and time - Getting system information. File I/O - Library functions and system calls for I/O - Getting file status information with stat() - Processing directories and directory entries. Shell Commands & Shell Scripting - Basic Shell commands - Bash Shell Essentials Creating Makefiles - Makefile basics - Creating make files for single or multiple source files project Creating Lilbraries - Creating Static Library - Creating Shared Library Multi Process Programming - Creating child processes - fork(). vfork(), exec() - Parent synchronization with child www.embeddedact.com 3 page out of 10

Multi Thread Programming - Creating multiple threads - Parent synchronization with other Threads Inter Process Communication - Pipes, FIFO's, - Signals - System-V IPC's - Message queues - Shared memory - Semaphores Introduction to Sockets - An Overview - System calls related to TCP and UDP sockets - Using Wireshark etc tool for network sniffing Network Programming - TCP Server Client Programming - UDP Server Client Programming Programming & Debugging Tools - Debugging and Analysis Tools - strace : Tracing System calls - ltrace : Tracing Library calls - Using gdb and ddd utilities - Core Dump Analysis etc Code checkers, memory checkers, profilers Embedded Linux System Development Introduction to Embedded Linux - What is Embedded System? - Anatomy of an Embedded System - Why Linux? - Is Linux Real-Time Enough? - The Status of Embedded Linux Today - Which Embedded Linux Distribution to Choose? - Embedded Linux Architecture Basic requirements for Embedded Linux Product Development - The four basic elements: toolchain, bootloader, kernel, root file system - Configuration, compilation and cross-compiling www.embeddedact.com 4 page out of 10

Building Development Environment ( Obisense ) - Toolchain installation - Cross compilation using Toolchain Target & Host Setup Setting Up Networking Services - Network Settings Static and Dynamic IP addresses Subnet mask - loading files using TFTP, HTTP, FTP etc. Bootloader commands and usage - Getting familiar with bootloader commands - Downloading kernel images and RootFS on Target board. Loading RootFS in Platfrom by various techniques - - Configuring TFTP and downloading kernel image over TFTP. - Configuring NFS and using rootfs over NFS. - Using SD-Card for rootfs. - Using USB for rootfs. Building an Embedded File System from Scratch - - Creating a minimal root file-system using Busybox - Creating a RAM disk image Intro to Building Own Embedded Linux Distribution - - Buildroot - Scratchbox - OpenEmbedded - Crosstool - Angstrom Narcissus Kernel Configuration and Compilation - Kernel Building System - Patching the Kernel - Kernel Configuration for Embedded Systems Settings (Porting) - Cross-compiling the Linux Kernel - Booting Linux - The Linux boot sequence - boot-loaders : U-boot - System Initialization Scripts - Bring up X11 (X-Windows) on Embedded Platform (GUI) - Loading various RootFS (Distributions) in platform Angstrom, Ubuntu, Fedora etc. RootFS www.embeddedact.com 5 page out of 10

- Board Bring-ups of following Embedded Linux Hardware Platforms Different Boards Used for differentiation and initialization Friendly ARM 2440 (main board used) Raspberry Pi (intro and demonstration) www.embeddedact.com 6 page out of 10

Beaglebone Black (intro and demonstration) - Embedded Apps & Device Drivers Labs on Embedded Linux Boards Writing Device Drivers & Applications for Embedded Platforms Accessing GPIOs Interfacing LED, Switch, Camera, Seven Segment Display Installing Web Server on Embedded Platform Porting Issues in Linux Linux Porting Issues Kernel Compilation and Architecture Specific Issues Cross Compilation Building Application in to Kernel Other issues Linux Device Drivers An introduction to device drivers - User space vs Kernel space - Kernel Architecture or Model - Splitting the kernel - Kernel modules - Kernel Module vs Applications - Role of the Device Drivers - Classes of devices and modules www.embeddedact.com 7 page out of 10

Kernel Module Programming Basics - Modules Defined - Data Type in the Kernel - Version dependency - Building and Running Modules - Types of Modules in the kernel - Writing Your first kernel module - Module Related Commands - Statically linked vs Dynamically linked drivers/modules - The kernel symbol table - Exporting symbols from modules - Module Parameters for above mentioned topics Kernel Debugging Techniques - Kernel Debugging: dmesg, printk for above mentioned topics Accessing Hardware Mechanisms - System Memory - Device Memory - I/O Ports - I/O ports vs. memory mapping - Allocating and mapping I/O space - Functions for reading and writing I/O ports - Side effects and compiler optimization - Accessing hardware from User Space - Example: the Parallel Port - Driver example - Barriers - User-Mode Access to Devices open, close, read, write ioctl ioperm, iopl, inb, outb mmap, munmap The proc file system programming - Using /proc - Creating proc file system entries - Registration - Reading from /proc - Writing to /proc Hardware and Interrupt Handling - Installing and implementing an interrupt handler www.embeddedact.com 8 page out of 10

- Restrictions of kernel code running in interrupt context - IRQs & their Registration - IRQ Handling & Control - Top & Bottom Halves - Enabling and Disabling Interrupts Tasklets and Bottom halves - Task queues Kernel Threads Sleep and wakeup (wait queues) Memory Management - Allocating Memory - Accessing Memory - Get Some Space (kmalloc()), kfree(), various flags - Get Some Pages (get_free_page()) - Get Some Virtual Memory - vmalloc() - Get Some Boot-time Space Concurrency and Race Conditions - Combating Race Conditions - Atomic Operations - Semaphores - Spin Locks Time, Delays and Deferred Work - Kernel Timers - Timer handling - HZ and Jiffies - Time of Day - Delayed Execution - Kernel Timers - Current time The Linux Device Model Character Device Drivers - Registering a character device driver - The file structure - Major and minor numbers - Character Device Methods open(), release(), read(), write() - Data Transfers between User Process and Driver www.embeddedact.com 9 page out of 10

copy_from_user(), copy_to_user() - Making a Device File - Memory Access in Kernel Space - Programming with ioctl( ), mmap() - devfs / lseek /ioctl Writing various Character Drivers - Memory Based Driver - IO PORT (Hardware) Based Driver Programming with ioctl( ) - writing device driver with ioctl() - Adding ioctl s in an existing device driver Netlink socket interface - point to point, multicast and broadcast - UDP, TCP and Raw sockets - Writed kernel module and userspace applilcations using Netlink sockets Network Drivers - The net_device structure in detail - Packet transmission - Packet reception - Simulating a network device Adding a Driver to the Kernel Tree Sample Hardware based device driver projects * * * * * * * * www.embeddedact.com 10 page out of 10