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

[Non Upstream Patches] Added ENV vars for non-upstream patches #36

Closed
wants to merge 4 commits into from

Conversation

vivekrnv
Copy link
Owner

@vivekrnv vivekrnv commented Oct 7, 2022

Signed-off-by: Vivek Reddy vkarri@nvidia.com

Why I did it

Provide a way to include non-upstream kernel patches in the kernel build process

How I did it

Introduce two new environment variables:

EXTERNAL_KERNEL_PATCHES = <url to the archive containing patches>, empty by default
INCLUDE_MLNX_PATCHES = <y|n to include the patches under platform/mellanox folder> 'n' y default

Use SONIC_OVERRIDE_BUILD_VARS to fuse in these env variables:

- NOJESSIE=1 NOSTRETCH=1 NOBUSTER=1 make SONIC_OVERRIDE_BUILD_VARS=' INCLUDE_MLNX_PATCHES=y ' target/debs/bullseye/linux-headers-5.10.0-12-2-common_5.10.103-1_all.deb
- NOJESSIE=1 NOSTRETCH=1 NOBUSTER=1 make SONIC_OVERRIDE_BUILD_VARS=' EXTERNAL_KERNEL_PATCHES=http://<url-root>/loc/patches.tar.gz ' target/debs/bullseye/linux-headers-5.10.0-12-2-common_5.10.103-1_all.deb

Structure of the patch tar archive

  1. It should contain a file named series. series should provide an order of which the patches have to be applied
  2. All the patches should be present in the archive in the same folder where series resides.
  3. Developers should make sure patches apply cleanly over the existing patches present in the sonic-linux-kernel/ repo.
vkarri@build-server:/sonic-buildimage/platform/mellanox/non-upstream-patches$ tar -tvf patches.tar.gz
drwxr-xr-x vkarri/dip        0 2022-10-07 00:20 ./
-rw-r--r-- vkarri/dip     4865 2022-10-06 22:50 ./mlx5-Implement-get_module_eeprom_by_page.patch
-rw-r--r-- vkarri/dip     1529 2022-10-06 22:48 ./mlx5-Add-support-for-DSFP-module-EEPROM-dumps.patch
-rw-r--r-- vkarri/dip      139 2022-10-07 00:20 ./series
-rw-r--r-- vkarri/dip     4827 2022-10-06 22:47 ./mlx5-Refactor-module-EEPROM-query.patch

How to verify it

  1. Build the kernel
  2. Check if the patches are applied on the kernel source
vkarri@r-build-sonic06:/builds2/vkarri/sonic/sonic-temp/sonic-buildimage/src/sonic-linux-kernel/linux-5.10.103$ git log --oneline -n 4
a524105fc (HEAD -> master, refs/patches/master/mlx5-Add-support-for-DSFP-module-EEPROM-dumps.patch) From 4c88fa412a100f925b8ab1aa952a672895f69d35 Mon Sep 17 00:00:00 2001 Subject: net/mlx5: Add support for DSFP module EEPROM dumps
8f366b27c (refs/patches/master/mlx5-Implement-get_module_eeprom_by_page.patch) From e109d2b204daa223e6d3cdaa369071c3ea96dcbf Mon Sep 17 00:00:00 2001 Subject: net/mlx5: Implement get_module_eeprom_by_page()
eb9bddfad (refs/patches/master/mlx5-Refactor-module-EEPROM-query.patch) From e19b0a3474ab9ef90dd110af9f39fc87329755f1 Mon Sep 17 00:00:00 2001 Subject: net/mlx5: Refactor module EEPROM query
cf79fff3a (refs/patches/master/armhf_secondary_boot_online.patch) From 500d48948f43d18a07894b5fd4f891afbade1d79 Mon Sep 17 00:00:00 2001

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
@vivekrnv vivekrnv marked this pull request as ready for review October 7, 2022 23:20
@vivekrnv vivekrnv changed the title [Non Upstream Kernel Patches] Added ENV vars for non-upstream patches [Non Upstream Patches] Added ENV vars for non-upstream patches Oct 11, 2022
INCLUDE_MLNX_PATCHES = n
MLNX_PATCH_LOC = $(PLATFORM_PATH)/non-upstream-patches/patches.tar.gz

export MLNX_PATCH_LOC SONIC_BUFFER_MODEL=dynamic

Choose a reason for hiding this comment

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

I suggest to split into two export statements to not change existing export SONIC_BUFFER_MODEL=dynamic line. Same comment applies for linux-kernel.mk file changes.

Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
vivekrnv and others added 2 commits October 17, 2022 22:10
Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
@vivekrnv vivekrnv closed this Oct 18, 2022
vivekrnv added a commit that referenced this pull request Mar 30, 2023
67a3bdf show counters wrong cli output fixed (#36)
5b3eea1 Update package cache, and bail on the first error (#35)
1d221b0 dhcpv6 relay UT code coverage improve (#32)
514b084 dhcpv6 packet handling code refine (#30)

Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
vivekrnv pushed a commit that referenced this pull request Apr 17, 2024
…tomatically (sonic-net#18665)

#### Why I did it
src/sonic-platform-pde
```
* 8b44c3c - (HEAD -> master, origin/master, origin/HEAD) Merge pull request #36 from sg893052/PL_PDE_BOOKWORM_MIGRATION (27 hours ago) [賓少鈺]
* 9f7ac0f - PDE Migration to bookworm (2 weeks ago) [sg893052]
```
#### How I did it
#### How to verify it
#### Description for the changelog
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.

3 participants