From 7edd0389e142d3c7f19551d4ca45e2324ca0af12 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Sun, 30 Dec 2018 17:39:29 -0500 Subject: [PATCH] arm-trusted-firmware: add RK3399 --- pkgs/misc/arm-trusted-firmware/default.nix | 12 +++++++++++- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/misc/arm-trusted-firmware/default.nix b/pkgs/misc/arm-trusted-firmware/default.nix index 4cb137b8535e..73e2a96d0cde 100644 --- a/pkgs/misc/arm-trusted-firmware/default.nix +++ b/pkgs/misc/arm-trusted-firmware/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, buildPackages }: +{ stdenv, fetchFromGitHub, pkgsCross, buildPackages }: let buildArmTrustedFirmware = { filesToInstall @@ -22,6 +22,9 @@ let depsBuildBuild = [ buildPackages.stdenv.cc ]; + # For Cortex-M0 firmware in RK3399 + nativeBuildInputs = [ pkgsCross.arm-embedded.stdenv.cc ]; + makeFlags = [ "CROSS_COMPILE=${stdenv.cc.targetPrefix}" "PLAT=${platform}" @@ -83,4 +86,11 @@ in rec { extraMeta.platforms = ["aarch64-linux"]; filesToInstall = [ "build/${platform}/release/bl31/bl31.elf"]; }; + + armTrustedFirmwareRK3399 = buildArmTrustedFirmware rec { + extraMakeFlags = [ "bl31" ]; + platform = "rk3399"; + extraMeta.platforms = ["aarch64-linux"]; + filesToInstall = [ "build/${platform}/release/bl31/bl31.elf"]; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 22147e4eb88f..48af0d7d8817 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14254,6 +14254,7 @@ in armTrustedFirmwareAllwinner armTrustedFirmwareQemu armTrustedFirmwareRK3328 + armTrustedFirmwareRK3399 ; microcodeAmd = callPackage ../os-specific/linux/microcode/amd.nix { };