Coder Social home page Coder Social logo

sonic-linux-kernel's Introduction

Build Status

SONiC - Kernel

Description

This repository contains the scripts and patches to build the kernel for SONiC. SONiC uses the same kernel for all platforms. We prefer to out-of-tree kernel platform modules. We accept kernel patches on following conditions:

  • Existing kernel modules need to be enabled.
  • Existing kernel modules need to be patched and those patches are available in upstream.
    • Please include the original upstream commit id and message in the patch. This allows the maintainer to remove upstream patches during the kernel upgrade.
  • New kernel modules which are common to all platforms.
  • Platform specific kernel modules which are impossible or very difficult to be built out of kernel tree.

Platform specific kernel modules are expected to develop out-of-tree kernel modules, provide them in debian packages to be embedded into SONiC ONE image and installed on their platforms.

For all patches, please ensure you have run the patch with checkpatch.pl and pass it.

Usage:

make DEST=<destination path>

If DEST is not set, package will stay in current directory.

Kernel Configuration Changes

The Debian kernel used with SONiC includes almost all available hardware that can be found on a system using Linux. This increases considerably the time needed to build the kernel Debian image. Since there are many drivers, protocols or filesystems which will never be used on a switch, there is a simple mechanism to remove kernel options which does not require creating a kernel configuration patch. The options which need to be excluded from the kernel are simply listed in a flat text file: patch/kconfig-exclusions

Example:

CONFIG_REISERFS_FS
CONFIG_JFS_FS
CONFIG_XFS_FS

Similarly, there is a mechanism to include some kernel options by listing these options into the flat text file: patch/kconfig-inclusions

Example:

CONFIG_INT340X_THERMAL=m
CONFIG_LOG_BUF_SHIFT=18

If the files patch/kconfig-exclusions and patch/kconfig-inclusions exist, they will be processed after all the kernel patches described in the patch directory have been applied, exclusions being done before inclusions.

Also, the final kernel configuration will be checked to verify that:

  • all options asked to be excluded are effectively not present in the kernel,
  • and all options asked to be included are effectively present in the kernel, using the exact type (module or built-in) or string or number.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.