1# Copyright (C) 2019, Fuzhou Rockchip Electronics Co., Ltd 2# Released under the MIT license (see COPYING.MIT for the terms) 3 4DESCRIPTION = "Tools and firmwares for rockchip npu" 5SECTION = "utils" 6 7LICENSE = "LICENSE.rockchip" 8LIC_FILES_CHKSUM = "file://${RKBASE}/licenses/LICENSE.rockchip;md5=d63890e209bf038f44e708bbb13e4ed9" 9 10RDEPENDS:${PN} = "bash" 11 12inherit local-git 13 14SRC_URI = " \ 15 git://github.com/JeffyCN/mirrors.git;protocol=https;branch=rknpu-fw; \ 16 file://rockchip-npu.sh \ 17" 18SRCREV = "2a532b012b5179dd573d8b7f98fc2c51b3046409" 19S = "${WORKDIR}/git" 20 21do_install () { 22 install -d ${D}${datadir}/npu_fw 23 install -m 0644 npu_fw/* ${D}${datadir}/npu_fw/ 24 25 install -d ${D}${datadir}/npu_fw_pcie 26 install -m 0644 npu_fw_pcie/* ${D}${datadir}/npu_fw_pcie/ 27 28 install -d ${D}${bindir} 29 # FIXME: support different arch 30 install -m 0755 bin/* ${D}${bindir} 31 32 install -d ${D}${sysconfdir}/init.d/ 33 install -m 0755 ${WORKDIR}/rockchip-npu.sh ${D}${sysconfdir}/init.d/ 34} 35 36inherit update-rc.d 37 38INITSCRIPT_NAME = "rockchip-npu.sh" 39INITSCRIPT_PARAMS = "start 11 S ." 40 41INSANE_SKIP:${PN} = "already-stripped ldflags" 42 43FILES:${PN} = " \ 44 ${datadir} \ 45 ${bindir} \ 46 ${sysconfdir}/init.d \ 47" 48