SlideShare a Scribd company logo
Architecture Porting



 © 2010 Anil Kumar Pugalia <email@sarika-pugs.com>
                All Rights Reserved.
What to Expect?
Porting Linux for a new Architecture




        © 2010 Anil Kumar Pugalia <email@sarika-pugs.com>   2
                       All Rights Reserved.
Architecture Branch
20+ architectures supported in Linux
Each typically contains
  Makefile, Kconfig
  kernel (Arch specific Kernel code)
  mm (Arch specific MM code)
  boot (for specific bootable target)
  mach-* (LSPs)
  configs (default configs)

         © 2010 Anil Kumar Pugalia <email@sarika-pugs.com>   3
                        All Rights Reserved.
Porting to a New CPU
Create a similar directory structure
Do all the architecture specific implementations
for
  Kernel interfaces
  Memory Management interfaces
Create/Modify Makefile & Kconfig, as required
LSPs & configs would be added as & when the
porting for the specific board is done
Significantly challenging, if totally afresh
Typically, start from a closer reference
           © 2010 Anil Kumar Pugalia <email@sarika-pugs.com>   4
                          All Rights Reserved.
Pre-requisites & Assumptions
System RAM is already initialized
System Memory Map is already initialized
Optionally, Serial port is configured
  For early kernel boot messages
Have a closest baseline Kernel




         © 2010 Anil Kumar Pugalia <email@sarika-pugs.com>   5
                        All Rights Reserved.
Starting Point
Modify the Architecture specific code
  For example
    For PPC, it is under arch/ppc/platforms
    For MPC5200, the file is lite5200.c
  A typical set would include few structures & functions
  Typical Functions
    *show_cpuinfo – CPU info texts
    *map_irq – Hardware specific interrupt logic routing
    *setup_cpu – CPU specific init
    *setup_arch – Architecture specific init
    platform_init – Board-specific init


            © 2010 Anil Kumar Pugalia <email@sarika-pugs.com>   6
                           All Rights Reserved.
Recall the Startup Flow
machine_init
  Called from arch/<arch>/kernel/head*.S
  Parameter Setup / Passing before calling machine_init
    These are typically setup by the bootloader
  Called before MMU init. So, calls from it are memory restricted
  Code is in arch/<arch>/kernel/setup.c
  Calls platform_init with the parameters as is
platform_init
  Sets up Board Information Structure (BIS)
  If initrd, Start & End addresses of ramdisk image are saved
  Store the Kernel Command Line parameters
  This code should be taking care of “Early Variable Access”
              © 2010 Anil Kumar Pugalia <email@sarika-pugs.com>     7
                             All Rights Reserved.
Early Variable Access
Kernel statically linked to well known, user
configured base address
  KERNELBASE (Typically, 0xC0000000)
Kernel is relocated to RAM (usually to 0)
After MMU is enabled, this works all fine
But before that, it should be relocatable, and
access to symbols should be fixed up
And, hence calls for a particular way of for the
early variable access
  By subtracting the offset KERNELBASE
          © 2010 Anil Kumar Pugalia <email@sarika-pugs.com>   8
                         All Rights Reserved.
Setting up BIS
Usual ways
  struct bd_info (From U-boot)
    Address in r3 on PPC
  struct bi_record (Attempt to unify)
    Found by looking for a special tag
Contains stuff like
  Command Line Arguments
  Start & End address of initrd image
  Machine Type
  Memory Info
  Optionally, many more hardware information
May or may not be used by the LSP
              © 2010 Anil Kumar Pugalia <email@sarika-pugs.com>   9
                             All Rights Reserved.
Final Steps
Other Generic Architecture specific Functions
needed, could be
  machine_restart
  machine_power_off
  machine_halt
Modify the preocessor / architecture specific C file
& header file as per
  Hardware specifications
  Schematics
  Any other relevant hardware platform data
Update the Kconfig & Makefile, as appropriate
           © 2010 Anil Kumar Pugalia <email@sarika-pugs.com>   10
                          All Rights Reserved.
What all have we learnt?
Porting Linux for a new Architecture
  In particular, for a new CPU




         © 2010 Anil Kumar Pugalia <email@sarika-pugs.com>   11
                        All Rights Reserved.
Any Queries?




© 2010 Anil Kumar Pugalia <email@sarika-pugs.com>   12
               All Rights Reserved.

