SlideShare ist ein Scribd-Unternehmen logo
1 von 46
Downloaden Sie, um offline zu lesen
Linux Board Porting
how to add Linux support for a new board




                  Patrick Bellasi

      Dipartimento di Elettronica ed Informazione
                 Politecnico di Milano
                 bellasi@elet.polimi.it



                                                    10/08/09
Agenda

ī€Š   Introduction
ī€Š   Hardware design
      customizing a reference design
      HW verification
ī€Š   Board Support Package
      board specific code
      Boot-loader porting
      booting Linux kernel
ī€Š   User-space support
      build your own distribution
ī€Š   Build you own application


                                    2
Introduction
     Presentation objectives

ī€Š   Show you how is relatively simple to develop you own
    Linux board
      demo-boards are suitable for fast prototyping
      real-applications require ad-hoc HW
         stability, both mechanical and functional
         efficiency
         Cost-reduction
ī€Š   Needs
      reference design
      a development methodology
         possibly using open-source tools
      mostly basic HW design skills



                                      3
Introduction
     Methodology Overview

ī€Š   Few simple steps
    1) customize an HW reference design to suite your needs
    2) build a cross-compilation toolchain
         using tools adopted on step 5
    3) setup boot code
         first (and Second) Level Bootloader
    4) add board support to Linux kernel
    5) build your own distribution



ī€Š   We will consider as example the porting to a new
    board based on Atmel's AT91SAM9260 SoC


                                    4
Agenda

ī€Š   Introduction
ī€Š   Hardware design
      customizing a reference design
      HW verification
ī€Š   Board Support Package
      board specific code
      Boot-loader porting
      booting Linux kernel
ī€Š   User-space support
      build your own distribution
ī€Š   Build you own application


                                    5
Hardware Design
     Identify your needs

ī€Š   Target system requirements
      processing power
      memories: type and amounts
      devices
         communication channels (USART, USB, CAN, I2C, ā€¦)
         digital I/O
         ADC (channels, resolution, timings, ā€¦)
         networking (ethernet, modem, zigbee, bluetooth, ā€¦)
         sensors (GPS, Temp/Lux/Humidity... )
      power needs and budget
      application fields constraints (usability, certifications, ... )
ī€Š   Identify a SoC that match most of these requirements
      consider your skills!
      a reference design is usually provide by the producer

                                    6
Hardware Design
Example - AM9 Reference Platform: AT91SAM9260 by Atmel

 High performances 7-layer high-speed bus matrix
 8 kByte instruction cache
 Advanced system controller
 Low power mode support




                          200 MIPS ARM926EJ-SĀ® core, camera interface, seven
                          USARTs, 10/100 Ethernet MAC, 12 Mbps USB device
                          and host controller with on-chip transceivers, external bus
                          interface (EBI) supporting SDRAM, Flash, NAND Flash
                          with built-in ECC, SD, SDIO, and Multimedia Card
                          interface (MMC), three synchronous serial controllers
                 (SSC), two master/slave Serial Peripheral Interfaces (SPI),a three-
                 channel 16-bit timer/counter, two-wire interface (IĀ²C) and IEEEĀ®
                 1149.1 JTAG Boundary Scan on all digital pins.

                                 7
Hardware Design
     Example ā€“ Custom boards based on same reference desing

ī€Š   Atmel provides reference board's schematics
      use to build you own board
          e.g. add new external devices (GSM, Memories, etc. )




    Omelix's SAM9-L9260
                                                     Daricom's C3-Ax03



                                     8
Hardware Design
     Design your own board

ī€Š   Keep as much as possible from the reference design
      substitute wrong components
      add missing components
ī€Š   Use an IDE to support both circuit design and
    verification
      opensource solutions: KiCAD, Eagle
         export standard garber files
      use them correctly
         define pin properties
         exploit circuit verification tools
ī€Š   Carefully review power lines design
      you may need an help from an electronics engineer
      if possible rely on power companion IC
ī€Š   Add test-points to help HW debugging
                                         9
Hardware Design
KiCAD ā€“ Main interface and Component Library




                                      Component Library




       Main interface




                            10
Hardware Design
KiCAD ā€“ Schema Definition and Verification




                             11
Hardware Design
KiCAD ā€“ Part List and PCB Generation




                            12
Hardware Design
     Produce and test the board

ī€Š   Verify the production quality
      power lines voltage levels
      connections among components
      test circuit functionalities
         you can test well behavior of SoC's external components
             e.g. USART working, control GPIOs, ā€¦
ī€Š   JTAG (IEEE 1149.1) boundary-scan
      device pin signals can be
      observed in real-time
         without interfering with the
         normal device operation
      used to control SoC's pins



                                        13
Hardware Design
Hands On




                  Hands On

      KiCAD Project and JTAG Boundary Scan




                       14
Agenda

ī€Š   Introduction
ī€Š   Hardware design
      customizing a reference design
      HW verification
ī€Š   Board Support Package
      board specific code
      Boot-loader porting
      booting Linux kernel
ī€Š   User-space support
      build your own distribution
ī€Š   Build you own application


                                    15
Board Support Package
     Introduction

ī€Š   Contains everything needed to run an operating
    system on a given hardware platform
      Microprocessor support
      Board specific resources
         Bootloader
         Board initialization code
         Device drivers: buses and peripherals
      User-space distribution
ī€Š   Integration into OpenSource standard tools
      preferred delivery method (i.e. public available)
         u-boot and Linux board support, OpenEmbedded metadata
ī€Š   SoC's producer provide BSP for reference design
      we can update the BSP to include support for our own board


                                   16
Booting Linux
     SAM9: Boot Sequence

ī€Š   Understand the boot procedure
      several pieces of software are involved
         ROM code check if a valid application is present on
         supported media
             FLASH, DATAFLASH, NANDFLASH, SDCARD
         download a valid application into internal SRAM
         run the First Level Bootloader (AT91Bootstrap)
             in charge of HW configuration, download U-Boot binary from
             FLASH to SDRAM, start the Second Level Bootloader
         run the Second Level Bootloader (U-Boot)
             in charge of download kernel binaries from FLASH, network,
             USB key, etc.
         start the kernel
ī€Š   Each architecture has a specific sequence
      for the first two steps only


                                         17
Booting Linux
     SAM9: Understanding Boot Possibilities

ī€Š   Memory considerations             ī€Š   Different booting
         4KB of internal SRAM             strategies




