1
0
Fork 0
mirror of https://github.com/samueldr/wip-pinebook-pro.git synced 2024-11-23 11:29:43 +01:00
Work of samueldr to run NixOS on the Pine64 Pinebook Pro
Find a file
Samuel Dionne-Riel 87078a9f8f Update README
2021-05-23 19:49:22 -04:00
firmware pinebookpro-firmware -> pinebookpro-ap6256-firmware 2021-05-11 17:22:46 -04:00
kernel kernel/latest: Track the latest kernel 2021-05-11 17:22:46 -04:00
keyboard-updater Adds revised keyboard firmware with fixes 2020-01-22 15:29:19 -05:00
sound Enable right speaker in reset script 2020-04-01 19:42:52 -04:00
.gitignore initial commit 2019-11-14 17:40:51 -05:00
cross-hacks.nix Add workaround for smartmontools cross-compilation regression 2020-09-13 23:43:36 -04:00
default.nix Change how this is built 2021-05-11 18:50:21 -04:00
overlay.nix u-boot: Remove customized build 2021-05-11 19:05:42 -04:00
pinebook_pro.nix Remove s2idle from the default 2021-05-12 21:20:18 -04:00
README.md Update README 2021-05-23 19:49:22 -04:00
system.nix Adds (incomplete) system image build 2020-01-06 15:22:39 -05:00
with-cross.nix Adds (incomplete) system image build 2020-01-06 15:22:39 -05:00

WIP stuff to get started on the pinebook pro.

Using in your configuration

Clone this repository somwhere, and in your configuration.nix

{
  imports = [
    .../pinebook-pro/pinebook_pro.nix
  ];
}

That entry point will try to stay unopinionated, while maximizing the hardware compatibility.

Current state

A whole lot of untested.

You can look at the previous state to see that the basic stuff works. But I find listing everything as working is hard.

What's untested and not working will be listed here at some point. Maybe.

Known issues

rockchipdrm and efifb

CONFIG_FB_EFI has been disabled in the customized kernel as rockchipdrm will not render the VT if efifb is present.

Be careful if using the mainline kernel instead, as it will have CONFIG_FB_EFI set to y.

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.

Power it off by holding the power button for a while (10-15 seconds).

Otherwise you might have a surprise and find the battery is flat!

A workaround exists, and is built in recent Tow-Boot (no prebuilt releases at this time).

Image build

NOTE: These images will be built without an Initial Boot Firmware.

SD image

 $ nix-build -A sdImage

ISO image

 $ nix-build -A isoImage

Note about cross-compilation

This will automatically detect the need for cross-compiling or not.

When cross-compiled, all caveats apply. Here this mainly means that the kernel will need to be re-compiled on the device on the first nixos-rebuild switch, while most other packages can be fetched from the cache.

For cross-compilation, you might have to provide a path to a known-good Nixpkgs checkout. (Left as an exercis to the reader.)

 $ NIX_PATH=nixpkgs=/path/to/known/working/cross-compilation-friendly/nixpkgs

Initial Boot Firmware

NOTE: The previously available customized U-Boot from this repository are not available anymore.

Tow-Boot

I 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 initial 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

 $ 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.