Embedded Linux kernel and driver development (LNX9)

Unixové systémy, Linux

Tento kurz je určen vývojářům embedded Linux zařízení. V rámci školení porozumíte jádru systému Linux, naučíte se pracovat s ovladači, ladit Linuxové jádro, pracovat s pamětí, procesy a napájením. Naučíte se nasazovat linuxové jádro v nových zařízeních a další. Součástí školení jsou praktické laby Raspberry Pi board.

Lokalita, termín kurzu



Brno
22.1. - 26. 1. 2018
Objednat
19.3. - 23. 3. 2018
Objednat
14.5. - 18. 5. 2018
Objednat
Praha
8.1. - 12. 1. 2018
Objednat
5.3. - 9. 3. 2018
Objednat
23.4. - 27. 4. 2018
Objednat
Vlastní Školení na míru (termín, lokalita, obsah, délka)

Náplň kurzu:

Skrýt detaily
  • Introduction to the Linux kernel
    1. Kernel features
    2. Understanding the development process
    3. Legal constraints with device drivers
    4. Kernel user interface (/proc and /sys)
    5. Userspace device drivers
  • Kernel sources
    1. Specifics of Linux kernel development
    2. Coding standards
    3. Retrieving Linux kernel sources
    4. Tour of the Linux kernel sources
    5. Kernel source code browsers: cscope, Kscope, Linux Cross Reference (LXR)
  • Lab - Kernel sources
    1. Making searches in the Linux kernel sources: looking for C definitions, for definitions of kernel configuration parameters, and for other kinds of information
    2. Using the Unix command line and then kernel source code browsers
  • Configuring, compiling and booting the Linux kernel
    1. Kernel configuration
    2. Native and cross-compilation. Generated files
    3. Booting the kernel. Kernel booting parameters
  • Lab - Kernel configuration, cross compiling and booting
    1. Configuring, cross-compiling and booting a Linux kernel
  • Linux kernel modules
    1. Linux device drivers
    2. A simple module
    3. Programming constraints
    4. Loading, unloading modules
    5. Module dependencies
    6. Adding sources to the kernel tree
  • Lab - Writing modules
    1. Write a kernel module with several capabilities
    2. Access kernel internals from your module
    3. Setup the environment to compile it
  • Linux device model
    1. Understand how the kernel is designed to support device drivers
    2. The device model
    3. Binding devices and drivers
    4. Platform devices, Device Tree
    5. Interface in userspace: /sys
  • Lab - Linux device model for an I2C driver
    1. Implement a driver that registers as an I2C driver
    2. Modify the Device Tree to list an I2C device
    3. Get the driver called when the I2C device is enumerated at boot time
  • Introduction to the I2C API
    1. The I2C subsystem of the kernel
    2. Details about the API provided to kernel drivers to interact with I2C devices
  • Pin muxing
    1. Understand the pinctrl framework of the kernel
    2. Understand how to configure the muxing of pins
  • Lab - Communicate with the Nunchuk over I2C
    1. Configure the pin muxing for the I2C bus used to communicate with the Nunchuk
    2. Extend the I2C driver started in the previous lab to communicate with the Nunchuk via I2C
  • Kernel frameworks
    1. Block vs. character devices
    2. Interaction of userspace applications with the kernel
    3. Details on character devices, file_operations, ioctl(), etc.
    4. Exchanging data to/from userspace
    5. The principle of kernel frameworks
  • The input subsystem
    1. Principle of the kernel input subsystem
    2. API offered to kernel drivers to expose input devices capabilities to userspace application
    3. Userspace API offered by the input subsystem
  • Lab - Expose the Nunchuk functionality to userspace
    1. Extend the Nunchuk driver to expose the Nunchuk features to userspace applications, as a input device.
    2. Test the operation of the Nunchuk using sample userspace applications
  • Memory management
    1. Linux: memory management - Physical and virtual (kernel and user) address spaces
    2. Linux memory management implementation
    3. Allocating with kmalloc()
    4. Allocating by pages
    5. Allocating with vmalloc()
  • I/O memory and ports
    1. I/O register and memory range registration
    2. I/O register and memory access
    3. Read / write memory barriers
  • Minimal platform driver and access to I/O memory
    1. Implement a minimal platform driver
    2. Modify the Device Tree to instantiate the new serial port device
    3. Reserve the I/O memory addresses used by the serial port
    4. Read device registers and write data to them, to send characters on the serial port
  • The misc kernel subsystem
    1. What the misc kernel subsystem is useful for
    2. API of the misc kernel subsystem, both the kernel side and userspace side
  • Lab - Output-only serial port driver
    1. Extend the driver started in the previous lab by registering it into the misc subsystem
    2. Implement serial port output functionality through the misc subsystem
    3. Test serial output from userspace
  • Processes, scheduling, sleeping and interrupts
    1. Process management in the Linux kernel
    2. The Linux kernel scheduler and how processes sleep
    3. Interrupt handling in device drivers: interrupt handler registration and programming, scheduling deferred work
  • Lab - Sleeping and handling interrupts in a device driver
    1. Adding read capability to the character driver developed earlier
    2. Register an interrupt handler
    3. Waiting for data to be available in the read file operation
    4. Waking up the code when data is available from the device
  • Locking
    1. Issues with concurrent access to resources
    2. Locking primitives: mutexes, semaphores, spinlocks
    3. Atomic operations
    4. Typical locking issues
    5. Using the lock validator to identify the sources of locking problems
  • Lab - Locking
    1. Observe problems due to concurrent accesses to the device
    2. Add locking to the driver to fix these issues
  • Driver debugging techniques
    1. Debugging with printk
    2. Debugfs entries
    3. Analyzing a kernel oops
    4. Using kgdb, a kernel debugger
    5. Using the Magic SysRq commands
    6. Debugging through a JTAG probe
  • Lab - Investigating kernel faults
    1. Studying a broken driver
    2. Analyzing a kernel fault and locating the problem in the source code
  • ARM board support and SoC support
    1. Understand the organization of the ARM support code
    2. Understand how the kernel can be ported to a new hardware board
  • Power management
    1. Overview of the power management features of the kernel
    2. Topics covered: clocks, suspend and resume, dynamic frequency scaling, saving power during idle, runtime power management, regulators, etc.
  • The Linux kernel development process
    1. Organization of the kernel community
    2. The release schedule and process: release candidates, stable releases, long-term support, etc.
    3. Legal aspects, licensing
    4. How to submit patches to contribute code to the community
Předpokládané znalosti:
Znalost unixového prostředí a programování v jazyku C.
Časový rozvrh:
5 dní (9:00hod. - 17:00hod.)
Cena kurzu:
49 000,00 Kč (59 290,00 Kč včetně 21% DPH)

Vybrané zákaznické reference

LOKEL s.r.o., Petr H.
Embedded Linux kernel and driver development ( LNX9)
"Školení bylo směrované přesně na míru tomu, co jsem si od školení sliboval, že se dozvím, takže za mě 100%."