2020-03-11 23:52:37 +03:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
mobile.device.name = "pine64-pinephone-braveheart";
|
2020-05-24 00:27:57 +03:00
|
|
|
mobile.device.identity = {
|
2020-03-11 23:52:37 +03:00
|
|
|
name = "PinePhone “BraveHeart”";
|
|
|
|
manufacturer = "Pine64";
|
2020-05-24 00:27:57 +03:00
|
|
|
};
|
2020-03-11 23:52:37 +03:00
|
|
|
|
|
|
|
mobile.hardware = {
|
|
|
|
soc = "allwinner-a64";
|
|
|
|
ram = 1024 * 2;
|
|
|
|
screen = {
|
|
|
|
width = 720; height = 1440;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-05-25 01:39:33 +03:00
|
|
|
mobile.boot.stage-1 = {
|
|
|
|
kernel.package = pkgs.callPackage ./kernel { kernelPatches = pkgs.defaultKernelPatches; };
|
|
|
|
};
|
|
|
|
|
2020-05-24 01:14:10 +03:00
|
|
|
boot.kernelParams = [
|
2020-05-24 09:44:39 +03:00
|
|
|
# Serial console on ttyS0, using the serial headphone adapter.
|
2020-05-24 01:14:10 +03:00
|
|
|
"console=ttyS0,115200"
|
|
|
|
"vt.global_cursor_default=0"
|
|
|
|
"earlycon=uart,mmio32,0x01c28000"
|
|
|
|
"panic=10"
|
|
|
|
"consoleblank=0"
|
|
|
|
];
|
|
|
|
|
2020-03-11 23:52:37 +03:00
|
|
|
mobile.system.type = "u-boot";
|
|
|
|
mobile.quirks.u-boot.package = pkgs.callPackage ./u-boot {};
|
2020-03-28 08:36:22 +03:00
|
|
|
mobile.quirks.u-boot.additionalCommands = ''
|
|
|
|
# Yellow LED.
|
2020-03-28 08:36:59 +03:00
|
|
|
gpio set 115 # R
|
|
|
|
gpio set 114 # G
|
2020-03-28 08:36:22 +03:00
|
|
|
gpio clear 116 # B
|
|
|
|
'';
|
2020-03-11 23:52:37 +03:00
|
|
|
}
|