SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Embedded Linux and the mainline kernel
                           David Woodhouse




                                         Kernel Recipes
                                       September 2012




                     Software and Services Group
Where does Linux run?




Embedded control device... phone...
PDA... Internet tablet... router...
media device... netbook... laptop...
desktop... server... supercomputer...




                              Software and Services Group   2
                                                            2
“Embedded”...?

• Control equipment
• Phones
• PDAs
• “Internet Tablets”
• Routers
• Televisions
• VCR / PVR / DVD / Media
• Netbooks (?)


                            Software and Services Group   3
                                                          3
“Embedded”...?

• Headless?
• Handheld?
• Power source?
• Physical size?
• Limited RAM?
• Storage?
• Other...




                            Software and Services Group   4
                                                          4
Embedded needs


• Power management
• Fast startup
• Headless operation
• Uncluttered user interfaces
• Solid state storage




                                Software and Services Group   5
                                                              5
Embedded needs


• Power management
• Fast startup
• Headless operation
• Uncluttered user interfaces
• Solid state storage


 Other users need these features too!



                                Software and Services Group   6
                                                              6
Power Management



• Battery life




                           Software and Services Group   7
                                                         7
Power Management



• Battery life
• Cost of power consumption
• Heat output




                              Software and Services Group   8
                                                            8
Tickless operation



• Power savings




                              Software and Services Group   9
                                                            9
Tickless operation



• Power savings
• Scalability for virtualisation




                                   Software and Services Group   10
                                                                 10
Fast boot



• Hard limits for mobile telephones
• User experience for consumer electronics




                                 Software and Services Group   11
                                                               11
Fast boot



• Hard limits for mobile telephones
• User experience for consumer electronics
• Server availability




                                 Software and Services Group   12
                                                               12
User interfaces



• Ease of use for consumer equipment




                               Software and Services Group   13
                                                             13
User interfaces



• Ease of use for consumer equipment
• ...   and for everyone else:
   –    OLPC / Sugar
   –    Netbooks
   –    Simple desktop environments




                                      Software and Services Group   14
                                                                    14
Solid state storage



• FLASH storage in “embedded” devices




                              Software and Services Group   15
                                                            15
Solid state storage



• FLASH storage in “embedded” devices
• Solid State Disk




                              Software and Services Group   16
                                                            16
Others...


• Execute in place (XIP)
   – From FLASH for embedded systems
   – Shared file system data under virtualisation


• DMA API usage
   – For cache coherency on embedded systems (ARM, some PPC)
   – For IOMMU on larger systems




                                        Software and Services Group   17
                                                                      17
We are not so
  special!


       Software and Services Group   18
                                     18
Community impressions



• “Enterprise” Linux
• “Embedded” Linux




                         Software and Services Group   19
                                                       19
Community impressions



• “Enterprise” Linux
• “Embedded” Linux
   – Working with old code
   – Not working with upstream
   – Inclined towards “special” one-off hacks
   – Irrelevant to the general case




                                        Software and Services Group   20
                                                                      20
Community impressions



• “Enterprise” Linux
• “Embedded” Linux
   – Working with old code
   – Not working with upstream
   – Inclined towards “special” one-off hacks
   – Irrelevant to the general case

          We must prove them wrong!



                                        Software and Services Group   21
                                                                      21
“Embedded” success stories



• Tickless
• Preemptive kernel
• Power management
• Suspend to RAM
• Solid state storage
• Squashfs




                            Software and Services Group   22
                                                          22
Working with the community



• Find generic points of interest
• Publish early and often
   – In git trees
   – Separate trees for separate development efforts
   – Also send patches for review
• Solicit and respond to feedback
• Work with upstream maintainers
• BE PART OF THE COMMUNITY!


                                       Software and Services Group   23
                                                                     23
Staying close to upstream



• Advantages
   – Easier for product updates and new products
   – Easy to use fixes and new features
   – External contributions
   – Code review and testing
