1
0
Fork 0
mirror of https://github.com/samueldr/wip-pinebook-pro.git synced 2024-11-23 03:19:43 +01:00

Set this up using a proper overlay

This commit is contained in:
Samuel Dionne-Riel 2020-01-06 15:21:02 -05:00
parent 63e6288f96
commit fdbecb02b6
3 changed files with 20 additions and 8 deletions

View file

@ -5,7 +5,7 @@ WIP stuff to get started on the pinebook pro.
Assuming `/dev/mmcblk0` is an SD card.
```
$ nix-build -A u-boot
$ nix-build -A pkgs.u-boot-pinebookpro
$ lsblk /dev/mmcblk0 && sudo dd if=result/idbloader.img of=/dev/mmcblk0 bs=512 seek=64 oflag=direct,sync && sudo dd if=result/u-boot.itb of=/dev/mmcblk0 bs=512 seek=16384 oflag=direct,sync
```

View file

@ -1,15 +1,17 @@
{
pkgs' ? import <nixpkgs> {}
pkgs ? import (builtins.fetchTarball "channel:nixos-19.09") {
overlays = [
(import ./overlay.nix)
];
}
}:
let
pkgs = if builtins.currentSystem == "aarch64-linux"
then pkgs'
else pkgs'.pkgsCross.aarch64-multiplatform
pkgs' = if builtins.currentSystem == "aarch64-linux"
then pkgs
else pkgs.pkgsCross.aarch64-multiplatform
;
inherit (pkgs) callPackage;
in
{
u-boot = callPackage ./u-boot {};
pkgs = pkgs';
}

10
overlay.nix Normal file
View file

@ -0,0 +1,10 @@
final: super:
let
inherit (final) callPackage;
in
{
# Alternative BSP u-boot, with nvme support if desired
# * https://gitlab.manjaro.org/manjaro-arm/packages/core/uboot-pinebookpro
u-boot-pinebookpro = callPackage ./u-boot {};
}