deleted file mode 100644
@@ -1,12 +0,0 @@
-#!/usr/bin/make -f
-
-ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
-export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-
-endif
-
-override_dh_auto_build:
- CFLAGS= LDFLAGS= $(MAKE) $(PARALLEL_MAKE) PLATFORM=generic \
- FW_PAYLOAD_PATH=/usr/lib/u-boot/sifive_unleashed/u-boot.bin
-
-%:
- dh $@
@@ -3,23 +3,16 @@
#
# SPDX-License-Identifier: MIT
-inherit dpkg
+inherit opensbi
-SRC_URI = " \
- https://github.com/riscv/opensbi/archive/v${PV}.tar.gz;downloadfilename=opensbi-${PV}.tar.gz \
- file://sifive-fu540-rules"
+SRC_URI += "https://github.com/riscv/opensbi/archive/v${PV}.tar.gz;downloadfilename=opensbi-${PV}.tar.gz"
SRC_URI[sha256sum] = "d183cb890130983a4f01e75fc03ee4f7ea0e16a7923b8af9c6dff7deb2fedaec"
S = "${WORKDIR}/opensbi-${PV}"
DEBIAN_BUILD_DEPENDS = "u-boot-sifive"
-do_prepare_build[cleandirs] += "${S}/debian"
-do_prepare_build() {
- cp ${WORKDIR}/sifive-fu540-rules ${WORKDIR}/rules
- deb_debianize
-
- echo "build/platform/generic/firmware/fw_payload.bin /usr/lib/opensbi/sifive-fu540/" > ${S}/debian/install
-}
+OPENSBI_EXTRA_BUILDARGS = "FW_PAYLOAD_PATH=/usr/lib/u-boot/sifive_unleashed/u-boot.bin"
+OPENSBI_BIN = "fw_payload.bin"
COMPATIBLE_MACHINE = "sifive-fu540"