More Related Content

What's hot

Kernel Programming
Kernel ProgrammingKernel Programming
Kernel Programming
Anil Kumar Pugalia
 
Embedded Software Design
Embedded Software DesignEmbedded Software Design
Embedded Software Design
Anil Kumar Pugalia
 
BeagleBoard-xM Booting Process
BeagleBoard-xM Booting ProcessBeagleBoard-xM Booting Process
BeagleBoard-xM Booting Process
SysPlay eLearning Academy for You
 
Linux User Space Debugging & Profiling
Linux User Space Debugging & ProfilingLinux User Space Debugging & Profiling
Linux User Space Debugging & ProfilingAnil Kumar Pugalia
 
Mobile Hacking using Linux Drivers
Mobile Hacking using Linux DriversMobile Hacking using Linux Drivers
Mobile Hacking using Linux DriversAnil Kumar Pugalia
 
SPI Drivers
SPI DriversSPI Drivers
BeagleBone Black Booting Process
BeagleBone Black Booting ProcessBeagleBone Black Booting Process
BeagleBone Black Booting Process
SysPlay eLearning Academy for You
 
Cache Management
Cache ManagementCache Management
Linux DMA Engine
Linux DMA EngineLinux DMA Engine
BeagleBone Black Bootloaders
BeagleBone Black BootloadersBeagleBone Black Bootloaders
BeagleBone Black Bootloaders
SysPlay eLearning Academy for You
 

What's hot (20)

Kernel Programming
Kernel ProgrammingKernel Programming
Kernel Programming
 
Embedded Software Design
Embedded Software DesignEmbedded Software Design
Embedded Software Design
 
BeagleBoard-xM Booting Process
BeagleBoard-xM Booting ProcessBeagleBoard-xM Booting Process
BeagleBoard-xM Booting Process
 
Kernel Debugging & Profiling
Kernel Debugging & ProfilingKernel Debugging & Profiling
Kernel Debugging & Profiling
 
Block Drivers
Block DriversBlock Drivers
Block Drivers
 
Toolchain
ToolchainToolchain
Toolchain
 
Linux User Space Debugging & Profiling
Linux User Space Debugging & ProfilingLinux User Space Debugging & Profiling
Linux User Space Debugging & Profiling
 
Signals
SignalsSignals
Signals
 
Mobile Hacking using Linux Drivers
Mobile Hacking using Linux DriversMobile Hacking using Linux Drivers
Mobile Hacking using Linux Drivers
 
SPI Drivers
SPI DriversSPI Drivers
SPI Drivers
 
Introduction to Linux Drivers
Introduction to Linux DriversIntroduction to Linux Drivers
Introduction to Linux Drivers
 
File System Modules
File System ModulesFile System Modules
File System Modules
 
Linux Network Management
Linux Network ManagementLinux Network Management
Linux Network Management
 
Introduction to Linux
Introduction to LinuxIntroduction to Linux
Introduction to Linux
 
BeagleBone Black Booting Process
BeagleBone Black Booting ProcessBeagleBone Black Booting Process
BeagleBone Black Booting Process
 
Cache Management
Cache ManagementCache Management
Cache Management
 
Linux Porting
Linux PortingLinux Porting
Linux Porting
 
Linux DMA Engine
Linux DMA EngineLinux DMA Engine
Linux DMA Engine
 
BeagleBone Black Bootloaders
BeagleBone Black BootloadersBeagleBone Black Bootloaders
BeagleBone Black Bootloaders
 
Processes
ProcessesProcesses
Processes
 

Viewers also liked

Interrupts
InterruptsInterrupts
Interrupts
Anil Kumar Pugalia
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
Anil Kumar Pugalia
 
Embedded C
Embedded CEmbedded C
Embedded C
Anil Kumar Pugalia
 
gcc and friends
gcc and friendsgcc and friends
gcc and friends
Anil Kumar Pugalia
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded SystemsAnil Kumar Pugalia
 
Threads
ThreadsThreads

Viewers also liked (17)

Embedded I/O Management
Embedded I/O ManagementEmbedded I/O Management
Embedded I/O Management
 
Interrupts
InterruptsInterrupts
Interrupts
 
File Systems
File SystemsFile Systems
File Systems
 
Synchronization
SynchronizationSynchronization
Synchronization
 
