sonic-buildimage/platform/mellanox/non-upstream-patches
Stephen Sun 1cd090277f
[Mellanox] Non upstream patches for hw-mgmt V.4.0020.4104 (#13792)
- Why I did it
Add non-upstream kernel patches for the Nvidia platforms
These patches are not yet upstream but needed for new technology.
A flow to upstream them is in progress and once they will be approved they will be moved officially to sonic-linux-kernel.
Till then to include them in the build (not must) the build option INCLUDE_EXTERNAL_PATCH_TAR=y should be included

- How I did it
Zip all the patches in to a tar.gz tarball.

- How to verify it
Manually test

Signed-off-by: Stephen Sun <stephens@nvidia.com>
2023-02-19 09:44:56 +02:00
..
patches.tar.gz [Mellanox] Non upstream patches for hw-mgmt V.4.0020.4104 (#13792) 2023-02-19 09:44:56 +02:00
README.md Added BUILD flags to provision for building the kernel with non-upstream patches (#12428) 2022-10-31 12:16:05 -07:00

Mellanox non-upstream linux kernel patches

To include non-upstream patches into the sonic-linux image during build time, this folder must contain a patch archive.

Structure of the patch archive

  1. It should contain a file named series. series should provide an order in which the patches have to be applied
admin@build-server:/sonic-buildimage/src/sonic-linux-kernel$ cat linux-5.10.103/non_upstream_patches/series
mlx5-Refactor-module-EEPROM-query.patch
mlx5-Implement-get_module_eeprom_by_page.patch
mlx5-Add-support-for-DSFP-module-EEPROM-dumps.patch
  1. All the patches should be present in the same folder where series resides.
  2. Developers should make sure patches apply cleanly over the existing patches present in the src/sonic-linux-kernel .
  3. Name of the tarball should match with the one specified under EXTERNAL_KERNEL_PATCH_TAR

Example

admin@build-server:/sonic-buildimage/platform/mellanox/non-upstream-patches$ tar -tf patches.tar.gz
./
./mlx5-Implement-get_module_eeprom_by_page.patch
./mlx5-Add-support-for-DSFP-module-EEPROM-dumps.patch
./series
./mlx5-Refactor-module-EEPROM-query.patch

Include the archive while building sonic linux kernel

Set INCLUDE_EXTERNAL_PATCH_TAR=y using SONIC_OVERRIDE_BUILD_VARS to include these changes before building the kernel.

  • Eg: NOJESSIE=1 NOSTRETCH=1 NOBUSTER=1 make SONIC_OVERRIDE_BUILD_VARS=' INCLUDE_EXTERNAL_PATCH_TAR=y ' target/debs/bullseye/linux-headers-5.10.0-12-2-common_5.10.103-1_all.deb