Try adding soquartz
This commit is contained in:
parent
c29e786f55
commit
1ee5ffb332
5 changed files with 87 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,6 +2,7 @@
|
|||
.idea
|
||||
*.log
|
||||
tmp/
|
||||
/result
|
||||
|
||||
# just now we don't want to lock
|
||||
flake.lock
|
||||
|
|
14
default.nix
14
default.nix
|
@ -1,19 +1,25 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
{ pkgs ? import <nixos-unstable> { }
|
||||
}:
|
||||
|
||||
let
|
||||
aarch64Pkgs = import pkgs.path {
|
||||
system = "aarch64-linux";
|
||||
};
|
||||
|
||||
buildImage = pkgs.callPackage ./pkgs/build-image {};
|
||||
aarch64Image = pkgs.callPackage ./pkgs/aarch64-image {};
|
||||
buildImage = pkgs.callPackage ./pkgs/build-image { };
|
||||
aarch64Image = pkgs.callPackage ./pkgs/aarch64-image { };
|
||||
rockchip = uboot: pkgs.callPackage ./images/rockchip.nix {
|
||||
inherit uboot;
|
||||
inherit aarch64Image buildImage;
|
||||
};
|
||||
in {
|
||||
quartzUBoots = aarch64Pkgs.callPackage ./pkgs/uboot-quartz64.nix { };
|
||||
in
|
||||
{
|
||||
inherit aarch64Image;
|
||||
|
||||
quartz64a = rockchip quartzUBoots.ubootQuartz64a;
|
||||
quartz64b = rockchip quartzUBoots.ubootQuartz64b;
|
||||
soquartz = rockchip quartzUBoots.ubootSoQuartz;
|
||||
rock64 = rockchip aarch64Pkgs.ubootRock64;
|
||||
rockPro64 = rockchip aarch64Pkgs.ubootRockPro64;
|
||||
roc-pc-rk3399 = rockchip aarch64Pkgs.ubootROCPCRK3399;
|
||||
|
|
27
flake.lock
Normal file
27
flake.lock
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1673569462,
|
||||
"narHash": "sha256-iQUrbM/abkPzukU0GXwyb0ACBk1C9RH91Do0nL2/3jE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e5c10c91bd8c45f24d5064f7b3a0b71b6c8b343b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "master",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
description = "Build NixOS images for various ARM single computer boards";
|
||||
# pin this to unstable
|
||||
# inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/master";
|
||||
|
||||
outputs = { self, nixpkgs }: {
|
||||
packages.x86_64-linux = import ./. {
|
||||
|
|
48
pkgs/uboot-quartz64.nix
Normal file
48
pkgs/uboot-quartz64.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, buildUBoot
|
||||
}:
|
||||
|
||||
let
|
||||
bl31Blobs = fetchFromGitHub {
|
||||
owner = "JeffyCN";
|
||||
repo = "rockchip_mirrors";
|
||||
rev = "6186debcac95553f6b311cee10669e12c9c9963d";
|
||||
sha256 = "nH/g95QMv0bFgbT5jiKTAa3Vd0gnqtG4M6nkZ5R3S0E=";
|
||||
};
|
||||
rkbinBlobs = fetchFromGitHub {
|
||||
owner = "rockchip-linux";
|
||||
repo = "rkbin";
|
||||
rev = "a4c6de9ea29f275bb1d08c94ccded51ff2ab5b92";
|
||||
sha256 = "e3RH/4hi+xc5cQpzt2txyZYNMGQvC1jGDJpzBY2QSHo=";
|
||||
};
|
||||
buildQuartz64UBoot = (defconfig: buildUBoot {
|
||||
version = "2022.64-rc1";
|
||||
defconfig = defconfig;
|
||||
src = fetchFromGitHub {
|
||||
owner = "CounterPillow";
|
||||
repo = "u-boot-quartz64";
|
||||
rev = "87c317f72735f9b336c55b9e00222e71816040e7";
|
||||
sha256 = "mmy6fY6+7aVSdYr/pZCX2kTP7/Zj3Ib1uBN9gFWFoxw=";
|
||||
};
|
||||
extraMakeFlags = [
|
||||
"ARCH=arm"
|
||||
];
|
||||
extraMeta = {
|
||||
platforms = [ "aarch64-linux" ];
|
||||
license = lib.licenses.unfreeRedistributableFirmware;
|
||||
};
|
||||
filesToInstall = [ "u-boot.itb" "idbloader.img" ];
|
||||
preConfigure = ''
|
||||
make mrproper
|
||||
|
||||
cp "${bl31Blobs}/bin/rk35/rk3568_bl31_v1.28.elf" "bl31.elf"
|
||||
cp "${rkbinBlobs}/bin/rk35/rk3566_ddr_1056MHz_v1.13.bin" ram_init.bin
|
||||
'';
|
||||
});
|
||||
in
|
||||
{
|
||||
ubootSoQuartz = buildQuartz64UBoot "soquartz-rk3566_defconfig";
|
||||
ubootQuartz64b = buildQuartz64UBoot "quartz64-b-rk3566_defconfig";
|
||||
ubootQuartz64a = buildQuartz64UBoot "quartz64-a-rk3566_defconfig";
|
||||
}
|
Loading…
Reference in a new issue