Embedded Applications
Embedded ApplicationsEmbedded Applications
Embedded Applications
 
Timers
TimersTimers
Timers
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
 
Embedded C
Embedded CEmbedded C
Embedded C
 
gcc and friends
gcc and friendsgcc and friends
gcc and friends
 
System Calls
System CallsSystem Calls
System Calls
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded Systems
 
Board Bringup
Board BringupBoard Bringup
Board Bringup
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 
Linux File System
Linux File SystemLinux File System
Linux File System
 
Threads
ThreadsThreads
Threads
 
Audio Drivers
Audio DriversAudio Drivers
Audio Drivers
 

Similar to Architecture Porting

© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1.docx
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1.docx© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1.docx
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1.docx
LynellBull52
 
Preparing BitVisor for Supporting Multiple Architectures
Preparing BitVisor for Supporting Multiple ArchitecturesPreparing BitVisor for Supporting Multiple Architectures
Preparing BitVisor for Supporting Multiple Architectures
Ake Koomsin
 
Easing the Path to Network Transformation - Network Transformation Experience...
Easing the Path to Network Transformation - Network Transformation Experience...Easing the Path to Network Transformation - Network Transformation Experience...
Easing the Path to Network Transformation - Network Transformation Experience...
Liz Warner
 
Porting_uClinux_CELF2008_Griffin
Porting_uClinux_CELF2008_GriffinPorting_uClinux_CELF2008_Griffin
Porting_uClinux_CELF2008_GriffinPeter Griffin
 
Ex 1 chapter11-configure-network-tony_chen
Ex 1 chapter11-configure-network-tony_chenEx 1 chapter11-configure-network-tony_chen
Ex 1 chapter11-configure-network-tony_chenĐô GiẢn
 
CCNA Discovery 3 - Chapter 2
CCNA Discovery 3 - Chapter 2CCNA Discovery 3 - Chapter 2
CCNA Discovery 3 - Chapter 2Irsandi Hasan
 
CCNA Icnd110 s06l02
CCNA Icnd110 s06l02CCNA Icnd110 s06l02
CCNA Icnd110 s06l02
computerlenguyen
 
Accelerating SDN/NFV with transparent offloading architecture
Accelerating SDN/NFV with transparent offloading architectureAccelerating SDN/NFV with transparent offloading architecture
Accelerating SDN/NFV with transparent offloading architecture
Open Networking Summits
 
Armboot process zeelogic
Armboot process zeelogicArmboot process zeelogic
Armboot process zeelogic
Aleem Shariff
 
Less04_Database_Instance.ppt
Less04_Database_Instance.pptLess04_Database_Instance.ppt
Less04_Database_Instance.ppt
MuhammadUmair833474
 
Week3 1
Week3 1Week3 1
Week3 1
trayyoo
 
Developing a Windows CE OAL.ppt
Developing a Windows CE OAL.pptDeveloping a Windows CE OAL.ppt
Developing a Windows CE OAL.ppt
KundanSingh887495
 
Verification of the QorIQ Communication Platform Containing CoreNet Fabric wi...
Verification of the QorIQ Communication Platform Containing CoreNet Fabric wi...Verification of the QorIQ Communication Platform Containing CoreNet Fabric wi...
Verification of the QorIQ Communication Platform Containing CoreNet Fabric wi...DVClub
 
Fujitsu m10 server features and capabilities
Fujitsu m10 server features and capabilitiesFujitsu m10 server features and capabilities
Fujitsu m10 server features and capabilities
solarisyougood
 
Oracle Solaris 11.1 New Features
Oracle Solaris 11.1 New FeaturesOracle Solaris 11.1 New Features
Oracle Solaris 11.1 New FeaturesOrgad Kimchi
 
Vortex86 Sx Linux How To
Vortex86 Sx Linux How ToVortex86 Sx Linux How To
Vortex86 Sx Linux How To
Rogelio Canedo
 
Clear Linux OS - Architecture Overview
Clear Linux OS - Architecture OverviewClear Linux OS - Architecture Overview
Clear Linux OS - Architecture Overview
Open Source Technology Center MeetUps
 
”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016
Kuniyasu Suzaki
 
SESI 7 RouterTroubleshooting.pptx
SESI 7 RouterTroubleshooting.pptxSESI 7 RouterTroubleshooting.pptx
SESI 7 RouterTroubleshooting.pptx
FirmanAFauzi1
 
