1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-17 21:11:34 +03:00
mobile-nixos/devices/sony-pioneer/default.nix

93 lines
2.6 KiB
Nix
Raw Normal View History

2020-09-28 04:54:08 +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 = "sony-pioneer";
mobile.device.identity = {
name = "Xperia XA2";
manufacturer = "Sony";
};
mobile.hardware = {
soc = "qualcomm-sdm660";
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 = {
/* The detection for ab_partitions is really not great.
* Verify your device "has slots" with fastboot.
* The most likely value has been selected.
*/
ab_partitions = true;
/* Your kernel knows about `skip_initramfs`.
* - Remove the following lines from this file if your device **does use**
* the A/B partition scheme.
* - If your device **does not** use the A/B partition scheme (does not
* have slots) the following values should be set to true if the
* bootloader adds `skip_initramfs` to the kernel command line options.
*/
# boot_as_recovery = true;
# has_recovery_partition = true;
bootimg.flash = {
offset_base = "0x00000000";
offset_kernel = "0x00008000";
offset_ramdisk = "0x01000000";
offset_second = "0x00f00000";
offset_tags = "0x00000100";
pagesize = "4096";
};
};
/* If your device has A/B partitions, the partition label is "vendor_a".
* Otherwise it's "vendor".
* The most likely value has been selected.
*/
mobile.system.vendor.partition = "/dev/disk/by-partlabel/vendor_a";
boot.kernelParams = [
# Extracted from an Android boot image
"androidboot.hardware=qcom"
"user_debug=31"
"msm_rtb.filter=0x37"
"ehci-hcd.park=3"
"lpm_levels.sleep_disabled=1"
"sched_enable_hmp=1"
"sched_enable_power_aware=1"
"service_locator.enable=1"
"swiotlb=1"
"firmware_class.path=/vendor/firmware_mnt/image"
"loop.max_part=7"
"panic_on_err=1"
"loop.max_part=7"
"buildvariant=user"
"veritykeyid=id:7178c839cde12f22cc9da21c692827e699dff45b"
];
mobile.system.type = "android";
mobile.usb.mode = "gadgetfs";
/* 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.gadgetfs.functions = {
/* The following is a common valid value for rndis. Uncomment it and try it out. */
#rndis = "gsi.rndis";
};
}