2019-11-18 22:33:27 +03:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
mobile.device.name = "google-walleye";
|
|
|
|
mobile.device.info = rec {
|
2020-04-04 07:23:51 +03:00
|
|
|
name = "Pixel 2";
|
2019-11-18 22:33:27 +03:00
|
|
|
# TODO : make kernel part of options.
|
|
|
|
kernel = pkgs.callPackage ./kernel { kernelPatches = pkgs.defaultKernelPatches; };
|
|
|
|
|
|
|
|
format_version = "0";
|
|
|
|
manufacturer = "Google";
|
|
|
|
codename = "google-walleye";
|
|
|
|
date = "";
|
|
|
|
dtb = "";
|
|
|
|
modules_initfs = "";
|
|
|
|
arch = "aarch64";
|
|
|
|
keyboard = "false";
|
|
|
|
external_storage = "true";
|
|
|
|
screen_width = "1080";
|
|
|
|
screen_height = "1920";
|
|
|
|
dev_touchscreen = "";
|
|
|
|
dev_touchscreen_calibration = "";
|
|
|
|
dev_keyboard = "";
|
|
|
|
flash_method = "fastboot";
|
|
|
|
|
2019-12-28 01:05:39 +03:00
|
|
|
kernel_cmdline = lib.concatStringsSep " " [
|
|
|
|
# From TWRP
|
|
|
|
"androidboot.hardware=walleye"
|
|
|
|
"androidboot.console=ttyMSM0"
|
|
|
|
"lpm_levels.sleep_disabled=1"
|
|
|
|
"user_debug=31"
|
|
|
|
"msm_rtb.filter=0x37"
|
|
|
|
"ehci-hcd.park=3"
|
|
|
|
"service_locator.enable=1"
|
|
|
|
"swiotlb=2048"
|
|
|
|
"firmware_class.path=/vendor/firmware"
|
|
|
|
"loop.max_part=7"
|
|
|
|
"raid=noautodetect"
|
|
|
|
"androidboot.fastboot=1"
|
|
|
|
"buildvariant=eng"
|
2019-12-28 01:11:41 +03:00
|
|
|
|
|
|
|
# Using `quiet` fixes early framebuffer init, for stage-1
|
|
|
|
"quiet"
|
2019-12-28 01:05:39 +03:00
|
|
|
];
|
2019-11-18 22:33:27 +03:00
|
|
|
|
|
|
|
generate_bootimg = "true";
|
|
|
|
bootimg_qcdt = false;
|
|
|
|
flash_offset_base = "0x00000000";
|
|
|
|
flash_offset_kernel = "0x00008000";
|
|
|
|
flash_offset_ramdisk = "0x01000000";
|
|
|
|
flash_offset_second = "0x00f00000";
|
|
|
|
flash_offset_tags = "0x00000100";
|
|
|
|
flash_pagesize = "4096";
|
2020-01-13 01:19:22 +03:00
|
|
|
|
2020-02-29 06:02:18 +03:00
|
|
|
# This device adds skip_initramfs to cmdline for normal boots
|
|
|
|
boot_as_recovery = true;
|
|
|
|
|
2020-01-13 01:19:22 +03:00
|
|
|
ab_partitions = true;
|
2020-01-13 22:57:02 +03:00
|
|
|
vendor_partition = "/dev/disk/by-partlabel/vendor_a";
|
2020-01-13 01:21:35 +03:00
|
|
|
gadgetfs.functions = {
|
|
|
|
rndis = "gsi.rndis";
|
|
|
|
# FIXME: This is the right function name, but doesn't work.
|
2020-01-26 03:39:28 +03:00
|
|
|
# adb = "ffs.usb0";
|
2020-01-13 01:21:35 +03:00
|
|
|
};
|
2019-11-18 22:33:27 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
mobile.hardware = {
|
|
|
|
soc = "qualcomm-msm8998";
|
|
|
|
ram = 1024 * 4;
|
|
|
|
screen = {
|
|
|
|
width = 1080; height = 1920;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
mobile.system.type = "android";
|
2020-01-13 01:18:56 +03:00
|
|
|
|
2020-01-14 01:57:48 +03:00
|
|
|
mobile.usb.mode = "gadgetfs";
|
2020-01-13 01:18:56 +03:00
|
|
|
# Google
|
|
|
|
mobile.usb.idVendor = "18D1";
|
|
|
|
# "Nexus 4"
|
|
|
|
mobile.usb.idProduct = "D001";
|
2019-11-18 22:33:27 +03:00
|
|
|
}
|