C C N A Day2
C C N A  Day2C C N A  Day2
C C N A Day2
darulquthni
 

Similar to Architecture Porting (20)

© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1.docx
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1.docx© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1.docx
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1.docx
 
Preparing BitVisor for Supporting Multiple Architectures
Preparing BitVisor for Supporting Multiple ArchitecturesPreparing BitVisor for Supporting Multiple Architectures
Preparing BitVisor for Supporting Multiple Architectures
 
Easing the Path to Network Transformation - Network Transformation Experience...
Easing the Path to Network Transformation - Network Transformation Experience...Easing the Path to Network Transformation - Network Transformation Experience...
Easing the Path to Network Transformation - Network Transformation Experience...
 
Porting_uClinux_CELF2008_Griffin
Porting_uClinux_CELF2008_GriffinPorting_uClinux_CELF2008_Griffin
Porting_uClinux_CELF2008_Griffin
 
Ex 1 chapter11-configure-network-tony_chen
Ex 1 chapter11-configure-network-tony_chenEx 1 chapter11-configure-network-tony_chen
Ex 1 chapter11-configure-network-tony_chen
 
CCNA Discovery 3 - Chapter 2
CCNA Discovery 3 - Chapter 2CCNA Discovery 3 - Chapter 2
CCNA Discovery 3 - Chapter 2
 
CCNA Icnd110 s06l02
CCNA Icnd110 s06l02CCNA Icnd110 s06l02
CCNA Icnd110 s06l02
 
Accelerating SDN/NFV with transparent offloading architecture
Accelerating SDN/NFV with transparent offloading architectureAccelerating SDN/NFV with transparent offloading architecture
Accelerating SDN/NFV with transparent offloading architecture
 
Armboot process zeelogic
Armboot process zeelogicArmboot process zeelogic
Armboot process zeelogic
 
Less04_Database_Instance.ppt
Less04_Database_Instance.pptLess04_Database_Instance.ppt
Less04_Database_Instance.ppt
 
Week3 1
Week3 1Week3 1
Week3 1
 
Developing a Windows CE OAL.ppt
Developing a Windows CE OAL.pptDeveloping a Windows CE OAL.ppt
Developing a Windows CE OAL.ppt
 
Verification of the QorIQ Communication Platform Containing CoreNet Fabric wi...
Verification of the QorIQ Communication Platform Containing CoreNet Fabric wi...Verification of the QorIQ Communication Platform Containing CoreNet Fabric wi...
Verification of the QorIQ Communication Platform Containing CoreNet Fabric wi...
 
Fujitsu m10 server features and capabilities
Fujitsu m10 server features and capabilitiesFujitsu m10 server features and capabilities
Fujitsu m10 server features and capabilities
 
Oracle Solaris 11.1 New Features
Oracle Solaris 11.1 New FeaturesOracle Solaris 11.1 New Features
Oracle Solaris 11.1 New Features
 
Vortex86 Sx Linux How To
Vortex86 Sx Linux How ToVortex86 Sx Linux How To
Vortex86 Sx Linux How To
 
Clear Linux OS - Architecture Overview
Clear Linux OS - Architecture OverviewClear Linux OS - Architecture Overview
Clear Linux OS - Architecture Overview
 
”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016
 
SESI 7 RouterTroubleshooting.pptx
SESI 7 RouterTroubleshooting.pptxSESI 7 RouterTroubleshooting.pptx
SESI 7 RouterTroubleshooting.pptx
 
C C N A Day2
C C N A  Day2C C N A  Day2
C C N A Day2
 

More from Anil Kumar Pugalia

File System Modules
File System ModulesFile System Modules
File System Modules
Anil Kumar Pugalia
 
Processes
ProcessesProcesses
Playing with R L C Circuits
Playing with R L C CircuitsPlaying with R L C Circuits
Playing with R L C Circuits
Anil Kumar Pugalia
 
References
ReferencesReferences
References
Anil Kumar Pugalia
 
Functional Programming with LISP
Functional Programming with LISPFunctional Programming with LISP
Functional Programming with LISPAnil Kumar Pugalia
 
Hardware Design for Software Hackers
Hardware Design for Software HackersHardware Design for Software Hackers
Hardware Design for Software Hackers
Anil Kumar Pugalia
 