ī€Š   Memory mapping
      give fixed addresses
         available memories
         device configuration
         registers

                                 18
Booting Linux
     SAM9: ROM Code

ī€Š   Integrates different programs to download and/or
    upload into the different memories of the product
      initializes the Debug Unit serial port (DBGU) and the USB
      device port
      look for valid code in DataFlash CS0
         sequence of eight valid ARM exception vectors
         all these vectors must be B-branch or LDR load register instructions
      if a valid sequence is found, code is downloaded into the
      internal SRAM
         remap and a jump to the first address of the SRAM
         otherwise check DataFlash CS1 and NAND Flash
      If no valid ARM vector sequence is found
         SAM-BAĀ® Boot is then executed
         waits for transactions either on the USB device, or on the DBGU
         serial port

                                    19
Booting Linux
     SAM9: SAM-BAĀ® Boot Code

ī€Š   Execute if a valid image to load is not found on flash
ī€Š   Provide a simple command set
      read/write internal SRAM memory
      copy files to/from internal SRAM memory
      jump execution to a specified address in SRAM
ī€Š   Can be used with a graphical tool (SAM-BA GUI)
      run on host, board attached via RS-232 or USB device
      to upload code into SRAM and execute setup routines
         initialize external memories: SDRAM, Serial DataFlash and NAND
         Flash
         available for Linux too
      can require some porting
            e.g. if you changed external memory configuration wrt reference design
         C code
            cross-compile using an arm-elf cross-compiler (e.g. wingcc)

                                         20
Booting Linux
SAM9: SAM-BAĀ® Boot Code



                               SAM Boot Assistant




                                           TCL API Commands




                          21
Hardware Design
Hands On




              Hands On

            Using SAM-BA GUI




                   22
Booting Linux
     SAM9: AT91Bootstrap

ī€Š   The first level boot loader
      small footprint (<4KB)
      stored into dataflash or nand using SAM-BA utility
ī€Š   Needed to
      initialize external memory making them usable
         load ā€œsome codeā€ into external memory
         jump execution to some predefined address
      or reset boot sector to restore access to SAM-BA
ī€Š   Can start either Linux or a second level bootloader
ī€Š   May require few porting
         e.g. if you changed external memory configuration wrt reference
         design
      C code
         quite similar to SAM-BA code structure

                                    23
Hardware Design
Hands On




                   Hands On

       Adding Board Support to AT91Bootstrap




                        24
Booting Linux
     Das U-Boot ā€“ The Universal Bootloader

ī€Š   Is a monitor program
      command line interface with basic command set
         information, memory, flash memory, execution control, network,
         environment variables, filesystem support, special and
         miscellaneous commands
ī€Š   It is relatively easy to port U-boot to a new board
         this explains its success
      many supported architectures
         PPC, ARM, MIPS, x86, m68k, NIOS, Microblaze
         thousand boards supported by public source tree
ī€Š   It is responsible of configuring main interfaces and
    launching a Linux system
      it is possible to directly boot Linux from AT91Bootstrap
      in a production phase for instance

                                     25
Booting Linux
Das U-Boot ā€“ CLI and Environment Variables




                            26
Booting Linux
Das U-Boot ā€“ Storing Kernel Image into NAND




                            27
Booting Linux
Das U-Boot ā€“ Booting Linux




                             28
Booting Linux
     Das U-Boot ā€“ The Universal Bootloader

ī€Š   Configuration depends on the combination of board
    and CPU type
      such information is kept in a configuration file
         include/configs/<board_name>.h
      look for an already supported board which is as close as
      possible to yours
         e.g. have a look at the at91sam9260ek.h
ī€Š   Create support code
      in board/atmel/<your_board>
      have a look at similar atmel'2 boards:
         at91sam9260ek.c config.mk led.c Makefile nand.c partition.c




                                   29
Booting Linux
     Das U-Boot ā€“ The Universal Bootloader

ī€Š   Adjust building scripts to add your board
      MAKEALL:
         LIST_at91="at91cap9adk at91rm9200dk.... <your_board>ā€
      Makefile:
         c3ax03_config :   unconfig
         $(MKCONFIG) -a c3ax03 arm arm926ejs c3ax03 daricom at91sam9
      include/asm-arm/mach-types.h:
         #define MACH_TYPE_<YOUR_BOARD> <YOUR_MACH_TYPE>
         (originating from Linux headers, should already be present)
ī€Š   Cross-compile and load the binary image into Flash
      using SAM-BA GUI Application
      save at address 0x8400
         defined into AT91Bootstrap code



                                  30
Booting Linux
     Das U-Boot ā€“ Other Implementation Details

ī€Š   CPU support implemented in the cpu/ directory
             74xx_7xx arm920t arm946es blackfin leon2 mcf5227x mcf532x microblaze
             mpc5xx mpc824x mpc85xx nios pxa sh3 arm1136 arm925t arm_intcm i386 leon3
             mcf523x mcf5445x mips mpc5xxx mpc8260 mpc86xx nios2 s3c44b0 sh4
             arm720t arm926ejs at32ap ixp lh7a40x mcf52x2 mcf547x_8x mpc512x
             mpc8220 mpc83xx mpc8xx ppc4xx sa1100
ī€Š   Device drivers implemented in drivers/
      a lot of reuse from Linux drivers
ī€Š   Headers implemented in include/ and in include/asm-
    <arch>/
      mostly Linux headers




                                       31
Hardware Design
Hands On




                   Hands On

           Adding Board Support to U-Boot




                         32
Booting Linux
     Linux Kernel ā€“ Architecture Specific Code

ī€Š   Processor specific code is under arch/<arch>
    and include/asm-<arch>
      e.g. arch/arm
ī€Š   Machine specific code is under arch/<arch>/<subdir>
      e.g. arch/arm/mach-at91




                                  33
Booting Linux
     Linux Kernel ā€“ Machine Initialization

ī€Š   On ARM done with the MACHINE_START macro
          MACHINE_START(C3AX03, "Daricom C3-AX03")
                  /* Maintainer: Patrick Bellasi <derkling@gmail.com> */
                  .phys_io        = AT91_BASE_SYS,
                  .io_pg_offst    = ((0xd8000000) >> 18) & 0xfffc,
                  .boot_params    = AT91_SDRAM_BASE + 0x100,
                  .map_io         = c3ax03_map_io,
                  .init_irq       = c3ax03_init_irq,
                  .init_machine   = c3ax03_board_init,
                  .timer          = &at91sam926x_timer,
          MACHINE_END
       declared in the board definition file
