mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-15 02:43:24 +03:00
93039954c2
This sets the red + green LEDs, making it yellow.
45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
mobile.device.name = "pine64-pinephone-braveheart";
|
|
mobile.device.info = rec {
|
|
format_version = "0";
|
|
name = "PinePhone “BraveHeart”";
|
|
manufacturer = "Pine64";
|
|
arch = "aarch64";
|
|
keyboard = false;
|
|
external_storage = true;
|
|
|
|
screen_width = "720";
|
|
screen_height = "1440";
|
|
|
|
# Serial console on ttyS0, using the serial headphone adapter.
|
|
kernel_cmdline = lib.concatStringsSep " " [
|
|
"console=ttyS0,115200"
|
|
"vt.global_cursor_default=0"
|
|
"earlycon=uart,mmio32,0x01c28000"
|
|
"panic=10"
|
|
"consoleblank=0"
|
|
];
|
|
# TODO : make kernel part of options.
|
|
kernel = pkgs.callPackage ./kernel { kernelPatches = pkgs.defaultKernelPatches; };
|
|
};
|
|
|
|
mobile.hardware = {
|
|
soc = "allwinner-a64";
|
|
ram = 1024 * 2;
|
|
screen = {
|
|
width = 720; height = 1440;
|
|
};
|
|
};
|
|
|
|
mobile.system.type = "u-boot";
|
|
mobile.quirks.u-boot.package = pkgs.callPackage ./u-boot {};
|
|
mobile.quirks.u-boot.additionalCommands = ''
|
|
# Yellow LED.
|
|
gpio set 115 # R
|
|
gpio set 114 # G
|
|
gpio clear 116 # B
|
|
'';
|
|
}
|