1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-14 06:59:41 +01:00
nixos-hardware/pine64/pinebook-pro
Winston R. Milling 9b98a70d46
Update disused function to runCommand
runCommandNoCC is deprecated.
2022-09-28 10:44:52 -05:00
..
firmware/ap6256-firmware Update disused function to runCommand 2022-09-28 10:44:52 -05:00
keyboard-updater Add: pinebook-pro @aciceri 2022-04-09 08:10:42 +01:00
sound Add: pinebook-pro @aciceri 2022-04-09 08:10:42 +01:00
default.nix Merge pull request #445 from tomfitzhenry/pbp-no-freq-override 2022-08-12 09:02:29 +01:00
overlay.nix Add: pinebook-pro @aciceri 2022-04-09 08:10:42 +01:00
README.md Add: pinebook-pro @aciceri 2022-04-09 08:10:42 +01:00

NOTE: This is an attempt to port samueldr's wip-pinebookpro to nixos-hardware. Credit for the work done goes to the original authors.

Using in your configuration

To use this configuration simply add this module to your configuration.

{
  imports = [
    ${nixos-hardware}/pine64/pinebook-pro
  ];
}

That entry point will try to maximize the hardware compatibility.

Current state

Currently everything seems to work but this is not guaranteed it will be forever.

Kernel

This module defaults to the latest upstream kernel. Attempts have been made to use manjaro's kernel that makes the DP alt mode available over Type-C, but it turns out that the kernel is unstable and some sporadic kernel panics may occur. If you want to this kernel, you can grab the nix expression from this commit: 6d1bd5bc2e/pine64/pinebook-pro/kernel/default.nix

Known issues

HDMI over Type-C

HDMI over Type-C works only for the custom kernel and the audio dosen't work (it's an upstream problem).

rockchipdrm and efifb

This can be worked around by booting with the efifb=off kernel command-line.

This is already handled for you by this configuration. If using the generic UEFI AArch64 iso, you will need to add the option yourself to the command-line using GRUB.

EFI and poweroff

When booted using EFI, the system will not power off. It will stay seemingly stuck with the LED and display turned off.

A workaround exists, and is built in recent Tow-Boot (make sure your release is 2021.10-004 or more recent).

Tow-Boot

We highly suggest installing Tow-Boot to the SPI Flash.

Having the firmware installed to SPI makes the device act basically like a normal computer. No need for weird incantations to setup the platform boot firmware.

Alternatively, starting from the Tow-Boot disk image on eMMC is easier to deal with and understand than having to deal with U-Boot manually.

Mainline U-Boot

Mainline U-Boot has full support for graphics since 2021.04. The current unstable relases of Nixpkgs are at 2021.04 at least.

 $ nix-build -A pkgs.ubootPinebookPro

Note that the default U-Boot build does not do anything with LED on startup.

Keyboard firmware

WARNING: Some hardware batches for the Pinebook Pro ship with the wrong chip for the keyboard controller. While it will work with the firmware it ships with, it may brick while flashing the updated firmware. See this comment on the firmware repository.

It is unclear how to identify said hardware from a running system.

To determine which keyboard controller you have, you will need to disassemble the Pinebook Pro as per the Pine64 wiki, and make sure that the IC next to the U23 marking on the main board is an SH68F83.

 $ nix-build -A pkgs.pinebookpro-keyboard-updater
 $ sudo ./result/bin/updater step-1 <iso|ansi>
 $ sudo poweroff
 # ...
 $ sudo ./result/bin/updater step-2 <iso|ansi>
 $ sudo poweroff
 # ...
 $ sudo ./result/bin/updater flash-kb-revised <iso|ansi>

Note: poweroff must be used, reboot does not turn the hardware "off" enough.