1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-17 04:51:31 +03:00

Merge pull request #263 from samueldr-wip/devices/motorola-surfna/init

motorola-surfna: init
This commit is contained in:
Samuel Dionne-Riel 2020-12-28 14:08:44 -05:00 committed by GitHub
commit 002bf7c1e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 5582 additions and 0 deletions

View File

@ -0,0 +1,14 @@
= Motorola Moto E6
include::_support/common.inc[]
== Device-specific notes
Using `fastboot` to burn system.img to the userdata partition will fail with
the `flash permission denied` error.
The current workaround is to `fastboot boot` the "android burn tool" and use
`dd` through `ssh` to flash the image.
```
$ cat .../system.img | bin/ssh-initrd dd of=/dev/disk/by-partlabel/userdata bs=8M
```

View File

@ -0,0 +1,54 @@
{ pkgs, ... }:
{
mobile.device.name = "motorola-surfna";
mobile.device.identity = {
name = "Moto E6";
manufacturer = "Motorola";
};
mobile.hardware = {
soc = "qualcomm-msm8940";
ram = 1024 * 2;
screen = {
width = 720; height = 1440;
};
};
mobile.boot.stage-1 = {
kernel.package = pkgs.callPackage ./kernel { };
};
mobile.system.android = {
# This device adds skip_initramfs to cmdline for normal boots
boot_as_recovery = true;
# Though this device has "boot_as_recovery", it still has a classic
# recovery partition for recovery.
has_recovery_partition = true;
bootimg.flash = {
offset_base = "0x80000000";
offset_kernel = "0x00008000";
offset_ramdisk = "0x01000000";
offset_second = "0x00f00000";
offset_tags = "0x00000100";
pagesize = "2048";
};
};
mobile.system.vendor.partition = "/dev/disk/by-partlabel/vendor";
boot.kernelParams = [
];
mobile.system.type = "android";
mobile.usb.mode = "gadgetfs";
mobile.usb.idVendor = "22B8"; # Motorola
mobile.usb.idProduct = "2E81"; # "Moto G"
mobile.usb.gadgetfs.functions = {
rndis = "rndis_bam.rndis";
};
}

View File

@ -0,0 +1,53 @@
From 2d34c641091e8bff9771db85448165274187ea26 Mon Sep 17 00:00:00 2001
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
Date: Sat, 5 Oct 2019 15:06:17 -0400
Subject: [PATCH] [mobile-nixos]: Adds and sets BGRA as default
This fixes the issue of Red and Blue channels being mixed up from the
expected.
---
drivers/video/fbdev/msm/mdss_fb.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c
index e0b5ad5b110e..94515e9d26ab 100644
--- a/drivers/video/fbdev/msm/mdss_fb.c
+++ b/drivers/video/fbdev/msm/mdss_fb.c
@@ -1297,7 +1297,7 @@ static int mdss_fb_probe(struct platform_device *pdev)
mfd->bl_scale = 1024;
mfd->ad_bl_level = 0;
- mfd->fb_imgType = MDP_RGBA_8888;
+ mfd->fb_imgType = MDP_BGRA_8888;
mfd->calib_mode_bl = 0;
mfd->unset_bl_level = U32_MAX;
mfd->bl_extn_level = -1;
@@ -2691,6 +2691,25 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
bpp = 4;
break;
+ case MDP_BGRA_8888:
+ fix->type = FB_TYPE_PACKED_PIXELS;
+ fix->xpanstep = 1;
+ fix->ypanstep = 1;
+ var->vmode = FB_VMODE_NONINTERLACED;
+ var->blue.offset = 0;
+ var->green.offset = 8;
+ var->red.offset = 16;
+ var->blue.length = 8;
+ var->green.length = 8;
+ var->red.length = 8;
+ var->blue.msb_right = 0;
+ var->green.msb_right = 0;
+ var->red.msb_right = 0;
+ var->transp.offset = 24;
+ var->transp.length = 8;
+ bpp = 4;
+ break;
+
case MDP_YCRYCB_H2V1:
fix->type = FB_TYPE_INTERLEAVED_PLANES;
fix->xpanstep = 2;
--
2.23.0