ī€Š   Initialization routines
       some are board specific
       mostly composed of structures definitions and registration


                                    34
Booting Linux
     Linux Kernel ā€“ Board Definition Code

ī€Š   Board definitions is done on a single file
      arch/arm/mach-at91/board-<your_board>.c
ī€Š   Data structure definitions
          e.g. MACB Ethernet device
             static struct at91_eth_data __initdata c3ax03_macb_data = {
                     .phy_irq_pin    = AT91_PIN_PA7,
                     .is_rmii        = 1,
             };
ī€Š   Data structure registrations
         e.g. MACB Ethernet device
             at91_add_device_eth(&c3ax03_macb_data);


ī€Š   Update configuration and compilation files
      enable building of your board code
      provide a default kernel configuration
         e.g. arch/arm/configs/c3ax03_defconfig
                                     35
Booting Linux
     Linux Kernel ā€“ Cross-compile kernel

ī€Š   Configure using default configuration
         cp arch/arm/configs/c3ax03_defconfig .config
         make ARCH=arm oldconfig
ī€Š   Customize the kernel for your needs
         make ARCH=arm menuconfig
ī€Š   Build the kernel image
         make ARCH=arm CROSS_COMPILE=<path_to_arm-gcc>
ī€Š   Build the U-Boot kernel Image
         mkimage -A arm -O linux -C none -T kernel -a 20008000 -e
         20008000 -n linux-2.6 -d arch/arm/boot/zImage uImage




                                   36
Hardware Design
Hands On




                   Hands On

           Adding Board Support to Linux




                        37
Agenda

ī€Š   Introduction
ī€Š   Hardware design
      customizing a reference design
      HW verification
ī€Š   Board Support Package
      board specific code
      Boot-loader porting
      booting Linux kernel
ī€Š   User-space support
      build your own distribution
ī€Š   Build you own application


                                    38
User Space Support
     Openembedded Introduction

ī€Š   Self contained cross build system
ī€Š   Collection of metadata (recipes) that describe how to
    build a package
      thousands of packages including bootloaders, libraries, and
      applications
      for ~60 target machines including the N770 and x86
      over 40 package/machine configurations (distributions)
ī€Š   Does not include source code
      fetches source using instructions in metadata
      sopport for sources on tarball, SVN, GIT, ...
ī€Š   Output is individual packages and ļ¬lesystem images
      jffs2, ext2, etc


                                 39
User Space Support
     Openembedded and Bitbake

ī€Š   OE is powered by BitBake
      parses the OE metadata to build the system
         parses recipes/confs
         creates a database of how to fetch, configure, build, install and stage
         each package
         determines package dependencies and builds in correct order
         uses the IPK packaging format




                                     40
User Space Support
     Openembedded Setup

ī€Š   Decide on OE metadata version (snapshot or latest)
      install bitbake
      setup a pristine OE directory
      keep changes in an overlay
         specific configuration files
         internal package metadata
         overloads on pristine metadata for classes, bb files, configuration
      download directory




                                     41
User Space Support
     Openembedded File Layout

ī€Š   Six directories, three of them hold BitBake metadata
      conf
         holding bitbake.conf, machine and distribution configuration
         bitbake.conf is read when BitBake is started
             will link a local.conf, the machine and distribution configuration files
             all these files will be searched in the BBPATH environment variable
      classes
         holding BitBake bbclass that can be inherited by receipts BitBake
      packages
         store the BitBake files
         a directory for each task or application
             directories store the real BitBake files, ending with .bb
             for each application and version we have one .bb file
ī€Š   Bitbake parses all configuration and recipes files found
    in the BBPATH environment variable
      metadata files end with .conf, .inc, .bb and .bbclass
                                            42
User Space Support
     Openembedded Main Configuration Files

ī€Š   local.conf
      highest level configuration
         BBPATH variable
         compilation options
         images to produce
         machine and distro
ī€Š   conf/machine/<machine>.conf
      system architecture
      kernel and its boot parameters
ī€Š   conf/distro/<distro>.conf
      version of each software packages




                                    43
User Space Support
     Using Openembedded

ī€Š   Source the configuration file init.conf
ī€Š   Build single packages
         bitbake busybox
      e.g. build the kernel
         bitbake linux
ī€Š   Build meta packages
      e.g. build a standalone toolchain
         bitbake meta-toolchain
ī€Š   Build a rootdisk image
      e.g. build a mininal system
         bitbake minimal-image




                                  44
User Space Support
     Openembedded Output

ī€Š   Build output directories
      cache
      conf      build specific configuration files
      deploy    image and packages
      staging   intermediate install for libraries and headers
      work      build directory
      cross     host tools for target
      rootfs    expanded root filesystem
      stamps




                                45
Hardware Design
Hands On




                    Hands On

           Configure and Use OpenEmbedded




                         46

Weitere Ƥhnliche Inhalte

Was ist angesagt?

Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device driversHoucheng Lin
Ā 
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBshimosawa
Ā 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internalsmukul bhardwaj
Ā 
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardKernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardAnne Nicolas
Ā 
Introduction to char device driver
Introduction to char device driverIntroduction to char device driver
Introduction to char device driverVandana Salve
Ā 
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily JobLuca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Joblinuxlab_conf
Ā 
Yocto Project Open Source Build System and Collaboration Initiative
Yocto Project Open Source Build System and Collaboration InitiativeYocto Project Open Source Build System and Collaboration Initiative
Yocto Project Open Source Build System and Collaboration InitiativeMarcelo Sanz
Ā 
Bootloaders (U-Boot)
Bootloaders (U-Boot) Bootloaders (U-Boot)
Bootloaders (U-Boot) Omkar Rane
Ā 
Kernel Debugging & Profiling
Kernel Debugging & ProfilingKernel Debugging & Profiling
Kernel Debugging & ProfilingAnil Kumar Pugalia
Ā 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernelguest547d74
Ā 
Introduction to Modern U-Boot
Introduction to Modern U-BootIntroduction to Modern U-Boot
Introduction to Modern U-BootGlobalLogic Ukraine
Ā 
Q4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsQ4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsLinaro
Ā 

