diff options
author | Zhaofeng Li <hello@zhaofeng.li> | 2022-01-09 20:12:27 -0800 |
---|---|---|
committer | Zhaofeng Li <hello@zhaofeng.li> | 2022-01-10 11:26:06 -0800 |
commit | 5d48d8158662b175e747250d8697b3ca3463ee27 (patch) | |
tree | 4abdced35fef8339403e225087de271eb3770d17 /pkgs/misc/opensbi | |
parent | f7fba6ae71166c812ea88c1ed72bcd16b95ee231 (diff) | |
download | nixlib-5d48d8158662b175e747250d8697b3ca3463ee27.tar nixlib-5d48d8158662b175e747250d8697b3ca3463ee27.tar.gz nixlib-5d48d8158662b175e747250d8697b3ca3463ee27.tar.bz2 nixlib-5d48d8158662b175e747250d8697b3ca3463ee27.tar.lz nixlib-5d48d8158662b175e747250d8697b3ca3463ee27.tar.xz nixlib-5d48d8158662b175e747250d8697b3ca3463ee27.tar.zst nixlib-5d48d8158662b175e747250d8697b3ca3463ee27.zip |
opensbi: init at 1.0
Co-authored-by: Joerie de Gram <j.de.gram@gmail.com>
Diffstat (limited to 'pkgs/misc/opensbi')
-rw-r--r-- | pkgs/misc/opensbi/default.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/misc/opensbi/default.nix b/pkgs/misc/opensbi/default.nix new file mode 100644 index 000000000000..3a3e9edf93a2 --- /dev/null +++ b/pkgs/misc/opensbi/default.nix @@ -0,0 +1,40 @@ +{ lib, stdenv, fetchFromGitHub +, withPlatform ? "generic" +, withPayload ? null +, withFDT ? null +}: + +stdenv.mkDerivation rec { + pname = "opensbi"; + version = "1.0"; + + src = fetchFromGitHub { + owner = "riscv-software-src"; + repo = "opensbi"; + rev = "v${version}"; + sha256 = "sha256-OgzcH+RLU680qF3+lUiWFFbif6YtjIknJriGlRqcOGs="; + }; + + installFlags = [ + "I=$(out)" + ]; + + makeFlags = [ + "PLATFORM=${withPlatform}" + ] ++ lib.optionals (withPayload != null) [ + "FW_PAYLOAD_PATH=${withPayload}" + ] ++ lib.optionals (withFDT != null) [ + "FW_FDT_PATH=${withFDT}" + ]; + + dontStrip = true; + dontPatchELF = true; + + meta = with lib; { + description = "RISC-V Open Source Supervisor Binary Interface"; + homepage = "https://github.com/riscv-software-src/opensbi"; + license = licenses.bsd2; + maintainers = with maintainers; [ ius nickcao zhaofengli ]; + platforms = [ "riscv64-linux" ]; + }; +} |