From fe5a135992a152ad07c3ede43838a9fdacc58037 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Mon, 28 Dec 2020 04:48:40 -0500 Subject: [PATCH] motorola-surfna: Clean-up device description --- devices/motorola-surfna/default.nix | 50 +++++++---------------------- 1 file changed, 12 insertions(+), 38 deletions(-) diff --git a/devices/motorola-surfna/default.nix b/devices/motorola-surfna/default.nix index 0303d091..24ceece5 100644 --- a/devices/motorola-surfna/default.nix +++ b/devices/motorola-surfna/default.nix @@ -1,26 +1,22 @@ { pkgs, ... }: -/* - * This file has been generated by autoport. - * **Do not** open a Pull Request without having verified the port works. - */ { mobile.device.name = "motorola-surfna"; mobile.device.identity = { - name = "moto e6"; - manufacturer = "motorola"; + name = "Moto E6"; + manufacturer = "Motorola"; }; mobile.hardware = { - soc = "qualcomm-msm8937"; - ram = 1024 * 0/* (in MB) To be filled by the user */; + soc = "qualcomm-msm8940"; + ram = 1024 * 2; screen = { - width = 0/* To be filled by the user */; height = 0/* To be filled by the user */; + width = 720; height = 1440; }; }; mobile.boot.stage-1 = { - kernel.package = pkgs.callPackage ./kernel { kernelPatches = pkgs.defaultKernelPatches; }; + kernel.package = pkgs.callPackage ./kernel { }; }; mobile.system.android = { @@ -44,37 +40,15 @@ mobile.system.vendor.partition = "/dev/disk/by-partlabel/vendor"; boot.kernelParams = [ - # Extracted from an Android boot image - "console=ttyMSM0,115200,n8" - "androidboot.console=ttyMSM0" - "androidboot.hardware=qcom" - "user_debug=30" - "msm_rtb.filter=0x237" - "ehci-hcd.park=3" - "androidboot.bootdevice=7824900.sdhci" - "lpm_levels.sleep_disabled=1" - "earlycon=msm_serial_dm,0x78B0000" - "vmalloc=300M" - "firmware_class.path=/vendor/firmware_mnt/image" - "androidboot.usbconfigfs=true" - "loop.max_part=7" - "printk.devkmsg=on" - "buildvariant=user" - "veritykeyid=id:b640f6ee9102b88daa3450b13ef25fc9eb143d63" ]; mobile.system.type = "android"; - /* The usb mode could not be detected. - * Assuming this is an older device, android_usb should be used. - * For a newer device, gadgetfs is to be used. - */ - mobile.usb.mode = null; - - /* To be changed by the author, though those may or may work with any device. */ - # Google - mobile.usb.idVendor = "18D1"; - # "Nexus 4" - mobile.usb.idProduct = "D001"; + mobile.usb.mode = "gadgetfs"; + mobile.usb.idVendor = "22B8"; # Motorola + mobile.usb.idProduct = "2E81"; # "Moto G" + mobile.usb.gadgetfs.functions = { + rndis = "rndis_bam.rndis"; + }; }