Linux Kernel Porting


Details

Objective

Provide better understanding of the Linux device model, and the device tree, and the changes required to port the kernel to a new board.

Total Duration

16h

Status

Available

Schedule

Session Hands-on

Setup and Introduction

1

Kernel Introduction

0.5

Devices Interfacing

1

Application Driver Interface

1

Kernel Subsystems

0.5

Bus Model & Sysfs

1

Kernel Module Autoloading

1

Device Tree Intro and Syntax

1

Device Tree Bindings

0.5

SoC Architecture + IRQ

1

Pin Control Subsystem: pinctrl

1

GPIOs, LEDs & Keys

1

External Bus Interface & I2C Devices

1

Periperhals: UART, Ethernet, MMC

1

Device Tree Boot & Debugging

1

Q & A

1

Previous Events

Detailed Syllabus

Kernel Introduction

  • Kernel configuration

  • Building the kernel

  • Booting the kernel

  • Devices Interfacing

  • Memory Interfacing

Device Interfacing

  • MMIO

  • Controller Based IO

  • Controlling LEDs from Userspace

Application Driver Interface

  • Unix/Linux Device Abstraction

  • Device Files

  • Types of Drivers

  • Keypad and LCD example

  • Kernel Frameworks

Bus Model & Sysfs

  • Hotpluggable Bus

  • Bus Model

  • Device and Driver Binding

  • Platform Bus

  • I2C Bus

Kernel Module Autoloading

  • Kernel Modules

  • Modalias

  • depmod

  • UDev and Module Loading

Device Tree Intro and Syntax

  • History

  • Role of Device Tree

  • Open Firmware

  • Linux Support

  • Bootloader Support

  • Syntax

  • Data Types

  • Tree Representation

  • Overlays

  • Includes

  • Preprocessor

SoC Architecture

  • System Bus

  • On-chip Peripherals

  • Interrupt Tree

Device Tree Bindings

  • Board compatible

  • CPU

  • Memory

  • System Bus

  • Peripherals

  • Registers

  • Interrupts

  • Boot Parameters

  • Device compatible

Flash

  • NOR Flash

  • Partitions

  • Range

  • Labels

  • Read-only

  • Testing with JFFS2

Ethernet

  • Phy Interface

  • Data

  • Control

  • MAC Address

  • Testing with ifconfig / wget

I2C LCD & Keypad

  • I2C Device

  • Addressing

  • Interrupts

  • Testing with Char Device

LCD Display

  • Video Interface

  • Configuration Parameters

  • Testing with Frame Buffer Console

GPIOs & LEDs

  • Refering GPIOs

  • LED Triggers

  • GPIO LEDs

  • Testing with Triggers

Pin Control Subsystem

  • Pin Muxing

  • Pin Configuration

  • Testing with Visualizer

Driver & Device Tree

  • Platform Device

  • Platform Data

  • Platform Resources

  • Kernel OpenFirmware APIs

Device Tree Boot

  • Machine DT

  • ATAGs and DT Boot

  • Appended DTB

Debugging with Log Messages

  • Console device

  • Early Printing

  • Log Buffer

  • Dumping Log Buffer from U-Boot

Debugging Driver Binding

  • Kernel Driver Config.

  • Driver Loading

  • Driver Binding

  • Debugging Probe Failure