{ stdenv , fetchFromGitHub , MODEL ? "3" , DEBUG ? "0" , TFA_FLAGS ? "" , lib }: stdenv.mkDerivation (_finalAttrs: rec { pname = "arm-trusted-firmware"; version = "2.14"; src = fetchFromGitHub { owner = "ARM-software"; repo = "arm-trusted-firmware"; tag = "v${version}"; hash = "sha256-7imeQocGMSyGXTEhNs4s0bcDxZpbLSSkOyI7c5UxqVs="; }; # buildInputs = [ # dtc # dtmerge depends on libfdt # ]; buildPhase = '' make \ PLAT=rpi${MODEL} \ PRELOADED_BL33_BASE=0x20000 \ RPI3_PRELOADED_DTB_BASE=0x3E0000 \ SUPPORT_VFP=1 \ SMC_PCI_SUPPORT=1 \ ENABLE_FEAT_VHE=1 \ DEBUG=${DEBUG} \ all \ ${TFA_FLAGS} ''; installPhase = '' mkdir -p $out ls -alh # # Adjust paths as needed. Example: # cp -r build/rpi${MODEL}/* $out/ ''; meta = with lib; { description = "A collection of scripts and simple applications for Raspberry Pi hardware"; homepage = "https://github.com/raspberrypi/utils"; license = licenses.bsd3; platforms = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" ]; maintainers = with maintainers; [ kazenyuk ]; }; })