Was ist angesagt? (20)

Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device drivers
Ā 
A practical guide to buildroot
A practical guide to buildrootA practical guide to buildroot
A practical guide to buildroot
Ā 
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
Ā 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
Ā 
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardKernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Ā 
Introduction to char device driver
Introduction to char device driverIntroduction to char device driver
Introduction to char device driver
Ā 
Linux Device Tree
Linux Device TreeLinux Device Tree
Linux Device Tree
Ā 
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily JobLuca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Ā 
Yocto Project Open Source Build System and Collaboration Initiative
Yocto Project Open Source Build System and Collaboration InitiativeYocto Project Open Source Build System and Collaboration Initiative
Yocto Project Open Source Build System and Collaboration Initiative
Ā 
I2C Drivers
I2C DriversI2C Drivers
I2C Drivers
Ā 
U-Boot - An universal bootloader
U-Boot - An universal bootloader U-Boot - An universal bootloader
U-Boot - An universal bootloader
Ā 
Linux Porting
Linux PortingLinux Porting
Linux Porting
Ā 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
Ā 
Bootloaders (U-Boot)
Bootloaders (U-Boot) Bootloaders (U-Boot)
Bootloaders (U-Boot)
Ā 
Kernel Debugging & Profiling
Kernel Debugging & ProfilingKernel Debugging & Profiling
Kernel Debugging & Profiling
Ā 
Embedded Linux on ARM
Embedded Linux on ARMEmbedded Linux on ARM
Embedded Linux on ARM
Ā 
BeagleBone Black Bootloaders
BeagleBone Black BootloadersBeagleBone Black Bootloaders
BeagleBone Black Bootloaders
Ā 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernel
Ā 
Introduction to Modern U-Boot
Introduction to Modern U-BootIntroduction to Modern U-Boot
Introduction to Modern U-Boot
Ā 
Q4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsQ4.11: Porting Android to new Platforms
Q4.11: Porting Android to new Platforms
Ā 

Ƅhnlich wie Linux Board Porting: Add Support for New Board

Embedding Linux On The Encore Simputer
Embedding Linux On The Encore SimputerEmbedding Linux On The Encore Simputer
Embedding Linux On The Encore SimputerSatpal Parmar
Ā 
AAME ARM Techcon2013 003v02 Software Development
AAME ARM Techcon2013 003v02  Software DevelopmentAAME ARM Techcon2013 003v02  Software Development
AAME ARM Techcon2013 003v02 Software DevelopmentAnh Dung NGUYEN
Ā 
TeksunLab Pegasus Program Details 2014
TeksunLab Pegasus Program Details 2014TeksunLab Pegasus Program Details 2014
TeksunLab Pegasus Program Details 2014Teksun Microsys Pvt. Ltd.
Ā 
Snug2007 Presentation
Snug2007 PresentationSnug2007 Presentation
Snug2007 Presentationclkalyan
Ā 
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...ryancox
Ā 
Developing a Windows CE OAL.ppt
Developing a Windows CE OAL.pptDeveloping a Windows CE OAL.ppt
Developing a Windows CE OAL.pptKundanSingh887495
Ā 
Developping drivers on small machines
Developping drivers on small machinesDevelopping drivers on small machines
Developping drivers on small machinesAnne Nicolas
Ā 
Creating an Embedded System Lab
Creating an Embedded System LabCreating an Embedded System Lab
Creating an Embedded System LabNonamepro
Ā 
Aftab_Alam_Resume2016
Aftab_Alam_Resume2016Aftab_Alam_Resume2016
Aftab_Alam_Resume2016AFTAB ALAM
Ā 
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...Toradex
Ā 
Richard Bronson Full Resume 2015
Richard Bronson Full Resume 2015Richard Bronson Full Resume 2015
Richard Bronson Full Resume 2015Richard Bronson
Ā 
Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PICliff Samuels Jr.
Ā 
system unit and Motherboard
system unit and Motherboardsystem unit and Motherboard
system unit and Motherboardromeodait
Ā 

Ƅhnlich wie Linux Board Porting: Add Support for New Board (20)

Building
BuildingBuilding
Building
Ā 
Embedding Linux On The Encore Simputer
Embedding Linux On The Encore SimputerEmbedding Linux On The Encore Simputer
Embedding Linux On The Encore Simputer
Ā 
AAME ARM Techcon2013 003v02 Software Development
AAME ARM Techcon2013 003v02  Software DevelopmentAAME ARM Techcon2013 003v02  Software Development
AAME ARM Techcon2013 003v02 Software Development
Ā 
Choosing the right processor
Choosing the right processorChoosing the right processor
Choosing the right processor
Ā 
TeksunLab Pegasus Program Details 2014
TeksunLab Pegasus Program Details 2014TeksunLab Pegasus Program Details 2014
TeksunLab Pegasus Program Details 2014
Ā 
Snug2007 Presentation
Snug2007 PresentationSnug2007 Presentation
Snug2007 Presentation
Ā 
Slimline Open Firmware
Slimline Open FirmwareSlimline Open Firmware
Slimline Open Firmware
Ā 
Divya_Resume
Divya_ResumeDivya_Resume
Divya_Resume
Ā 
soc design for dsp applications
soc design for dsp applicationssoc design for dsp applications
soc design for dsp applications
Ā 
ARM Processor Tutorial
ARM Processor Tutorial ARM Processor Tutorial
ARM Processor Tutorial
Ā 
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
Ā 
Developing a Windows CE OAL.ppt
Developing a Windows CE OAL.pptDeveloping a Windows CE OAL.ppt
Developing a Windows CE OAL.ppt
Ā 
Developping drivers on small machines
Developping drivers on small machinesDevelopping drivers on small machines
Developping drivers on small machines
Ā 
Creating an Embedded System Lab
Creating an Embedded System LabCreating an Embedded System Lab
Creating an Embedded System Lab
Ā 
Aftab_Alam_Resume2016
Aftab_Alam_Resume2016Aftab_Alam_Resume2016
Aftab_Alam_Resume2016
Ā 
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
Ā 
FPGA workshop
FPGA workshopFPGA workshop
FPGA workshop
Ā 
Richard Bronson Full Resume 2015
Richard Bronson Full Resume 2015Richard Bronson Full Resume 2015
Richard Bronson Full Resume 2015
Ā 
Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PI
Ā 
system unit and Motherboard
system unit and Motherboardsystem unit and Motherboard
system unit and Motherboard
Ā 

Mehr von Patrick Bellasi

