Update uboot, deps

This commit is contained in:
asonix 2023-02-16 16:52:40 -06:00
parent 6583702e8c
commit 530aec602c
3 changed files with 45 additions and 24 deletions

View file

@ -23,11 +23,11 @@
]
},
"locked": {
"lastModified": 1674666581,
"narHash": "sha256-KNI2s/xrL7WOYaPJAWKBtb7cCH3335rLfsL+B+ssuGY=",
"lastModified": 1676297861,
"narHash": "sha256-YECUmK34xzg0IERpnbCnaO6z6YgfecJlstMWX7dqOZ8=",
"owner": "nix-community",
"repo": "nixos-generators",
"rev": "6a5dc1d3d557ea7b5c19b15ff91955124d0400fa",
"rev": "1e0a05219f2a557d4622bc38f542abb360518795",
"type": "github"
},
"original": {
@ -38,11 +38,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1675454231,
"narHash": "sha256-5rgcWq1nFWlbR3NsLqY7i/7358uhkSeMQJ/LEHk3BWA=",
"lastModified": 1676481215,
"narHash": "sha256-afma/1RU0EePRyrBPcjBdOt+dV8z1bJH9dtpTN/WXmY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "06999209d7a0043d4372e38f57cffae00223d592",
"rev": "28319deb5ab05458d9cd5c7d99e1a24ec2e8fc4b",
"type": "github"
},
"original": {

View file

@ -102,15 +102,15 @@
};
soquartz-model-a = rockchip {
system = system.soquartz-model-a;
uboot = quartzUBoots.ubootSoQuartz;
uboot = quartzUBoots.ubootSoQuartzModelA;
};
soquartz-cm4 = rockchip {
system = system.soquartz-cm4;
uboot = quartzUBoots.ubootSoQuartz;
uboot = quartzUBoots.ubootSoQuartzCM4;
};
soquartz-blade = rockchip {
system = system.soquartz-blade;
uboot = quartzUBoots.ubootSoQuartz;
uboot = quartzUBoots.ubootSoQuartzBlade;
};
rock64 = rockchip {
system = system.rock64;

View file

@ -1,4 +1,5 @@
{ lib
, pkgs
, fetchFromGitHub
, buildUBoot
, buildPackages
@ -7,10 +8,10 @@
let
bl31Blobs = fetchFromGitHub {
owner = "JeffyCN";
repo = "rockchip_mirrors";
rev = "6186debcac95553f6b311cee10669e12c9c9963d";
sha256 = "nH/g95QMv0bFgbT5jiKTAa3Vd0gnqtG4M6nkZ5R3S0E=";
owner = "rockchip-linux";
repo = "rkbin";
rev = "87885c48747a358dc8eb1808db99e313935e129e";
sha256 = "aQj4JHk67dlr9OGI5SdbQSypQllIasF0TZFoPNARuTo=";
};
rkbinBlobs = fetchFromGitHub {
owner = "rockchip-linux";
@ -19,36 +20,56 @@ let
sha256 = "e3RH/4hi+xc5cQpzt2txyZYNMGQvC1jGDJpzBY2QSHo=";
};
buildQuartz64UBoot = (defconfig: buildUBoot {
version = "2022.64-rc1";
version = "2023.04-rc1";
defconfig = defconfig;
src = fetchFromGitHub {
owner = "CounterPillow";
repo = "u-boot-quartz64";
rev = "2ea8c1c4db6d739273ae3821970c02e9d3b6180b";
sha256 = "vtM8uTTrnwRG61CfATSzNFyW1Nij+nonSMMUs+AyHZY=";
rev = "5c6103317c76d5e7ca47700176e2e04747cebee6";
sha256 = "do9s7aAwH5uZ1wEKlnrfmlWS2O4jcKeUGWLgpzVTPIc=";
};
nativeBuildInputs = with pkgs; [
ncurses # tools/kwboot
bc
bison
dtc
flex
openssl
(buildPackages.python3.withPackages (p: [
p.libfdt
p.setuptools # for pkg_resources
p.pyelftools
]))
swig
which # for scripts/dtc-version.sh
];
extraMakeFlags = [
"ARCH=arm"
];
extraMeta = {
platforms = [ "aarch64-linux" ];
license = lib.licenses.unfreeRedistributableFirmware;
};
filesToInstall = [ "u-boot.itb" "idbloader.img" ];
# cflags is workaround based on https://github.com/NixOS/nixpkgs/commit/8b3a31f923662bc3003be4943bc382c46136cb5f
BL31 = "${bl31Blobs}/bin/rk35/rk3568_bl31_v1.34.elf";
ROCKCHIP_TPL = "${rkbinBlobs}/bin/rk35/rk3566_ddr_1056MHz_v1.13.bin";
preConfigure = ''
export NIX_CFLAGS_COMPILE_BEFORE_${lib.replaceStrings ["-" "."] ["_" "_"] buildPackages.stdenv.hostPlatform.config}=$(< ${buildPackages.stdenv.cc}/nix-support/libc-cflags)
export NIX_CFLAGS_COMPILE_BEFORE_${lib.replaceStrings ["-" "."] ["_" "_"] stdenv.hostPlatform.config}=$(< ${stdenv.cc}/nix-support/libc-cflags)
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";
ubootSoQuartzBlade = buildQuartz64UBoot "soquartz-blade-rk3566_defconfig";
ubootSoQuartzCM4 = buildQuartz64UBoot "soquartz-cm4io-rk3566_defconfig";
ubootSoQuartzModelA = buildQuartz64UBoot "soquartz-model-a-rk3566_defconfig";
ubootQuartz64b = buildQuartz64UBoot "quartz64-b-rk3566_defconfig";
ubootQuartz64a = buildQuartz64UBoot "quartz64-a-rk3566_defconfig";
}