Merge pull request #292667 from thefossguy/rk3588-init
Initial RK3588 support in nixpkgs
This commit is contained in:
commit
24ff2807a6
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
|
# 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
|
# privilege level EL3, which is above both the kernel and the
|
||||||
|
@ -151,6 +151,25 @@ in {
|
||||||
platformCanUseHDCPBlob = true;
|
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 {
|
armTrustedFirmwareS905 = buildArmTrustedFirmware rec {
|
||||||
extraMakeFlags = [ "bl31" ];
|
extraMakeFlags = [ "bl31" ];
|
||||||
platform = "gxbb";
|
platform = "gxbb";
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
, meson-tools
|
, meson-tools
|
||||||
, ncurses
|
, ncurses
|
||||||
, openssl
|
, openssl
|
||||||
|
, rkbin
|
||||||
, swig
|
, swig
|
||||||
, which
|
, which
|
||||||
, python3
|
, python3
|
||||||
|
@ -21,6 +22,7 @@
|
||||||
, armTrustedFirmwareAllwinnerH616
|
, armTrustedFirmwareAllwinnerH616
|
||||||
, armTrustedFirmwareRK3328
|
, armTrustedFirmwareRK3328
|
||||||
, armTrustedFirmwareRK3399
|
, armTrustedFirmwareRK3399
|
||||||
|
, armTrustedFirmwareRK3588
|
||||||
, armTrustedFirmwareS905
|
, armTrustedFirmwareS905
|
||||||
, buildPackages
|
, buildPackages
|
||||||
}:
|
}:
|
||||||
|
@ -371,6 +373,14 @@ in {
|
||||||
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
|
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 {
|
ubootOrangePiPc = buildUBoot {
|
||||||
defconfig = "orangepi_pc_defconfig";
|
defconfig = "orangepi_pc_defconfig";
|
||||||
extraMeta.platforms = ["armv7l-linux"];
|
extraMeta.platforms = ["armv7l-linux"];
|
||||||
|
@ -515,6 +525,14 @@ in {
|
||||||
filesToInstall = ["u-boot.bin"];
|
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 {
|
ubootRock64 = buildUBoot {
|
||||||
defconfig = "rock64-rk3328_defconfig";
|
defconfig = "rock64-rk3328_defconfig";
|
||||||
extraMeta.platforms = [ "aarch64-linux" ];
|
extraMeta.platforms = [ "aarch64-linux" ];
|
||||||
|
|
|
@ -27190,6 +27190,7 @@ with pkgs;
|
||||||
armTrustedFirmwareQemu
|
armTrustedFirmwareQemu
|
||||||
armTrustedFirmwareRK3328
|
armTrustedFirmwareRK3328
|
||||||
armTrustedFirmwareRK3399
|
armTrustedFirmwareRK3399
|
||||||
|
armTrustedFirmwareRK3588
|
||||||
armTrustedFirmwareS905
|
armTrustedFirmwareS905
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -28397,6 +28398,7 @@ with pkgs;
|
||||||
ubootOlimexA64Olinuxino
|
ubootOlimexA64Olinuxino
|
||||||
ubootOlimexA64Teres1
|
ubootOlimexA64Teres1
|
||||||
ubootOrangePi3
|
ubootOrangePi3
|
||||||
|
ubootOrangePi5
|
||||||
ubootOrangePiPc
|
ubootOrangePiPc
|
||||||
ubootOrangePiZeroPlus2H5
|
ubootOrangePiZeroPlus2H5
|
||||||
ubootOrangePiZero
|
ubootOrangePiZero
|
||||||
|
@ -28417,6 +28419,7 @@ with pkgs;
|
||||||
ubootRaspberryPi4_32bit
|
ubootRaspberryPi4_32bit
|
||||||
ubootRaspberryPi4_64bit
|
ubootRaspberryPi4_64bit
|
||||||
ubootRaspberryPiZero
|
ubootRaspberryPiZero
|
||||||
|
ubootRock5ModelB
|
||||||
ubootRock64
|
ubootRock64
|
||||||
ubootRock64v2
|
ubootRock64v2
|
||||||
ubootRockPi4
|
ubootRockPi4
|
||||||
|
|
Loading…
Reference in New Issue
Block a user