Introduction to embedded linux device driver and firmware
Introduction to Embedded Linuxand Device Driverswww.definecareer.com
What is an Embedded system?An embedded system is a special-purpose computersystem designed to perform one or a few dedicatedfunctions, often with real-time computing constraints. It is usually embedded as part of a complete deviceincluding hardware and mechanical parts.In contrast, a general-purpose computer, such as apersonal computer, can do many different tasksdepending on programming.Embedded systems control many of the commondevices in use today.
LinuxThe Free Software and Open Source world offers abroad range of tools to develop embedded systems.AdvantagesReuse of existing components for the base systemAllows to focus on the added value of the product.High quality, proven components (Linux kernel, Clibraries...)Complete control on the choice of componentsModifications possible without external constraintsCommunity support: tutorials, mailing lists...Low cost, in particular no per-unit royalties.Potentially less legal issues.Easier access to software and tools.
Linux ArchitectureHardwareBoot loaderLinux kernelStandard C libraryLibrary Library LibraryApplicationTools
Embedded HardwareHardware for embedded systems is often differentfrom hardware for classical systems.Often a different CPU architecture: ARM, MIPS orPowerPC. Intel atom based on x86 arch is also used.Storage on flash : NOR or NAND type, often withlimited capacity (from a few hundreds of MB to fewGB)Limited RAM capacity (from a few tens of MB toseveral hundreds of MB)Many interconnect buses generally not often foundon the desktop: I2C, SPI, SSP, CAN, etc.
Minimum System HW ReqA CPU supported by gcc and the Linux kernel32 bit CPUMMU-less CPUs are also supported, through theuClinux project.A few MB of RAM (4 MB), 8 MB are needed toreally do something.Linux isnt designed for small microcontrollers thatjust have a few tens or hundreds of KB of flash andRAM.Base metal, no OSReduced systems, such as FreeRTOS , Nucleus
SW Comp’s Req for DevelopmentCross-compilation tool chainCompiler that runs on the development machine, butgenerates code for the targetBootloaderStarted by the hardware, responsible for basicinitialization, loading and executing the kernelLinux KernelContains the process and memory management,network stack, device drivers and provides services touserspace applicationsC libraryThe interface between the kernel and the userspaceapplicationsLibraries and applicationsThird-party or in-house
Driver DevelopmentKernel Architecture for Device DriversEmbedded Linux DriverDevelopment
Kernel and Device DriversApplicationSystem call interfaceFrameworkDriverBus infrastructureHardwareUserspaceKernel
Unified Device ModelThe 2.6 kernel included a significant new feature: a unified deviceModel : Instead of having different ad-hoc mechanisms in the varioussubsystems, the device model unifies the description of thedevices and their topology Minimization of code duplication Common facilities (reference counting, event notification,power management, etc.) Enumerate the devices, view their interconnections, linkthe devices to their buses and drivers, etc. Understanding the device model is necessary to understandhow device drivers fit into the Linux kernel architecture.
Bus Drivers The first component of the device model is the bus driver; One bus driver for each type of bus: USB, PCI, SPI, MMC, I2C, etc. It is responsible for: Registering the bus type (struct bus_type) Allowing the registration of adapter drivers (USB controllers,I2C adapters, etc.), able of detecting the connected devices,and providing a communication mechanism with the devices Allowing the registration of device drivers (USB devices, I2Cdevices, PCI devices, etc.), managing the devices Matching the device drivers against the devices detected bythe adapter drivers Provides an API to both adapter drivers and device drivers Defining driver and device specific structure, typicallyxxx_driver and xxx_device
Platform Devices On embedded systems, devices are often not connectedthrough a bus allowing enumeration, hot plugging, andproviding unique identifiers for devices. However, we still want the devices to be part of the devicemodel. The solution to this is the platform driver / platform deviceinfrastructure. The platform devices are the devices that are directlyconnected to the CPU, without any kind of bus.
Linux DD Course ContentOverviewUnderstanding the Linux kernel Understanding the development process Kernel Internals Root file system development from scratch Developing Linux device drivers Driver architecture Development of char driver Working with the kernel development community Practical labs with ARM boards as well as emulatedPC systems Duration 50 hrsFor further queries/enquiries contact :firstname.lastname@example.org