Linaro Connect 2016 (BKK16) - Introduction to LISA
Linaro Connect 2016 (BKK16) - Introduction to LISALinaro Connect 2016 (BKK16) - Introduction to LISA
Linaro Connect 2016 (BKK16) - Introduction to LISAPatrick Bellasi
Ā 
Evoluzione dei Sistemi Embedded: Verso architetture multi-core
Evoluzione dei Sistemi Embedded: Verso architetture multi-coreEvoluzione dei Sistemi Embedded: Verso architetture multi-core
Evoluzione dei Sistemi Embedded: Verso architetture multi-corePatrick Bellasi
Ā 
Exploiting Linux Control Groups for Effective Run-time Resource Management
Exploiting Linux Control Groups for Effective Run-time Resource ManagementExploiting Linux Control Groups for Effective Run-time Resource Management
Exploiting Linux Control Groups for Effective Run-time Resource ManagementPatrick Bellasi
Ā 
Cross-Layer Frameworks for Constrained Power and Resources Management of Embe...
Cross-Layer Frameworks for Constrained Power and Resources Management of Embe...Cross-Layer Frameworks for Constrained Power and Resources Management of Embe...
Cross-Layer Frameworks for Constrained Power and Resources Management of Embe...Patrick Bellasi
Ā 
Constrained Power Management
Constrained Power ManagementConstrained Power Management
Constrained Power ManagementPatrick Bellasi
Ā 
Embedded Systems Power Management
Embedded Systems Power ManagementEmbedded Systems Power Management
Embedded Systems Power ManagementPatrick Bellasi
Ā 
Linux Power Management Slideshare
Linux Power Management SlideshareLinux Power Management Slideshare
Linux Power Management SlidesharePatrick Bellasi
Ā 

Mehr von Patrick Bellasi (7)

Linaro Connect 2016 (BKK16) - Introduction to LISA
Linaro Connect 2016 (BKK16) - Introduction to LISALinaro Connect 2016 (BKK16) - Introduction to LISA
Linaro Connect 2016 (BKK16) - Introduction to LISA
Ā 
Evoluzione dei Sistemi Embedded: Verso architetture multi-core
Evoluzione dei Sistemi Embedded: Verso architetture multi-coreEvoluzione dei Sistemi Embedded: Verso architetture multi-core
Evoluzione dei Sistemi Embedded: Verso architetture multi-core
Ā 
Exploiting Linux Control Groups for Effective Run-time Resource Management
Exploiting Linux Control Groups for Effective Run-time Resource ManagementExploiting Linux Control Groups for Effective Run-time Resource Management
Exploiting Linux Control Groups for Effective Run-time Resource Management
Ā 
Cross-Layer Frameworks for Constrained Power and Resources Management of Embe...
Cross-Layer Frameworks for Constrained Power and Resources Management of Embe...Cross-Layer Frameworks for Constrained Power and Resources Management of Embe...
Cross-Layer Frameworks for Constrained Power and Resources Management of Embe...
Ā 
Constrained Power Management
Constrained Power ManagementConstrained Power Management
Constrained Power Management
Ā 
Embedded Systems Power Management
Embedded Systems Power ManagementEmbedded Systems Power Management
Embedded Systems Power Management
Ā 
Linux Power Management Slideshare
Linux Power Management SlideshareLinux Power Management Slideshare
Linux Power Management Slideshare
Ā 

KĆ¼rzlich hochgeladen

Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
Ā 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Centuryrwgiffor
Ā 
Call Girls Jp Nagar Just Call šŸ‘— 7737669865 šŸ‘— Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call šŸ‘— 7737669865 šŸ‘— Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call šŸ‘— 7737669865 šŸ‘— Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call šŸ‘— 7737669865 šŸ‘— Top Class Call Girl Service Bang...amitlee9823
Ā 
VIP Call Girls In Saharaganj ( Lucknow ) šŸ” 8923113531 šŸ” Cash Payment (COD) šŸ‘’
VIP Call Girls In Saharaganj ( Lucknow  ) šŸ” 8923113531 šŸ”  Cash Payment (COD) šŸ‘’VIP Call Girls In Saharaganj ( Lucknow  ) šŸ” 8923113531 šŸ”  Cash Payment (COD) šŸ‘’
VIP Call Girls In Saharaganj ( Lucknow ) šŸ” 8923113531 šŸ” Cash Payment (COD) šŸ‘’anilsa9823
Ā 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Neil Kimberley
Ā 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Serviceritikaroy0888
Ā 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLSeo
Ā 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsP&CO
Ā 
HONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsHONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsMichael W. Hawkins
Ā 
Event mailer assignment progress report .pdf
Event mailer assignment progress report .pdfEvent mailer assignment progress report .pdf
Event mailer assignment progress report .pdftbatkhuu1
Ā 
Yaroslav Rozhankivskyy: Š¢Ń€Šø сŠŗŠ»Š°Š“Š¾Š²Ń– і трŠø ŠæŠµŃ€ŠµŠ“уŠ¼Š¾Š²Šø Š¼Š°ŠŗсŠøŠ¼Š°Š»ŃŒŠ½Š¾Ń— ŠæрŠ¾Š“уŠŗтŠøŠ²Š½...
Yaroslav Rozhankivskyy: Š¢Ń€Šø сŠŗŠ»Š°Š“Š¾Š²Ń– і трŠø ŠæŠµŃ€ŠµŠ“уŠ¼Š¾Š²Šø Š¼Š°ŠŗсŠøŠ¼Š°Š»ŃŒŠ½Š¾Ń— ŠæрŠ¾Š“уŠŗтŠøŠ²Š½...Yaroslav Rozhankivskyy: Š¢Ń€Šø сŠŗŠ»Š°Š“Š¾Š²Ń– і трŠø ŠæŠµŃ€ŠµŠ“уŠ¼Š¾Š²Šø Š¼Š°ŠŗсŠøŠ¼Š°Š»ŃŒŠ½Š¾Ń— ŠæрŠ¾Š“уŠŗтŠøŠ²Š½...
Yaroslav Rozhankivskyy: Š¢Ń€Šø сŠŗŠ»Š°Š“Š¾Š²Ń– і трŠø ŠæŠµŃ€ŠµŠ“уŠ¼Š¾Š²Šø Š¼Š°ŠŗсŠøŠ¼Š°Š»ŃŒŠ½Š¾Ń— ŠæрŠ¾Š“уŠŗтŠøŠ²Š½...Lviv Startup Club
Ā 
Best Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaBest Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaShree Krishna Exports
Ā 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Dave Litwiller
Ā 
A305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdfA305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdftbatkhuu1
Ā 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMANIlamathiKannappan
Ā 
Lucknow šŸ’‹ Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow šŸ’‹ Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow šŸ’‹ Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow šŸ’‹ Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...anilsa9823
Ā 
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...Aggregage
Ā 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxWorkforce Group
Ā 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfPaul Menig
Ā 

