From d3a231e2bedb24e2918066bb13d4794cfe989506 Mon Sep 17 00:00:00 2001 From: Tad Date: Wed, 31 Jan 2018 13:14:19 -0500 Subject: [PATCH] Many build fixes - Deblobber: sh -> bash (potential fix) - Mark h815 as broken upstream - Fix h850 - Fix herolte - Fix Z00T --- Misc/Features/Android_Scaling.txt | 15 +++++++++++++++ Patches/Linux | 2 +- .../android_kernel_samsung_universal8890.sh | 2 +- Scripts/LineageOS-14.1/Deblob.sh | 8 +++++--- Scripts/LineageOS-14.1/Functions.sh | 13 +++++++------ Scripts/LineageOS-14.1/Patch.sh | 5 ++++- 6 files changed, 33 insertions(+), 12 deletions(-) create mode 100644 Misc/Features/Android_Scaling.txt diff --git a/Misc/Features/Android_Scaling.txt b/Misc/Features/Android_Scaling.txt new file mode 100644 index 00000000..d0efe631 --- /dev/null +++ b/Misc/Features/Android_Scaling.txt @@ -0,0 +1,15 @@ +clark + Up to 4 increase is 56 + 1440x2560 + 1 / Smallest = 392 + 2 / Smaller = 448 + 3 / Small = 504 + 4 / Default = 560 + 5 / Large = 612 + 6 / Larger = 666 + 7 / Largest = 720 + 1080x1920 + 1 / Smallest = 392 + 2 / Smaller = 448 + 3 / Small = 504 + 4 / Default = 560 diff --git a/Patches/Linux b/Patches/Linux index aa3cf353..9ed7eb85 160000 --- a/Patches/Linux +++ b/Patches/Linux @@ -1 +1 @@ -Subproject commit aa3cf3537e013f9e07170a2678798e40f906b023 +Subproject commit 9ed7eb85d4646d0cf2e72e3004ef7f400d15231e diff --git a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_samsung_universal8890.sh b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_samsung_universal8890.sh index d9498d01..172d4507 100644 --- a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_samsung_universal8890.sh +++ b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_samsung_universal8890.sh @@ -58,7 +58,7 @@ git apply $cvePatchesLinux/CVE-2016-6828/ANY/0001.patch git apply $cvePatchesLinux/CVE-2016-7042/ANY/0001.patch git apply $cvePatchesLinux/CVE-2016-7117/^4.5/0002.patch git apply $cvePatchesLinux/CVE-2016-7913/ANY/0001.patch -git apply $cvePatchesLinux/CVE-2016-7917/ANY/0001.patch +#git apply $cvePatchesLinux/CVE-2016-7917/ANY/0001.patch git apply $cvePatchesLinux/CVE-2016-8399/ANY/0001.patch git apply $cvePatchesLinux/CVE-2016-8468/3.18/0001.patch git apply $cvePatchesLinux/CVE-2016-8650/ANY/0001.patch diff --git a/Scripts/LineageOS-14.1/Deblob.sh b/Scripts/LineageOS-14.1/Deblob.sh index 76a95676..47747690 100755 --- a/Scripts/LineageOS-14.1/Deblob.sh +++ b/Scripts/LineageOS-14.1/Deblob.sh @@ -324,9 +324,9 @@ deblobDevice() { #rm -rf data-ipa-cfg-mgr; #Remove IPA rm -rf libshimwvm libshims/wvm_shim.cpp; #Remove Google Widevine compatibility module rm -rf board/qcom-wipower.mk product/qcom-wipower.mk; #Remove WiPower makefiles - if [ -f setup-makefiles.sh ]; then #FIXME: This breaks some devices using shared device trees (eg. osprey) when removing blobs that are listed in Android.mk of vendor repositories + if [ -f setup-makefiles.sh ]; then awk -i inplace '!/'$blobs'/' *proprietary*.txt; #Remove all blob references from blob manifest - sh -c "cd $base$devicePath && ./setup-makefiles.sh"; #Update the makefiles + bash -c "cd $base$devicePath && ./setup-makefiles.sh"; #Update the makefiles fi; cd $base; } @@ -370,7 +370,9 @@ rm -rf vendor/samsung/nodevice; #END OF DEBLOBBING # - +#setup-makefiles doesn't execute properly for some devices, running it twice seems to fix whatever is wrong +cd device/asus/Z00T && ./setup-makefiles.sh && cd $base +cd device/lge/h850 && ./setup-makefiles.sh && cd $base #Fixes marlin building, really janky (recursive symlinks) and probably not the best place for it [LAOS SPECIFIC] cd vendor/google/marlin/proprietary; diff --git a/Scripts/LineageOS-14.1/Functions.sh b/Scripts/LineageOS-14.1/Functions.sh index 9af6e27a..2011bf6b 100644 --- a/Scripts/LineageOS-14.1/Functions.sh +++ b/Scripts/LineageOS-14.1/Functions.sh @@ -57,13 +57,13 @@ buildAll() { brunch lineage_d802-userdebug; brunch lineage_d855-userdebug; brunch lineage_ether-user; -# brunch lineage_flo-user - undefined reference to 'mm_jpeg_get_new_session_idx' +# brunch lineage_flo-user; - undefined reference to 'mm_jpeg_get_new_session_idx' brunch lineage_flounder-user; brunch lineage_FP2-user; -# brunch lineage_h815-user - drivers/input/touchscreen/DS5/RefCode_CustomerImplementation.c:147:1: warning: the frame size of 2064 bytes is larger than 2048 bytes [-Wframe-larger-than=] -# brunch lineage_h850-user - arch/arm64/mm/mmu.c:134:31: error: 'prot_sect_kernel' undeclared (first use in this function) +# brunch lineage_h815-user; - (UPSTREAM) drivers/input/touchscreen/DS5/RefCode_CustomerImplementation.c:147:1: warning: the frame size of 2064 bytes is larger than 2048 bytes + brunch lineage_h850-userdebug; brunch lineage_hammerhead-user; -# brunch lineage_herolte-user - missing libprotobuf-cpp-full.so + brunch lineage_herolte-user; brunch lineage_himaul-user; brunch lineage_i9100-userdebug; brunch lineage_i9305-user; @@ -75,7 +75,7 @@ buildAll() { brunch lineage_osprey-user; brunch lineage_sailfish-user; brunch lineage_shamu-user; -# brunch lineage_Z00T-user; + brunch lineage_Z00T-user; } export -f buildAll; @@ -94,7 +94,7 @@ export -f patchWorkspace; enableDexPreOpt() { cd $base$1; - if [ $1 != "device/amazon/thor" ] && [ $1 != "device/samsung/i9100" ]; then #Some devices won't compile, or have too small of a /system partition + if [ $1 != "device/amazon/thor" ] && [ $1 != "device/samsung/i9100" ] && [ $1 != "device/lge/h850" ]; then #Some devices won't compile, or have too small of a /system partition if [ -f BoardConfig.mk ]; then echo "WITH_DEXPREOPT := true" >> BoardConfig.mk; echo "WITH_DEXPREOPT_PIC := true" >> BoardConfig.mk; @@ -213,6 +213,7 @@ hardenDefconfig() { fi; done #Disable supported options + #TODO: Disable earjack/uart debugger declare -a optionsNo=("CONFIG_ACPI_CUSTOM_METHOD" "CONFIG_BINFMT_MISC" "CONFIG_COMPAT_BRK" "CONFIG_COMPAT_VDSO" "CONFIG_CP_ACCESS64" "CONFIG_DEVKMEM" "CONFIG_DEVMEM" "CONFIG_DEVPORT" "CONFIG_HIBERNATION" "CONFIG_INET_DIAG" "CONFIG_KEXEC" "CONFIG_LEGACY_PTYS" "CONFIG_MSM_BUSPM_DEV" "CONFIG_OABI_COMPAT" "CONFIG_PROC_KCORE" "CONFIG_PROC_VMCORE" "CONFIG_SECURITY_SELINUX_DISABLE" "CONFIG_SLAB_MERGE_DEFAULT") for option in "${optionsNo[@]}" do diff --git a/Scripts/LineageOS-14.1/Patch.sh b/Scripts/LineageOS-14.1/Patch.sh index c1e049e9..cd9d2712 100755 --- a/Scripts/LineageOS-14.1/Patch.sh +++ b/Scripts/LineageOS-14.1/Patch.sh @@ -222,7 +222,10 @@ find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableForcedEncrypt find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableStrongEncryption "$0"' {} \; find "kernel" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'hardenDefconfig "$0"' {} \; cd $base -sed -i "s/CONFIG_DEBUG_RODATA=y/# CONFIG_DEBUG_RODATA is not set/" kernel/google/msm/arch/arm/configs/lineageos_flo_defconfig; #Breaks on compile + +#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 # #END OF DEVICE CHANGES #