mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-26 07:59:30 -05:00
Ensure all used defconfigs are altered
This commit is contained in:
parent
83efa5fe7d
commit
7e093e0500
@ -646,7 +646,8 @@ getDefconfig() {
|
|||||||
elif ls arch/arm64/configs/lineage*defconfig 1> /dev/null 2>&1; then
|
elif ls arch/arm64/configs/lineage*defconfig 1> /dev/null 2>&1; then
|
||||||
local defconfigPath="arch/arm64/configs/lineage*defconfig";
|
local defconfigPath="arch/arm64/configs/lineage*defconfig";
|
||||||
else
|
else
|
||||||
local defconfigPath="arch/arm*/configs/*defconfig arch/arm*/configs/*/*defconfig";
|
#grep TARGET_KERNEL_CONFIG /mnt/dos/Build/*/device/ -Rih | sed 's|TARGET_KERNEL_CONFIG .= |arch/arm\*/configs/|' | grep -v lineage | sort -u
|
||||||
|
local defconfigPath="arch/arm*/configs/lineage*defconfig arch/arm*/configs/aura_defconfig arch/arm*/configs/beryllium_defconfig arch/arm*/configs/clark_defconfig arch/arm*/configs/enchilada_defconfig arch/arm*/configs/exynos8890-herolte_defconfig arch/arm*/configs/floral_defconfig arch/arm*/configs/griffin_defconfig arch/arm*/configs/grouper_defconfig arch/arm*/configs/m7_defconfig arch/arm*/configs/m8_defconfig arch/arm*/configs/msm8974-hdx_defconfig arch/arm*/configs/msm8974-hdx-perf_defconfig arch/arm*/configs/oneplus2_defconfig arch/arm*/configs/osprey_defconfig arch/arm*/configs/redbull_defconfig arch/arm*/configs/samsung_serrano_defconfig arch/arm*/configs/samsung_serrano_usa_defconfig arch/arm*/configs/shamu_defconfig arch/arm*/configs/sunfish_defconfig arch/arm*/configs/surnia_defconfig arch/arm*/configs/tuna_defconfig arch/arm*/configs/twrp_defconfig arch/arm*/configs/vendor/alioth_defconfig arch/arm*/configs/vendor/lineage_davinci_defconfig arch/arm*/configs/vendor/lito-perf_defconfig arch/arm*/configs/vendor/lmi_defconfig arch/arm*/configs/vendor/raphael_defconfig arch/arm*/configs/vendor/sm8150-perf_defconfig arch/arm*/configs/vendor/vayu_defconfig arch/arm*/configs/yellowstone_defconfig arch/arm*/configs/Z00T_defconfig arch/arm*/configs/z2_plus_defconfig arch/arm*/configs/zenfone3-perf_defconfig";
|
||||||
fi;
|
fi;
|
||||||
echo $defconfigPath;
|
echo $defconfigPath;
|
||||||
}
|
}
|
||||||
@ -770,9 +771,9 @@ hardenDefconfig() {
|
|||||||
do
|
do
|
||||||
sed -i 's/# '"CONFIG_$option"' is not set/'"CONFIG_$option"'=y/' $defconfigPath &>/dev/null || true;
|
sed -i 's/# '"CONFIG_$option"' is not set/'"CONFIG_$option"'=y/' $defconfigPath &>/dev/null || true;
|
||||||
#Some defconfigs are very minimal/not-autogenerated, so lets add the rest. Obviously most won't have any affect as they aren't supported.
|
#Some defconfigs are very minimal/not-autogenerated, so lets add the rest. Obviously most won't have any affect as they aren't supported.
|
||||||
if [[ "$defconfigPath" == *"lineage"* ]] && [[ "$1" != *"kernel/oneplus/msm8996"* ]]; then
|
if [[ "$1" != *"kernel/oneplus/msm8996"* ]]; then
|
||||||
if ! grep -q "CONFIG_$option=y" $defconfigPath; then
|
if ! grep -q "CONFIG_$option=y" $defconfigPath &>/dev/null; then
|
||||||
echo "CONFIG_$option=y" | tee -a $defconfigPath > /dev/null;
|
echo "CONFIG_$option=y" | tee -a $defconfigPath &>/dev/null || true;
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
done
|
done
|
||||||
@ -789,10 +790,8 @@ hardenDefconfig() {
|
|||||||
sed -i 's/'"CONFIG_$option"'=y/# '"CONFIG_$option"' is not set/' $defconfigPath &>/dev/null || true;
|
sed -i 's/'"CONFIG_$option"'=y/# '"CONFIG_$option"' is not set/' $defconfigPath &>/dev/null || true;
|
||||||
#sed -i 's/'"CONFIG_$option"'=y/'"CONFIG_$option"'=n/' $defconfigPath &>/dev/null || true;
|
#sed -i 's/'"CONFIG_$option"'=y/'"CONFIG_$option"'=n/' $defconfigPath &>/dev/null || true;
|
||||||
#Some defconfigs are very minimal/not-autogenerated, so lets add the rest. Obviously most won't have any affect as they aren't supported.
|
#Some defconfigs are very minimal/not-autogenerated, so lets add the rest. Obviously most won't have any affect as they aren't supported.
|
||||||
if [[ "$defconfigPath" == *"lineage"* ]]; then
|
if ! grep -q "CONFIG_$option=n" $defconfigPath &>/dev/null; then
|
||||||
if ! grep -q "CONFIG_$option=n" $defconfigPath; then
|
echo "CONFIG_$option=n" | tee -a $defconfigPath &>/dev/null || true;
|
||||||
echo "CONFIG_$option=n" | tee -a $defconfigPath > /dev/null;
|
|
||||||
fi;
|
|
||||||
fi;
|
fi;
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -92,9 +92,8 @@ patchWorkspace() {
|
|||||||
umask 0022;
|
umask 0022;
|
||||||
if [ "$DOS_MALWARE_SCAN_ENABLED" = true ]; then scanForMalware false "$DOS_PREBUILT_APPS $DOS_BUILD_BASE/build $DOS_BUILD_BASE/device $DOS_BUILD_BASE/vendor/lineage"; fi;
|
if [ "$DOS_MALWARE_SCAN_ENABLED" = true ]; then scanForMalware false "$DOS_PREBUILT_APPS $DOS_BUILD_BASE/build $DOS_BUILD_BASE/device $DOS_BUILD_BASE/vendor/lineage"; fi;
|
||||||
|
|
||||||
source build/envsetup.sh;
|
#source build/envsetup.sh;
|
||||||
#repopick -it ten-firewall;
|
#repopick -it ten-firewall;
|
||||||
repopick -it Q_asb_2021-09;
|
|
||||||
|
|
||||||
source "$DOS_SCRIPTS/Patch.sh";
|
source "$DOS_SCRIPTS/Patch.sh";
|
||||||
source "$DOS_SCRIPTS_COMMON/Copy_Keys.sh";
|
source "$DOS_SCRIPTS_COMMON/Copy_Keys.sh";
|
||||||
|
@ -68,7 +68,6 @@ sed -i '75i$(my_res_package): PRIVATE_AAPT_FLAGS += --auto-add-overlay' core/aap
|
|||||||
sed -i 's/messaging/Silence/' target/product/aosp_base_telephony.mk target/product/gsi_common.mk; #Replace the Messaging app with Silence
|
sed -i 's/messaging/Silence/' target/product/aosp_base_telephony.mk target/product/gsi_common.mk; #Replace the Messaging app with Silence
|
||||||
awk -i inplace '!/updatable_apex.mk/' target/product/mainline_system.mk; #Disable APEX
|
awk -i inplace '!/updatable_apex.mk/' target/product/mainline_system.mk; #Disable APEX
|
||||||
sed -i 's/PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := 23/PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := 28/' core/version_defaults.mk; #Set the minimum supported target SDK to Pie (GrapheneOS)
|
sed -i 's/PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := 23/PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := 28/' core/version_defaults.mk; #Set the minimum supported target SDK to Pie (GrapheneOS)
|
||||||
sed -i 's/2021-08-05/2021-09-05/' core/version_defaults.mk; #Bump Security String #Q_asb_2021-09 #XXX
|
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
if enterAndClear "build/soong"; then
|
if enterAndClear "build/soong"; then
|
||||||
|
Loading…
Reference in New Issue
Block a user