• Costs
   – Writing acceptable code can be hard and takes time
   – Upstream kernel is a fast-moving target
   – Releasing information may be difficult


                                       Software and Services Group   24
                                                                     24
Tips on contributing code



• Avoid hacking around problems
• Avoid overengineering
• Care about locking
• Coding Style
• Submit patches carefully




                                  Software and Services Group   25
                                                                25
Coding Style



• Simple, short functions
• Avoid:
   – typedefs
   – StudlyCaps
   – Hungarian Notation
• Read Documentation/CodingStyle


       http://www.linux.or.jp/JF/JFdocs/kernel-docs-
       2.6/CodingStyle.html


                                            Software and Services Group   26
                                                                          26
Submitting Patches

• Read the patch before you send it
      --- a/drivers/net/wireless/libertas/assoc.c
      +++ b/drivers/net/wireless/libertas/assoc.c
      @@ -13,6 +13,7 @@

       static const u8 bssid_any[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
       static const u8 bssid_off[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
      +extern int libertas_mesh_config(wlan_private * priv, int action,int channel,char
      *str);

       static void print_assoc_req(const char * extra, struct assoc_request * assoc_req)
       {
      @@ -211,9 +212,17 @@ static int assoc_helper_channel(wlan_private *priv,
       {
              wlan_adapter *adapter = priv->adapter;
              int ret = 0;
      +       int restart_mesh = 0;

             lbs_deb_enter(LBS_DEB_ASSOC);

      +      if(adapter->mesh_connect_status == LIBERTAS_CONNECTED)
      +      {
      +              libertas_mesh_config(priv,0,adapter->curbssparams.channel,NULL);
      +              restart_mesh = 1;
      +
      +      }
      +
              ret = update_channel(priv);
              if (ret < 0) {
                      lbs_deb_assoc("ASSOC: channel: error getting channel.");
      @@ -225,11 +234,13 @@ static int assoc_helper_channel(wlan_private *priv,
              lbs_deb_assoc("ASSOC: channel: %d -> %dn",
                     adapter->curbssparams.channel, assoc_req->channel);

      +
             ret = libertas_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL,
                                     CMD_OPT_802_11_RF_CHANNEL_SET,




                                                                   Software and Services Group   27
                                                                                                 27
Submitting Patches

• Read the patch before you send it
      --- a/drivers/net/wireless/libertas/assoc.c
      +++ b/drivers/net/wireless/libertas/assoc.c
      @@ -13,6 +13,7 @@

       static const u8 bssid_any[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
       static const u8 bssid_off[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
      +extern int libertas_mesh_config(wlan_private * priv, int action,int channel,char
      *str);

       static void print_assoc_req(const char * extra, struct assoc_request * assoc_req)
       {
      @@ -211,9 +212,17 @@ static int assoc_helper_channel(wlan_private *priv,
       {
              wlan_adapter *adapter = priv->adapter;
              int ret = 0;
      +       int restart_mesh = 0;

             lbs_deb_enter(LBS_DEB_ASSOC);

      +      if(adapter->mesh_connect_status == LIBERTAS_CONNECTED)
      +      {
      +              libertas_mesh_config(priv,0,adapter->curbssparams.channel,NULL);
      +              restart_mesh = 1;
      +
      +      }
      +
              ret = update_channel(priv);
              if (ret < 0) {
                      lbs_deb_assoc("ASSOC: channel: error getting channel.");
      @@ -225,11 +234,13 @@ static int assoc_helper_channel(wlan_private *priv,
              lbs_deb_assoc("ASSOC: channel: %d -> %dn",
                     adapter->curbssparams.channel, assoc_req->channel);

      +
             ret = libertas_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL,
                                     CMD_OPT_802_11_RF_CHANNEL_SET,




                                                                   Software and Services Group   28
                                                                                                 28
Submitting Patches

• Read the patch before you send it
• Use scripts/checkpatch.pl
 $ scripts/checkpatch.pl 0002-MESH-START-STOP_IOCTLS.patch
 WARNING: line over 80 characters
 #7: FILE: drivers/net/wireless/libertas/assoc.c:16:
 +extern int libertas_mesh_config(wlan_private * priv, int action,int channel,char *str);

 ERROR: "foo * bar" should be "foo *bar"
 #7: FILE: drivers/net/wireless/libertas/assoc.c:16:
 +extern int libertas_mesh_config(wlan_private * priv, int action,int channel,char *str);

 ERROR: need space after that ',' (ctx:VxV)
 #7: FILE: drivers/net/wireless/libertas/assoc.c:16:
 +extern int libertas_mesh_config(wlan_private * priv, int action,int channel,char *str);
                                                                             ^

 WARNING: externs should be avoided in .c files
 #7: FILE: drivers/net/wireless/libertas/assoc.c:16:
 +extern int libertas_mesh_config(wlan_private * priv, int action,int channel,char *str);

 ERROR: That open brace { should be on the previous line
 #19: FILE: drivers/net/wireless/libertas/assoc.c:219:
 +       if(adapter->mesh_connect_status == LIBERTAS_CONNECTED)
 +       {
 ERROR: need a space before the open parenthesis '('
 #19: FILE: drivers/net/wireless/libertas/assoc.c:219:
 +       if(adapter->mesh_connect_status == LIBERTAS_CONNECTED)


                                                          Software and Services Group       29
                                                                                            29
Submitting Patches

• Read the patch before you send it
• Use scripts/checkpatch.pl
• Send patches to yourself first


  $ patch -p1 < saved-email.txt
  patching file drivers/net/wireless/libertas/assoc.c
  Hunk #1 FAILED at 13.
  Hunk #2 FAILED at 212.
  Hunk #3 FAILED at 234.
  patch: **** malformed patch at line 71: adapter->meshid);




                                   Software and Services Group   30
                                                                 30
Submitting Patches

• Read the patch before you send it
• Use scripts/checkpatch.pl
• Send patches to yourself first
• Read Documentation/SubmittingPatches
    or Documentation/ja_JP/SubmittingPatches




                                   Software and Services Group   31
                                                                 31
Submitting Patches

• Read the patch before you send it
• Use scripts/checkpatch.pl
• Send patches to yourself first
• Read Documentation/SubmittingPatches
• Include appropriate description
      commit 4ac9137858e08a19f29feac4e1f4df7c268b0ba5
      Author: Jan Blunck <jblunck@suse.de>
      Date:   Thu Feb 14 19:34:32 2008 -0800

        Embed a struct path into struct nameidata instead of nd->{dentry,mnt}

        This is the central patch of a cleanup series. In most cases there is no good
        reason why someone would want to use a dentry for itself. This series reflects
        that fact and embeds a struct path into nameidata.

        Together with the other patches of   this series
        - it enforced the correct order of   getting/releasing the reference count on
          <dentry,vfsmount> pairs
        - it prepares the VFS for stacking   support since it is essential to have a
          struct path in every place where   the stack can be traversed



                                                          Software and Services Group    32
                                                                                         32
What's next for “Embedded” Linux?



• Solid state storage
   – More work on SSDs
   – Flash file system development (UBI, logfs, btrfs)
• Better power management
• More real time development
• What do you need?




                                         Software and Services Group   33
                                                                       33
Questions?




       Software and Services Group   34
                                     34

Weitere ähnliche Inhalte

Was ist angesagt?

Symantec rhev 31-update by syed m shaaf
Symantec rhev 31-update by syed m shaafSymantec rhev 31-update by syed m shaaf
Symantec rhev 31-update by syed m shaaf
Syed Shaaf
 
Comp tia a+_session_10
Comp tia a+_session_10Comp tia a+_session_10
Comp tia a+_session_10
Niit Care
 
Os Wardenupdated
Os WardenupdatedOs Wardenupdated
Os Wardenupdated
oscon2007
 
AMD Embedded G-Series Press Presentation
AMD Embedded G-Series Press PresentationAMD Embedded G-Series Press Presentation
AMD Embedded G-Series Press Presentation
AMD
 

Was ist angesagt? (20)

Symantec rhev 31-update by syed m shaaf
Symantec rhev 31-update by syed m shaafSymantec rhev 31-update by syed m shaaf
Symantec rhev 31-update by syed m shaaf
 
Nic teaming and converged fabric
Nic teaming and converged fabricNic teaming and converged fabric
Nic teaming and converged fabric
 
Nakajima numa-final
Nakajima numa-finalNakajima numa-final
Nakajima numa-final
 
Runner sv q307
Runner sv q307Runner sv q307
Runner sv q307
 
Comp tia a+_session_10
Comp tia a+_session_10Comp tia a+_session_10
Comp tia a+_session_10
 
AMD Catalyst Software
AMD Catalyst Software  AMD Catalyst Software
AMD Catalyst Software
 
Os Wardenupdated
Os WardenupdatedOs Wardenupdated
Os Wardenupdated
 
Trinity press deck 10 2 2012
Trinity press deck 10 2 2012Trinity press deck 10 2 2012
Trinity press deck 10 2 2012
 
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
 
Rapid prototyping with open source
Rapid prototyping with open sourceRapid prototyping with open source
Rapid prototyping with open source
 
AMD Embedded G-Series Press Presentation
AMD Embedded G-Series Press PresentationAMD Embedded G-Series Press Presentation
AMD Embedded G-Series Press Presentation
 
The glideinWMS approach to the ownership of System Images in the Cloud World
The glideinWMS approach to the ownership of System Images in the Cloud WorldThe glideinWMS approach to the ownership of System Images in the Cloud World
The glideinWMS approach to the ownership of System Images in the Cloud World
 
Application hosting in the Intelligent WAN
Application hosting in the Intelligent WANApplication hosting in the Intelligent WAN
Application hosting in the Intelligent WAN
 
6dec2011 - DELL
6dec2011 - DELL6dec2011 - DELL
6dec2011 - DELL
 
Virtualization Best Practices-Tips and Tricks From Expert
Virtualization Best Practices-Tips and Tricks From ExpertVirtualization Best Practices-Tips and Tricks From Expert
Virtualization Best Practices-Tips and Tricks From Expert
 
Ian Pratt Usenix 08 Keynote
Ian Pratt Usenix 08 KeynoteIan Pratt Usenix 08 Keynote
Ian Pratt Usenix 08 Keynote
 
z/VM 6.2: Increasing the Endless Possibilities of Virtualization
z/VM 6.2: Increasing the Endless Possibilities of Virtualizationz/VM 6.2: Increasing the Endless Possibilities of Virtualization
z/VM 6.2: Increasing the Endless Possibilities of Virtualization
 
Maximizing Application Performance on Cray XT6 and XE6 Supercomputers DOD-MOD...
Maximizing Application Performance on Cray XT6 and XE6 Supercomputers DOD-MOD...Maximizing Application Performance on Cray XT6 and XE6 Supercomputers DOD-MOD...
Maximizing Application Performance on Cray XT6 and XE6 Supercomputers DOD-MOD...
 
IGEL Universal Desktop
IGEL Universal DesktopIGEL Universal Desktop
IGEL Universal Desktop
 
XS Oracle 2009 Intro Slides
XS Oracle 2009 Intro SlidesXS Oracle 2009 Intro Slides
XS Oracle 2009 Intro Slides
 

Andere mochten auch

Andere mochten auch (7)

Hardware Detection Tool
Hardware Detection ToolHardware Detection Tool
Hardware Detection Tool
 
Kernel Recipes 2013 - Automating source code evolutions using Coccinelle
Kernel Recipes 2013 - Automating source code evolutions using CoccinelleKernel Recipes 2013 - Automating source code evolutions using Coccinelle
Kernel Recipes 2013 - Automating source code evolutions using Coccinelle
 
Maintenance des branches stables du noyau
Maintenance des branches stables du noyauMaintenance des branches stables du noyau
Maintenance des branches stables du noyau
 
Interruption Timer Périodique
Interruption Timer PériodiqueInterruption Timer Périodique
Interruption Timer Périodique
 
Coccinelle, a bug finding tool
Coccinelle, a bug finding toolCoccinelle, a bug finding tool
Coccinelle, a bug finding tool
 
Kernel Recipes 2014 - Advanced Quilt
Kernel Recipes 2014 - Advanced QuiltKernel Recipes 2014 - Advanced Quilt
Kernel Recipes 2014 - Advanced Quilt
 
The Glymphatic System – A New Player in Alzheimer Disease?
The Glymphatic System – A New Player  in Alzheimer Disease?The Glymphatic System – A New Player  in Alzheimer Disease?
The Glymphatic System – A New Player in Alzheimer Disease?
 

Ähnlich wie Embedded is not special

InfiniBand for the enterprise
InfiniBand for the enterpriseInfiniBand for the enterprise
InfiniBand for the enterprise
Anas Kanzoua
 
Linux Distribution Collaboration …on a Mainframe!
Linux Distribution Collaboration …on a Mainframe!Linux Distribution Collaboration …on a Mainframe!
Linux Distribution Collaboration …on a Mainframe!
All Things Open
 
Lenovo xClarity - Presentacion - ITALTEL.pptx
Lenovo xClarity - Presentacion - ITALTEL.pptxLenovo xClarity - Presentacion - ITALTEL.pptx
Lenovo xClarity - Presentacion - ITALTEL.pptx
JairVelasquezParraga
 

Ähnlich wie Embedded is not special (20)

RedHat Linux
RedHat LinuxRedHat Linux
RedHat Linux
 
Moving from Device Centric to a User Centric Management
Moving from Device Centric to a User Centric Management Moving from Device Centric to a User Centric Management
Moving from Device Centric to a User Centric Management
 
SDN Basics
SDN BasicsSDN Basics
SDN Basics
 
License Estate
License EstateLicense Estate
License Estate
 
Qt and the Red Flag Linux Distro
Qt and the Red Flag Linux DistroQt and the Red Flag Linux Distro
Qt and the Red Flag Linux Distro
 
EOS
EOSEOS
EOS
 
InfiniBand for the enterprise
InfiniBand for the enterpriseInfiniBand for the enterprise
InfiniBand for the enterprise
 
Updates to Apache CloudStack and LINBIT SDS
Updates to Apache CloudStack and LINBIT SDSUpdates to Apache CloudStack and LINBIT SDS
Updates to Apache CloudStack and LINBIT SDS
 
Oracle Database 19c - poslední z rodiny 12.2 a co přináší nového
Oracle Database 19c - poslední z rodiny 12.2 a co přináší novéhoOracle Database 19c - poslední z rodiny 12.2 a co přináší nového
Oracle Database 19c - poslední z rodiny 12.2 a co přináší nového
 
Keynote | Middleware Everywhere - Ready for Mobile and Cloud | Dr. Mark Little
Keynote | Middleware Everywhere - Ready for Mobile and Cloud | Dr. Mark LittleKeynote | Middleware Everywhere - Ready for Mobile and Cloud | Dr. Mark Little
Keynote | Middleware Everywhere - Ready for Mobile and Cloud | Dr. Mark Little
 
Overview of Remoting Protocols - By VDIworks
Overview of Remoting Protocols - By VDIworksOverview of Remoting Protocols - By VDIworks
Overview of Remoting Protocols - By VDIworks
 
Postcards from the (far) edge
Postcards from the (far) edgePostcards from the (far) edge
Postcards from the (far) edge
 
Application Virtualization Smackdown
Application Virtualization SmackdownApplication Virtualization Smackdown
Application Virtualization Smackdown
 
Best Practices for IT Asset Management Using Novell ZENworks
Best Practices for IT Asset Management Using Novell ZENworksBest Practices for IT Asset Management Using Novell ZENworks
Best Practices for IT Asset Management Using Novell ZENworks
 
Developer Day 2014 - 7 - andrew mitchell - legato
Developer Day 2014 - 7 - andrew mitchell - legatoDeveloper Day 2014 - 7 - andrew mitchell - legato
Developer Day 2014 - 7 - andrew mitchell - legato
 
Linux Distribution Collaboration …on a Mainframe!
Linux Distribution Collaboration …on a Mainframe!Linux Distribution Collaboration …on a Mainframe!
Linux Distribution Collaboration …on a Mainframe!
 
Hyperconvergence... and the public sector
Hyperconvergence... and the public sectorHyperconvergence... and the public sector
Hyperconvergence... and the public sector
 
Lenovo xClarity - Presentacion - ITALTEL.pptx
Lenovo xClarity - Presentacion - ITALTEL.pptxLenovo xClarity - Presentacion - ITALTEL.pptx
Lenovo xClarity - Presentacion - ITALTEL.pptx
 
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
 
LCA13: George Grey Keynote
LCA13: George Grey KeynoteLCA13: George Grey Keynote
LCA13: George Grey Keynote
 

Mehr von Anne Nicolas

Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Anne Nicolas
 

Mehr von Anne Nicolas (20)

Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstKernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream first
 
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIKernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are money
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and future
 
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
 
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxEmbedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
 
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialEmbedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less special
 
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconEmbedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
 
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureEmbedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops way
 
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerEmbedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmaker
 
Embedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationEmbedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integration
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debugging
 
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaEmbedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
 
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPKernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDP
 
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Embedded is not special

  • 1. Embedded Linux and the mainline kernel David Woodhouse Kernel Recipes September 2012 Software and Services Group
  • 2. Where does Linux run? Embedded control device... phone... PDA... Internet tablet... router... media device... netbook... laptop... desktop... server... supercomputer... Software and Services Group 2 2
  • 3. “Embedded”...? • Control equipment • Phones • PDAs • “Internet Tablets” • Routers • Televisions • VCR / PVR / DVD / Media • Netbooks (?) Software and Services Group 3 3
  • 4. “Embedded”...? • Headless? • Handheld? • Power source? • Physical size? • Limited RAM? • Storage? • Other... Software and Services Group 4 4
  • 5. Embedded needs • Power management • Fast startup • Headless operation • Uncluttered user interfaces • Solid state storage Software and Services Group 5 5
  • 6. Embedded needs • Power management • Fast startup • Headless operation • Uncluttered user interfaces • Solid state storage Other users need these features too! Software and Services Group 6 6
  • 7. Power Management • Battery life Software and Services Group 7 7
  • 8. Power Management • Battery life • Cost of power consumption • Heat output Software and Services Group 8 8
  • 9. Tickless operation • Power savings Software and Services Group 9 9
  • 10. Tickless operation • Power savings • Scalability for virtualisation Software and Services Group 10 10
  • 11. Fast boot • Hard limits for mobile telephones • User experience for consumer electronics Software and Services Group 11 11
  • 12. Fast boot • Hard limits for mobile telephones • User experience for consumer electronics • Server availability Software and Services Group 12 12
  • 13. User interfaces • Ease of use for consumer equipment Software and Services Group 13 13
  • 14. User interfaces • Ease of use for consumer equipment • ... and for everyone else: – OLPC / Sugar – Netbooks – Simple desktop environments Software and Services Group 14 14
  • 15. Solid state storage • FLASH storage in “embedded” devices Software and Services Group 15 15
  • 16. Solid state storage • FLASH storage in “embedded” devices • Solid State Disk Software and Services Group 16 16
  • 17. Others... • Execute in place (XIP) – From FLASH for embedded systems – Shared file system data under virtualisation • DMA API usage – For cache coherency on embedded systems (ARM, some PPC) – For IOMMU on larger systems Software and Services Group 17 17
  • 18. We are not so special! Software and Services Group 18 18
  • 19. Community impressions • “Enterprise” Linux • “Embedded” Linux Software and Services Group 19 19
  • 20. Community impressions • “Enterprise” Linux • “Embedded” Linux – Working with old code – Not working with upstream – Inclined towards “special” one-off hacks – Irrelevant to the general case Software and Services Group 20 20
  • 21. Community impressions • “Enterprise” Linux • “Embedded” Linux – Working with old code – Not working with upstream – Inclined towards “special” one-off hacks – Irrelevant to the general case We must prove them wrong! Software and Services Group 21 21
  • 22. “Embedded” success stories • Tickless • Preemptive kernel • Power management • Suspend to RAM • Solid state storage • Squashfs Software and Services Group 22 22
  • 23. Working with the community • Find generic points of interest • Publish early and often – In git trees – Separate trees for separate development efforts – Also send patches for review • Solicit and respond to feedback • Work with upstream maintainers • BE PART OF THE COMMUNITY! Software and Services Group 23 23
  • 24. Staying close to upstream • Advantages – Easier for product updates and new products – Easy to use fixes and new features – External contributions – Code review and testing • Costs – Writing acceptable code can be hard and takes time – Upstream kernel is a fast-moving target – Releasing information may be difficult Software and Services Group 24 24
  • 25. Tips on contributing code • Avoid hacking around problems • Avoid overengineering • Care about locking • Coding Style • Submit patches carefully Software and Services Group 25 25
  • 26. Coding Style • Simple, short functions • Avoid: – typedefs – StudlyCaps – Hungarian Notation • Read Documentation/CodingStyle http://www.linux.or.jp/JF/JFdocs/kernel-docs- 2.6/CodingStyle.html Software and Services Group 26 26
  • 27. Submitting Patches • Read the patch before you send it --- a/drivers/net/wireless/libertas/assoc.c +++ b/drivers/net/wireless/libertas/assoc.c @@ -13,6 +13,7 @@ static const u8 bssid_any[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; static const u8 bssid_off[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +extern int libertas_mesh_config(wlan_private * priv, int action,int channel,char *str); static void print_assoc_req(const char * extra, struct assoc_request * assoc_req) { @@ -211,9 +212,17 @@ static int assoc_helper_channel(wlan_private *priv, { wlan_adapter *adapter = priv->adapter; int ret = 0; + int restart_mesh = 0; lbs_deb_enter(LBS_DEB_ASSOC); + if(adapter->mesh_connect_status == LIBERTAS_CONNECTED) + { + libertas_mesh_config(priv,0,adapter->curbssparams.channel,NULL); + restart_mesh = 1; + + } + ret = update_channel(priv); if (ret < 0) { lbs_deb_assoc("ASSOC: channel: error getting channel."); @@ -225,11 +234,13 @@ static int assoc_helper_channel(wlan_private *priv, lbs_deb_assoc("ASSOC: channel: %d -> %dn", adapter->curbssparams.channel, assoc_req->channel); + ret = libertas_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL, CMD_OPT_802_11_RF_CHANNEL_SET, Software and Services Group 27 27
  • 28. Submitting Patches • Read the patch before you send it --- a/drivers/net/wireless/libertas/assoc.c +++ b/drivers/net/wireless/libertas/assoc.c @@ -13,6 +13,7 @@ static const u8 bssid_any[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; static const u8 bssid_off[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +extern int libertas_mesh_config(wlan_private * priv, int action,int channel,char *str); static void print_assoc_req(const char * extra, struct assoc_request * assoc_req) { @@ -211,9 +212,17 @@ static int assoc_helper_channel(wlan_private *priv, { wlan_adapter *adapter = priv->adapter; int ret = 0; + int restart_mesh = 0; lbs_deb_enter(LBS_DEB_ASSOC); + if(adapter->mesh_connect_status == LIBERTAS_CONNECTED) + { + libertas_mesh_config(priv,0,adapter->curbssparams.channel,NULL); + restart_mesh = 1; + + } + ret = update_channel(priv); if (ret < 0) { lbs_deb_assoc("ASSOC: channel: error getting channel."); @@ -225,11 +234,13 @@ static int assoc_helper_channel(wlan_private *priv, lbs_deb_assoc("ASSOC: channel: %d -> %dn", adapter->curbssparams.channel, assoc_req->channel); + ret = libertas_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL, CMD_OPT_802_11_RF_CHANNEL_SET, Software and Services Group 28 28
  • 29. Submitting Patches • Read the patch before you send it • Use scripts/checkpatch.pl $ scripts/checkpatch.pl 0002-MESH-START-STOP_IOCTLS.patch WARNING: line over 80 characters #7: FILE: drivers/net/wireless/libertas/assoc.c:16: +extern int libertas_mesh_config(wlan_private * priv, int action,int channel,char *str); ERROR: "foo * bar" should be "foo *bar" #7: FILE: drivers/net/wireless/libertas/assoc.c:16: +extern int libertas_mesh_config(wlan_private * priv, int action,int channel,char *str); ERROR: need space after that ',' (ctx:VxV) #7: FILE: drivers/net/wireless/libertas/assoc.c:16: +extern int libertas_mesh_config(wlan_private * priv, int action,int channel,char *str); ^ WARNING: externs should be avoided in .c files #7: FILE: drivers/net/wireless/libertas/assoc.c:16: +extern int libertas_mesh_config(wlan_private * priv, int action,int channel,char *str); ERROR: That open brace { should be on the previous line #19: FILE: drivers/net/wireless/libertas/assoc.c:219: + if(adapter->mesh_connect_status == LIBERTAS_CONNECTED) + { ERROR: need a space before the open parenthesis '(' #19: FILE: drivers/net/wireless/libertas/assoc.c:219: + if(adapter->mesh_connect_status == LIBERTAS_CONNECTED) Software and Services Group 29 29
  • 30. Submitting Patches • Read the patch before you send it • Use scripts/checkpatch.pl • Send patches to yourself first $ patch -p1 < saved-email.txt patching file drivers/net/wireless/libertas/assoc.c Hunk #1 FAILED at 13. Hunk #2 FAILED at 212. Hunk #3 FAILED at 234. patch: **** malformed patch at line 71: adapter->meshid); Software and Services Group 30 30
  • 31. Submitting Patches • Read the patch before you send it • Use scripts/checkpatch.pl • Send patches to yourself first • Read Documentation/SubmittingPatches   or Documentation/ja_JP/SubmittingPatches Software and Services Group 31 31
  • 32. Submitting Patches • Read the patch before you send it • Use scripts/checkpatch.pl • Send patches to yourself first • Read Documentation/SubmittingPatches • Include appropriate description commit 4ac9137858e08a19f29feac4e1f4df7c268b0ba5 Author: Jan Blunck <jblunck@suse.de> Date: Thu Feb 14 19:34:32 2008 -0800 Embed a struct path into struct nameidata instead of nd->{dentry,mnt} This is the central patch of a cleanup series. In most cases there is no good reason why someone would want to use a dentry for itself. This series reflects that fact and embeds a struct path into nameidata. Together with the other patches of this series - it enforced the correct order of getting/releasing the reference count on <dentry,vfsmount> pairs - it prepares the VFS for stacking support since it is essential to have a struct path in every place where the stack can be traversed Software and Services Group 32 32
  • 33. What's next for “Embedded” Linux? • Solid state storage – More work on SSDs – Flash file system development (UBI, logfs, btrfs) • Better power management • More real time development • What do you need? Software and Services Group 33 33
  • 34. Questions? Software and Services Group 34 34