mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-05-02 06:26:20 -04:00
lowram tweaks
Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
parent
b660167e08
commit
d078b24ddb
10 changed files with 77 additions and 14 deletions
|
@ -327,6 +327,9 @@ cd "$DOS_BUILD_BASE";
|
|||
deblobAudio || true;
|
||||
removeBuildFingerprints || true;
|
||||
|
||||
#Tweaks for <2GB RAM devices
|
||||
enableLowRam "device/asus/fugu";
|
||||
|
||||
#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; #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; #Breaks on compile
|
||||
|
|
|
@ -118,7 +118,8 @@ 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; #TODO: handle lineage_device.mk
|
||||
if [ -f lineage.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage.mk; fi;
|
||||
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";
|
||||
|
|
|
@ -391,6 +391,9 @@ cd "$DOS_BUILD_BASE";
|
|||
deblobAudio || true;
|
||||
removeBuildFingerprints || true;
|
||||
|
||||
#Tweaks for <2GB RAM devices
|
||||
enableLowRam "device/asus/fugu" "fugu";
|
||||
|
||||
#Fix broken options enabled by hardenDefconfig()
|
||||
sed -i "s/CONFIG_STRICT_MEMORY_RWX=y/# CONFIG_STRICT_MEMORY_RWX is not set/" kernel/asus/msm8953/arch/arm64/configs/*_defconfig; #Breaks on compile
|
||||
sed -i "s/CONFIG_DEBUG_RODATA=y/# CONFIG_DEBUG_RODATA is not set/" kernel/google/yellowstone/arch/arm*/configs/*_defconfig; #Breaks on compile
|
||||
|
|
|
@ -126,7 +126,8 @@ 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; #TODO: handle lineage_device.mk
|
||||
if [ -f lineage.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage.mk; fi;
|
||||
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";
|
||||
|
|
|
@ -478,10 +478,16 @@ removeBuildFingerprints || true;
|
|||
enableAutoVarInit || true;
|
||||
|
||||
#Tweaks for <2GB RAM devices
|
||||
#enableLowRam "device/motorola/harpia";
|
||||
#enableLowRam "device/motorola/merlin";
|
||||
#enableLowRam "device/motorola/osprey";
|
||||
#enableLowRam "device/motorola/surnia";
|
||||
enableLowRam "device/asus/fugu" "fugu";
|
||||
enableLowRam "device/motorola/harpia" "harpia";
|
||||
enableLowRam "device/motorola/merlin" "merlin";
|
||||
enableLowRam "device/motorola/msm8916-common" "msm8916-common";
|
||||
enableLowRam "device/motorola/osprey" "osprey";
|
||||
enableLowRam "device/motorola/surnia" "surnia";
|
||||
#Tweaks for <3GB RAM devices
|
||||
enableLowRam "device/cyanogen/msm8916-common" "msm8916-common";
|
||||
enableLowRam "device/motorola/clark" "clark";
|
||||
enableLowRam "device/wileyfox/crackling" "crackling";
|
||||
|
||||
#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; #Breaks on compile
|
||||
|
|
|
@ -188,7 +188,8 @@ 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; #TODO: handle lineage_device.mk
|
||||
if [ -f lineage.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage.mk; fi;
|
||||
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";
|
||||
|
|
|
@ -560,8 +560,25 @@ removeBuildFingerprints || true;
|
|||
enableAutoVarInit || true;
|
||||
|
||||
#Tweaks for <2GB RAM devices
|
||||
#enableLowRam "device/samsung/serrano3gxx";
|
||||
#enableLowRam "device/samsung/serranoltexx";
|
||||
enableLowRam "device/samsung/msm8930-common" "msm8930-common";
|
||||
enableLowRam "device/samsung/serrano3gxx" "serrano3gxx";
|
||||
enableLowRam "device/samsung/serrano-common" "serrano-common";
|
||||
enableLowRam "device/samsung/serranoltexx" "serranoltexx";
|
||||
#Tweaks for <3GB RAM devices
|
||||
enableLowRam "device/asus/flox" "flox";
|
||||
enableLowRam "device/fairphone/FP2" "FP2";
|
||||
enableLowRam "device/htc/m8-common" "m8-common";
|
||||
enableLowRam "device/htc/m8" "m8";
|
||||
enableLowRam "device/htc/msm8974-common" "msm8974-common";
|
||||
enableLowRam "device/lge/d802" "d802";
|
||||
enableLowRam "device/lge/g2-common" "g2-common";
|
||||
enableLowRam "device/lge/mako" "mako";
|
||||
enableLowRam "device/motorola/victara" "victara";
|
||||
enableLowRam "device/samsung/jf-common" "jf-common";
|
||||
enableLowRam "device/samsung/jfltexx" "jfltexx";
|
||||
enableLowRam "device/samsung/klte-common" "klte-common";
|
||||
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; #Breaks on compile
|
||||
|
|
|
@ -128,7 +128,8 @@ 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; #TODO: handle lineage_device.mk
|
||||
if [ -f lineage.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage.mk; fi;
|
||||
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";
|
||||
|
|
|
@ -418,7 +418,7 @@ deblobAudio || true;
|
|||
removeBuildFingerprints || true;
|
||||
enableAutoVarInit || true;
|
||||
|
||||
#Tweaks for <2GB RAM devices
|
||||
#Tweaks for <4GB RAM devices
|
||||
#none yet
|
||||
|
||||
#Fix broken options enabled by hardenDefconfig()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue