SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
ARM Linux & GNU
                         Philippe Robin


                                June 2004




                                                                         1
          THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd




Outline
 Open source model
 Architecture and platforms support
 Linux 2.4 kernel
 Linux 2.6 kernel
 GNU GCC tool chain
 Debugging
 Cooperation
 Linux resources




                                                                         2
          THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd
ARM Architecture Evolution
                                                                              2004
                                                                                        ARMv7
                                                                     2003
                                                                            ARMv6Z– TrustZoneℱ, IEM*
                                                           2003
                                                                   ARMv6T2– Thumb-2 ISA
                                                2002
                                                         ARMv6 – SIMD Media ISA
                                       2000
                                               ARMv5TEJ – Jazelle¼ Java Acceleration
                               1998
                                      ARMv5TE – DSP Instructions
                      1995

                             ARMv4T – Thumb ISA¼ ISA


                                                                                                             3
                                  THE ARCHITECTURE FOR THE DIGITAL WORLD         Copyright © ARM Ltd




                      Linux and Architecture Support
  ARM ARCHITECTURES




                                                                     TrustZone

                                                                       Intelligent Energy Controller (IEC)
                                               Jazelle (option)

                      V4        V5TE          V5TEJ                  V6                    V7

                                 Linux 2.4 kernel
Linux Kernel




                                                     Linux 2.6 kernel

                                                           Linux 2.7 kernel


                               Preemtion, 0(1) scheduler, New Posix Thread Library (NPTL),
                               Power Management etc



                                                                                                             4
                                  THE ARCHITECTURE FOR THE DIGITAL WORLD         Copyright © ARM Ltd
Open Source Model
                                                             Other organisations
                                                             -Embedded Linux Consortium
                                                             -Embedix
     Commercial Linux                                        -CELF
                                        Gatekeepers
        Providers




                                 Open Source Repository
                                    www.kernel.org


                                                                        Other Contributors:
   ARM Source Tree                                                      -Platforms (Zaurus, iPaq
)
Architecture & Platform
                                                                        -Debian
        Support
                                                                        -Etc

                                           ARM Linux
                                        Open Source Tree
                                   http://www.arm.linux.org.uk



                                                                                            5
                   THE ARCHITECTURE FOR THE DIGITAL WORLD        Copyright © ARM Ltd




    ARM and Open Source Projects
       ARM Contribute Architectural support to the
       Linux kernel and related GNU projects
        – For ARM cores and specific technology
             ‱ ARMv6, ARMv7...
        – Promote standardization initiatives
             ‱ New ARM ABI
       Early contribution to promote adoption from the
       community
        – Cooperation with partners and gatekeepers
       Promote active participation and contributions
       to the open source

                                                                                            6
                   THE ARCHITECTURE FOR THE DIGITAL WORLD        Copyright © ARM Ltd
Architectural Support

     ARM uses Linux kernel internally to validate
     new ARM cores and technology
      – Used with simulation models, FPGA and Cores
     Contribute architectural support to GNU GCC
      – Currently GCC is needed to compile kernel and
        applications
      – New ARM ABI will allow more choices and inter-
        operability between tool chains




                                                                                         7
                THE ARCHITECTURE FOR THE DIGITAL WORLD     Copyright © ARM Ltd




  ARM Development Platforms
               Integrator Family                                Versatile Family
Compact Platform
                                                         Versatile Platform Baseboard
                                 Logic Modules




Core Modules

                     Interface Modules




                                                                                 Analyzer Tile
                                                         Logic Tile



                                                                                         8
                THE ARCHITECTURE FOR THE DIGITAL WORLD     Copyright © ARM Ltd
ARM Cores and Platform Support
 Currently Linux has support for:
  – ARM720T, ARM92x, ARM102x and
    ARM11 cores
 ARM development platforms
  – ARM Integrator family
  – Versatile board
 BSP availability
  – ARM (early access)
  – Open source (www.kernel.org)
     ‱ availability usually coincide with hardware
       availability


                                                                        9
         THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd




Linux 2.4 kernel

 Stable version
  – Feature freeze
     ‱ Only bug fixes are now being integrated
 Current 2.4.21 includes support for:
  – ARM cores up to ARMv6
     ‱ Legacy mode, not optimised
  – Integrator AP and CP
  – Versatile PB
     ‱ Patch available from ARM

                                                                        10
         THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd
Linux 2.6 kernel
 2.6.6 is the current development version
 Version 2.6.6 includes support for:
  – ARM cores up to architecture v6 including:
      ‱   ASIDS,
      ‱   Atomic instructions,
      ‱   physically tagged cache,
      ‱   CPS instructions
  – Integrator AP, CP and Versatile Platforms
      ‱ Including the following Primecell peripherals:
            Serial, Timers, Interrupt controller, KMI, Ethernet, VGA/LCD
 Peripherals being added in 04Q2
  – AACI, VIC, VFP9
  – MMC, RTC, I2C
 USB (Transdimension), DoC (M-Systems)

                                                                            11
             THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd




