Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel configuration changes #105

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

olivier-singla
Copy link
Contributor

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 buit-in) or string or number.

@pavel-shirshov
Copy link

Will this change ABI of the kernel?

@olivier-singla
Copy link
Contributor Author

Will this change ABI of the kernel?

We only remove a few options in the kernel configuration (such as CONFIG_INPUT_JOYSTICK, etc.), so AFAIK this will not change the ABI of the kernel.

manage-config Outdated Show resolved Hide resolved
@olivier-singla
Copy link
Contributor Author

Can somebody take a look at this PR?

@olivier-singla
Copy link
Contributor Author

retest this please

@olivier-singla
Copy link
Contributor Author

Can somebody take a look at this PR?

A friendly reminder: if somebody could look at this patch that would be appreciated,

CONFIG_NET_9P
CONFIG_DLM
CONFIG_QFMT_V1
CONFIG_MTD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do use CONFIG_MTD on some platforms. patch/0042-armhf-additional-configs.patch

README.md Show resolved Hide resolved
@lguohan
Copy link
Contributor

lguohan commented Apr 16, 2020

retest this please

1 similar comment
@lguohan
Copy link
Contributor

lguohan commented Apr 17, 2020

retest this please

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.
@@ -98,7 +98,6 @@ CONFIG_USB_EHSET_TEST_FIXTURE
CONFIG_USB_ISIGHTFW
CONFIG_USB_YUREX
CONFIG_USB_ATM
CONFIG_DMA_SHARED_BUFFER
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lguohan
Copy link
Contributor

lguohan commented Jun 3, 2020

[2020-06-03T13:27:52.659Z] debian/bin/buildcheck.py debian/build/build_amd64_none_amd64 amd64 none amd64
[2020-06-03T13:27:53.611Z] ABI has changed! Refusing to continue.

@lguohan
Copy link
Contributor

lguohan commented Jun 3, 2020

@olivier-singla , ABI changed, need to fix the build. here is my plan, i think we can first merge the infrastructure in, and then, we can move the existing config patch into kconfig-inclusion and kconfig-exclusion, and then we can add additional trim from you.

the infrastructure change is in pr #143

| | Number of .ko modules | Modules size |
| ----------- | ----------- | ----------- |
| Before | 3448 | 196 MB |
| After | 1991 | 110 MB |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please format (align) this for a monospace font.

|CONFIG_USB_EHSET_TEST_FIXTURE | USB EHSET Test Fixture driver | Say Y here if you want to support the special test fixture device used for the USB-IF Embedded Host High-Speed Electrical Test procedure.
|CONFIG_USB_ISIGHTFW | iSight firmware loading support | This driver loads firmware for USB Apple iSight cameras
|CONFIG_USB_YUREX | USB YUREX driver support | Say Y here if you want to connect a YUREX to your computer's USB port. The YUREX is a leg-shakes sensor.
|CONFIG_USB_ATM | USB DSL modem support | Say Y here if you want to connect a USB Digital Subscriber Line (DSL) modem to your computer's USB port
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe apply this configuration change in Linux’ config, and then run make savedefconfig, and rename defconfig to defconfig.optimized.

@jarias-lfx
Copy link

/easycla

@linux-foundation-easycla
Copy link

CLA Not Signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants