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

Revamp module build script to make it work for 5.15 on Ubuntu 20.04 #720

Merged

Conversation

saiarcot895
Copy link
Contributor

@saiarcot895 saiarcot895 commented Dec 3, 2022

The current version of the script does not work at all when the host kernel is Azure's 5.15 kernel on Ubuntu 20.04. It does seem to work with 5.11 and older.

Update the script to add support for building and loading the kernel modules for the 5.15 kernel, while keeping support for the non-HWE kernel.

In addition, use a separate updates/sonic directory for the kernel modules we compile, to make it clear they were compiled separately and don't come from the official kernel build packages.

Finally, add a warning if we're compiling a kernel module for a different version of the kernel than what is currently running.

Signed-off-by: Saikrishna Arcot sarcot@microsoft.com

The current version of the script does not work at all when the host
kernel is Azure's 5.15 kernel on Ubuntu 20.04. It does seem to work with
the non-HWE kernel (version 5.4).

Update the script to add support for building and loading the kernel
modules for the 5.15 kernel, while keeping support for the non-HWE
kernel.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
@saiarcot895
Copy link
Contributor Author

@xumia @qiluo-msft could you review this when you get a chance?

echo CONFIG_MACSEC=m >> .config
echo CONFIG_NET_VENDOR_MICROSOFT=y >> .config
echo CONFIG_MICROSOFT_MANA=m >> .config
echo CONFIG_SYSTEM_REVOCATION_LIST=n >> .config
Copy link
Contributor

Choose a reason for hiding this comment

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

why removing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ideally, when building kernel modules, the config used for building the kernel module must match the system's kernel config. This is especially true for config options that aren't for just building a module (i.e. options that may affect multiple parts of the kernel). If there's a difference, there a risk of structure sizes not matching, or function parameters not matching.

These kernel options, as far as I can tell, and based on the CI test run, don't have any functional impact.

@saiarcot895
Copy link
Contributor Author

@xumia @liushilongbuaa Could you review this when you get a chance?

@xumia
Copy link
Collaborator

xumia commented Mar 17, 2023

@xumia @liushilongbuaa Could you review this when you get a chance?

LGTM, thanks for the fix.

@saiarcot895 saiarcot895 merged commit ec42adb into sonic-net:master Mar 17, 2023
@saiarcot895 saiarcot895 deleted the module-build-script-for-azure-ubuntu branch March 17, 2023 14:31
StormLiangMS pushed a commit that referenced this pull request Mar 19, 2023
…720)

* Revamp module build script to make it work for 5.15 on Ubuntu 20.04

The current version of the script does not work at all when the host
kernel is Azure's 5.15 kernel on Ubuntu 20.04. It does seem to work with
the non-HWE kernel (version 5.4).

Update the script to add support for building and loading the kernel
modules for the 5.15 kernel, while keeping support for the non-HWE
kernel.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

* Print warning when building module for different version of kernel

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

* Fix up command names and reuse variable

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

---------

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
yxieca pushed a commit that referenced this pull request Mar 24, 2023
…720)

* Revamp module build script to make it work for 5.15 on Ubuntu 20.04

The current version of the script does not work at all when the host
kernel is Azure's 5.15 kernel on Ubuntu 20.04. It does seem to work with
the non-HWE kernel (version 5.4).

Update the script to add support for building and loading the kernel
modules for the 5.15 kernel, while keeping support for the non-HWE
kernel.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

* Print warning when building module for different version of kernel

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

* Fix up command names and reuse variable

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

---------

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
saiarcot895 added a commit to saiarcot895/sonic-buildimage that referenced this pull request Apr 3, 2023
Update sonic-swss-common submodule pointer to include the following:

