build.config.msm.common: remove menuconfig

menuconfig has been replaced by upstream config.sh and is no longer
needed.

Change-Id: I6aa7a61241e38d8d47a222511d8a17b7e96e6c31
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
This commit is contained in:
Elliot Berman 2021-01-31 21:40:18 -08:00
parent 1e4a663cb5
commit 271a3901b9

View File

@ -142,61 +142,6 @@ function apply_defconfig_fragment() {
DEFCONFIG="${2:-${DEFCONFIG}}"
}
function menuconfig() {
set +x
local orig_defconfig=$(mktemp)
local orig_config=$(mktemp)
cp ${OUT_DIR}/.config ${orig_config}
(cd ${KERNEL_DIR} && make "${TOOL_ARGS[@]}" O=${OUT_DIR} ${MAKE_ARGS} savedefconfig)
mv ${OUT_DIR}/defconfig ${orig_defconfig}
(cd ${KERNEL_DIR} && make "${TOOL_ARGS[@]}" O=${OUT_DIR} ${MAKE_ARGS} ${1:-menuconfig})
(cd ${KERNEL_DIR} && make "${TOOL_ARGS[@]}" O=${OUT_DIR} ${MAKE_ARGS} savedefconfig)
mv ${OUT_DIR}/defconfig ${KERNEL_DIR}/arch/${ARCH}/configs/${DEFCONFIG}
if [ -z "${FRAGMENT_CONFIG}" ]; then
rm "${orig_config}" "${orig_defconfig}"
exit
fi
local new_defconfig="${KERNEL_DIR}/arch/${ARCH}/configs/${DEFCONFIG}"
local new_config="${OUT_DIR}/.config"
# CONFIGs to be added
# 'defconfig' file should have been generated.
# Diff this with the 'defconfig_base' from the previous step and extract only the lines that were added
# Finally, remove the "+" from the beginning of the lines and append it to the FRAGMENT
diff -u ${orig_defconfig} ${new_defconfig} | grep "^+CONFIG_" | sed 's/^.//' >> ${FRAGMENT_CONFIG}
# CONFIGs to be removed
configs_to_remove=`diff -u ${orig_defconfig} ${new_defconfig} | grep "^-CONFIG_" | sed 's/^.//'`
for config_del in $configs_to_remove; do
sed -i "/$config_del/d" ${FRAGMENT_CONFIG}
done
# CONFIGs that are unset in base defconfig (# CONFIG_X is not set), but enabled in fragments,
# the diff is shown as: -# CONFIG_X is not set. Hence, explicitly set them in the config fragments.
configs_to_set=`diff -u ${orig_defconfig} ${new_defconfig} | grep "^-# CONFIG_" | awk '{print $2}'`
for config_to_set in $configs_to_set; do
# The CONFIG could be set as 'm' in the previous steps. Ignore setting them to 'y'
if ! grep -q "$config_to_set" ${FRAGMENT_CONFIG}; then
echo $config_to_set=y >> ${FRAGMENT_CONFIG}
fi
done
# CONFIGs that are set in base defconfig (or lower fragment), but wanted it to be disabled in FRAG_CONFIG
diff -u ${orig_config} ${new_config} | grep "^+# CONFIG_" | sed 's/^.//' >> ${FRAGMENT_CONFIG}
echo
echo "Updated ${FRAGMENT_CONFIG}"
echo
rm "${orig_config}" "${orig_defconfig}"
exit
}
export -f menuconfig
################################################################################
## DLKMs
if [ -e "${KERNEL_DIR}/modules.list.${CONFIG_TARGET}" ]; then