1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-17 04:51:31 +03:00
mobile-nixos/devices/pine64-pinephone/default.nix
Samuel Dionne-Riel 082770117c pine64-pinephone: Add modem firmware updater
This has not been made "fancier" for easier use yet. It is unknown how
useful updating the firmware is.

Usage:

```
 $ NIXPKGS_ALLOW_UNFREE=1 nix-build --argstr device pine64-pinephone -A pkgs.pine64-pinephone.qfirehose
 $ sudo ./result/bin/QFirehose -l ./ -f ./newfw
```

But maybe read more about whether you want to update or not beforehand?

https://forum.pine64.org/showthread.php?tid=11815
2020-10-18 17:53:41 -04:00

51 lines
995 B
Nix

{ config, lib, pkgs, ... }:
{
imports = [
./modem.nix
];
nixpkgs.overlays = [
(import ./overlay)
];
mobile.device.name = "pine64-pinephone";
mobile.device.identity = {
name = "PinePhone";
manufacturer = "Pine64";
};
mobile.hardware = {
soc = "allwinner-a64";
ram = 1024 * 2;
screen = {
width = 720; height = 1440;
};
};
mobile.boot.stage-1 = {
kernel.package = pkgs.callPackage ./kernel { };
};
boot.kernelParams = [
# Serial console on ttyS0, using the serial headphone adapter.
"console=ttyS0,115200"
"vt.global_cursor_default=0"
"earlycon=uart,mmio32,0x01c28000"
"panic=10"
"consoleblank=0"
];
mobile.system.type = "u-boot";
mobile.device.firmware = pkgs.callPackage ./firmware {};
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
'';
}