1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-16 20:21:32 +03:00
mobile-nixos/devices/razer-cheryl2/default.nix

76 lines
2.0 KiB
Nix
Raw Normal View History

2020-10-10 01:19:34 +03:00
{ pkgs, ... }:
/*
* This file has been generated by autoport.
* **Do not** open a Pull Request without having verified the port works.
*/
{
mobile.device.name = "razer-cheryl2";
mobile.device.identity = {
name = "Phone 2";
manufacturer = "Razer";
};
mobile.hardware = {
soc = "qualcomm-sdm845";
ram = 1024 * 0/* (in MB) To be filled by the user */;
screen = {
width = 0/* To be filled by the user */; height = 0/* To be filled by the user */;
};
};
mobile.boot.stage-1 = {
kernel.package = pkgs.callPackage ./kernel { kernelPatches = pkgs.defaultKernelPatches; };
};
mobile.system.android = {
# This device has an A/B partition scheme.
ab_partitions = true;
bootimg.flash = {
offset_base = "0x00000000";
offset_kernel = "0x00008000";
offset_ramdisk = "0x01000000";
offset_second = "0x00f00000";
offset_tags = "0x00000100";
pagesize = "4096";
};
};
mobile.system.vendor.partition = "/dev/disk/by-partlabel/vendor_a";
boot.kernelParams = [
# Extracted from an Android boot image
"console=ttyMSM0,115200n8"
"earlycon=msm_geni_serial,0xA84000"
"androidboot.hardware=qcom"
"androidboot.console=ttyMSM0"
"video=vfb:640x400,bpp=32,memsize=3072000"
"msm_rtb.filter=0x237"
"ehci-hcd.park=3"
"lpm_levels.sleep_disabled=1"
"service_locator.enable=1"
"swiotlb=2048"
"androidboot.configfs=true"
"firmware_class.path=/vendor/firmware_mnt/image"
"loop.max_part=7"
"androidboot.usbcontroller=a600000.dwc3"
"buildvariant=user"
];
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";
}