Skip to content

Commit fee7d7e

Browse files
Add nvidia arm section and an ability to patch kconfig-inc and fix manage-config (#336)
* \Add nvidia arm markers and add an ability to patch kconfig-inc Signed-off-by: Vivek Reddy <[email protected]> * Minor issue in manage_config script Signed-off-by: Vivek Reddy <[email protected]> * Handle review comments Signed-off-by: Vivek Reddy <[email protected]> * Moved all the changes into one patch Signed-off-by: Vivek Reddy <[email protected]> * Intgerate HW-MGMT 7.0030.1037 Changes ## Patch List * 0172-DS-platform-mlx-platform-Add-SPI-path-for-rack-switc.patch : * 0182-platform-mellanox-Introduce-support-of-new-Nvidia-L1.patch : torvalds/linux@dd635e33b5c9 * 0183-platform-mellanox-Split-initialization-procedure.patch : torvalds/linux@0170f616f496 * 0184-platform-mellanox-Split-logic-in-init-and-exit-flow.patch : torvalds/linux@158cd8320776 * 0185-platform-mellanox-Extend-all-systems-with-I2C-notifi.patch : torvalds/linux@233fd7e44cd7 * 0187-platform_data-mlxreg-Add-field-with-mapped-resource-.patch : torvalds/linux@26917eab144c * 0188-i2c-mux-Add-register-map-based-mux-driver.patch : https://patchwork.ozlabs.org/project/linux-i2c/patch/[email protected]/ * 0189-i2c-mlxcpld-Allow-driver-to-run-on-ARM64-architectur.patch : * 0190-i2c-mlxcpld-Support-PCIe-mapped-register-space.patch : * 0192-i2c-mlxcpld-Add-support-for-extended-transaction-len.patch : * 0193-platform-mellanox-mlx-platform-Add-mux-selection-reg.patch : torvalds/linux@cefdbc7815660 * 0194-platform-mellanox-mlx-platform-Move-bus-shift-assign.patch : torvalds/linux@50b823fdd357e * 0195-platform-mellanox-Add-support-for-dynamic-I2C-channe.patch : * 0196-platform-mellanox-Cosmetic-changes.patch : * 0197-platform-mellanox-Fix-order-in-exit-flow.patch : * 0198-platform-mellanox-Add-new-attributes.patch : * 0199-platform-mellanox-Change-register-offset-addresses.patch : * 0269-platform-mellanox-Add-field-upgrade-capability-regis.patch : * 0270-platform-mellanox-Modify-reset-causes-description.patch : * 0278-platform-mellanox-mlx-platform-Modify-graceful-shutd.patch : * 0279-platform-mellanox-mlx-platform-Fix-signals-polarity-.patch : * 0280-platform-mellanox-mlxreg-hotplug-Extend-condition-fo.patch : * 0281-platform-mellanox-mlx-platform-Modify-health-and-pow.patch : * 0282-platform-mellanox-mlx-platform-Add-reset-cause-attri.patch : * 0284-platform-mellanox-mlx-platform-add-support-for-addit.patch : * 0294-hwmon-pmbus-Add-support-for-MPS-Multi-phase-mp2891-c.patch : * 0295-dt-bindings-trivial-devices-Add-mps-mp2891.patch : * 0304-platform-mellanox-mlx-platform-Modify-power-off-call.patch : * 0305-Extend-driver-to-support-Infineon-Digital-Multi-phas.patch : * 0311-platform-mellanox-nvsw-sn2201-change-fans-i2c-busses.patch : * 0312-platform-mellanox-mlx-platform-Add-reset-callback.patch : * 0313-platform-mellanox-mlx-platform-Prepare-driver-to-all.patch : * 0314-platform-mellanox-mlx-platform-Introduce-ACPI-init-f.patch : * 0315-platform-mellanox-mlx-platform-Get-interrupt-line-th.patch : * 0316-platform-mellanox-Add-initial-support-for-PCIe-based.patch : * Revert the manage-config changes Signed-off-by: Vivek Reddy <[email protected]> * Modify manage-config script to have error messages be printed out Changes in adding secure-boot support caused error messages (about configs not having the expected value) to be suppressed. This makes debugging such failures harder. Modify the code to make sure those messages always get printed to console. Signed-off-by: Saikrishna Arcot <[email protected]> * fix the invocation during secure boot Signed-off-by: Vivek Reddy <[email protected]> * Revert "Intgerate HW-MGMT 7.0030.1037 Changes" This reverts commit 9125a63. * Retain markers for common & amd64 but add a section for arm64 Signed-off-by: Vivek Reddy <[email protected]> --------- Signed-off-by: Vivek Reddy <[email protected]> Signed-off-by: Saikrishna Arcot <[email protected]> Co-authored-by: Saikrishna Arcot <[email protected]>
1 parent d5232ab commit fee7d7e

File tree

4 files changed

+28
-27
lines changed

4 files changed

+28
-27
lines changed

Makefile

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,15 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
7777
fi
7878
fi
7979

80-
if [ -f "$(NON_UP_DIR)/series.patch" ]; then
81-
echo "Patch the series file"
82-
cat $(NON_UP_DIR)/series.patch
83-
pushd patch
84-
# clear any unstaged changes
85-
git stash -- series
86-
git apply $(NON_UP_DIR)/series.patch
87-
popd
88-
89-
if [ -d "$(NON_UP_DIR)/patches" ]; then
90-
echo "Copy the non upstream patches"
91-
cp $(NON_UP_DIR)/patches/*.patch patch/
92-
fi
80+
if [ -f "$(NON_UP_DIR)/external-changes.patch" ]; then
81+
cat $(NON_UP_DIR)/external-changes.patch
82+
git stash -- patch/
83+
git apply $(NON_UP_DIR)/external-changes.patch
84+
fi
85+
86+
if [ -d "$(NON_UP_DIR)/patches" ]; then
87+
echo "Copy the non upstream patches"
88+
cp $(NON_UP_DIR)/patches/*.patch patch/
9389
fi
9490

9591
# Obtaining the Debian kernel source

manage-config

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function process_inclusion_exclusion_files(){
7575

7676
# Process any exclusions in the kernel
7777
if [ -f ${exclusion_file} ]; then
78-
exclusion_opts=$(get_section_opts ${exclusion_file} "common" ${ARCH} ${PLATFORM})
78+
exclusion_opts=$(get_section_opts ${exclusion_file} "common" ${ARCH} ${PLATFORM} ${PLATFORM}-${ARCH})
7979
while read -r opt; do
8080
if [ ! -z "$opt" ] && [[ ! "$opt" =~ ^#.* ]]; then
8181
scripts/config --file ${CONFIG_FILE} -d $opt
@@ -85,7 +85,7 @@ function process_inclusion_exclusion_files(){
8585

8686
# Process any inclusions in the kernel
8787
if [ -f ${inclusion_file} ]; then
88-
inclusion_opts=$(get_section_opts ${inclusion_file} "common" ${ARCH} ${PLATFORM})
88+
inclusion_opts=$(get_section_opts ${inclusion_file} "common" ${ARCH} ${PLATFORM} ${PLATFORM}-${ARCH})
8989
while read -r opt; do
9090
if [ ! -z "$opt" ] && [[ ! "$opt" =~ ^#.* ]]; then
9191
n=${opt%=*}
@@ -133,7 +133,7 @@ function process_inclusion_exclusion_files(){
133133
fi
134134
fi
135135
done <<< ${inclusion_opts};
136-
if [ ! $ret = 2 ]; then
136+
if [ $ret = 0 ]; then
137137
echo "No error"
138138
fi
139139
fi
@@ -158,8 +158,8 @@ function process_inclusion_exclusion_files(){
158158
exclusion_file="../patch/kconfig-exclusions"
159159
inclusion_file="../patch/kconfig-inclusions"
160160
force_inclusion_file="../patch/kconfig-force-inclusions"
161-
ret_process_inc_ex=0
162-
ret_process_inc_ex=$(process_inclusion_exclusion_files > /dev/null; echo $?)
161+
process_inclusion_exclusion_files
162+
ret_process_inc_ex=$?
163163

164164
# Secure Boot support
165165
if [ $ret_process_inc_ex -eq 0 ]; then
@@ -179,7 +179,8 @@ if [ $ret_process_inc_ex -eq 0 ]; then
179179
# save the new pub key in kernel
180180
sed -i "s|^CONFIG_SYSTEM_TRUSTED_KEYS=.*|CONFIG_SYSTEM_TRUSTED_KEYS=\"$SECURE_UPGRADE_SIGNING_CERT\"|g" ${inclusion_file}
181181

182-
ret_process_inc_ex=$(process_inclusion_exclusion_files > /dev/null; echo $?)
182+
process_inclusion_exclusion_files
183+
ret_process_inc_ex=$?
183184
echo "Secure Boot kernel configuration done."
184185
else
185186
echo "no Secure Boot Kernel configuration required."

patch/kconfig-exclusions

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ CONFIG_CGROUP_NET_CLASSID
66
CONFIG_NET_CLS_CGROUP
77
CONFIG_NETFILTER_XT_MATCH_CGROUP
88
CONFIG_CGROUP_NET_PRIO
9+
###-> mellanox_common-start
10+
###-> mellanox_common-end
911

1012
[amd64]
1113
# Unset X86_PAT according to Broadcom's requirement
1214
CONFIG_X86_PAT
1315
CONFIG_MLXSW_PCI
16+
###-> mellanox_amd64-start
17+
###-> mellanox_amd64-end
1418

1519
[arm64]
1620
CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU
@@ -51,3 +55,5 @@ CONFIG_EFI
5155
CONFIG_LOCK_DOWN_KERNEL
5256
CONFIG_SECONDARY_TRUSTED_KEYRING
5357
CONFIG_SYSTEM_BLACKLIST_KEYRING
58+
59+
[mellanox-arm64]

patch/kconfig-inclusions

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
# Description: Add kconfig options that has to be included in the kernel
2-
# Note: Markers should start with "###->"
3-
# Header should end with .*-start eg: any_description-start
4-
# Footer must end with .*-end eg: any_description-end
5-
# Markers should not be nested
6-
71
[common]
82
CONFIG_LOG_BUF_SHIFT=20
3+
###-> mellanox_common-start
4+
###-> mellanox_common-end
95

106
[amd64]
117
# For Arista
@@ -37,7 +33,7 @@ CONFIG_SENSORS_MAX31790=m
3733
# For optoe
3834
CONFIG_EEPROM_OPTOE=m
3935

40-
###-> mellanox-start
36+
###-> mellanox_amd64-start
4137
CONFIG_OF=y
4238
CONFIG_THERMAL_OF=y
4339
CONFIG_CPU_THERMAL=y
@@ -138,7 +134,7 @@ CONFIG_I2C_I801=m
138134
CONFIG_PINCTRL=y
139135
CONFIG_PINCTRL_INTEL=y
140136
CONFIG_SPI_PXA2XX=m
141-
###-> mellanox-end
137+
###-> mellanox_amd64-end
142138

143139
# For Cisco 8000
144140
CONFIG_PHYLIB=m
@@ -230,3 +226,5 @@ CONFIG_I2C_MUX_GPIO=m
230226
[marvell-armhf]
231227
CONFIG_MTD_CMDLINE_PARTS=y
232228
CONFIG_MTD_OF_PARTS=y
229+
230+
[mellanox-arm64]

0 commit comments

Comments
 (0)