Hardware Floating Point
 Need compiler support
  – Now available in GCC 3.4
 Linux kernel support currently being added
 to 2.6 kernel
  – Validated on Versatile platform using VFP9
 Availability
  – 2004Q2



                                                                            12
             THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd
ARM Linux – SMP Support
 Linux kernel already has SMP support for multiple architectures
 Implications on development tool chain
  – Multi-threading (TLS)
  – Debugging tools
 ARMv6 architecture + extensions
  – Physically indexed, physically tagged coherent data cache
  – Write allocation in Write-Back regions
  – 64-bit non-bus locking LDRDEX/STRDEX
  – Thread context registers
  – Weakly ordered memory model, with memory barriers and
      sequential consistency for certain memory regions
 Initial validation on modified ARM926EJ-S cores with Linux on
 ARM Integrator CP
  – Need hardware support for cache coherency, synchronization


                                                                         13
          THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd




ARM Linux – MPCore Platform
 Configurable ARMv6 architectural core
  – Implement between 1 and 4 processors
  – Provides up to 2600 DMIPS performance
  – Integral interrupt distribution and control unit
 Flexible software support
  – Symmetric multiprocessing (SMP)
      ‱ OS dynamically shares task across multiple CPU
      ‱ Coherent and consistent view of memory
  – Asymmetric multiprocessing (AMP)
    ‱ Programmer statically assigns tasks to CPU
    ‱ Isolate tasks from each other
 SoC system compatibility
  – AMBA AXI bus inter-connect
  – RealView¼ development tools
  – PrimeCellℱ L220 L2 cache controller


                                                                         14
          THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd
ARM Intelligent Energy Management (IEM)
 Controlling run-time voltage reduces energy
 consumed from battery when maximum
 performance is not required.
 Reducing energy consumed,
  – Extends battery life or
  – Enables additional functionality for same battery
  – Reduces battery size for same functionality
    Greater user benefits and/or lower mfg. cost
 Reducing frequency reduces average power
 consumption and associated heating
  – Can also help to reduce packaging costs

                                                                         15
          THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd




ARM Linux - IEM
 Current prototype developed on Linux kernel
  – Used as technology demonstrator
  – Complementary to other existing technologies such as
    Montavista Dynamic Power Management (DPM)
  – Works along hardware components (IEC)
 Participate to CELF Power Management Group
  – Define common kernel interface to power management
 Availability
  – Mid-2004
 IEM documentation
  – http://www.arm.com/products/CPUs/cpu-arch-IEM.html

                                                                         16
          THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd
Future Architectural Support

 ARM1176JZ-S support
 – Planned for 04Q3
 Thumb2 support planned for 05Q4
 ARMv7 (Tiger) scheduled for 2006




                                                                      17
       THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd




                  ARM GNU Tools




                                                                      18
       THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd
ARM GNU Tools
 Follow evolution of the ARM Architecture
 – Recently added ARMv6 support
 Adoption of the new ARM ABI
 – Initial ARM ABI support for GCC end 2004
 – Inter-operability between tool chains
 Publicly available
 – Bi-annual source and binary releases
    ‱ Snapshots and binary packages
    ‱ Open source mailing lists
 – Cooperation with www.codesourcery.com


                                                                       19
        THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd




ARM GNU Tools

 Currently support up to ARMv6 Architecture
 – ARMv6 instructions (supported by compiler)
 – Hardware VFP
 – BE8 (new ARM ABI)
 – ARM1176JZ-S CPU support
 – ARMv6 interrupt instructions




                                                                       20
        THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd
ARM GNU Tools – Planned Work

 Next release planned for 2004Q4
  – New ARM ABI support
     ‱ Enables interlink with ARM Compiler
 2005 Q4
  – Thumb2 support
  – CPU support for ARM1156T2(F)-S
 2006 Q2
  – Tiger CPU support



                                                                       21
        THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd




ARM GNU GCC
Adoption of the new ABI for the ARM Architecture
 – Better portability of binary code
 – Allows greater interoperability between
   proprietary tool chains (RVCT, etc.)
   http://www.arm.com/products/DevTools/ABI.html
Open access of pre-built GNU binaries
 – Facilitate access to ARM development environment
 – Enable early adoption of new architectural features
    http://www.codesourcery.com



                                                                       22
        THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd
Linux and GNU roadmap
    ARMv6 and VFP binutils support                   ABI v1.0

                         ARMv6 GCC support                ABI v1.2   Thumb 2 support      ARMv7 support
                         - VFP GCC support