KĆ¼rzlich hochgeladen (20)

unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
Ā 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Ā 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Century
Ā 
Call Girls Jp Nagar Just Call šŸ‘— 7737669865 šŸ‘— Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call šŸ‘— 7737669865 šŸ‘— Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call šŸ‘— 7737669865 šŸ‘— Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call šŸ‘— 7737669865 šŸ‘— Top Class Call Girl Service Bang...
Ā 
VIP Call Girls In Saharaganj ( Lucknow ) šŸ” 8923113531 šŸ” Cash Payment (COD) šŸ‘’
VIP Call Girls In Saharaganj ( Lucknow  ) šŸ” 8923113531 šŸ”  Cash Payment (COD) šŸ‘’VIP Call Girls In Saharaganj ( Lucknow  ) šŸ” 8923113531 šŸ”  Cash Payment (COD) šŸ‘’
VIP Call Girls In Saharaganj ( Lucknow ) šŸ” 8923113531 šŸ” Cash Payment (COD) šŸ‘’
Ā 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023
Ā 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
Ā 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
Ā 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
Ā 
HONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsHONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael Hawkins
Ā 
Event mailer assignment progress report .pdf
Event mailer assignment progress report .pdfEvent mailer assignment progress report .pdf
Event mailer assignment progress report .pdf
Ā 
Yaroslav Rozhankivskyy: Š¢Ń€Šø сŠŗŠ»Š°Š“Š¾Š²Ń– і трŠø ŠæŠµŃ€ŠµŠ“уŠ¼Š¾Š²Šø Š¼Š°ŠŗсŠøŠ¼Š°Š»ŃŒŠ½Š¾Ń— ŠæрŠ¾Š“уŠŗтŠøŠ²Š½...
Yaroslav Rozhankivskyy: Š¢Ń€Šø сŠŗŠ»Š°Š“Š¾Š²Ń– і трŠø ŠæŠµŃ€ŠµŠ“уŠ¼Š¾Š²Šø Š¼Š°ŠŗсŠøŠ¼Š°Š»ŃŒŠ½Š¾Ń— ŠæрŠ¾Š“уŠŗтŠøŠ²Š½...Yaroslav Rozhankivskyy: Š¢Ń€Šø сŠŗŠ»Š°Š“Š¾Š²Ń– і трŠø ŠæŠµŃ€ŠµŠ“уŠ¼Š¾Š²Šø Š¼Š°ŠŗсŠøŠ¼Š°Š»ŃŒŠ½Š¾Ń— ŠæрŠ¾Š“уŠŗтŠøŠ²Š½...
Yaroslav Rozhankivskyy: Š¢Ń€Šø сŠŗŠ»Š°Š“Š¾Š²Ń– і трŠø ŠæŠµŃ€ŠµŠ“уŠ¼Š¾Š²Šø Š¼Š°ŠŗсŠøŠ¼Š°Š»ŃŒŠ½Š¾Ń— ŠæрŠ¾Š“уŠŗтŠøŠ²Š½...
Ā 
Best Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaBest Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in India
Ā 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Ā 
A305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdfA305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdf
Ā 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMAN
Ā 
Lucknow šŸ’‹ Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow šŸ’‹ Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow šŸ’‹ Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow šŸ’‹ Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Ā 
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
Ā 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
Ā 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdf
Ā 

