mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-16 20:21:32 +03:00
f67bbf99d9
NOTE: this has been detected as armv7l as the kernel and system on the device is built for 32 bit ARM. The SoC actually supports 64 bit.
81 lines
2.1 KiB
Nix
81 lines
2.1 KiB
Nix
{ 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";
|
|
};
|
|
|
|
mobile.hardware = {
|
|
soc = "qualcomm-msm8937";
|
|
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 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 = [
|
|
# 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";
|
|
|
|
}
|