Linux device driver programming using beaglebone black ldd1

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Practical Linux device driver programming, discuss about source code Kernel. Using Kernel API, implement device and driver then build on Beagle Bone Black.

windlunar/BeagleBoneBlack_Linux_Device_Driver

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Linux Device Driver Using BeagleBone Black

  • Device driver is a piece of code that configures and manages a device.
  • The device driver code knows, how to configure the device, sending data to the device, and it knows how to process requests which originate from the device.
  • When the device driver code is loaded into the operating system such as Linux, it exposes interfaces to the user-space so that the user application can communicate with the device.
  • Without the device driver, the OS/Application will not have a clear picture of how to deal with a device.
  • There are three types of device drivers:
    • Character device drivers: character devices (RTC, keyboard, sensor. )
    • Block device drivers: storage devices (mmc, eeproom, flash, harddisk. )
    • Network device drivers: network devices (ethernet, wifi, bluetooth. )

    • Kernel space: This is a set of addresses where the kernel is hosted and where it runs. Kernel memory (or kernel space) is a memory range, owned by the kernel, protected by access flags, preventing any user apps from messing with the kernel (un)knowingly. On the other hand, the kernel can access the whole system memory, since it runs with the higher priority on the system. In kernel mode, the CPU can access the whole memory (both kernel space and user space).
    • User space: This is a set of addresses (locations) where normal programs (such as gedit and so on) are restricted to run in. You may consider it a sandbox or a jail, so that a user program can’t mess with memory or any other resource owned by another program. In user mode, the CPU can only access memory tagged with user space access rights. The only way for a user app to run in the kernel space is through system calls. Some of these are read , write , open , close , mmap , and so on. User space code runs with lower priority. When a process performs a system call, a software interrupt is sent to the kernel, which turns on privileged mode so that the process can run in kernel space. When the system call returns, the kernel turns off the privileged mode and the process is jailed again.
    Sortware Hardware
    ubuntu 18.04/20.04 Beaglebone Black Rev.C
    cross compile 7 or 8 cable, led, lcd
    vsc or vim
    Reference
    AM335x ARM® Cortex™-A8 Microprocessors (MPUs) Technical Reference Manual
    AM335x Datasheet
    Beagleboard Cape Expansion Headers
    Device Tree Document
    • arch/ : The Linux kernel is a fast growing project that supports more and more architectures. That being said, the kernel wants to be as generic as possible. Architecture-specific code is separated from the rest, and falls into this directory. This directory contains processor-specific subdirectories such as alpha/ , arm/ , mips/ , blackfin/ , and so on.
    • block/ : This directory contains code for block storage devices, actually the scheduling algorithm.
    • crypto/ : This directory contains the cryptographic API and the encryption algorithms code.
    • Documentation/ : This should be your favorite directory. It contains the descriptions of APIs used for different kernel frameworks and subsystems. You should look here prior to asking any questions on forums.
    • drivers/ : This is the heaviest directory, continuously growing as device drivers get merged. It contains every device driver organized in various subdirectories.
    • fs/ : This directory contains the implementation of different filesystems that the kernel actually supports, such as NTFS, FAT, ETX , sysfs, procfs, NFS, and so on.
    • include/ : This contains kernel header files.
    • init/ : This directory contains the initialization and start up code.
    • ipc/ : This contains implementation of the Inter-Process Communication (IPC) mechanisms, such as message queues, semaphores, and hared memory.
    • kernel/ : This directory contains architecture-independent portions of the base kernel.
    • lib/ : Library routines and some helper functions live here. They are generic kernel object (kobject) handlers, Cyclic Redundancy Code (CRC) computation functions, and so on.
    • mm/ : This contains memory management code.
    • net/ : This contains networking (whatever network type it is) protocols code.
    • scripts/ : This contains scripts and tools used during kernel development. There are other useful tools here.
    • security/ : This directory contains the security framework code.
    • sound/ : Audio subsystems code is here.
    • usr/ : This currently contains the initramfs implementation.
    • In most cases, there will be no need to start a configuration from scratch. There are default and useful configuration files available in each arch/ directory, which you can use as a starting point:
    • For ARM-based CPUs, these configs files are located in arch/arm/configs/ , and for an BeagleBone Black processor, the default file config is arch/arm/configs/bb.org_defconfig . Similarly, for x86 processors we find the files in arch/x86/configs/ , with only two default configuration files, i386_defconfig and x86_64_defconfig , for 32- and 64-bit versions respectively.
    • For an x86 system:
    make x86_64_defconfig make uImage -j4 make modules make INSTALL_MOD_PATH=/where/to/install> modules_install
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bb.org_defconfig make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage dtbs LOADADDR=0x80008000 -j4 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules -j4 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=/where/to/install> modules_install

    About

    Practical Linux device driver programming, discuss about source code Kernel. Using Kernel API, implement device and driver then build on Beagle Bone Black.

    Источник

    Linux device driver programming using Beaglebone Black(LDD1)

    1) For some exercises involving testing of GPIOs, pinctrl, device tree nodes, overlays, you need a board.

    In this course, Beaglebone Black board is being used.

    2) Mini USB cable to power BBB

    3) USB to UART cable for serial connection with BBB

    6) 16×2 LCD and 10K potentiometer

    OS Requirements

    Learning order of FastBit Embedded Brain Academy Courses,

    If you are a beginner in the field of embedded systems, then you can take our courses in the below-mentioned order.
    This is just a recommendation from the instructor for beginners.

    1) Microcontroller Embedded C Programming: absolute beginners(Embedded C)

    2) Embedded Systems Programming on ARM Cortex-M3/M4 Processor(ARM Cortex M4 Processor specific)

    3) Mastering Microcontroller with Embedded Driver Development(MCU1)

    4) Mastering Microcontroller: TIMERS, PWM, CAN, RTC,LOW POWER(MCU2)

    5) Mastering RTOS: Hands-on FreeRTOS and STM32Fx with Debugging(RTOS)

    6) ARM Cortex M Microcontroller DMA Programming Demystified(DMA)

    7) STM32Fx Microcontroller Custom Bootloader Development(Bootloader)

    8) Embedded Linux Step by Step using Beaglebone Black(Linux)

    9) Linux device driver programming using Beaglebone Black(LDD1)

    Источник

    Linux device driver programming using Beaglebone Black(LDD1)

    Linux device driver programming using Beaglebone Black(LDD1)

    Last updated 6/2023
    Created by FastBit Embedded Brain Academy,Kiran Nayak
    MP4 | Video: h264, 1280×720 | Audio: AAC, 44.1 KHz, 2 Ch
    Genre: eLearning | Language: English + srt | Duration: 151 Lectures ( 21h 55m ) | Size: 6.83 GB

    Foundation course on practical Linux device driver programming

    What you’ll learn
    Fundamentals of Linux kernel module and writing syntax
    Makefile and LKM build procedure
    Character device driver implementation
    Platform bus, Platform device, and platform driver concepts
    Platform driver implementation
    Learn device tree from scratch
    Device tree node syntax, properties of device tree nodes
    Kernel APIs to process device tree nodes
    Device instantiation through device tree nodes
    Device tree overlays and overlays testing via u-boot
    Kernel synchronization services , mutex , spinlocks usage
    Linux device model and sysfs
    Linux GPIO Subsystem
    Linux pinctrl subsystem

    Requirements
    Students must be familiar with basic Linux command usage
    Students must be familiar with ‘C’ programming language

    Description
    ==> This should be your very first course to dive into the exciting world of «Linux device drivers» <==In this course you will learn ,Fundamentals Linux kernel module and syntaxCharacter device driver theory and code implementationPlatform bus, Platform device, and platform driver conceptsPlatform driver implementationDevice tree from scratchAccessing device tree nodes from driversDevice instantiation through device tree nodesDevice tree properties and node syntaxDevice tree overlaysOverlays testing via u-bootKernel synchronization services (Mutex, Spinlocks)Linux device model and sysfsLinux GPIO subsystemLinux pinctrl subsystemHardware Requirements:1) For some exercises involving testing of GPIOs, pinctrl, device tree nodes, overlays, you need a board.In this course, Beaglebone Black board is being used.2) Mini USB cable to power BBB3) USB to UART cable for serial connection with BBB4) Micro SD card 8/16 GB5) SD card reader6) 16×2 LCD and 10K potentiometer7) Jumper wires8)Bread boardOS Requirements:32/64 bit Ubuntu 18.04+ LTSLearning order of FastBit Embedded Brain Academy Courses,If you are a beginner in the field of embedded systems, then you can take our courses in the below-mentioned order. This is just a recommendation from the instructor for beginners. 1) Microcontroller Embedded C Programming: absolute beginners(Embedded C)2) Embedded Systems Programming on ARM Cortex-M3/M4 Processor(ARM Cortex M4 Processor specific)3) Mastering Microcontroller with Embedded Driver Development(MCU1)4) Mastering Microcontroller: TIMERS, PWM, CAN, RTC,LOW POWER(MCU2)5) Mastering Microcontroller: STM32-LTDC, LCD-TFT, LVGL(MCU3)6) Embedded System Design using UML State Machines(State machine)7) Mastering RTOS: Hands-on FreeRTOS and STM32Fx with Debugging(RTOS)8) ARM Cortex M Microcontroller DMA Programming Demystified(DMA)9) STM32Fx Microcontroller Custom Bootloader Development(Bootloader)10) Embedded Linux Step by Step using Beaglebone Black(Linux)11) Linux device driver programming using Beaglebone Black(LDD1)

    Who this course is for
    Students/Hobbyists/Professionals interested in exploring Linux device driver programming

    Источник

    Читайте также:  Linux pam unix so
Оцените статью
Adblock
detector