Linux Board Porting: Add Support for New Board

  • 1. Linux Board Porting how to add Linux support for a new board Patrick Bellasi Dipartimento di Elettronica ed Informazione Politecnico di Milano bellasi@elet.polimi.it 10/08/09
  • 2. Agenda ī€Š Introduction ī€Š Hardware design customizing a reference design HW verification ī€Š Board Support Package board specific code Boot-loader porting booting Linux kernel ī€Š User-space support build your own distribution ī€Š Build you own application 2
  • 3. Introduction Presentation objectives ī€Š Show you how is relatively simple to develop you own Linux board demo-boards are suitable for fast prototyping real-applications require ad-hoc HW stability, both mechanical and functional efficiency Cost-reduction ī€Š Needs reference design a development methodology possibly using open-source tools mostly basic HW design skills 3
  • 4. Introduction Methodology Overview ī€Š Few simple steps 1) customize an HW reference design to suite your needs 2) build a cross-compilation toolchain using tools adopted on step 5 3) setup boot code first (and Second) Level Bootloader 4) add board support to Linux kernel 5) build your own distribution ī€Š We will consider as example the porting to a new board based on Atmel's AT91SAM9260 SoC 4
  • 5. Agenda ī€Š Introduction ī€Š Hardware design customizing a reference design HW verification ī€Š Board Support Package board specific code Boot-loader porting booting Linux kernel ī€Š User-space support build your own distribution ī€Š Build you own application 5
  • 6. Hardware Design Identify your needs ī€Š Target system requirements processing power memories: type and amounts devices communication channels (USART, USB, CAN, I2C, ā€¦) digital I/O ADC (channels, resolution, timings, ā€¦) networking (ethernet, modem, zigbee, bluetooth, ā€¦) sensors (GPS, Temp/Lux/Humidity... ) power needs and budget application fields constraints (usability, certifications, ... ) ī€Š Identify a SoC that match most of these requirements consider your skills! a reference design is usually provide by the producer 6
  • 7. Hardware Design Example - AM9 Reference Platform: AT91SAM9260 by Atmel High performances 7-layer high-speed bus matrix 8 kByte instruction cache Advanced system controller Low power mode support 200 MIPS ARM926EJ-SĀ® core, camera interface, seven USARTs, 10/100 Ethernet MAC, 12 Mbps USB device and host controller with on-chip transceivers, external bus interface (EBI) supporting SDRAM, Flash, NAND Flash with built-in ECC, SD, SDIO, and Multimedia Card interface (MMC), three synchronous serial controllers (SSC), two master/slave Serial Peripheral Interfaces (SPI),a three- channel 16-bit timer/counter, two-wire interface (IĀ²C) and IEEEĀ® 1149.1 JTAG Boundary Scan on all digital pins. 7
  • 8. Hardware Design Example ā€“ Custom boards based on same reference desing ī€Š Atmel provides reference board's schematics use to build you own board e.g. add new external devices (GSM, Memories, etc. ) Omelix's SAM9-L9260 Daricom's C3-Ax03 8
  • 9. Hardware Design Design your own board ī€Š Keep as much as possible from the reference design substitute wrong components add missing components ī€Š Use an IDE to support both circuit design and verification opensource solutions: KiCAD, Eagle export standard garber files use them correctly define pin properties exploit circuit verification tools ī€Š Carefully review power lines design you may need an help from an electronics engineer if possible rely on power companion IC ī€Š Add test-points to help HW debugging 9
  • 10. Hardware Design KiCAD ā€“ Main interface and Component Library Component Library Main interface 10
  • 11. Hardware Design KiCAD ā€“ Schema Definition and Verification 11
  • 12. Hardware Design KiCAD ā€“ Part List and PCB Generation 12
  • 13. Hardware Design Produce and test the board ī€Š Verify the production quality power lines voltage levels connections among components test circuit functionalities you can test well behavior of SoC's external components e.g. USART working, control GPIOs, ā€¦ ī€Š JTAG (IEEE 1149.1) boundary-scan device pin signals can be observed in real-time without interfering with the normal device operation used to control SoC's pins 13
  • 14. Hardware Design Hands On Hands On KiCAD Project and JTAG Boundary Scan 14
  • 15. Agenda ī€Š Introduction ī€Š Hardware design customizing a reference design HW verification ī€Š Board Support Package board specific code Boot-loader porting booting Linux kernel ī€Š User-space support build your own distribution ī€Š Build you own application 15
  • 16. Board Support Package Introduction ī€Š Contains everything needed to run an operating system on a given hardware platform Microprocessor support Board specific resources Bootloader Board initialization code Device drivers: buses and peripherals User-space distribution ī€Š Integration into OpenSource standard tools preferred delivery method (i.e. public available) u-boot and Linux board support, OpenEmbedded metadata ī€Š SoC's producer provide BSP for reference design we can update the BSP to include support for our own board 16
  • 17. Booting Linux SAM9: Boot Sequence ī€Š Understand the boot procedure several pieces of software are involved ROM code check if a valid application is present on supported media FLASH, DATAFLASH, NANDFLASH, SDCARD download a valid application into internal SRAM run the First Level Bootloader (AT91Bootstrap) in charge of HW configuration, download U-Boot binary from FLASH to SDRAM, start the Second Level Bootloader run the Second Level Bootloader (U-Boot) in charge of download kernel binaries from FLASH, network, USB key, etc. start the kernel ī€Š Each architecture has a specific sequence for the first two steps only 17
  • 18. Booting Linux SAM9: Understanding Boot Possibilities ī€Š Memory considerations ī€Š Different booting 4KB of internal SRAM strategies ī€Š Memory mapping give fixed addresses available memories device configuration registers 18
  • 19. Booting Linux SAM9: ROM Code ī€Š Integrates different programs to download and/or upload into the different memories of the product initializes the Debug Unit serial port (DBGU) and the USB device port look for valid code in DataFlash CS0 sequence of eight valid ARM exception vectors all these vectors must be B-branch or LDR load register instructions if a valid sequence is found, code is downloaded into the internal SRAM remap and a jump to the first address of the SRAM otherwise check DataFlash CS1 and NAND Flash If no valid ARM vector sequence is found SAM-BAĀ® Boot is then executed waits for transactions either on the USB device, or on the DBGU serial port 19
  • 20. Booting Linux SAM9: SAM-BAĀ® Boot Code ī€Š Execute if a valid image to load is not found on flash ī€Š Provide a simple command set read/write internal SRAM memory copy files to/from internal SRAM memory jump execution to a specified address in SRAM ī€Š Can be used with a graphical tool (SAM-BA GUI) run on host, board attached via RS-232 or USB device to upload code into SRAM and execute setup routines initialize external memories: SDRAM, Serial DataFlash and NAND Flash available for Linux too can require some porting e.g. if you changed external memory configuration wrt reference design C code cross-compile using an arm-elf cross-compiler (e.g. wingcc) 20
  • 21. Booting Linux SAM9: SAM-BAĀ® Boot Code SAM Boot Assistant TCL API Commands 21
  • 22. Hardware Design Hands On Hands On Using SAM-BA GUI 22
  • 23. Booting Linux SAM9: AT91Bootstrap ī€Š The first level boot loader small footprint (<4KB) stored into dataflash or nand using SAM-BA utility ī€Š Needed to initialize external memory making them usable load ā€œsome codeā€ into external memory jump execution to some predefined address or reset boot sector to restore access to SAM-BA ī€Š Can start either Linux or a second level bootloader ī€Š May require few porting e.g. if you changed external memory configuration wrt reference design C code quite similar to SAM-BA code structure 23
  • 24. Hardware Design Hands On Hands On Adding Board Support to AT91Bootstrap 24
  • 25. Booting Linux Das U-Boot ā€“ The Universal Bootloader ī€Š Is a monitor program command line interface with basic command set information, memory, flash memory, execution control, network, environment variables, filesystem support, special and miscellaneous commands ī€Š It is relatively easy to port U-boot to a new board this explains its success many supported architectures PPC, ARM, MIPS, x86, m68k, NIOS, Microblaze thousand boards supported by public source tree ī€Š It is responsible of configuring main interfaces and launching a Linux system it is possible to directly boot Linux from AT91Bootstrap in a production phase for instance 25
  • 26. Booting Linux Das U-Boot ā€“ CLI and Environment Variables 26
  • 27. Booting Linux Das U-Boot ā€“ Storing Kernel Image into NAND 27
  • 28. Booting Linux Das U-Boot ā€“ Booting Linux 28
  • 29. Booting Linux Das U-Boot ā€“ The Universal Bootloader ī€Š Configuration depends on the combination of board and CPU type such information is kept in a configuration file include/configs/<board_name>.h look for an already supported board which is as close as possible to yours e.g. have a look at the at91sam9260ek.h ī€Š Create support code in board/atmel/<your_board> have a look at similar atmel'2 boards: at91sam9260ek.c config.mk led.c Makefile nand.c partition.c 29
  • 30. Booting Linux Das U-Boot ā€“ The Universal Bootloader ī€Š Adjust building scripts to add your board MAKEALL: LIST_at91="at91cap9adk at91rm9200dk.... <your_board>ā€ Makefile: c3ax03_config : unconfig $(MKCONFIG) -a c3ax03 arm arm926ejs c3ax03 daricom at91sam9 include/asm-arm/mach-types.h: #define MACH_TYPE_<YOUR_BOARD> <YOUR_MACH_TYPE> (originating from Linux headers, should already be present) ī€Š Cross-compile and load the binary image into Flash using SAM-BA GUI Application save at address 0x8400 defined into AT91Bootstrap code 30
  • 31. Booting Linux Das U-Boot ā€“ Other Implementation Details ī€Š CPU support implemented in the cpu/ directory 74xx_7xx arm920t arm946es blackfin leon2 mcf5227x mcf532x microblaze mpc5xx mpc824x mpc85xx nios pxa sh3 arm1136 arm925t arm_intcm i386 leon3 mcf523x mcf5445x mips mpc5xxx mpc8260 mpc86xx nios2 s3c44b0 sh4 arm720t arm926ejs at32ap ixp lh7a40x mcf52x2 mcf547x_8x mpc512x mpc8220 mpc83xx mpc8xx ppc4xx sa1100 ī€Š Device drivers implemented in drivers/ a lot of reuse from Linux drivers ī€Š Headers implemented in include/ and in include/asm- <arch>/ mostly Linux headers 31
  • 32. Hardware Design Hands On Hands On Adding Board Support to U-Boot 32
  • 33. Booting Linux Linux Kernel ā€“ Architecture Specific Code ī€Š Processor specific code is under arch/<arch> and include/asm-<arch> e.g. arch/arm ī€Š Machine specific code is under arch/<arch>/<subdir> e.g. arch/arm/mach-at91 33
  • 34. Booting Linux Linux Kernel ā€“ Machine Initialization ī€Š On ARM done with the MACHINE_START macro MACHINE_START(C3AX03, "Daricom C3-AX03") /* Maintainer: Patrick Bellasi <derkling@gmail.com> */ .phys_io = AT91_BASE_SYS, .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, .boot_params = AT91_SDRAM_BASE + 0x100, .map_io = c3ax03_map_io, .init_irq = c3ax03_init_irq, .init_machine = c3ax03_board_init, .timer = &at91sam926x_timer, MACHINE_END declared in the board definition file ī€Š Initialization routines some are board specific mostly composed of structures definitions and registration 34
  • 35. Booting Linux Linux Kernel ā€“ Board Definition Code ī€Š Board definitions is done on a single file arch/arm/mach-at91/board-<your_board>.c ī€Š Data structure definitions e.g. MACB Ethernet device static struct at91_eth_data __initdata c3ax03_macb_data = { .phy_irq_pin = AT91_PIN_PA7, .is_rmii = 1, }; ī€Š Data structure registrations e.g. MACB Ethernet device at91_add_device_eth(&c3ax03_macb_data); ī€Š Update configuration and compilation files enable building of your board code provide a default kernel configuration e.g. arch/arm/configs/c3ax03_defconfig 35
  • 36. Booting Linux Linux Kernel ā€“ Cross-compile kernel ī€Š Configure using default configuration cp arch/arm/configs/c3ax03_defconfig .config make ARCH=arm oldconfig ī€Š Customize the kernel for your needs make ARCH=arm menuconfig ī€Š Build the kernel image make ARCH=arm CROSS_COMPILE=<path_to_arm-gcc> ī€Š Build the U-Boot kernel Image mkimage -A arm -O linux -C none -T kernel -a 20008000 -e 20008000 -n linux-2.6 -d arch/arm/boot/zImage uImage 36
  • 37. Hardware Design Hands On Hands On Adding Board Support to Linux 37
  • 38. Agenda ī€Š Introduction ī€Š Hardware design customizing a reference design HW verification ī€Š Board Support Package board specific code Boot-loader porting booting Linux kernel ī€Š User-space support build your own distribution ī€Š Build you own application 38
  • 39. User Space Support Openembedded Introduction ī€Š Self contained cross build system ī€Š Collection of metadata (recipes) that describe how to build a package thousands of packages including bootloaders, libraries, and applications for ~60 target machines including the N770 and x86 over 40 package/machine configurations (distributions) ī€Š Does not include source code fetches source using instructions in metadata sopport for sources on tarball, SVN, GIT, ... ī€Š Output is individual packages and ļ¬lesystem images jffs2, ext2, etc 39
  • 40. User Space Support Openembedded and Bitbake ī€Š OE is powered by BitBake parses the OE metadata to build the system parses recipes/confs creates a database of how to fetch, configure, build, install and stage each package determines package dependencies and builds in correct order uses the IPK packaging format 40
  • 41. User Space Support Openembedded Setup ī€Š Decide on OE metadata version (snapshot or latest) install bitbake setup a pristine OE directory keep changes in an overlay specific configuration files internal package metadata overloads on pristine metadata for classes, bb files, configuration download directory 41
  • 42. User Space Support Openembedded File Layout ī€Š Six directories, three of them hold BitBake metadata conf holding bitbake.conf, machine and distribution configuration bitbake.conf is read when BitBake is started will link a local.conf, the machine and distribution configuration files all these files will be searched in the BBPATH environment variable classes holding BitBake bbclass that can be inherited by receipts BitBake packages store the BitBake files a directory for each task or application directories store the real BitBake files, ending with .bb for each application and version we have one .bb file ī€Š Bitbake parses all configuration and recipes files found in the BBPATH environment variable metadata files end with .conf, .inc, .bb and .bbclass 42
  • 43. User Space Support Openembedded Main Configuration Files ī€Š local.conf highest level configuration BBPATH variable compilation options images to produce machine and distro ī€Š conf/machine/<machine>.conf system architecture kernel and its boot parameters ī€Š conf/distro/<distro>.conf version of each software packages 43
  • 44. User Space Support Using Openembedded ī€Š Source the configuration file init.conf ī€Š Build single packages bitbake busybox e.g. build the kernel bitbake linux ī€Š Build meta packages e.g. build a standalone toolchain bitbake meta-toolchain ī€Š Build a rootdisk image e.g. build a mininal system bitbake minimal-image 44
  • 45. User Space Support Openembedded Output ī€Š Build output directories cache conf build specific configuration files deploy image and packages staging intermediate install for libraries and headers work build directory cross host tools for target rootfs expanded root filesystem stamps 45
  • 46. Hardware Design Hands On Hands On Configure and Use OpenEmbedded 46