View File

@ -0,0 +1,29 @@
From 834fd7cb1eac09da44ac79d939c41eac54a4da93 Mon Sep 17 00:00:00 2001
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
Date: Sun, 29 Sep 2019 14:42:50 -0400
Subject: [PATCH] [mobile-nixos]: Workaround "selected processor does not
support"
See:
* https://github.com/NixOS/nixpkgs/issues/64916
---
arch/arm64/crypto/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/crypto/Makefile b/arch/arm64/crypto/Makefile
index 28a71246e0a3..3d5a44121565 100644
--- a/arch/arm64/crypto/Makefile
+++ b/arch/arm64/crypto/Makefile
@@ -42,7 +42,7 @@ CFLAGS_aes-glue-ce.o := -DUSE_V8_CRYPTO_EXTENSIONS
obj-$(CONFIG_CRYPTO_CRC32_ARM64) += crc32-arm64.o
-CFLAGS_crc32-arm64.o := -mcpu=generic+crc
+CFLAGS_crc32-arm64.o := -march=armv8-a+crc
$(obj)/aes-glue-%.o: $(src)/aes-glue.c FORCE
$(call if_changed_rule,cc_o_c)
--
2.23.0

View File

@ -0,0 +1,79 @@
From 5ce717535e07b8904a598dc93bc362abfe7453e6 Mon Sep 17 00:00:00 2001
From: Alexey Min <alexey.min@gmail.com>
Date: Wed, 11 Sep 2019 21:51:40 +0300
Subject: [PATCH 3/3] arch: arm64: Add config option to fix bootloader cmdline
args
Android bootloader passes some arguments in kernel command
line, that make booting custom OSes harder:
* skip_initramfs
* root=PARTUUID=...
* init=/init
Those parameters override default boot partition to hardcoded,
set init binary to /init, disable booting from initramfs.
If enabled, those parameters will be erased from bootloader's
command line, and custom OS can boot the way it likes.
---
arch/arm64/Kconfig | 17 +++++++++++++++++
drivers/of/fdt.c | 14 ++++++++++++++
2 files changed, 31 insertions(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 2829edba6aa5..bd9f05f83c7e 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1125,6 +1125,23 @@ config CMDLINE_FORCE
command-line options your boot loader passes to the kernel.
endchoice
+config CMDLINE_DROP_DANGEROUS_ANDROID_OPTIONS
+ bool "Drop certain dangerous options from cmdline"
+ default n
+ help
+ Android bootloader passes some arguments in kernel command
+ line, that make booting custom OSes harder:
+
+ * skip_initramfs
+ * root=PARTUUID=...
+ * init=/init
+
+ Those parameters override default boot partition to hardcoded,
+ set init binary to /init, disable booting from initramfs.
+
+ If enabled, those parameters will be erased from bootloader's
+ command line, and custom OS can boot the way it likes.
+
config EFI_STUB
bool
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index ca175710c4c8..fd8257589648 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -1012,6 +1012,20 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
pr_debug("Command line is: %s\n", (char*)data);
+#ifdef CONFIG_CMDLINE_DROP_DANGEROUS_ANDROID_OPTIONS
+ pr_err("Replacing dangerous cmdline options...");
+ cmdline = strstr((const char *)data, "skip_initramfs");
+ if (cmdline)
+ *cmdline = '_';
+ cmdline = strstr((const char *)data, "root=");
+ if (cmdline)
+ *cmdline = '_';
+ cmdline = strstr((const char *)data, "init=");
+ if (cmdline)
+ *cmdline = '_';
+ pr_err("Command line now is: %s\n", (char*)data);
+#endif
+
/* break now */
return 1;
}
--
2.21.0

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
{
mobile-nixos
, fetchFromGitHub
}:
mobile-nixos.kernel-builder-gcc49 {
version = "4.9.112";
configfile = ./config.aarch64;
src = fetchFromGitHub {
owner = "mobile-nixos";
repo = "linux";
rev = "f94feb0d419573e219bb15e9f4a7c839e1f1543a"; # mobile-nixos/motorola-surfna
sha256 = "09bn08g0qcsp0b134lsd0kvcx7mlcs2cckix7bqq23m6bzrnxy54";
};
patches = [
./0001-mobile-nixos-Workaround-selected-processor-does-not-.patch
./0001-mobile-nixos-Adds-and-sets-BGRA-as-default.patch
./0003-arch-arm64-Add-config-option-to-fix-bootloader-cmdli.patch
];
enableRemovingWerror = true;
isImageGzDtb = true;
isModular = false;
}