More from Anil Kumar Pugalia (12)

File System Modules
File System ModulesFile System Modules
File System Modules
 
Processes
ProcessesProcesses
Processes
 
System Calls
System CallsSystem Calls
System Calls
 
Playing with R L C Circuits
Playing with R L C CircuitsPlaying with R L C Circuits
Playing with R L C Circuits
 
Video Drivers
Video DriversVideo Drivers
Video Drivers
 
Shell Scripting
Shell ScriptingShell Scripting
Shell Scripting
 
References
ReferencesReferences
References
 
Functional Programming with LISP
Functional Programming with LISPFunctional Programming with LISP
Functional Programming with LISP
 
Power of vi
Power of viPower of vi
Power of vi
 
"make" system
"make" system"make" system
"make" system
 
Hardware Design for Software Hackers
Hardware Design for Software HackersHardware Design for Software Hackers
Hardware Design for Software Hackers
 
RPM Building
RPM BuildingRPM Building
RPM Building
 

Recently uploaded

State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 

Recently uploaded (20)

State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 

Architecture Porting

  • 1. Architecture Porting © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> All Rights Reserved.
  • 2. What to Expect? Porting Linux for a new Architecture © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 2 All Rights Reserved.
  • 3. Architecture Branch 20+ architectures supported in Linux Each typically contains Makefile, Kconfig kernel (Arch specific Kernel code) mm (Arch specific MM code) boot (for specific bootable target) mach-* (LSPs) configs (default configs) © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 3 All Rights Reserved.
  • 4. Porting to a New CPU Create a similar directory structure Do all the architecture specific implementations for Kernel interfaces Memory Management interfaces Create/Modify Makefile & Kconfig, as required LSPs & configs would be added as & when the porting for the specific board is done Significantly challenging, if totally afresh Typically, start from a closer reference © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 4 All Rights Reserved.
  • 5. Pre-requisites & Assumptions System RAM is already initialized System Memory Map is already initialized Optionally, Serial port is configured For early kernel boot messages Have a closest baseline Kernel © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 5 All Rights Reserved.
  • 6. Starting Point Modify the Architecture specific code For example For PPC, it is under arch/ppc/platforms For MPC5200, the file is lite5200.c A typical set would include few structures & functions Typical Functions *show_cpuinfo – CPU info texts *map_irq – Hardware specific interrupt logic routing *setup_cpu – CPU specific init *setup_arch – Architecture specific init platform_init – Board-specific init © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 6 All Rights Reserved.
  • 7. Recall the Startup Flow machine_init Called from arch/<arch>/kernel/head*.S Parameter Setup / Passing before calling machine_init These are typically setup by the bootloader Called before MMU init. So, calls from it are memory restricted Code is in arch/<arch>/kernel/setup.c Calls platform_init with the parameters as is platform_init Sets up Board Information Structure (BIS) If initrd, Start & End addresses of ramdisk image are saved Store the Kernel Command Line parameters This code should be taking care of “Early Variable Access” © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 7 All Rights Reserved.
  • 8. Early Variable Access Kernel statically linked to well known, user configured base address KERNELBASE (Typically, 0xC0000000) Kernel is relocated to RAM (usually to 0) After MMU is enabled, this works all fine But before that, it should be relocatable, and access to symbols should be fixed up And, hence calls for a particular way of for the early variable access By subtracting the offset KERNELBASE © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 8 All Rights Reserved.
  • 9. Setting up BIS Usual ways struct bd_info (From U-boot) Address in r3 on PPC struct bi_record (Attempt to unify) Found by looking for a special tag Contains stuff like Command Line Arguments Start & End address of initrd image Machine Type Memory Info Optionally, many more hardware information May or may not be used by the LSP © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 9 All Rights Reserved.
  • 10. Final Steps Other Generic Architecture specific Functions needed, could be machine_restart machine_power_off machine_halt Modify the preocessor / architecture specific C file & header file as per Hardware specifications Schematics Any other relevant hardware platform data Update the Kconfig & Makefile, as appropriate © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 10 All Rights Reserved.
  • 11. What all have we learnt? Porting Linux for a new Architecture In particular, for a new CPU © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 11 All Rights Reserved.
  • 12. Any Queries? © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 12 All Rights Reserved.