git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #154241 from zhaofengli/opensbi

opensbi: init at 1.0

commit96255dd4728fe83eb6478449865dc0d1243ac319 author0x4A6F <0x4A6F@users.noreply.github.com> dateMon 24 Jan 2022, 00:49 (5 years ago) parent98590035d48d81
2 files changed+42
pkgs/misc/opensbi/default.nix+40 pkgs/top-level/all-packages.nix+2
pkgs/misc/opensbi/default.nixnew file+40
@@ -0,0 +1,40 @@
1+{ lib, stdenv, fetchFromGitHub
2+, withPlatform ? "generic"
3+, withPayload ? null
4+, withFDT ? null
5+}:
6+
7+stdenv.mkDerivation rec {
8+ pname = "opensbi";
9+ version = "1.0";
10+
11+ src = fetchFromGitHub {
12+ owner = "riscv-software-src";
13+ repo = "opensbi";
14+ rev = "v${version}";
15+ sha256 = "sha256-OgzcH+RLU680qF3+lUiWFFbif6YtjIknJriGlRqcOGs=";
16+ };
17+
18+ installFlags = [
19+ "I=$(out)"
20+ ];
21+
22+ makeFlags = [
23+ "PLATFORM=${withPlatform}"
24+ ] ++ lib.optionals (withPayload != null) [
25+ "FW_PAYLOAD_PATH=${withPayload}"
26+ ] ++ lib.optionals (withFDT != null) [
27+ "FW_FDT_PATH=${withFDT}"
28+ ];
29+
30+ dontStrip = true;
31+ dontPatchELF = true;
32+
33+ meta = with lib; {
34+ description = "RISC-V Open Source Supervisor Binary Interface";
35+ homepage = "https://github.com/riscv-software-src/opensbi";
36+ license = licenses.bsd2;
37+ maintainers = with maintainers; [ ius nickcao zhaofengli ];
38+ platforms = [ "riscv64-linux" ];
39+ };
40+}
pkgs/top-level/all-packages.nix+2
@@ -8389,6 +8389,8 @@ with pkgs;
83898389 luaPackages = lua53Packages;
83908390 };
83918391
8392+ opensbi = callPackage ../misc/opensbi { };
8393+
83928394 opensc = callPackage ../tools/security/opensc {
83938395 inherit (darwin.apple_sdk.frameworks) Carbon PCSC;
83948396 };