View File

@ -0,0 +1,4 @@
{
"kernel_version": "4.9.112-perf+",
"kernel_version_string": "Linux version 4.9.112-perf+ (hudsoncm@ilclbld32) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Fri Jun 14 04:47:12 CDT 2019\n"
}

View File

@ -0,0 +1,329 @@
{
"DEVICE_PROVISIONED": "1",
"af.fast_track_multiplier": "1",
"audio.deep_buffer.media": "true",
"audio.offload.disable": "false",
"audio.offload.gapless.enabled": "false",
"audio.offload.min.duration.secs": "60",
"audio.offload.video": "false",
"bluetooth.hfp.client": "1",
"camera.disable_zsl_mode": "0",
"config.disable_consumerir": "true",
"dalvik.vm.appimageformat": "lz4",
"dalvik.vm.dex2oat-Xms": "64m",
"dalvik.vm.dex2oat-Xmx": "512m",
"dalvik.vm.dex2oat-minidebuginfo": "true",
"dalvik.vm.dex2oat-threads": "6",
"dalvik.vm.dexopt.secondary": "true",
"dalvik.vm.heapgrowthlimit": "96m",
"dalvik.vm.heapmaxfree": "8m",
"dalvik.vm.heapminfree": "512k",
"dalvik.vm.heapsize": "36m",
"dalvik.vm.heapstartsize": "8m",
"dalvik.vm.heaptargetutilization": "0.75",
"dalvik.vm.image-dex2oat-Xms": "64m",
"dalvik.vm.image-dex2oat-Xmx": "64m",
"dalvik.vm.isa.arm.features": "default",
"dalvik.vm.isa.arm.variant": "cortex-a53",
"dalvik.vm.stack-trace-dir": "/data/anr",
"dalvik.vm.usejit": "true",
"dalvik.vm.usejitprofiles": "true",
"debug.atrace.tags.enableflags": "0",
"debug.egl.hw": "1",
"debug.enable.sglscale": "1",
"debug.mdpcomp.logs": "0",
"debug.sf.enable_hwc_vds": "1",
"debug.sf.hw": "1",
"debug.sf.latch_unsignaled": "1",
"debug.sf.recomputecrop": "0",
"dev.pm.dyn_samplingrate": "1",
"drm.service.enabled": "true",
"keyguard.no_require_sim": "true",
"log.tag.stats_log": "I",
"media.aac_51_output_enabled": "true",
"media.msm8956hw": "0",
"media.recorder.show_manufacturer_and_model": "true",
"media.settings.xml": "/vendor/etc/media_profiles_vendor.xml",
"mm.enable.smoothstreaming": "true",
"mmp.enable.3g2": "true",
"net.bt.name": "Android",
"persist.audio.endcall.delay": "250",
"persist.audio.qti.flac.decoder": "true",
"persist.backup.ntpServer": "0.pool.ntp.org",
"persist.console.silent.config": "0",
"persist.debug.coresight.config": "stm-events",
"persist.demo.hdmirotationlock": "false",
"persist.fuse_sdcard": "true",
"persist.hwc.enable_vds": "1",
"persist.hwc.mdpcomp.enable": "true",
"persist.mm.sta.enable": "0",
"persist.mot.gps.smart_battery": "1",
"persist.qfp": "false",
"persist.radio.call_type": "1",
"persist.radio.eri64_as_home": "1",
"persist.radio.mode_pref_nv10": "1",
"persist.radio.nw_mtu_enabled": "true",
"persist.rcs.supported": "1",
"persist.sys.dalvik.vm.lib.2": "libart.so",
"persist.sys.sf.native_mode": "1",
"persist.timed.enable": "true",
"persist.vendor.audio.dualmic.config": "endfire",
"persist.vendor.audio.fluence.speaker": "false",
"persist.vendor.audio.fluence.voicecall": "true",
"persist.vendor.audio.fluence.voicecomm": "true",
"persist.vendor.audio.fluence.voicerec": "false",
"persist.vendor.btstack.enable.splita2dp": "false",
"persist.vendor.camera.display.lmax": "1280x720",
"persist.vendor.camera.display.umax": "1920x1080",
"persist.vendor.camera.eis.enable": "0",
"persist.vendor.cne.feature": "1",
"persist.vendor.cne.logging.qxdm": "3974",
"persist.vendor.cne.rat.wlan.chip.oem": "WCN",
"persist.vendor.data.mode": "concurrent",
"persist.vendor.dpm.feature": "0",
"persist.vendor.eab.supported": "1",
"persist.vendor.ims.disableADBLogs": "0",
"persist.vendor.ims.disableDebugDataPathLogs": "0",
"persist.vendor.ims.disableIMSLogs": "0",
"persist.vendor.ims.vt.enableadb": "1",
"persist.vendor.lte.pco_supported": "true",
"persist.vendor.qc.sub.rdump.max": "0",
"persist.vendor.qc.sub.rdump.on": "1",
"persist.vendor.qcomsysd.enabled": "1",
"persist.vendor.radio.0x9e_not_callname": "1",
"persist.vendor.radio.adb_log_on": "0",
"persist.vendor.radio.add_power_save": "1",
"persist.vendor.radio.apm_sim_not_pwdn": "1",
"persist.vendor.radio.custom_ecc": "1",
"persist.vendor.radio.data_con_rprt": "1",
"persist.vendor.radio.dfr_mode_set": "1",
"persist.vendor.radio.eri64_as_home": "1",
"persist.vendor.radio.force_get_pref": "1",
"persist.vendor.radio.is_wps_enabled": "true",
"persist.vendor.radio.jbims": "1",
"persist.vendor.radio.lte_vrte_ltd": "1",
"persist.vendor.radio.msgtunnel.start": "true",
"persist.vendor.radio.mt_sms_ack": "30",
"persist.vendor.radio.no_wait_for_card": "1",
"persist.vendor.radio.oem_ind_to_both": "0",
"persist.vendor.radio.plmn_name_cmp": "1",
"persist.vendor.radio.qcril_uim_vcc_feature": "1",
"persist.vendor.radio.rat_on": "other",
"persist.vendor.radio.relay_oprt_change": "1",
"persist.vendor.radio.sar_sensor": "1",
"persist.vendor.radio.sib16_support": "1",
"persist.vendor.radio.snapshot_enabled": "1",
"persist.vendor.radio.snapshot_timer": "22",
"persist.vendor.radio.start_ota_daemon": "1",
"persist.vendor.radio.sw_mbn_update": "0",
"persist.vendor.radio.uicc_se_enabled": "false",
"persist.vendor.rcs.presence.provision": "0",
"persist.vendor.sensor.hw.binder.size": "8",
"persist.vendor.ssr.restart_level": "ALL_ENABLE",
"persist.vendor.sys.cnd.iwlan": "1",
"persist.vendor.vt.supported": "1",
"persist.vold.ecryptfs_supported": "true",
"pm.dexopt.ab-ota": "speed-profile",
"pm.dexopt.bg-dexopt": "speed-profile",
"pm.dexopt.boot": "verify",
"pm.dexopt.first-boot": "quicken",
"pm.dexopt.inactive": "verify",
"pm.dexopt.install": "speed-profile",
"pm.dexopt.shared": "speed",
"ril.subscription.types": "NV,RUIM",
"rild.libargs": "-d /dev/smd0",
"rild.libpath": "/vendor/lib/libril-qc-hal-qmi.so",
"ro.actionable_compatible_property.enabled": "true",
"ro.adb.secure": "1",
"ro.af.client_heap_size_kbyte": "7168",
"ro.allow.mock.location": "0",
"ro.bluetooth.library_name": "libbluetooth_qti.so",
"ro.board.platform": "msm8937",
"ro.boot.usbcontroller": "msm_hsusb",
"ro.bootimage.build.date": "Fri Jun 14 04:07:10 CDT 2019",
"ro.bootimage.build.date.utc": "1560503230",
"ro.bootimage.build.fingerprint": "motorola/surfna_vzw/surfna:9/PCB29.73-39/5bf3c:user/release-keys",
"ro.build.characteristics": "default",
"ro.build.date": "Fri Jun 14 04:07:10 CDT 2019",
"ro.build.date.utc": "1560503230",
"ro.build.host": "ilclbld32",
"ro.build.id": "PCB29.73-39",
"ro.build.product": "surfna",
"ro.build.system_root_image": "true",
"ro.build.tags": "release-keys",
"ro.build.thumbprint": "9/PCB29.73-39/5bf3c:user/release-keys",
"ro.build.type": "user",
"ro.build.user": "hudsoncm",
"ro.build.version.all_codenames": "REL",
"ro.build.version.ci": "43",
"ro.build.version.codename": "REL",
"ro.build.version.incremental": "5bf3c",
"ro.build.version.min_supported_target_sdk": "17",
"ro.build.version.preview_sdk": "0",
"ro.build.version.release": "9",
"ro.build.version.sdk": "28",
"ro.build.version.security_patch": "2019-06-01",
"ro.carrier": "unknown",
"ro.cdma.home.operator.alpha": "Verizon",
"ro.cdma.home.operator.numeric": "311480",
"ro.cdma.otaspnumschema": "SELC,1,80,99",
"ro.com.android.prov_mobiledata": "true",
"ro.com.google.gmsversion": "9_201905",
"ro.com.google.ime.theme_id": "4",
"ro.com.google.rlzbrandcode": "MOTC",
"ro.config.alarm_alert": "Oxygen.ogg",
"ro.config.max_starting_bg": "8",
"ro.config.notification_sound": "Moto.ogg",
"ro.config.ringtone": "Moto.ogg",
"ro.config.ringtone_2": "Moto.ogg",
"ro.config.vc_call_vol_steps": "8",
"ro.config.wallpaper": "system/media/wallpapers/default_moto_wallpaper.jpg",
"ro.control_privapp_permissions": "enforce",
"ro.crypto.allow_encrypt_override": "true",
"ro.crypto.volume.filenames_mode": "aes-256-cts",
"ro.cutoff_voltage_mv": "3400",
"ro.dalvik.vm.native.bridge": "0",
"ro.debuggable": "0",
"ro.emmc_size": "16GB",
"ro.emulate_fbe": "false",
"ro.expect.recovery_id": "0x512c860dd85fd2f00cf4534a624695bfeadde1bb000000000000000000000000",
"ro.fm.transmitter": "false",
"ro.fpsensor.position": "1",
"ro.frp.pst": "/dev/block/bootdevice/by-name/frp",
"ro.hardware.keystore_desede": "true",
"ro.hardware.nfc_nci": "nqx.default",
"ro.hardware.sensors": "surfna",
"ro.hwui.drop_shadow_cache_size": "6",
"ro.hwui.gradient_cache_size": "1",
"ro.hwui.layer_cache_size": "48",
"ro.hwui.path_cache_size": "32",
"ro.hwui.r_buffer_cache_size": "8",
"ro.hwui.text_large_cache_height": "2048",
"ro.hwui.text_large_cache_width": "2048",
"ro.hwui.text_small_cache_height": "1024",
"ro.hwui.text_small_cache_width": "1024",
"ro.hwui.texture_cache_flushrate": "0.4",
"ro.hwui.texture_cache_size": "72",
"ro.lenovo.single_hand": "1",
"ro.location.osnlp.package": "com.google.android.gms",
"ro.location.osnlp.region.package": "",
"ro.logd.size.stats": "64K",
"ro.mot.build.customerid": "verizon",
"ro.mot.build.guid": "9672d41af12039c",
"ro.mot.build.product.increment": "11",
"ro.mot.build.version.release": "29.11",
"ro.mot.build.version.sdk_int": "29",
"ro.mot.eri": "1",
"ro.mot.phonemode.vzw4gphone": "1",
"ro.mot.product_wave": "2019.2",
"ro.mot.security.enable": "true",
"ro.nfc.ignoreCheckFirmware": "true",
"ro.oem_unlock_supported": "1",
"ro.opa.eligible_device": "true",
"ro.opengles.version": "196610",
"ro.product.board": "msm8937",
"ro.product.brand": "motorola",
"ro.product.cpu.abi": "armeabi-v7a",
"ro.product.cpu.abi2": "armeabi",
"ro.product.cpu.abilist": "armeabi-v7a,armeabi",
"ro.product.cpu.abilist32": "armeabi-v7a,armeabi",
"ro.product.cpu.abilist64": "",
"ro.product.device": "surfna",
"ro.product.first_api_level": "28",
"ro.product.locale": "en-US",
"ro.product.manufacturer": "motorola",
"ro.product.model": "moto e6",
"ro.product.name": "surfna_vzw",
"ro.product.vendor.brand": "motorola",
"ro.product.vendor.device": "surfna",
"ro.product.vendor.manufacturer": "motorola",
"ro.product.vendor.model": "moto e6",
"ro.product.vendor.name": "surfna_vzw",
"ro.qualcomm.bt.hci_transport": "smd",
"ro.qualcomm.cabl": "0",
"ro.secure": "1",
"ro.setupwizard.mode": "OPTIONAL",
"ro.sf.hwc_set_default_colormode": "true",
"ro.sys.sdcardfs": "1",
"ro.telephony.default_network": "10",
"ro.treble.enabled": "true",
"ro.url.legal": "http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html",
"ro.url.legal.android_privacy": "http://www.google.com/intl/%s/mobile/android/basic/privacy.html",
"ro.usb.mtp_cdrom": "2e61",
"ro.vendor.at_library": "libqti-at.so",
"ro.vendor.build.date": "Fri Jun 14 04:07:10 CDT 2019",
"ro.vendor.build.date.utc": "1560503230",
"ro.vendor.build.id": "PCB29.73-39",
"ro.vendor.build.security_patch": "2018-11-05",
"ro.vendor.build.tags": "release-keys",
"ro.vendor.build.thumbprint": "9/PCB29.73-39/5bf3c:user/release-keys",
"ro.vendor.build.type": "user",
"ro.vendor.build.vendorprefix": "/vendor",
"ro.vendor.build.version.qcom": "LA.UM.7.6.2.r1-08100-89xx.0",
"ro.vendor.build.version.release": "9",
"ro.vendor.display.cabl": "0",
"ro.vendor.extension_library": "libqti-perfd-client.so",
"ro.vendor.gt_library": "libqti-gt.so",
"ro.vendor.mot.hw.colormode_aosp2qdcm": "1",
"ro.vendor.product.cpu.abilist": "armeabi-v7a,armeabi",
"ro.vendor.product.cpu.abilist32": "armeabi-v7a,armeabi",
"ro.vendor.product.cpu.abilist64": "",
"ro.vendor.product.display": "moto e⁶",
"ro.vendor.qti.am.reschedule_service": "true",
"ro.vendor.qti.config.swap": "true",
"ro.vendor.qti.core_ctl_max_cpu": "4",
"ro.vendor.qti.core_ctl_min_cpu": "2",
"ro.vendor.qti.sys.fw.bservice_age": "5000",
"ro.vendor.qti.sys.fw.bservice_enable": "true",
"ro.vendor.qti.sys.fw.bservice_limit": "5",
"ro.vendor.qti.sys.fw.empty_app_percent": "50",
"ro.vendor.qti.sys.fw.trim_cache_percent": "100",
"ro.vendor.qti.sys.fw.trim_empty_percent": "100",
"ro.vendor.qti.sys.fw.trim_enable_memory": "2147483648",
"ro.vendor.qti.sys.fw.use_trim_settings": "true",
"ro.vendor.radio.imei.sv": "1",
"ro.vendor.sdk.sensors.gestures": "false",
"ro.vendor.sensors.amd": "false",
"ro.vendor.sensors.camgest": "false",
"ro.vendor.sensors.facing": "false",
"ro.vendor.sensors.glance_approach": "false",
"ro.vendor.sensors.glance_cover_to_wake": "false",
"ro.vendor.sensors.mot_detect": "true",
"ro.vendor.sensors.mot_ltv": "false",
"ro.vendor.sensors.pedometer": "false",
"ro.vendor.sensors.pmd": "false",
"ro.vendor.sensors.rmd": "false",
"ro.vendor.sensors.scrn_ortn": "false",
"ro.vendor.sensors.sta_detect": "true",
"ro.vendor.use_data_netmgrd": "true",
"ro.vndk.version": "28",
"ro.wifi.channels": "",
"ro.zygote": "zygote32",
"security.perf_harden": "1",
"setupwizard.feature.predeferred_enabled": "false",
"setupwizard.theme": "glif_v3_light",
"sys.vendor.shutdown.waittime": "500",
"telephony.lteOnCdmaDevice": "1",
"vendor.audio.parser.ip.buffer.size": "262144",
"vendor.audio.snd_card.open.retries": "50",
"vendor.audio.use.sw.alac.decoder": "false",
"vendor.audio.use.sw.ape.decoder": "false",
"vendor.audio_hal.period_size": "240",
"vendor.camera.aux.packagelist": "org.codeaurora.snapcam",
"vendor.camera.hal1.packagelist": "com.skype.raider,com.google.android.talk",
"vendor.debug.enable.gamed": "0",
"vendor.debug.enable.lm": "1",
"vendor.display.disable_skip_validate": "1",
"vendor.display.enable_default_color_mode": "1",
"vendor.gralloc.enable_fb_ubwc": "1",
"vendor.hw.fm.init": "0",
"vendor.mediacodec.binder.size": "4",
"vendor.mm.en.sec.smoothstreaming": "false",
"vendor.mm.enable.qcom_parser": "1048575",
"vendor.perf.gestureflingboost.enable": "true",
"vendor.power.pasr.enabled": "true",
"vendor.rild.libpath": "/system/vendor/lib/libril-qc-qmi-1.so",
"vendor.vidc.disable.split.mode": "1",
"vendor.vidc.enc.narrow.searchrange": "1",
"vendor.video.disable.ubwc": "1"
}

View File

@ -12,6 +12,11 @@ in
default = false;
description = "enable when SOC is APQ80641AA";
};
hardware.socs.qualcomm-msm8940.enable = mkOption {
type = types.bool;
default = false;
description = "enable when SOC is msm8940";
};
hardware.socs.qualcomm-msm8953.enable = mkOption {
type = types.bool;
default = false;
@ -45,6 +50,12 @@ in
};
config = mkMerge [
{
mobile = mkIf cfg.qualcomm-msm8940.enable {
system.system = "aarch64-linux";
quirks.fb-refresher.enable = true;
};
}
{
mobile = mkIf cfg.qualcomm-msm8939.enable {
system.system = "aarch64-linux";