-
-
Notifications
You must be signed in to change notification settings - Fork 629
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
starfive visionfive2: use stable opensbi release
- Loading branch information
Showing
1 changed file
with
9 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,11 @@ | ||
{ lib | ||
, stdenv | ||
, fetchFromGitHub | ||
, python3 | ||
, withPlatform ? "generic" | ||
, withPayload ? null | ||
, withFDT ? null | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "opensbi"; | ||
version = "1.3-git-2868f26"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "riscv-software-src"; | ||
repo = "opensbi"; | ||
rev = "2868f26131308ff345382084681ea89c5b0159f1"; | ||
sha256 = "sha256-E+nVFLSpH6lQ2nVmMlVRTr7qYRVY0ULW7gUvAyTr90I="; | ||
}; | ||
|
||
postPatch = '' | ||
patchShebangs ./scripts | ||
''; | ||
|
||
nativeBuildInputs = [ python3 ]; | ||
|
||
installFlags = [ | ||
"I=$(out)" | ||
]; | ||
|
||
makeFlags = [ | ||
"PLATFORM=${withPlatform}" | ||
{ opensbi }: | ||
|
||
opensbi.overrideAttrs (attrs: { | ||
makeFlags = attrs.makeFlags ++ [ | ||
# opensbi generic platform default FW_TEXT_START is 0x80000000 | ||
# For JH7110, need to specify the FW_TEXT_START to 0x40000000 | ||
# Otherwise, the fw_payload.bin downloading via jtag will not run. | ||
# https://github.com/starfive-tech/VisionFive2/blob/7733673d27052dc5a48f1cb1d060279dfa3f0241/Makefile#L274 | ||
"FW_TEXT_START=0x40000000" | ||
] ++ lib.optionals (withPayload != null) [ | ||
"FW_PAYLOAD_PATH=${withPayload}" | ||
] ++ lib.optionals (withFDT != null) [ | ||
"FW_FDT_PATH=${withFDT}" | ||
]; | ||
|
||
dontStrip = true; | ||
dontPatchELF = true; | ||
} | ||
}) |