From f22684d262790c3899cb0734b8f8898cc2a9b345 Mon Sep 17 00:00:00 2001 From: PA4WDH Date: Fri, 3 Dec 2021 19:26:52 +0100 Subject: Add sys-boot/opensbi-0.9_p2 --- sys-boot/opensbi/opensbi-0.9_p2.ebuild | 45 ++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 sys-boot/opensbi/opensbi-0.9_p2.ebuild (limited to 'sys-boot/opensbi/opensbi-0.9_p2.ebuild') diff --git a/sys-boot/opensbi/opensbi-0.9_p2.ebuild b/sys-boot/opensbi/opensbi-0.9_p2.ebuild new file mode 100644 index 0000000..ca17841 --- /dev/null +++ b/sys-boot/opensbi/opensbi-0.9_p2.ebuild @@ -0,0 +1,45 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +META_SIFIVE="2021.11" +OPENSBI_COMMIT="22d556d26809775e2ac19251e5df9075434ee66e" + +DESCRIPTION="RISC-V Supervisor Binary Interface (SBI) with meta-sifive-${META_SIFIVE} patches" +HOMEPAGE="https://github.com/riscv/${PN}/tree/v${PV}" +SRC_URI="https://github.com/riscv-software-src/${PN}/archive/${OPENSBI_COMMIT}.zip -> ${P}.zip + https://github.com/sifive/meta-sifive/archive/refs/heads/${META_SIFIVE}.zip -> meta-sifive-${META_SIFIVE}.zip" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~riscv" + +DEPEND="" +RDEPEND="${DEPEND}" +BDEPEND="" + +src_unpack() { + unpack ${P}.zip + unpack meta-sifive-${META_SIFIVE}.zip + mv "${WORKDIR}/opensbi-${OPENSBI_COMMIT}" "${WORKDIR}/${P}" +} + +src_prepare() { + eapply "${WORKDIR}/meta-sifive-${META_SIFIVE}/recipes-bsp/opensbi/files" + default +} + +src_compile() { + emake PLATFORM=generic FW_PIC=n +} + +src_install() { + mkdir -p "${D}/usr/share/${P}" + cp "${WORKDIR}/${P}/build/platform/generic/firmware/fw_dynamic.bin" "${D}/usr/share/${P}" + elog "Installed OpenSBI at /usr/share/${P}/fw_dynamic.bin" + dodoc CONTRIBUTORS.md + dodoc COPYING.BSD + dodoc README.md + dodoc ThirdPartyNotices.md +} -- cgit v1.2.3