GCC roadmap
2.5.70 SMP (CP/CM916)                           ARM1136 SMP
2.6 kernel (ARMv6, Integrator CP, AP)

                           2.6 kernel:
                           - Versatile PB926 + VFP
2.5.70 kernel
                           - ARMv6
- ARMv6 (ASIDS, CPS,                                     GCC / ARM ABI      Thumb2                ARMv7
  LDREX/STREX, Cache)         IEM, TrustZone




Linux 2.6.x roadmap

03/Q4 04/Q1 04/Q2 04/Q3 04/Q4 05/Q1 05/Q2 05/Q3 05/Q4 06/Q1 06/Q2 06/Q3 06/Q4




                                                                                                          23
                     THE ARCHITECTURE FOR THE DIGITAL WORLD              Copyright © ARM Ltd




Linux - Debugging
     Architectural support added for new cores
      – Currently ARMv6 support
     GDB Multi-thread debug
      – Ensure working debug functionality in GDB
        for multi-threaded applications
     ARM RealView Linux Debug
      – Debug Linux kernels using ARM RealView
        Debugger
      – HSD for kernel and loadable modules
      – Plan for RSD with running kernels

                                                                                                          24
                     THE ARCHITECTURE FOR THE DIGITAL WORLD              Copyright © ARM Ltd
