Merge pull request #297946 from K900/cherrypick-rk3588
Cherrypick #292667 (RK3588 uboot support) to master
This commit is contained in:
commit
0ebdaea977
5 changed files with 82 additions and 1 deletions
|
@ -19356,6 +19356,13 @@
|
|||
githubId = 42933;
|
||||
name = "Andrew Childs";
|
||||
};
|
||||
thefossguy = {
|
||||
name = "Pratham Patel";
|
||||
email = "prathampatel@thefossguy.com";
|
||||
matrix = "@thefossguy:matrix.org";
|
||||
github = "thefossguy";
|
||||
githubId = 44400303;
|
||||
};
|
||||
thehedgeh0g = {
|
||||
name = "The Hedgehog";
|
||||
email = "hedgehog@mrhedgehog.xyz";
|
||||
|
|
34
pkgs/by-name/rk/rkbin/package.nix
Normal file
34
pkgs/by-name/rk/rkbin/package.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "rkbin";
|
||||
version = "unstable-2024.02.22";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rockchip-linux";
|
||||
repo = "rkbin";
|
||||
rev = "a2a0b89b6c8c612dca5ed9ed8a68db8a07f68bc0";
|
||||
hash = "sha256-U/jeUsV7bhqMw3BljmO6SI07NCDAd/+sEp3dZnyXeeA=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
mv bin doc $out/
|
||||
'';
|
||||
|
||||
BL31_RK3568 = "bin/rk35/rk3568_ddr_1056MHz_v1.21.bin";
|
||||
ROCKCHIP_TPL_RK3568 = "bin/rk35/rk3568_ddr_1056MHz_v1.21.bin";
|
||||
|
||||
ROCKCHIP_TPL_RK3588 = "bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.16.bin";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Rockchip proprietary bootloader blobs";
|
||||
homepage = "https://github.com/rockchip-linux/rkbin";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ thefossguy ];
|
||||
platforms = [ "aarch64-linux" ];
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, stdenv, fetchFromGitHub, openssl, pkgsCross, buildPackages
|
||||
{ lib, stdenv, fetchFromGitHub, fetchFromGitLab, openssl, pkgsCross, buildPackages
|
||||
|
||||
# Warning: this blob (hdcp.bin) runs on the main CPU (not the GPU) at
|
||||
# privilege level EL3, which is above both the kernel and the
|
||||
|
@ -151,6 +151,25 @@ in {
|
|||
platformCanUseHDCPBlob = true;
|
||||
};
|
||||
|
||||
armTrustedFirmwareRK3588 = buildArmTrustedFirmware rec {
|
||||
extraMakeFlags = [ "bl31" ];
|
||||
platform = "rk3588";
|
||||
extraMeta.platforms = ["aarch64-linux"];
|
||||
filesToInstall = [ "build/${platform}/release/bl31/bl31.elf"];
|
||||
platformCanUseHDCPBlob = true;
|
||||
|
||||
# TODO: remove this once the following get merged:
|
||||
# 1: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/21840
|
||||
# 2: https://review.trustedfirmware.org/c/ci/tf-a-ci-scripts/+/21833
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.collabora.com";
|
||||
owner = "hardware-enablement/rockchip-3588";
|
||||
repo = "trusted-firmware-a";
|
||||
rev = "002d8e85ce5f4f06ebc2c2c52b4923a514bfa701";
|
||||
hash = "sha256-1XOG7ILIgWa3uXUmAh9WTfSGLD/76OsmWrUhIxm/zTg=";
|
||||
};
|
||||
};
|
||||
|
||||
armTrustedFirmwareS905 = buildArmTrustedFirmware rec {
|
||||
extraMakeFlags = [ "bl31" ];
|
||||
platform = "gxbb";
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
, meson-tools
|
||||
, ncurses
|
||||
, openssl
|
||||
, rkbin
|
||||
, swig
|
||||
, which
|
||||
, python3
|
||||
|
@ -21,6 +22,7 @@
|
|||
, armTrustedFirmwareAllwinnerH616
|
||||
, armTrustedFirmwareRK3328
|
||||
, armTrustedFirmwareRK3399
|
||||
, armTrustedFirmwareRK3588
|
||||
, armTrustedFirmwareS905
|
||||
, buildPackages
|
||||
}:
|
||||
|
@ -371,6 +373,14 @@ in {
|
|||
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
|
||||
};
|
||||
|
||||
ubootOrangePi5 = buildUBoot {
|
||||
defconfig = "orangepi-5-rk3588s_defconfig";
|
||||
extraMeta.platforms = ["aarch64-linux"];
|
||||
BL31 = "${armTrustedFirmwareRK3588}/bl31.elf";
|
||||
ROCKCHIP_TPL = "${rkbin}/${rkbin.ROCKCHIP_TPL_RK3588}";
|
||||
filesToInstall = [ "u-boot.itb" "idbloader.img" "u-boot-rockchip.bin" ];
|
||||
};
|
||||
|
||||
ubootOrangePiPc = buildUBoot {
|
||||
defconfig = "orangepi_pc_defconfig";
|
||||
extraMeta.platforms = ["armv7l-linux"];
|
||||
|
@ -515,6 +525,14 @@ in {
|
|||
filesToInstall = ["u-boot.bin"];
|
||||
};
|
||||
|
||||
ubootRock5ModelB = buildUBoot {
|
||||
defconfig = "rock5b-rk3588_defconfig";
|
||||
extraMeta.platforms = ["aarch64-linux"];
|
||||
BL31 = "${armTrustedFirmwareRK3588}/bl31.elf";
|
||||
ROCKCHIP_TPL = "${rkbin}/${rkbin.ROCKCHIP_TPL_RK3588}";
|
||||
filesToInstall = [ "u-boot.itb" "idbloader.img" "u-boot-rockchip.bin" "u-boot-rockchip-spi.bin" ];
|
||||
};
|
||||
|
||||
ubootRock64 = buildUBoot {
|
||||
defconfig = "rock64-rk3328_defconfig";
|
||||
extraMeta.platforms = [ "aarch64-linux" ];
|
||||
|
|
|
@ -27155,6 +27155,7 @@ with pkgs;
|
|||
armTrustedFirmwareQemu
|
||||
armTrustedFirmwareRK3328
|
||||
armTrustedFirmwareRK3399
|
||||
armTrustedFirmwareRK3588
|
||||
armTrustedFirmwareS905
|
||||
;
|
||||
|
||||
|
@ -28360,6 +28361,7 @@ with pkgs;
|
|||
ubootOlimexA64Olinuxino
|
||||
ubootOlimexA64Teres1
|
||||
ubootOrangePi3
|
||||
ubootOrangePi5
|
||||
ubootOrangePiPc
|
||||
ubootOrangePiZeroPlus2H5
|
||||
ubootOrangePiZero
|
||||
|
@ -28380,6 +28382,7 @@ with pkgs;
|
|||
ubootRaspberryPi4_32bit
|
||||
ubootRaspberryPi4_64bit
|
||||
ubootRaspberryPiZero
|
||||
ubootRock5ModelB
|
||||
ubootRock64
|
||||
ubootRock64v2
|
||||
ubootRockPi4
|
||||
|
|
Loading…
Reference in a new issue