Thiyagarajan Subramani | 3e8bfd9 | 2021-04-26 15:07:14 +0530 | [diff] [blame] | 1 | #!/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 | |
| 17 | TOPDIR=`pwd` |
| 18 | KERNEL_CONFIG_FILE=${TOPDIR}/packages/base/any/kernels/4.19-lts/configs/x86_64-all/x86_64-all.config |
| 19 | |
| 20 | ADDITIONAL_OPTIONS=( |
| 21 | CONFIG_CC_IS_GCC=y |
| 22 | CONFIG_GCC_VERSION=80300 |
| 23 | CONFIG_CLANG_VERSION=0 |
| 24 | CONFIG_CC_HAS_ASM_GOTO=y |
| 25 | CONFIG_IRQ_WORK=y |
| 26 | CONFIG_BUILDTIME_EXTABLE_SORT=y |
| 27 | CONFIG_THREAD_INFO_IN_TASK=y |
| 28 | "# CONFIG_ACPI_IPMI is not set" |
| 29 | CONFIG_HOTPLUG_PCI_ACPI_IBM=y |
| 30 | CONFIG_BCM_NET_PHYLIB=y |
| 31 | CONFIG_USB_NET_AX8817X=y |
| 32 | CONFIG_USB_NET_AX88179_178A=y |
| 33 | CONFIG_USB_NET_CDCETHER=y |
| 34 | CONFIG_USB_NET_CDC_EEM=y |
| 35 | CONFIG_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" |
| 44 | CONFIG_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" |
| 48 | CONFIG_USB_NET_CDC_SUBSET_ENABLE=y |
| 49 | CONFIG_USB_NET_CDC_SUBSET=y |
| 50 | "# CONFIG_USB_ALI_M5632 is not set" |
| 51 | "# CONFIG_USB_AN2720 is not set" |
| 52 | CONFIG_USB_BELKIN=y |
| 53 | CONFIG_USB_ARMLINUX=y |
| 54 | "# CONFIG_USB_EPSON2888 is not set" |
| 55 | "# CONFIG_USB_KC2190 is not set" |
| 56 | CONFIG_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" |
| 64 | CONFIG_IPMI_DMI_DECODE=y |
| 65 | CONFIG_IPMI_PANIC_EVENT=y |
| 66 | "# CONFIG_IPMI_PANIC_STRING is not set" |
| 67 | CONFIG_IPMI_DEVICE_INTERFACE=y |
| 68 | CONFIG_IPMI_SI=y |
| 69 | "# CONFIG_IPMI_SSIF is not set" |
| 70 | "# CONFIG_IPMI_WATCHDOG is not set" |
| 71 | CONFIG_IPMI_POWEROFF=y |
| 72 | CONFIG_HW_RANDOM_TPM=y |
| 73 | CONFIG_TCG_TIS_CORE=y |
| 74 | CONFIG_TCG_TIS=y |
| 75 | CONFIG_TCG_TIS_SPI=y |
| 76 | CONFIG_TCG_TIS_I2C_ATMEL=y |
| 77 | CONFIG_TCG_TIS_I2C_INFINEON=y |
| 78 | CONFIG_TCG_TIS_I2C_NUVOTON=y |
| 79 | CONFIG_TCG_NSC=y |
| 80 | CONFIG_TCG_ATMEL=y |
| 81 | CONFIG_TCG_INFINEON=y |
| 82 | CONFIG_TCG_CRB=y |
| 83 | CONFIG_TCG_VTPM_PROXY=y |
| 84 | CONFIG_TCG_TIS_ST33ZP24=y |
| 85 | CONFIG_TCG_TIS_ST33ZP24_I2C=y |
| 86 | CONFIG_TCG_TIS_ST33ZP24_SPI=y |
| 87 | CONFIG_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" |
| 91 | CONFIG_ENABLE_DEFAULT_TRACERS=y |
| 92 | "# CONFIG_FTRACE_STARTUP_TEST is not set" |
| 93 | ) |
| 94 | |
| 95 | OPTIONS_TO_CHANGE=( |
| 96 | CONFIG_HOTPLUG_PCI_PCIE=y |
| 97 | CONFIG_HOTPLUG_PCI_ACPI=y |
| 98 | CONFIG_HOTPLUG_PCI_SHPC=y |
| 99 | CONFIG_EEPROM_AT24=y |
| 100 | CONFIG_BROADCOM_PHY=y |
| 101 | CONFIG_USB_USBNET=y |
| 102 | CONFIG_DEVKMEM=y |
| 103 | CONFIG_IPMI_HANDLER=y |
| 104 | CONFIG_TCG_TPM=y |
| 105 | CONFIG_I2C_ISMT=y |
| 106 | CONFIG_GPIO_ICH=y |
| 107 | CONFIG_X86_PKG_TEMP_THERMAL=y |
| 108 | CONFIG_INTEL_PCH_THERMAL=y |
| 109 | CONFIG_LPC_ICH=y |
| 110 | CONFIG_SECURITYFS=y |
| 111 | ) |
| 112 | |
| 113 | OPTIONS_TO_COMMENT=( |
| 114 | CONFIG_EEPROM_LEGACY |
| 115 | CONFIG_I2C_MUX_REG |
| 116 | CONFIG_I2C_MUX_MLXCPLD |
| 117 | CONFIG_GENERIC_TRACER |
| 118 | CONFIG_BLK_DEV_IO_TRACE |
| 119 | ) |
| 120 | |
| 121 | add_additional_options() { |
| 122 | for i in "${ADDITIONAL_OPTIONS[@]}"; do echo "$i" >> ${KERNEL_CONFIG_FILE}; done |
| 123 | } |
| 124 | |
| 125 | modify_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 | |
| 132 | comment_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 | |
| 138 | modify_options |
| 139 | comment_options |
| 140 | add_additional_options |