mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-02-02 18:34:46 -05:00
Some actual error handling 1/n
Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
parent
097019193e
commit
6ba784ac33
@ -147,11 +147,15 @@ enableDexPreOptFull() {
|
||||
export -f enableDexPreOptFull;
|
||||
|
||||
enableLowRam() {
|
||||
cd "$DOS_BUILD_BASE$1";
|
||||
if [ -f lineage.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage.mk; fi;
|
||||
if [ -f BoardConfig.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfig.mk; fi;
|
||||
if [ -f BoardConfigCommon.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfigCommon.mk; fi;
|
||||
echo "Enabled lowram for $1";
|
||||
cd "$DOS_BUILD_BASE";
|
||||
if [ -d "$DOS_BUILD_BASE$1" ]; then
|
||||
cd "$DOS_BUILD_BASE$1";
|
||||
if [ -f lineage.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage.mk; fi;
|
||||
if [ -f BoardConfig.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfig.mk; fi;
|
||||
if [ -f BoardConfigCommon.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfigCommon.mk; fi;
|
||||
echo "Enabled lowram for $1";
|
||||
cd "$DOS_BUILD_BASE";
|
||||
else
|
||||
echo "Not enabling lowram for $1, not available";
|
||||
fi;
|
||||
}
|
||||
export -f enableLowRam;
|
||||
|
@ -574,9 +574,9 @@ if [ "$DOS_STRONG_ENCRYPTION_ENABLED" = true ]; then find "device" -maxdepth 2 -
|
||||
find "kernel" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 4 -I {} bash -c 'hardenDefconfig "{}"';
|
||||
find "kernel" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {} bash -c 'updateRegDb "{}"';
|
||||
cd "$DOS_BUILD_BASE";
|
||||
deblobAudio || true;
|
||||
removeBuildFingerprints || true;
|
||||
changeDefaultDNS || true; #Change the default DNS servers
|
||||
deblobAudio;
|
||||
removeBuildFingerprints;
|
||||
changeDefaultDNS; #Change the default DNS servers
|
||||
|
||||
#Tweaks for <2GB RAM devices
|
||||
enableLowRam "device/asus/grouper";
|
||||
@ -610,14 +610,14 @@ enableLowRam "device/samsung/tuna";
|
||||
|
||||
#Fixes
|
||||
#Fix broken options enabled by hardenDefconfig()
|
||||
sed -i "s/# CONFIG_KPROBES is not set/CONFIG_KPROBES=y/" kernel/amazon/hdx-common/arch/arm/configs/*defconfig || true; #Breaks on compile
|
||||
sed -i "s/CONFIG_X509_CERTIFICATE_PARSER=y/# CONFIG_X509_CERTIFICATE_PARSER is not set/" kernel/amazon/hdx-common/arch/arm/configs/*defconfig || true; #Breaks on compile
|
||||
sed -i "s/CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y/# CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE is not set/" kernel/amazon/hdx-common/arch/arm/configs/*defconfig || true; #Breaks on compile
|
||||
sed -i "s/CONFIG_SYSTEM_TRUSTED_KEYRING=y/# CONFIG_SYSTEM_TRUSTED_KEYRING is not set/" kernel/amazon/hdx-common/arch/arm/configs/*defconfig || true; #Breaks on compile
|
||||
sed -i "s/CONFIG_ASYMMETRIC_KEY_TYPE=y/# CONFIG_ASYMMETRIC_KEY_TYPE is not set/" kernel/amazon/hdx-common/arch/arm/configs/*defconfig || true; #Breaks on compile
|
||||
sed -i "s/CONFIG_DEBUG_RODATA=y/# CONFIG_DEBUG_RODATA is not set/" kernel/asus/grouper/arch/arm/configs/grouper_defconfig || true; #Breaks on compile
|
||||
awk -i inplace '!/STACKPROTECTOR/' kernel/lge/msm8992/arch/arm64/configs/lineageos_*_defconfig || true; #Breaks on compile
|
||||
sed -i "s/CONFIG_ARM_SMMU=y/# CONFIG_ARM_SMMU is not set/" kernel/motorola/msm8992/arch/arm64/configs/*defconfig || true; #Breaks on compile
|
||||
[[ -d kernel/amazon/hdx-common ]] && sed -i "s/# CONFIG_KPROBES is not set/CONFIG_KPROBES=y/" kernel/amazon/hdx-common/arch/arm/configs/*defconfig; #Breaks on compile
|
||||
[[ -d kernel/amazon/hdx-common ]] && sed -i "s/CONFIG_X509_CERTIFICATE_PARSER=y/# CONFIG_X509_CERTIFICATE_PARSER is not set/" kernel/amazon/hdx-common/arch/arm/configs/*defconfig; #Breaks on compile
|
||||
[[ -d kernel/amazon/hdx-common ]] && sed -i "s/CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y/# CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE is not set/" kernel/amazon/hdx-common/arch/arm/configs/*defconfig; #Breaks on compile
|
||||
[[ -d kernel/amazon/hdx-common ]] && sed -i "s/CONFIG_SYSTEM_TRUSTED_KEYRING=y/# CONFIG_SYSTEM_TRUSTED_KEYRING is not set/" kernel/amazon/hdx-common/arch/arm/configs/*defconfig; #Breaks on compile
|
||||
[[ -d kernel/amazon/hdx-common ]] && sed -i "s/CONFIG_ASYMMETRIC_KEY_TYPE=y/# CONFIG_ASYMMETRIC_KEY_TYPE is not set/" kernel/amazon/hdx-common/arch/arm/configs/*defconfig; #Breaks on compile
|
||||
[[ -d kernel/asus/grouper ]] && sed -i "s/CONFIG_DEBUG_RODATA=y/# CONFIG_DEBUG_RODATA is not set/" kernel/asus/grouper/arch/arm/configs/grouper_defconfig; #Breaks on compile
|
||||
[[ -d kernel/lge/msm8992 ]] && awk -i inplace '!/STACKPROTECTOR/' kernel/lge/msm8992/arch/arm64/configs/lineageos_*_defconfig; #Breaks on compile
|
||||
[[ -d kernel/motorola/msm8992 ]] && sed -i "s/CONFIG_ARM_SMMU=y/# CONFIG_ARM_SMMU is not set/" kernel/motorola/msm8992/arch/arm64/configs/*defconfig; #Breaks on compile
|
||||
#tuna fixes
|
||||
awk -i inplace '!/nfc_enhanced.mk/' device/samsung/toro*/lineage.mk || true;
|
||||
awk -i inplace '!/TARGET_RECOVERY_UPDATER_LIBS/' device/samsung/toro*/BoardConfig.mk || true;
|
||||
|
@ -116,11 +116,15 @@ enableDexPreOpt() {
|
||||
export -f enableDexPreOpt;
|
||||
|
||||
enableLowRam() {
|
||||
cd "$DOS_BUILD_BASE$1";
|
||||
if [ -f lineage.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage.mk; fi;
|
||||
if [ -f BoardConfig.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfig.mk; fi;
|
||||
if [ -f BoardConfigCommon.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfigCommon.mk; fi;
|
||||
echo "Enabled lowram for $1";
|
||||
cd "$DOS_BUILD_BASE";
|
||||
if [ -d "$DOS_BUILD_BASE$1" ]; then
|
||||
cd "$DOS_BUILD_BASE$1";
|
||||
if [ -f lineage.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage.mk; fi;
|
||||
if [ -f BoardConfig.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfig.mk; fi;
|
||||
if [ -f BoardConfigCommon.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfigCommon.mk; fi;
|
||||
echo "Enabled lowram for $1";
|
||||
cd "$DOS_BUILD_BASE";
|
||||
else
|
||||
echo "Not enabling lowram for $1, not available";
|
||||
fi;
|
||||
}
|
||||
export -f enableLowRam;
|
||||
|
@ -483,9 +483,9 @@ if [ "$DOS_STRONG_ENCRYPTION_ENABLED" = true ]; then find "device" -maxdepth 2 -
|
||||
find "kernel" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 4 -I {} bash -c 'hardenDefconfig "{}"';
|
||||
find "kernel" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {} bash -c 'updateRegDb "{}"';
|
||||
cd "$DOS_BUILD_BASE";
|
||||
deblobAudio || true;
|
||||
removeBuildFingerprints || true;
|
||||
changeDefaultDNS || true; #Change the default DNS servers
|
||||
deblobAudio;
|
||||
removeBuildFingerprints;
|
||||
changeDefaultDNS; #Change the default DNS servers
|
||||
|
||||
#Tweaks for <2GB RAM devices
|
||||
enableLowRam "device/asus/fugu";
|
||||
@ -498,9 +498,9 @@ enableLowRam "device/asus/fugu";
|
||||
#enableLowRam "device/lge/hammerhead";
|
||||
|
||||
#Fix broken options enabled by hardenDefconfig()
|
||||
sed -i "s/CONFIG_DEBUG_RODATA=y/# CONFIG_DEBUG_RODATA is not set/" kernel/google/msm/arch/arm/configs/lineageos_*_defconfig || true; #Breaks on compile
|
||||
sed -i "s/CONFIG_STRICT_MEMORY_RWX=y/# CONFIG_STRICT_MEMORY_RWX is not set/" kernel/lge/msm8996/arch/arm64/configs/lineageos_*_defconfig || true; #Breaks on compile
|
||||
sed -i "s/CONFIG_STRICT_MEMORY_RWX=y/# CONFIG_STRICT_MEMORY_RWX is not set/" kernel/zte/msm8996/arch/arm64/configs/lineageos_*_defconfig || true; #Breaks on compile
|
||||
[[ -d kernel/google/msm ]] && sed -i "s/CONFIG_DEBUG_RODATA=y/# CONFIG_DEBUG_RODATA is not set/" kernel/google/msm/arch/arm/configs/lineageos_*_defconfig; #Breaks on compile
|
||||
[[ -d kernel/lge/msm8996 ]] && sed -i "s/CONFIG_STRICT_MEMORY_RWX=y/# CONFIG_STRICT_MEMORY_RWX is not set/" kernel/lge/msm8996/arch/arm64/configs/lineageos_*_defconfig; #Breaks on compile
|
||||
[[ -d kernel/zte/msm8996 ]] && sed -i "s/CONFIG_STRICT_MEMORY_RWX=y/# CONFIG_STRICT_MEMORY_RWX is not set/" kernel/zte/msm8996/arch/arm64/configs/lineageos_*_defconfig; #Breaks on compile
|
||||
|
||||
sed -i 's/^YYLTYPE yylloc;/extern YYLTYPE yylloc;/' kernel/*/*/scripts/dtc/dtc-lexer.l* || true; #Fix builds with GCC 10
|
||||
rm -v kernel/*/*/drivers/staging/greybus/tools/Android.mk || true;
|
||||
|
@ -120,11 +120,15 @@ enableDexPreOpt() {
|
||||
export -f enableDexPreOpt;
|
||||
|
||||
enableLowRam() {
|
||||
cd "$DOS_BUILD_BASE$1";
|
||||
if [ -f lineage_$2.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage_$2.mk; fi;
|
||||
if [ -f BoardConfig.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfig.mk; fi;
|
||||
if [ -f BoardConfigCommon.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfigCommon.mk; fi;
|
||||
echo "Enabled lowram for $1";
|
||||
cd "$DOS_BUILD_BASE";
|
||||
if [ -d "$DOS_BUILD_BASE$1" ]; then
|
||||
cd "$DOS_BUILD_BASE$1";
|
||||
if [ -f lineage_$2.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage_$2.mk; fi;
|
||||
if [ -f BoardConfig.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfig.mk; fi;
|
||||
if [ -f BoardConfigCommon.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfigCommon.mk; fi;
|
||||
echo "Enabled lowram for $1";
|
||||
cd "$DOS_BUILD_BASE";
|
||||
else
|
||||
echo "Not enabling lowram for $1, not available";
|
||||
fi;
|
||||
}
|
||||
export -f enableLowRam;
|
||||
|
@ -408,9 +408,9 @@ find "kernel" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 4 -I {}
|
||||
find "kernel" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {} bash -c 'updateRegDb "{}"';
|
||||
if [ "$DOS_GRAPHENE_EXEC" = true ]; then find "device" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {} bash -c 'disableEnforceRRO "{}"'; fi;
|
||||
cd "$DOS_BUILD_BASE";
|
||||
deblobAudio || true;
|
||||
removeBuildFingerprints || true;
|
||||
changeDefaultDNS || true; #Change the default DNS servers
|
||||
deblobAudio;
|
||||
removeBuildFingerprints;
|
||||
changeDefaultDNS; #Change the default DNS servers
|
||||
fixupCarrierConfigs || true; #Remove silly carrier restrictions
|
||||
cd "$DOS_BUILD_BASE";
|
||||
|
||||
@ -421,8 +421,8 @@ cd "$DOS_BUILD_BASE";
|
||||
#enableLowRam "device/samsung/kccat6" "kccat6";
|
||||
|
||||
#Fix broken options enabled by hardenDefconfig()
|
||||
sed -i "s/CONFIG_DEBUG_RODATA=y/# CONFIG_DEBUG_RODATA is not set/" kernel/google/yellowstone/arch/arm*/configs/*_defconfig || true; #Breaks on compile
|
||||
sed -i "s/CONFIG_STRICT_MEMORY_RWX=y/# CONFIG_STRICT_MEMORY_RWX is not set/" kernel/xiaomi/msm8937/arch/arm64/configs/*_defconfig || true; #Breaks on compile
|
||||
[[ -d kernel/google/yellowstone ]] && sed -i "s/CONFIG_DEBUG_RODATA=y/# CONFIG_DEBUG_RODATA is not set/" kernel/google/yellowstone/arch/arm*/configs/*_defconfig; #Breaks on compile
|
||||
[[ -d kernel/xiaomi/msm8937 ]] && sed -i "s/CONFIG_STRICT_MEMORY_RWX=y/# CONFIG_STRICT_MEMORY_RWX is not set/" kernel/xiaomi/msm8937/arch/arm64/configs/*_defconfig; #Breaks on compile
|
||||
|
||||
sed -i 's/^YYLTYPE yylloc;/extern YYLTYPE yylloc;/' kernel/*/*/scripts/dtc/dtc-lexer.l* || true; #Fix builds with GCC 10
|
||||
rm -v kernel/*/*/drivers/staging/greybus/tools/Android.mk || true;
|
||||
|
@ -114,11 +114,15 @@ enableDexPreOpt() {
|
||||
export -f enableDexPreOpt;
|
||||
|
||||
enableLowRam() {
|
||||
cd "$DOS_BUILD_BASE$1";
|
||||
if [ -f lineage_$2.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage_$2.mk; fi;
|
||||
if [ -f BoardConfig.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfig.mk; fi;
|
||||
if [ -f BoardConfigCommon.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfigCommon.mk; fi;
|
||||
echo "Enabled lowram for $1";
|
||||
cd "$DOS_BUILD_BASE";
|
||||
if [ -d "$DOS_BUILD_BASE$1" ]; then
|
||||
cd "$DOS_BUILD_BASE$1";
|
||||
if [ -f lineage_$2.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage_$2.mk; fi;
|
||||
if [ -f BoardConfig.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfig.mk; fi;
|
||||
if [ -f BoardConfigCommon.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfigCommon.mk; fi;
|
||||
echo "Enabled lowram for $1";
|
||||
cd "$DOS_BUILD_BASE";
|
||||
else
|
||||
echo "Not enabling lowram for $1, not available";
|
||||
fi;
|
||||
}
|
||||
export -f enableLowRam;
|
||||
|
@ -481,10 +481,10 @@ find "kernel" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {}
|
||||
find "device" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {} bash -c 'disableAPEX "{}"';
|
||||
if [ "$DOS_GRAPHENE_EXEC" = true ]; then find "device" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {} bash -c 'disableEnforceRRO "{}"'; fi;
|
||||
cd "$DOS_BUILD_BASE";
|
||||
deblobAudio || true;
|
||||
removeBuildFingerprints || true;
|
||||
deblobAudio;
|
||||
removeBuildFingerprints;
|
||||
enableAutoVarInit || true;
|
||||
changeDefaultDNS || true; #Change the default DNS servers
|
||||
changeDefaultDNS; #Change the default DNS servers
|
||||
fixupCarrierConfigs || true; #Remove silly carrier restrictions
|
||||
cd "$DOS_BUILD_BASE";
|
||||
#rm -rfv device/*/*/overlay/CarrierConfigResCommon device/*/*/rro_overlays/CarrierConfigOverlay device/*/*/overlay/packages/apps/CarrierConfig/res/xml/vendor.xml;
|
||||
@ -500,8 +500,8 @@ enableLowRam "device/cyanogen/msm8916-common" "msm8916-common";
|
||||
enableLowRam "device/wileyfox/crackling" "crackling";
|
||||
|
||||
#Fix broken options enabled by hardenDefconfig()
|
||||
sed -i "s/CONFIG_STRICT_MEMORY_RWX=y/# CONFIG_STRICT_MEMORY_RWX is not set/" kernel/motorola/msm8996/arch/arm64/configs/*_defconfig || true; #Breaks on compile
|
||||
sed -i "s/CONFIG_RANDOMIZE_BASE=y/# CONFIG_RANDOMIZE_BASE is not set/" kernel/samsung/universal9810/arch/arm64/configs/*_defconfig || true; #Breaks on compile
|
||||
[[ -d kernel/motorola/msm8996 ]] && sed -i "s/CONFIG_STRICT_MEMORY_RWX=y/# CONFIG_STRICT_MEMORY_RWX is not set/" kernel/motorola/msm8996/arch/arm64/configs/*_defconfig; #Breaks on compile
|
||||
[[ -d kernel/samsung/universal9810 ]] && sed -i "s/CONFIG_RANDOMIZE_BASE=y/# CONFIG_RANDOMIZE_BASE is not set/" kernel/samsung/universal9810/arch/arm64/configs/*_defconfig; #Breaks on compile
|
||||
|
||||
sed -i 's/^YYLTYPE yylloc;/extern YYLTYPE yylloc;/' kernel/*/*/scripts/dtc/dtc-lexer.l* || true; #Fix builds with GCC 10
|
||||
rm -v kernel/*/*/drivers/staging/greybus/tools/Android.mk || true;
|
||||
|
@ -151,9 +151,13 @@ enableDexPreOpt() {
|
||||
export -f enableDexPreOpt;
|
||||
|
||||
enableLowRam() {
|
||||
cd "$DOS_BUILD_BASE$1";
|
||||
if [ -f lineage_$2.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage_$2.mk; fi;
|
||||
echo "Enabled lowram for $1";
|
||||
cd "$DOS_BUILD_BASE";
|
||||
if [ -d "$DOS_BUILD_BASE$1" ]; then
|
||||
cd "$DOS_BUILD_BASE$1";
|
||||
if [ -f lineage_$2.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage_$2.mk; fi;
|
||||
echo "Enabled lowram for $1";
|
||||
cd "$DOS_BUILD_BASE";
|
||||
else
|
||||
echo "Not enabling lowram for $1, not available";
|
||||
fi;
|
||||
}
|
||||
export -f enableLowRam;
|
||||
|
@ -556,10 +556,10 @@ find "kernel" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {}
|
||||
find "device" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {} bash -c 'disableAPEX "{}"';
|
||||
if [ "$DOS_GRAPHENE_EXEC" = true ]; then find "device" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {} bash -c 'disableEnforceRRO "{}"'; fi;
|
||||
cd "$DOS_BUILD_BASE";
|
||||
deblobAudio || true;
|
||||
removeBuildFingerprints || true;
|
||||
deblobAudio;
|
||||
removeBuildFingerprints;
|
||||
enableAutoVarInit || true;
|
||||
changeDefaultDNS || true; #Change the default DNS servers
|
||||
changeDefaultDNS; #Change the default DNS servers
|
||||
fixupCarrierConfigs || true; #Remove silly carrier restrictions
|
||||
cd "$DOS_BUILD_BASE";
|
||||
#rm -rfv device/*/*/overlay/CarrierConfigResCommon device/*/*/rro_overlays/CarrierConfigOverlay device/*/*/overlay/packages/apps/CarrierConfig/res/xml/vendor.xml;
|
||||
@ -593,11 +593,11 @@ enableLowRam "device/samsung/klte" "klte";
|
||||
enableLowRam "device/samsung/msm8974-common" "msm8974-common";
|
||||
|
||||
#Fix broken options enabled by hardenDefconfig()
|
||||
sed -i "s/CONFIG_DEBUG_RODATA=y/# CONFIG_DEBUG_RODATA is not set/" kernel/google/msm/arch/arm/configs/lineageos_*_defconfig || true; #Breaks on compile
|
||||
sed -i "s/CONFIG_DEBUG_RODATA=y/# CONFIG_DEBUG_RODATA is not set/" kernel/lge/mako/arch/arm/configs/lineageos_*_defconfig || true; #Breaks on compile
|
||||
sed -i "s/CONFIG_STRICT_MEMORY_RWX=y/# CONFIG_STRICT_MEMORY_RWX is not set/" kernel/lge/msm8996/arch/arm64/configs/lineageos_*_defconfig || true; #Breaks on compile
|
||||
sed -i "s/CONFIG_DEBUG_RODATA=y/# CONFIG_DEBUG_RODATA is not set/" kernel/motorola/msm8974/arch/arm/configs/lineageos_*_defconfig || true; #Breaks on compile
|
||||
sed -i "s/CONFIG_STRICT_MEMORY_RWX=y/# CONFIG_STRICT_MEMORY_RWX is not set/" kernel/oneplus/msm8996/arch/arm64/configs/lineageos_*_defconfig || true; #Breaks on compile
|
||||
[[ -d kernel/google/msm ]] && sed -i "s/CONFIG_DEBUG_RODATA=y/# CONFIG_DEBUG_RODATA is not set/" kernel/google/msm/arch/arm/configs/lineageos_*_defconfig; #Breaks on compile
|
||||
[[ -d kernel/lge/mako ]] && sed -i "s/CONFIG_DEBUG_RODATA=y/# CONFIG_DEBUG_RODATA is not set/" kernel/lge/mako/arch/arm/configs/lineageos_*_defconfig; #Breaks on compile
|
||||
[[ -d kernel/lge/msm8996 ]] && sed -i "s/CONFIG_STRICT_MEMORY_RWX=y/# CONFIG_STRICT_MEMORY_RWX is not set/" kernel/lge/msm8996/arch/arm64/configs/lineageos_*_defconfig; #Breaks on compile
|
||||
[[ -d kernel/motorola/msm8974 ]] && sed -i "s/CONFIG_DEBUG_RODATA=y/# CONFIG_DEBUG_RODATA is not set/" kernel/motorola/msm8974/arch/arm/configs/lineageos_*_defconfig; #Breaks on compile
|
||||
[[ -d kernel/oneplus/msm8996 ]] && sed -i "s/CONFIG_STRICT_MEMORY_RWX=y/# CONFIG_STRICT_MEMORY_RWX is not set/" kernel/oneplus/msm8996/arch/arm64/configs/lineageos_*_defconfig; #Breaks on compile
|
||||
|
||||
sed -i 's/^YYLTYPE yylloc;/extern YYLTYPE yylloc;/' kernel/*/*/scripts/dtc/dtc-lexer.l* || true; #Fix builds with GCC 10
|
||||
rm -v kernel/*/*/drivers/staging/greybus/tools/Android.mk || true;
|
||||
|
@ -114,9 +114,13 @@ enableDexPreOpt() {
|
||||
export -f enableDexPreOpt;
|
||||
|
||||
enableLowRam() {
|
||||
cd "$DOS_BUILD_BASE$1";
|
||||
if [ -f lineage_$2.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage_$2.mk; fi;
|
||||
echo "Enabled lowram for $1";
|
||||
cd "$DOS_BUILD_BASE";
|
||||
if [ -d "$DOS_BUILD_BASE$1" ]; then
|
||||
cd "$DOS_BUILD_BASE$1";
|
||||
if [ -f lineage_$2.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage_$2.mk; fi;
|
||||
echo "Enabled lowram for $1";
|
||||
cd "$DOS_BUILD_BASE";
|
||||
else
|
||||
echo "Not enabling lowram for $1, not available";
|
||||
fi;
|
||||
}
|
||||
export -f enableLowRam;
|
||||
|
@ -454,10 +454,10 @@ find "kernel" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {}
|
||||
find "device" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {} bash -c 'disableAPEX "{}"';
|
||||
if [ "$DOS_GRAPHENE_EXEC" = true ]; then find "device" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {} bash -c 'disableEnforceRRO "{}"'; fi;
|
||||
cd "$DOS_BUILD_BASE";
|
||||
deblobAudio || true;
|
||||
removeBuildFingerprints || true;
|
||||
deblobAudio;
|
||||
removeBuildFingerprints;
|
||||
enableAutoVarInit || true;
|
||||
changeDefaultDNS || true; #Change the default DNS servers
|
||||
changeDefaultDNS; #Change the default DNS servers
|
||||
fixupCarrierConfigs || true; #Remove silly carrier restrictions
|
||||
cd "$DOS_BUILD_BASE";
|
||||
#rm -rfv device/*/*/overlay/CarrierConfigResCommon device/*/*/rro_overlays/CarrierConfigOverlay device/*/*/overlay/packages/apps/CarrierConfig/res/xml/vendor.xml;
|
||||
@ -466,7 +466,7 @@ cd "$DOS_BUILD_BASE";
|
||||
#enableLowRam "device/sony/pioneer" "pioneer";
|
||||
|
||||
#Fix broken options enabled by hardenDefconfig()
|
||||
sed -i "s/CONFIG_PREEMPT_TRACER=n/CONFIG_PREEMPT_TRACER=y/" kernel/fairphone/sdm632/arch/arm64/configs/lineageos_*_defconfig || true; #Breaks on compile
|
||||
[[ -d kernel/fairphone/sdm632 ]] && sed -i "s/CONFIG_PREEMPT_TRACER=n/CONFIG_PREEMPT_TRACER=y/" kernel/fairphone/sdm632/arch/arm64/configs/lineageos_*_defconfig; #Breaks on compile
|
||||
|
||||
sed -i 's/^YYLTYPE yylloc;/extern YYLTYPE yylloc;/' kernel/*/*/scripts/dtc/dtc-lexer.l* || true; #Fix builds with GCC 10
|
||||
rm -v kernel/*/*/drivers/staging/greybus/tools/Android.mk || true;
|
||||
|
@ -147,9 +147,13 @@ enableDexPreOpt() {
|
||||
export -f enableDexPreOpt;
|
||||
|
||||
enableLowRam() {
|
||||
cd "$DOS_BUILD_BASE$1";
|
||||
if [ -f lineage_$2.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage_$2.mk; fi;
|
||||
echo "Enabled lowram for $1";
|
||||
cd "$DOS_BUILD_BASE";
|
||||
if [ -d "$DOS_BUILD_BASE$1" ]; then
|
||||
cd "$DOS_BUILD_BASE$1";
|
||||
if [ -f lineage_$2.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage_$2.mk; fi;
|
||||
echo "Enabled lowram for $1";
|
||||
cd "$DOS_BUILD_BASE";
|
||||
else
|
||||
echo "Not enabling lowram for $1, not available";
|
||||
fi;
|
||||
}
|
||||
export -f enableLowRam;
|
||||
|
@ -487,21 +487,21 @@ find "kernel" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {}
|
||||
find "device" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {} bash -c 'disableAPEX "{}"';
|
||||
if [ "$DOS_GRAPHENE_EXEC" = true ]; then find "device" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {} bash -c 'disableEnforceRRO "{}"'; fi;
|
||||
cd "$DOS_BUILD_BASE";
|
||||
deblobAudio || true;
|
||||
removeBuildFingerprints || true;
|
||||
deblobAudio;
|
||||
removeBuildFingerprints;
|
||||
enableAutoVarInit || true;
|
||||
changeDefaultDNS || true; #Change the default DNS servers
|
||||
changeDefaultDNS; #Change the default DNS servers
|
||||
fixupCarrierConfigs || true; #Remove silly carrier restrictions
|
||||
cd "$DOS_BUILD_BASE";
|
||||
#rm -rfv device/*/*/overlay/CarrierConfigResCommon device/*/*/rro_overlays/CarrierConfigOverlay device/*/*/overlay/packages/apps/CarrierConfig/res/xml/vendor.xml;
|
||||
|
||||
#Fix broken options enabled by hardenDefconfig()
|
||||
sed -i "s/CONFIG_PREEMPT_TRACER=n/CONFIG_PREEMPT_TRACER=y/" kernel/fairphone/sdm632/arch/arm64/configs/lineageos_*_defconfig || true; #Breaks on compile
|
||||
sed -i "s/CONFIG_DEBUG_NOTIFIERS=y/# CONFIG_DEBUG_NOTIFIERS is not set/" kernel/google/msm-4.9/arch/arm64/configs/*_defconfig || true; #Likely breaks boot
|
||||
sed -i "s/CONFIG_FORTIFY_SOURCE=y/# CONFIG_FORTIFY_SOURCE is not set/" kernel/google/msm-4.14/arch/arm64/configs/*_defconfig || true; #breaks compile
|
||||
sed -i "s/CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y/# CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY is not set/" kernel/google/msm-4.14/arch/arm64/configs/*_defconfig || true; #impartial backport
|
||||
echo -e "\nCONFIG_DEBUG_FS=y" >> kernel/oneplus/sm8150/arch/arm64/configs/vendor/sm8150-perf_defconfig || true; #compile failure
|
||||
echo -e "\nCONFIG_DEBUG_FS=n" >> kernel/oneplus/sm8250/arch/arm64/configs/vendor/kona-perf_defconfig || true; #vintf failure
|
||||
[[ -d kernel/fairphone/sdm632 ]] && sed -i "s/CONFIG_PREEMPT_TRACER=n/CONFIG_PREEMPT_TRACER=y/" kernel/fairphone/sdm632/arch/arm64/configs/lineageos_*_defconfig; #Breaks on compile
|
||||
[[ -d kernel/google/msm-4.9 ]] && sed -i "s/CONFIG_DEBUG_NOTIFIERS=y/# CONFIG_DEBUG_NOTIFIERS is not set/" kernel/google/msm-4.9/arch/arm64/configs/*_defconfig; #Likely breaks boot
|
||||
[[ -d kernel/google/msm-4.14 ]] && sed -i "s/CONFIG_FORTIFY_SOURCE=y/# CONFIG_FORTIFY_SOURCE is not set/" kernel/google/msm-4.14/arch/arm64/configs/*_defconfig; #breaks compile
|
||||
[[ -d kernel/google/msm-4.14 ]] && sed -i "s/CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y/# CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY is not set/" kernel/google/msm-4.14/arch/arm64/configs/*_defconfig; #impartial backport
|
||||
[[ -d kernel/oneplus/sm8150 ]] && echo -e "\nCONFIG_DEBUG_FS=y" >> kernel/oneplus/sm8150/arch/arm64/configs/vendor/sm8150-perf_defconfig; #compile failure
|
||||
[[ -d kernel/oneplus/sm8250 ]] && echo -e "\nCONFIG_DEBUG_FS=n" >> kernel/oneplus/sm8250/arch/arm64/configs/vendor/kona-perf_defconfig; #vintf failure
|
||||
|
||||
sed -i 's/^YYLTYPE yylloc;/extern YYLTYPE yylloc;/' kernel/*/*/scripts/dtc/dtc-lexer.l* || true; #Fix builds with GCC 10
|
||||
rm -v kernel/*/*/drivers/staging/greybus/tools/Android.mk || true;
|
||||
|
@ -34,7 +34,7 @@ export CCACHE_COMPRESSLEVEL=1;
|
||||
#export DOS_BINARY_PATCHER="";
|
||||
export DOS_TOR_WRAPPER="";
|
||||
#export DOS_TOR_WRAPPER="torsocks"; #Uncomment to perform select build operations over Tor
|
||||
export DOS_MALWARE_SCAN_ENABLED=true; #Set true to perform a fast scan on patchWorkspace() and a through scan on buildAll()
|
||||
export DOS_MALWARE_SCAN_ENABLED=false; #Set true to perform a fast scan on patchWorkspace() and a through scan on buildAll()
|
||||
export DOS_MALWARE_SCAN_SETTING="quick"; #buildAll() scan speed. Options: quick, extra, slow, full
|
||||
export DOS_REFRESH_PATCHES=true; #Set true to refresh branch-specific patches on apply
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user