Skip to content

Commit b638af8

Browse files
olivier-singlalguohan
authored andcommitted
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 imple 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 buit-in) or string or number.
1 parent 2e81a98 commit b638af8

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,13 @@
55
## Description
66
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:
77

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

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

16-
For all patches, please ensure you have run the patch with `checkpatch.pl` and pass it.
17-
1815
Usage:
1916

2017
make DEST=<destination path>

0 commit comments

Comments
 (0)