mirror of
https://github.com/samueldr/wip-pinebook-pro.git
synced 2024-11-26 21:09:43 +01:00
Set this up using a proper overlay
This commit is contained in:
parent
63e6288f96
commit
fdbecb02b6
3 changed files with 20 additions and 8 deletions
|
@ -5,7 +5,7 @@ WIP stuff to get started on the pinebook pro.
|
||||||
Assuming `/dev/mmcblk0` is an SD card.
|
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
|
$ 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
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
16
default.nix
16
default.nix
|
@ -1,15 +1,17 @@
|
||||||
{
|
{
|
||||||
pkgs' ? import <nixpkgs> {}
|
pkgs ? import (builtins.fetchTarball "channel:nixos-19.09") {
|
||||||
|
overlays = [
|
||||||
|
(import ./overlay.nix)
|
||||||
|
];
|
||||||
|
}
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
pkgs = if builtins.currentSystem == "aarch64-linux"
|
pkgs' = if builtins.currentSystem == "aarch64-linux"
|
||||||
then pkgs'
|
then pkgs
|
||||||
else pkgs'.pkgsCross.aarch64-multiplatform
|
else pkgs.pkgsCross.aarch64-multiplatform
|
||||||
;
|
;
|
||||||
|
|
||||||
inherit (pkgs) callPackage;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
u-boot = callPackage ./u-boot {};
|
pkgs = pkgs';
|
||||||
}
|
}
|
||||||
|
|
10
overlay.nix
Normal file
10
overlay.nix
Normal 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 {};
|
||||||
|
}
|
Loading…
Reference in a new issue