Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac63c97d authored by Raghavendra Rao Ananta's avatar Raghavendra Rao Ananta
Browse files

scripts: gki: Fix setting of a CONFIG if it's unset in base defconfig



CONFIGs that are unset in base defconfig (# CONFIG_X is not set),
but gets enabled in fragments through menuconfig, the diff is shown
as: -# CONFIG_X is not set. However, for the fragments to work
correctly, it must be set to 'y'. Hence, explicitly set them in the
config fragments.

Change-Id: Ic1c1578fb8109c09f3f39b9d254474d2c341a6d6
Signed-off-by: default avatarRaghavendra Rao Ananta <rananta@codeaurora.org>
parent 9b450de0
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -95,6 +95,16 @@ for config_del in $configs_to_remove; do
	sed -i "/$config_del/d" ${FRAG_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 defconfig_base 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" ${FRAG_CONFIG}; then
		echo $config_to_set=y >> ${FRAG_CONFIG}
	fi
done

# CONFIGs that are set in base defconfig (or lower fragment), but wanted it to be disabled in FRAG_CONFIG
diff -u .config_base .config | grep "^+# CONFIG_" | sed 's/^.//' >> ${FRAG_CONFIG}