Cooperation
 Commercial Linux distributions
 – Montavista          (http://www.mvista.com/)
 – Metrowerks          (http://www.metrowerks.com)
 – LynuxWorks          (http://www.lynuxworks.com/)
 – Lineo               (http://www.lineo.co.jp)
 –

 Consumer Electronic Linux Forum (CELF)
 – ARM is Associate Member
 – Participate to Working Groups to improve
   ARM/Linux support for Embedded platforms


                                                                      25
       THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd




ARM Linux – Building Blocks
 Compilation tool chain
 Boot Loader
 Kernel distribution and patches
 Filesystem and applications
 Debug and Validation tools
 Additional links




                                                                      26
       THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd
ARM Linux – Tool Chain
 arm-linux build of the GNU compiler
  – Cross-compilation from Unix (Linux or Solaris) or
    Windows host
  – Snapshots available at http://www.codesourcery.com/
 Choice of C library
  – Glibc – standard GNU C library
  – uCLibc
     ‱ http://www.uclibc.org
  – Newlib – smaller library
     ‱ http://sources.redhat.com/newlib/
  – Decide on which library to use when building the cross
    compilation tool chain


                                                                         27
          THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd




Linux - Boot Loader

 Needed to initialise platform,
  – Load and run the Linux kernel
     ‱ Can download kernel using tftp/bootp
     ‱ Access from flash if kernel resides in Flash
  – Setup various initialisation parameters:
     ‱ command line: root=/dev/nfs 
.
     ‱ Platform ID (stored in r1)
 Available boot loaders for ARM platforms:
  – U-Boot (http://sourceforge.net/projects/u-boot)
  – RedBoot (http://www.ecoscentric.com/ecos/redboot.shtml)

                                                                         28
          THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd
Building Linux Kernels
 Download reference kernel
  – http://www.kernel.org
 Download and apply associated ARM patch
  – http://www.arm.linux.org.uk/developer/
  – This is applied on unpacked base kernel
  – Add additional patches as appropriate
 Configure the kernel (make xconfig)
  – Choose architecture, development platform, devices and
    functionality needed
 Build the kernel
  – Ensure the right link is set in main Makefile to point at the
    cross compiler location


                                                                         29
          THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd




Running Linux kernels

 Built image is in arch/arm/boot directory
 Loading and running the image on the target:
  – Use BootLoader
     ‱ Either via network (tftp/bootp) or from flash
  – Use Debugger
     ‱ Load image as raw binary
       (i.e. @0x8000 for uncompressed Image)
     ‱ Set platform ID in r1 and initialise r0, r2
     ‱ Disable semihosting and vector catch
     ‱ Set pc=0x8000 and run the kernel


                                                                         30
          THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd
Linux Filesystem
 Contains system utilities and applications
 – Busybox for base utilities (http://www.busybox.net/)
 – Need C library – either Glibc or Newlib
 – Additional utilities such as:
    ‱ Sysvinit, shells, ftpd, telnet

 – Graphical windowing system and applications:
    ‱ X11 environment: http://www.xfree86.org/
    ‱ Microwindows: http://www.microwindows.org/
    ‱ Qt/Qtopia: http://www.trolltech.com
 Access from Flash or via NFS
 – From Flash can use cramfs, romfs


                                                                       31
        THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd




Linux – Debugging
 Kernel debug
 – With JTAG connection use commercial debugger for early
   kernel bring up
 – Use Kgdb to debug kernel
 – Commercial debuggers offer additional features to debug
   and profile the Linux kernel:
    ‱ Choice of halted/running system debug
    ‱ Profiling
 Application debug
 – Use GDB over serial or networking link
    ‱ Either natively or in cross-debug environment
    ‱ Choice over graphical front-end used
 – Use commercial debuggers for debugging over JTAG


                                                                       32
        THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd
Additional open source links
 Gnu Debugger - http://www.gnu.org/software/gdb/gdb.html
 Linux Test Project - http://ltp.sourceforge.net/
  – Test coverage of the kernel
 Linux Trace Toolkit - http://www.opersys.com/LTT/
  – Acquire and display kernel trace information
 Guide to porting Linux on new ARM hardware
  – http://vega.soi.city.ac.uk/~es728/pdf/aleph.pdf
 Guide to building Linux system from scratch
  – http://www.opersys.com/quickref.html
 Other useful resources
  – http://www.debian.org
  – http://www.handhelds.org/



                                                                          33
           THE ARCHITECTURE FOR THE DIGITAL WORLD   Copyright © ARM Ltd

Weitere Àhnliche Inhalte

Was ist angesagt?

Distro Recipes 2013: What’s new in gcc 4.8?
Distro Recipes 2013: What’s new in gcc 4.8?Distro Recipes 2013: What’s new in gcc 4.8?
Distro Recipes 2013: What’s new in gcc 4.8?
Anne Nicolas
 
Embedded Linux Multimedia
Embedded Linux MultimediaEmbedded Linux Multimedia
Embedded Linux Multimedia
Caglar Dursun
 

Was ist angesagt? (20)

Distro Recipes 2013: What’s new in gcc 4.8?
Distro Recipes 2013: What’s new in gcc 4.8?Distro Recipes 2013: What’s new in gcc 4.8?
Distro Recipes 2013: What’s new in gcc 4.8?
 
Isn’t it Ironic that a Redfish is software defining you
Isn’t it Ironic that a Redfish is software defining you Isn’t it Ironic that a Redfish is software defining you
Isn’t it Ironic that a Redfish is software defining you
 
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
 
Ipmi Server Management
Ipmi Server ManagementIpmi Server Management
Ipmi Server Management
 
Developing an embedded video application on dual Linux + FPGA architecture
Developing an embedded video application on dual Linux + FPGA architectureDeveloping an embedded video application on dual Linux + FPGA architecture
Developing an embedded video application on dual Linux + FPGA architecture
 
MIPI DevCon 2016: Accelerating Software Development for MIPI CSI-2 Cameras
MIPI DevCon 2016: Accelerating Software Development for MIPI CSI-2 CamerasMIPI DevCon 2016: Accelerating Software Development for MIPI CSI-2 Cameras
MIPI DevCon 2016: Accelerating Software Development for MIPI CSI-2 Cameras
 
Long-term Maintenance Model of Embedded Industrial Linux Distribution
Long-term Maintenance Model of Embedded Industrial Linux DistributionLong-term Maintenance Model of Embedded Industrial Linux Distribution
Long-term Maintenance Model of Embedded Industrial Linux Distribution
 
Kernel Recipes 2014 - Testing Video4Linux Applications and Drivers
Kernel Recipes 2014 - Testing Video4Linux Applications and DriversKernel Recipes 2014 - Testing Video4Linux Applications and Drivers
Kernel Recipes 2014 - Testing Video4Linux Applications and Drivers
 
Userspace drivers-2016
Userspace drivers-2016Userspace drivers-2016
Userspace drivers-2016
 
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded DevicesQi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
 
Slimline Open Firmware
Slimline Open FirmwareSlimline Open Firmware
Slimline Open Firmware
 
Hardware accelerated Virtualization in the ARM Cortexℱ Processors
Hardware accelerated Virtualization in the ARM Cortexℱ ProcessorsHardware accelerated Virtualization in the ARM Cortexℱ Processors
Hardware accelerated Virtualization in the ARM Cortexℱ Processors
 
Unix v6 Internals
Unix v6 InternalsUnix v6 Internals
Unix v6 Internals
 
VIO LPAR Introduction | Basics | Demo
VIO LPAR Introduction | Basics | DemoVIO LPAR Introduction | Basics | Demo
VIO LPAR Introduction | Basics | Demo
 
Using open source software to build an industrial grade embedded linux platfo...
Using open source software to build an industrial grade embedded linux platfo...Using open source software to build an industrial grade embedded linux platfo...
Using open source software to build an industrial grade embedded linux platfo...
 
OpenMAX Overview
OpenMAX OverviewOpenMAX Overview
OpenMAX Overview
 
Linux Audio Drivers. ALSA
Linux Audio Drivers. ALSALinux Audio Drivers. ALSA
Linux Audio Drivers. ALSA
 
Xilinx manual
Xilinx manualXilinx manual
Xilinx manual
 
Implement Runtime Environments for HSA using LLVM
Implement Runtime Environments for HSA using LLVMImplement Runtime Environments for HSA using LLVM
Implement Runtime Environments for HSA using LLVM
 
Embedded Linux Multimedia
Embedded Linux MultimediaEmbedded Linux Multimedia
Embedded Linux Multimedia
 

Ähnlich wie Porting linux on ARM

ARM Architecture-based System Virtualization: Xen ARM open source software pr...
ARM Architecture-based System Virtualization: Xen ARM open source software pr...ARM Architecture-based System Virtualization: Xen ARM open source software pr...
ARM Architecture-based System Virtualization: Xen ARM open source software pr...
The Linux Foundation
 
ELCE 2011 - BZ - Embedded Linux Optimization Techniques - How Not To Be Slow
ELCE 2011 - BZ - Embedded Linux Optimization Techniques - How Not To Be SlowELCE 2011 - BZ - Embedded Linux Optimization Techniques - How Not To Be Slow
ELCE 2011 - BZ - Embedded Linux Optimization Techniques - How Not To Be Slow
Benjamin Zores
 
Programming The Arm Microprocessor For Embedded Systems
Programming The Arm Microprocessor For Embedded SystemsProgramming The Arm Microprocessor For Embedded Systems
Programming The Arm Microprocessor For Embedded Systems
joshparrish13
 
Droidcon2013 ndk cpu_architecture_optimization_weggerle_intel
Droidcon2013 ndk cpu_architecture_optimization_weggerle_intelDroidcon2013 ndk cpu_architecture_optimization_weggerle_intel
Droidcon2013 ndk cpu_architecture_optimization_weggerle_intel
Droidcon Berlin
 
Droidcon ndk cpu_architecture_optimization
Droidcon ndk cpu_architecture_optimizationDroidcon ndk cpu_architecture_optimization
Droidcon ndk cpu_architecture_optimization
Droidcon Berlin
 

Ähnlich wie Porting linux on ARM (20)

Rapid prototyping with open source
Rapid prototyping with open sourceRapid prototyping with open source
Rapid prototyping with open source
 
ARM Processor Tutorial
ARM Processor Tutorial ARM Processor Tutorial
ARM Processor Tutorial
 
Arm processor architecture awareness session pi technologies
Arm processor architecture awareness session pi technologiesArm processor architecture awareness session pi technologies
Arm processor architecture awareness session pi technologies
 
Enea Keystone training 2014
Enea Keystone training 2014Enea Keystone training 2014
Enea Keystone training 2014
 
ARM Architecture-based System Virtualization: Xen ARM open source software pr...
ARM Architecture-based System Virtualization: Xen ARM open source software pr...ARM Architecture-based System Virtualization: Xen ARM open source software pr...
ARM Architecture-based System Virtualization: Xen ARM open source software pr...
 
Linxu conj2016 96boards
Linxu conj2016 96boardsLinxu conj2016 96boards
Linxu conj2016 96boards
 
What's New in RHEL 6 for Linux on System z?
What's New in RHEL 6 for Linux on System z?What's New in RHEL 6 for Linux on System z?
What's New in RHEL 6 for Linux on System z?
 
First Look Webcast: OneCore Storage SDK 3.6 Roll-out and Walkthrough
First Look Webcast: OneCore Storage SDK 3.6 Roll-out and WalkthroughFirst Look Webcast: OneCore Storage SDK 3.6 Roll-out and Walkthrough
First Look Webcast: OneCore Storage SDK 3.6 Roll-out and Walkthrough
 
Linux on System z Update: Current & Future Linux on System z Technology
Linux on System z Update: Current & Future Linux on System z TechnologyLinux on System z Update: Current & Future Linux on System z Technology
Linux on System z Update: Current & Future Linux on System z Technology
 
Android Optimization: Myth and Reality
Android Optimization: Myth and RealityAndroid Optimization: Myth and Reality
Android Optimization: Myth and Reality
 
ELCE 2011 - BZ - Embedded Linux Optimization Techniques - How Not To Be Slow
ELCE 2011 - BZ - Embedded Linux Optimization Techniques - How Not To Be SlowELCE 2011 - BZ - Embedded Linux Optimization Techniques - How Not To Be Slow
ELCE 2011 - BZ - Embedded Linux Optimization Techniques - How Not To Be Slow
 
Simulation Directed Co-Design from Smartphones to Supercomputers
Simulation Directed Co-Design from Smartphones to SupercomputersSimulation Directed Co-Design from Smartphones to Supercomputers
Simulation Directed Co-Design from Smartphones to Supercomputers
 
LECT 1: ARM PROCESSORS
LECT 1: ARM PROCESSORSLECT 1: ARM PROCESSORS
LECT 1: ARM PROCESSORS
 
Embedded Os [Linux & Co.]
Embedded Os [Linux & Co.]Embedded Os [Linux & Co.]
Embedded Os [Linux & Co.]
 
Programming The Arm Microprocessor For Embedded Systems
Programming The Arm Microprocessor For Embedded SystemsProgramming The Arm Microprocessor For Embedded Systems
Programming The Arm Microprocessor For Embedded Systems
 
Exploring Github Data with Apache Drill on ARM64
Exploring Github Data with Apache Drill on ARM64 Exploring Github Data with Apache Drill on ARM64
Exploring Github Data with Apache Drill on ARM64
 
Arm
ArmArm
Arm
 
Droidcon2013 ndk cpu_architecture_optimization_weggerle_intel
Droidcon2013 ndk cpu_architecture_optimization_weggerle_intelDroidcon2013 ndk cpu_architecture_optimization_weggerle_intel
Droidcon2013 ndk cpu_architecture_optimization_weggerle_intel
 
Droidcon ndk cpu_architecture_optimization
Droidcon ndk cpu_architecture_optimizationDroidcon ndk cpu_architecture_optimization
Droidcon ndk cpu_architecture_optimization
 
L4 Microkernel :: Design Overview
L4 Microkernel :: Design OverviewL4 Microkernel :: Design Overview
L4 Microkernel :: Design Overview
 

Mehr von Satpal Parmar (6)

Debugging linux kernel tools and techniques
Debugging linux kernel tools and  techniquesDebugging linux kernel tools and  techniques
Debugging linux kernel tools and techniques
 
Troubleshooting Linux Kernel Modules And Device Drivers
Troubleshooting Linux Kernel Modules And Device DriversTroubleshooting Linux Kernel Modules And Device Drivers
Troubleshooting Linux Kernel Modules And Device Drivers
 
Linkers And Loaders
Linkers And LoadersLinkers And Loaders
Linkers And Loaders
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
 
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
 

KĂŒrzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

KĂŒrzlich hochgeladen (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

Porting linux on ARM

  • 1. ARM Linux & GNU Philippe Robin June 2004 1 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd Outline Open source model Architecture and platforms support Linux 2.4 kernel Linux 2.6 kernel GNU GCC tool chain Debugging Cooperation Linux resources 2 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd
  • 2. ARM Architecture Evolution 2004 ARMv7 2003 ARMv6Z– TrustZoneℱ, IEM* 2003 ARMv6T2– Thumb-2 ISA 2002 ARMv6 – SIMD Media ISA 2000 ARMv5TEJ – JazelleÂź Java Acceleration 1998 ARMv5TE – DSP Instructions 1995 ARMv4T – Thumb ISAÂź ISA 3 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd Linux and Architecture Support ARM ARCHITECTURES TrustZone Intelligent Energy Controller (IEC) Jazelle (option) V4 V5TE V5TEJ V6 V7 Linux 2.4 kernel Linux Kernel Linux 2.6 kernel Linux 2.7 kernel Preemtion, 0(1) scheduler, New Posix Thread Library (NPTL), Power Management etc
 4 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd
  • 3. Open Source Model Other organisations -Embedded Linux Consortium -Embedix Commercial Linux -CELF Gatekeepers Providers Open Source Repository www.kernel.org Other Contributors: ARM Source Tree -Platforms (Zaurus, iPaq
) Architecture & Platform -Debian Support -Etc
 ARM Linux Open Source Tree http://www.arm.linux.org.uk 5 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd ARM and Open Source Projects ARM Contribute Architectural support to the Linux kernel and related GNU projects – For ARM cores and specific technology ‱ ARMv6, ARMv7... – Promote standardization initiatives ‱ New ARM ABI Early contribution to promote adoption from the community – Cooperation with partners and gatekeepers Promote active participation and contributions to the open source 6 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd
  • 4. Architectural Support ARM uses Linux kernel internally to validate new ARM cores and technology – Used with simulation models, FPGA and Cores Contribute architectural support to GNU GCC – Currently GCC is needed to compile kernel and applications – New ARM ABI will allow more choices and inter- operability between tool chains 7 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd ARM Development Platforms Integrator Family Versatile Family Compact Platform Versatile Platform Baseboard Logic Modules Core Modules Interface Modules Analyzer Tile Logic Tile 8 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd
  • 5. ARM Cores and Platform Support Currently Linux has support for: – ARM720T, ARM92x, ARM102x and ARM11 cores ARM development platforms – ARM Integrator family – Versatile board BSP availability – ARM (early access) – Open source (www.kernel.org) ‱ availability usually coincide with hardware availability 9 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd Linux 2.4 kernel Stable version – Feature freeze ‱ Only bug fixes are now being integrated Current 2.4.21 includes support for: – ARM cores up to ARMv6 ‱ Legacy mode, not optimised – Integrator AP and CP – Versatile PB ‱ Patch available from ARM 10 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd
  • 6. Linux 2.6 kernel 2.6.6 is the current development version Version 2.6.6 includes support for: – ARM cores up to architecture v6 including: ‱ ASIDS, ‱ Atomic instructions, ‱ physically tagged cache, ‱ CPS instructions – Integrator AP, CP and Versatile Platforms ‱ Including the following Primecell peripherals: Serial, Timers, Interrupt controller, KMI, Ethernet, VGA/LCD Peripherals being added in 04Q2 – AACI, VIC, VFP9 – MMC, RTC, I2C USB (Transdimension), DoC (M-Systems) 11 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd Hardware Floating Point Need compiler support – Now available in GCC 3.4 Linux kernel support currently being added to 2.6 kernel – Validated on Versatile platform using VFP9 Availability – 2004Q2 12 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd
  • 7. ARM Linux – SMP Support Linux kernel already has SMP support for multiple architectures Implications on development tool chain – Multi-threading (TLS) – Debugging tools ARMv6 architecture + extensions – Physically indexed, physically tagged coherent data cache – Write allocation in Write-Back regions – 64-bit non-bus locking LDRDEX/STRDEX – Thread context registers – Weakly ordered memory model, with memory barriers and sequential consistency for certain memory regions Initial validation on modified ARM926EJ-S cores with Linux on ARM Integrator CP – Need hardware support for cache coherency, synchronization 13 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd ARM Linux – MPCore Platform Configurable ARMv6 architectural core – Implement between 1 and 4 processors – Provides up to 2600 DMIPS performance – Integral interrupt distribution and control unit Flexible software support – Symmetric multiprocessing (SMP) ‱ OS dynamically shares task across multiple CPU ‱ Coherent and consistent view of memory – Asymmetric multiprocessing (AMP) ‱ Programmer statically assigns tasks to CPU ‱ Isolate tasks from each other SoC system compatibility – AMBA AXI bus inter-connect – RealViewÂź development tools – PrimeCellℱ L220 L2 cache controller 14 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd
  • 8. ARM Intelligent Energy Management (IEM) Controlling run-time voltage reduces energy consumed from battery when maximum performance is not required. Reducing energy consumed, – Extends battery life or – Enables additional functionality for same battery – Reduces battery size for same functionality Greater user benefits and/or lower mfg. cost Reducing frequency reduces average power consumption and associated heating – Can also help to reduce packaging costs 15 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd ARM Linux - IEM Current prototype developed on Linux kernel – Used as technology demonstrator – Complementary to other existing technologies such as Montavista Dynamic Power Management (DPM) – Works along hardware components (IEC) Participate to CELF Power Management Group – Define common kernel interface to power management Availability – Mid-2004 IEM documentation – http://www.arm.com/products/CPUs/cpu-arch-IEM.html 16 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd
  • 9. Future Architectural Support ARM1176JZ-S support – Planned for 04Q3 Thumb2 support planned for 05Q4 ARMv7 (Tiger) scheduled for 2006 17 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd ARM GNU Tools 18 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd
  • 10. ARM GNU Tools Follow evolution of the ARM Architecture – Recently added ARMv6 support Adoption of the new ARM ABI – Initial ARM ABI support for GCC end 2004 – Inter-operability between tool chains Publicly available – Bi-annual source and binary releases ‱ Snapshots and binary packages ‱ Open source mailing lists – Cooperation with www.codesourcery.com 19 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd ARM GNU Tools Currently support up to ARMv6 Architecture – ARMv6 instructions (supported by compiler) – Hardware VFP – BE8 (new ARM ABI) – ARM1176JZ-S CPU support – ARMv6 interrupt instructions 20 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd
  • 11. ARM GNU Tools – Planned Work Next release planned for 2004Q4 – New ARM ABI support ‱ Enables interlink with ARM Compiler 2005 Q4 – Thumb2 support – CPU support for ARM1156T2(F)-S 2006 Q2 – Tiger CPU support 21 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd ARM GNU GCC Adoption of the new ABI for the ARM Architecture – Better portability of binary code – Allows greater interoperability between proprietary tool chains (RVCT, etc.) http://www.arm.com/products/DevTools/ABI.html Open access of pre-built GNU binaries – Facilitate access to ARM development environment – Enable early adoption of new architectural features http://www.codesourcery.com 22 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd
  • 12. Linux and GNU roadmap ARMv6 and VFP binutils support ABI v1.0 ARMv6 GCC support ABI v1.2 Thumb 2 support ARMv7 support - VFP GCC support GCC roadmap 2.5.70 SMP (CP/CM916) ARM1136 SMP 2.6 kernel (ARMv6, Integrator CP, AP) 2.6 kernel: - Versatile PB926 + VFP 2.5.70 kernel - ARMv6 - ARMv6 (ASIDS, CPS, GCC / ARM ABI Thumb2 ARMv7 LDREX/STREX, Cache) IEM, TrustZone Linux 2.6.x roadmap 03/Q4 04/Q1 04/Q2 04/Q3 04/Q4 05/Q1 05/Q2 05/Q3 05/Q4 06/Q1 06/Q2 06/Q3 06/Q4 23 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd Linux - Debugging Architectural support added for new cores – Currently ARMv6 support GDB Multi-thread debug – Ensure working debug functionality in GDB for multi-threaded applications ARM RealView Linux Debug – Debug Linux kernels using ARM RealView Debugger – HSD for kernel and loadable modules – Plan for RSD with running kernels 24 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd
  • 13. Cooperation Commercial Linux distributions – Montavista (http://www.mvista.com/) – Metrowerks (http://www.metrowerks.com) – LynuxWorks (http://www.lynuxworks.com/) – Lineo (http://www.lineo.co.jp) –
 Consumer Electronic Linux Forum (CELF) – ARM is Associate Member – Participate to Working Groups to improve ARM/Linux support for Embedded platforms 25 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd ARM Linux – Building Blocks Compilation tool chain Boot Loader Kernel distribution and patches Filesystem and applications Debug and Validation tools Additional links 26 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd
  • 14. ARM Linux – Tool Chain arm-linux build of the GNU compiler – Cross-compilation from Unix (Linux or Solaris) or Windows host – Snapshots available at http://www.codesourcery.com/ Choice of C library – Glibc – standard GNU C library – uCLibc ‱ http://www.uclibc.org – Newlib – smaller library ‱ http://sources.redhat.com/newlib/ – Decide on which library to use when building the cross compilation tool chain 27 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd Linux - Boot Loader Needed to initialise platform, – Load and run the Linux kernel ‱ Can download kernel using tftp/bootp ‱ Access from flash if kernel resides in Flash – Setup various initialisation parameters: ‱ command line: root=/dev/nfs 
. ‱ Platform ID (stored in r1) Available boot loaders for ARM platforms: – U-Boot (http://sourceforge.net/projects/u-boot) – RedBoot (http://www.ecoscentric.com/ecos/redboot.shtml) 28 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd
  • 15. Building Linux Kernels Download reference kernel – http://www.kernel.org Download and apply associated ARM patch – http://www.arm.linux.org.uk/developer/ – This is applied on unpacked base kernel – Add additional patches as appropriate Configure the kernel (make xconfig) – Choose architecture, development platform, devices and functionality needed Build the kernel – Ensure the right link is set in main Makefile to point at the cross compiler location 29 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd Running Linux kernels Built image is in arch/arm/boot directory Loading and running the image on the target: – Use BootLoader ‱ Either via network (tftp/bootp) or from flash – Use Debugger ‱ Load image as raw binary (i.e. @0x8000 for uncompressed Image) ‱ Set platform ID in r1 and initialise r0, r2 ‱ Disable semihosting and vector catch ‱ Set pc=0x8000 and run the kernel 30 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd
  • 16. Linux Filesystem Contains system utilities and applications – Busybox for base utilities (http://www.busybox.net/) – Need C library – either Glibc or Newlib – Additional utilities such as: ‱ Sysvinit, shells, ftpd, telnet
 – Graphical windowing system and applications: ‱ X11 environment: http://www.xfree86.org/ ‱ Microwindows: http://www.microwindows.org/ ‱ Qt/Qtopia: http://www.trolltech.com Access from Flash or via NFS – From Flash can use cramfs, romfs
 31 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd Linux – Debugging Kernel debug – With JTAG connection use commercial debugger for early kernel bring up – Use Kgdb to debug kernel – Commercial debuggers offer additional features to debug and profile the Linux kernel: ‱ Choice of halted/running system debug ‱ Profiling Application debug – Use GDB over serial or networking link ‱ Either natively or in cross-debug environment ‱ Choice over graphical front-end used – Use commercial debuggers for debugging over JTAG 32 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd
  • 17. Additional open source links Gnu Debugger - http://www.gnu.org/software/gdb/gdb.html Linux Test Project - http://ltp.sourceforge.net/ – Test coverage of the kernel Linux Trace Toolkit - http://www.opersys.com/LTT/ – Acquire and display kernel trace information Guide to porting Linux on new ARM hardware – http://vega.soi.city.ac.uk/~es728/pdf/aleph.pdf Guide to building Linux system from scratch – http://www.opersys.com/quickref.html Other useful resources – http://www.debian.org – http://www.handhelds.org/ 33 THE ARCHITECTURE FOR THE DIGITAL WORLD Copyright © ARM Ltd