* 6e4daf1 Revamp module build script to make it work for 5.15 on Ubuntu 20.04 (sonic-net/sonic-swss-common#720)
* 7f40cde Non recursive automake and Debian packaging changes (sonic-net/sonic-swss-common#700)

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
yxieca pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Apr 7, 2023
Update sonic-swss-common submodule pointer to include the following:

* 6e4daf1 Revamp module build script to make it work for 5.15 on Ubuntu 20.04 (sonic-net/sonic-swss-common#720)
* 7f40cde Non recursive automake and Debian packaging changes (sonic-net/sonic-swss-common#700)

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
saiarcot895 added a commit to saiarcot895/sonic-swss that referenced this pull request Jul 2, 2024
The current version of the script does not work at all when the host
kernel is Azure's 5.15 kernel on Ubuntu 20.04. It does seem to work with
the non-HWE kernel (version 5.4).

Update the script to add support for building and loading the kernel
modules for the 5.15 kernel, while keeping support for the non-HWE
kernel.

This is a cherry-pick of sonic-net/sonic-swss-common#720

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>
saiarcot895 added a commit to saiarcot895/sonic-swss that referenced this pull request Jul 2, 2024
The current version of the script does not work at all when the host
kernel is Azure's 5.15 kernel on Ubuntu 20.04. It does seem to work with
the non-HWE kernel (version 5.4).

Update the script to add support for building and loading the kernel
modules for the 5.15 kernel, while keeping support for the non-HWE
kernel.

This is a cherry-pick of sonic-net/sonic-swss-common#720

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>
yxieca pushed a commit to sonic-net/sonic-swss that referenced this pull request Jul 2, 2024
…3212)

* Revamp module build script to make it work for 5.15 on Ubuntu 20.04

The current version of the script does not work at all when the host
kernel is Azure's 5.15 kernel on Ubuntu 20.04. It does seem to work with
the non-HWE kernel (version 5.4).

Update the script to add support for building and loading the kernel
modules for the 5.15 kernel, while keeping support for the non-HWE
kernel.

This is a cherry-pick of sonic-net/sonic-swss-common#720

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>

* Remove libswsscommon dependencies from the script

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>

---------

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>
mssonicbld pushed a commit to mssonicbld/sonic-swss that referenced this pull request Jul 2, 2024
…onic-net#3212)

* Revamp module build script to make it work for 5.15 on Ubuntu 20.04

The current version of the script does not work at all when the host
kernel is Azure's 5.15 kernel on Ubuntu 20.04. It does seem to work with
the non-HWE kernel (version 5.4).

Update the script to add support for building and loading the kernel
modules for the 5.15 kernel, while keeping support for the non-HWE
kernel.

This is a cherry-pick of sonic-net/sonic-swss-common#720

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>

* Remove libswsscommon dependencies from the script

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>

---------

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>
mssonicbld pushed a commit to mssonicbld/sonic-swss that referenced this pull request Jul 2, 2024
…onic-net#3212)

* Revamp module build script to make it work for 5.15 on Ubuntu 20.04

The current version of the script does not work at all when the host
kernel is Azure's 5.15 kernel on Ubuntu 20.04. It does seem to work with
the non-HWE kernel (version 5.4).

Update the script to add support for building and loading the kernel
modules for the 5.15 kernel, while keeping support for the non-HWE
kernel.

This is a cherry-pick of sonic-net/sonic-swss-common#720

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>

* Remove libswsscommon dependencies from the script

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>

---------

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>
mssonicbld pushed a commit to sonic-net/sonic-swss that referenced this pull request Jul 2, 2024
…3212)

* Revamp module build script to make it work for 5.15 on Ubuntu 20.04

The current version of the script does not work at all when the host
kernel is Azure's 5.15 kernel on Ubuntu 20.04. It does seem to work with
the non-HWE kernel (version 5.4).

Update the script to add support for building and loading the kernel
modules for the 5.15 kernel, while keeping support for the non-HWE
kernel.

This is a cherry-pick of sonic-net/sonic-swss-common#720

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>

* Remove libswsscommon dependencies from the script

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>

---------

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>
yejianquan pushed a commit to yejianquan/sonic-swss that referenced this pull request Jul 8, 2024
…onic-net#3212)

* Revamp module build script to make it work for 5.15 on Ubuntu 20.04

The current version of the script does not work at all when the host
kernel is Azure's 5.15 kernel on Ubuntu 20.04. It does seem to work with
the non-HWE kernel (version 5.4).

Update the script to add support for building and loading the kernel
modules for the 5.15 kernel, while keeping support for the non-HWE
kernel.

This is a cherry-pick of sonic-net/sonic-swss-common#720

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>

* Remove libswsscommon dependencies from the script

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>

---------

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>
mssonicbld pushed a commit to sonic-net/sonic-swss that referenced this pull request Jul 12, 2024
…3212)

* Revamp module build script to make it work for 5.15 on Ubuntu 20.04

The current version of the script does not work at all when the host
kernel is Azure's 5.15 kernel on Ubuntu 20.04. It does seem to work with
the non-HWE kernel (version 5.4).

Update the script to add support for building and loading the kernel
modules for the 5.15 kernel, while keeping support for the non-HWE
kernel.

This is a cherry-pick of sonic-net/sonic-swss-common#720

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>

* Remove libswsscommon dependencies from the script

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>

---------

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>
shiraez pushed a commit to Marvell-switching/sonic-swss that referenced this pull request Feb 17, 2025
…onic-net#3212)

* Revamp module build script to make it work for 5.15 on Ubuntu 20.04

The current version of the script does not work at all when the host
kernel is Azure's 5.15 kernel on Ubuntu 20.04. It does seem to work with
the non-HWE kernel (version 5.4).

Update the script to add support for building and loading the kernel
modules for the 5.15 kernel, while keeping support for the non-HWE
kernel.

This is a cherry-pick of sonic-net/sonic-swss-common#720

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>

* Remove libswsscommon dependencies from the script

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>

---------

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants