Skip to content

Commit a635a0c

Browse files
committed
[zcheri] Unify opensbi install pass for both ISAv9 and Zcheri.
1 parent 9577506 commit a635a0c

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

pycheribuild/projects/cross/opensbi.py

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,11 @@ def install(self, **kwargs):
140140
if self.crosscompile_target.is_hybrid_or_purecap_cheri() and not self.build_dir_suffix:
141141
# Install into the QEMU firware directory so that `-bios default` works
142142
qemu_fw_dir = self._qemu_install_dir() / "share/qemu/"
143-
suffix = "cheristd" if self.crosscompile_target.is_cheri_purecap() else "cheri"
143+
suffix = ""
144+
if self.crosscompile_target.is_cheri_purecap():
145+
suffix = "cheri"
146+
if self.config.riscv_cheri_isa == RiscvCheriISA.STD:
147+
suffix += "std"
144148
self.makedirs(qemu_fw_dir)
145149
# TODO: looks like newer versions install a .bin that we could just copy instead.
146150
self.run_cmd(
@@ -233,25 +237,6 @@ def setup(self):
233237
super().setup()
234238
self.make_args.set(FW_TEXT_START=0x80000000)
235239

236-
def install(self, **kwargs):
237-
self.makedirs(self.install_dir)
238-
for platform in self.all_platforms:
239-
args = self.make_args.copy()
240-
args.set(PLATFORM=platform)
241-
self.run_make_install(cwd=self.source_dir, options=args)
242-
# Install into the QEMU firmware directory so that `-bios default` works
243-
qemu_fw_dir = BuildCheriAllianceQEMU.get_install_dir(self, cross_target=CompilationTargets.NATIVE) / "share/qemu/"
244-
self.makedirs(qemu_fw_dir)
245-
self.run_cmd(
246-
self.sdk_bindir / "llvm-objcopy",
247-
"-S",
248-
"-O",
249-
"binary",
250-
self._fw_jump_path(),
251-
qemu_fw_dir / "opensbi-riscv64cheri-virt-fw_jump.bin",
252-
print_verbose_only=False,
253-
)
254-
255240
@property
256241
def all_platforms(self):
257242
return ["generic"]

0 commit comments

Comments
 (0)