blob: 0ff4c42f10c47fd4493fec0536e4ec97c7cc96ec [file] [log] [blame]
Thiyagarajan Subramani3e8bfd92021-04-26 15:07:14 +05301#!/bin/bash
2
3#Copyright 2018-present Open Networking Foundation
4#
5#Licensed under the Apache License, Version 2.0 (the "License");
6#you may not use this file except in compliance with the License.
7#You may obtain a copy of the License at
8#
9#http://www.apache.org/licenses/LICENSE-2.0
10#
11#Unless required by applicable law or agreed to in writing, software
12#distributed under the License is distributed on an "AS IS" BASIS,
13#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14#See the License for the specific language governing permissions and
15#limitations under the License.
16
17TOPDIR=`pwd`
18KERNEL_CONFIG_FILE=${TOPDIR}/packages/base/any/kernels/4.19-lts/configs/x86_64-all/x86_64-all.config
19
20ADDITIONAL_OPTIONS=(
21CONFIG_CC_IS_GCC=y
22CONFIG_GCC_VERSION=80300
23CONFIG_CLANG_VERSION=0
24CONFIG_CC_HAS_ASM_GOTO=y
25CONFIG_IRQ_WORK=y
26CONFIG_BUILDTIME_EXTABLE_SORT=y
27CONFIG_THREAD_INFO_IN_TASK=y
28"# CONFIG_ACPI_IPMI is not set"
29CONFIG_HOTPLUG_PCI_ACPI_IBM=y
30CONFIG_BCM_NET_PHYLIB=y
31CONFIG_USB_NET_AX8817X=y
32CONFIG_USB_NET_AX88179_178A=y
33CONFIG_USB_NET_CDCETHER=y
34CONFIG_USB_NET_CDC_EEM=y
35CONFIG_USB_NET_CDC_NCM=y
36"# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set"
37"# CONFIG_USB_NET_CDC_MBIM is not set"
38"# CONFIG_USB_NET_DM9601 is not set"
39"# CONFIG_USB_NET_SR9700 is not set"
40"# CONFIG_USB_NET_SR9800 is not set"
41"# CONFIG_USB_NET_SMSC75XX is not set"
42"# CONFIG_USB_NET_SMSC95XX is not set"
43"# CONFIG_USB_NET_GL620A is not set"
44CONFIG_USB_NET_NET1080=y
45"# CONFIG_USB_NET_PLUSB is not set"
46"# CONFIG_USB_NET_MCS7830 is not set"
47"# CONFIG_USB_NET_RNDIS_HOST is not set"
48CONFIG_USB_NET_CDC_SUBSET_ENABLE=y
49CONFIG_USB_NET_CDC_SUBSET=y
50"# CONFIG_USB_ALI_M5632 is not set"
51"# CONFIG_USB_AN2720 is not set"
52CONFIG_USB_BELKIN=y
53CONFIG_USB_ARMLINUX=y
54"# CONFIG_USB_EPSON2888 is not set"
55"# CONFIG_USB_KC2190 is not set"
56CONFIG_USB_NET_ZAURUS=y
57"# CONFIG_USB_NET_CX82310_ETH is not set"
58"# CONFIG_USB_NET_KALMIA is not set"
59"# CONFIG_USB_NET_QMI_WWAN is not set"
60"# CONFIG_USB_NET_INT51X1 is not set"
61"# CONFIG_USB_SIERRA_NET is not set"
62"# CONFIG_USB_VL600 is not set"
63"# CONFIG_USB_NET_CH9200 is not set"
64CONFIG_IPMI_DMI_DECODE=y
65CONFIG_IPMI_PANIC_EVENT=y
66"# CONFIG_IPMI_PANIC_STRING is not set"
67CONFIG_IPMI_DEVICE_INTERFACE=y
68CONFIG_IPMI_SI=y
69"# CONFIG_IPMI_SSIF is not set"
70"# CONFIG_IPMI_WATCHDOG is not set"
71CONFIG_IPMI_POWEROFF=y
72CONFIG_HW_RANDOM_TPM=y
73CONFIG_TCG_TIS_CORE=y
74CONFIG_TCG_TIS=y
75CONFIG_TCG_TIS_SPI=y
76CONFIG_TCG_TIS_I2C_ATMEL=y
77CONFIG_TCG_TIS_I2C_INFINEON=y
78CONFIG_TCG_TIS_I2C_NUVOTON=y
79CONFIG_TCG_NSC=y
80CONFIG_TCG_ATMEL=y
81CONFIG_TCG_INFINEON=y
82CONFIG_TCG_CRB=y
83CONFIG_TCG_VTPM_PROXY=y
84CONFIG_TCG_TIS_ST33ZP24=y
85CONFIG_TCG_TIS_ST33ZP24_I2C=y
86CONFIG_TCG_TIS_ST33ZP24_SPI=y
87CONFIG_I2C_MUX_PCA954X_BUSES_CREATE_FORCE=y
88"# CONFIG_SENSORS_IBMAEM is not set"
89"# CONFIG_SENSORS_IBMPEX is not set"
90"# CONFIG_TRUSTED_KEYS is not set"
91CONFIG_ENABLE_DEFAULT_TRACERS=y
92"# CONFIG_FTRACE_STARTUP_TEST is not set"
93)
94
95OPTIONS_TO_CHANGE=(
96CONFIG_HOTPLUG_PCI_PCIE=y
97CONFIG_HOTPLUG_PCI_ACPI=y
98CONFIG_HOTPLUG_PCI_SHPC=y
99CONFIG_EEPROM_AT24=y
100CONFIG_BROADCOM_PHY=y
101CONFIG_USB_USBNET=y
102CONFIG_DEVKMEM=y
103CONFIG_IPMI_HANDLER=y
104CONFIG_TCG_TPM=y
105CONFIG_I2C_ISMT=y
106CONFIG_GPIO_ICH=y
107CONFIG_X86_PKG_TEMP_THERMAL=y
108CONFIG_INTEL_PCH_THERMAL=y
109CONFIG_LPC_ICH=y
110CONFIG_SECURITYFS=y
111)
112
113OPTIONS_TO_COMMENT=(
114CONFIG_EEPROM_LEGACY
115CONFIG_I2C_MUX_REG
116CONFIG_I2C_MUX_MLXCPLD
117CONFIG_GENERIC_TRACER
118CONFIG_BLK_DEV_IO_TRACE
119)
120
121add_additional_options() {
122 for i in "${ADDITIONAL_OPTIONS[@]}"; do echo "$i" >> ${KERNEL_CONFIG_FILE}; done
123}
124
125modify_options() {
126 for i in "${OPTIONS_TO_CHANGE[@]}"; do
127 option=$(echo $i | cut -d= -f1);
128 sed -i "s/.*$option.*/$i/" ${KERNEL_CONFIG_FILE};
129 done
130}
131
132comment_options() {
133 for i in "${OPTIONS_TO_COMMENT[@]}"; do
134 sed -i "s/.*$i.*/# $i is not set/" ${KERNEL_CONFIG_FILE};
135 done
136}
137
138modify_options
139comment_options
140add_additional_options