Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Contributing to the Linux Kernel

Contributing to the Linux Kernel


March 24, 2022

More Decks by Umegbewe

Other Decks in Programming


  1. Meet Great - Site Reliability Engineer @TCI - Linux &

    DevOps Aficionado - Started writing code & using Linux at 9 - Wannabe Zuckerberg - Follow me on twitter @nwebedu_junior Umegbewe Nwebedu TCI Technologies @nwebedu_junior
  2. What to expect from this talk - Quick Introduction -

    Understanding how the Linux Kernel is developed (release cycles, active kernel releases, kernel trees - Configuring our development system - Explore Kernel Sources - Compiling and Installing a Kernel - Writing a Kernel Patch - Aftermath
  3. Why contribute to the Linux Kernel? - Linux is cool

    - Linux powers the world (Servers, The Cloud, Desktop? maybe this year. - By contributing your code you can add new functionality to the kernel - Why not?
  4. Open Source Festival 2022 What is a Kernel? The Kernel

    is the most important part of an operating system The Kernel is responsible for low-level tasks such as disk management, memory management, task management, etc. It provides an interface between the user and the hardware components of the system. When a process makes a request to the Kernel, then it is called System Call.
  5. Open Source Festival 2022 About the Linux Kernel - Monolithic

    - Modular - Free Software - Things happen, so panic type
  6. Open Source The term open source refers to something people

    can modify and share because its design is publicly accessible.
  7. Development Process It is a 24-hour, seven days a week,

    and 365 days of continuous open source development. the kernel uses a rolling development model which is continually integrating major changes that results in a new release once every 2+ months, and several stable and extended stable releases once a week.
  8. September 15 5.3 stable release September 30 5.4-rc1, merge window

    closes October 6 5.4-rc2 October 13 5.4-rc3 October 20 5.4-rc4 October 27 5.4-rc5 November 3 5.4-rc6 November 10 5.4-rc7 November 17 5.4-rc8 November 24 5.4 stable release
  9. Open Source Festival 2022 Prepatch or RC (Release Candidate) Prepatch

    or "RC" kernels are mainline kernel pre-releases that are mostly aimed at other kernel developers and Linux enthusiasts. They must be compiled from source and usually contain new features that must be tested before they can be put into a stable release. Prepatch kernels are maintained and released by Linus Torvalds Active Releases
  10. Open Source Festival 2022 Stable After a mainline kernel is

    released it is considered “stable”, and are bug fix-only release. Any bug fixes for a stable kernel are backported from the mainline kernel and applied to stable git by a designated stable kernel release maintainer. Stable kernel updates are released on average, once a week, or on an as needed basis. Active Releases
  11. Open Source Festival 2022 Long Term Long-term releases are stable

    releases selected for long-term maintenance to provide critical bug fixes for older kernel trees. Only important bug fixes are applied to this long term releases and they don’t come frequently. E.g 5.10 Active Releases
  12. Open Source Festival 2022 Linux Kernel Versioning 4: Kernel Version

    15: Major Revision 0: Minor Revision 39: Patch Level or number Generic:Linux distro/kernel specific additional info So my Linux kernel version is 4.15.0-39, where:
  13. - Check system requirements - Get needed tools - Configure

    tools - Configure mail client used to send patches (mutt, git-mail etc)
  14. - Cregit - Check history of source files - Get

    Linux Mainline - Explore directories
  15. - Create a new branch to host our changes -

    Commit changes - Generate Patch - Run checkpatch.pl - Run get_maintainers.pl - Send patch
  16. Beginners guide to Linux Kernel Development Linux Kernel Documentation Configuring

    Email Client for Kernel Development Check and Install required tools for Kernel Development Linux From Scratch Book Linux Kernel Development by Robert Love [BOOK] Appendix