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