blob: 19dca25302e083e2001305d02757c819626694bd (
plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
LIC_FILES_CHKSUM = "file://${WORKDIR}/git/rsi/Makefile;beginline=1;endline=29;md5=5eb8ffe925477437d8fcd5e2859c96a1"
LICENSE = "BSD-3-Clause"
PR = "r3"
inherit allarch
inherit update-rc.d
SRCREV = "v${PV}"
SRC_URI = "git://github.com/SiliconLabs/RS911X-nLink-OSD.git;protocol=https \
file://rsi_91x.conf \
file://rs9113_load_modules.sh \
file://rs9113_remove_modules.sh \
file://rs9113.default \
file://rs9113.init \
file://rs9113.reset \
file://rsi_91x.conf \
"
S = "${WORKDIR}/git/"
ALLOW_EMPTY_rsi-91x-autostart = "1"
PACKAGES =+ "rsi-91x-examples rsi-91x-reset rsi-91x-autostart"
FILES_rsi-91x-examples = "/opt/rs9113/examples"
FILES_rsi-91x-reset = "/etc/init.d/rs9113-reset"
RDEPENDS_rsi-91x-reset = "bash"
RDEPENDS_rsi-91x-fw = "bash"
RDEPENDS_rsi-91x-autostart = "${PN}"
INITSCRIPT_PACKAGES = "rsi-91x-autostart rsi-91x-reset"
INITSCRIPT_NAME_rsi-91x-autostart = "rs9113"
INITSCRIPT_PARAMS_rsi-91x-autostart = "start 50 S ."
INITSCRIPT_NAME_rsi-91x-reset = "rs9113-reset"
INITSCRIPT_PARAMS_rsi-91x-reset = "start 40 S ."
FILES_${PN} = "${base_libdir} ${prefix} /opt ${sysconfdir}"
do_install() {
cd ${WORKDIR}
instdir="${D}/opt/rs9113"
install -m 0755 -d ${instdir}/tables
install -m 0755 -d ${D}${prefix}/sbin
install -m 0755 rs9113_load_modules.sh ${D}${prefix}/sbin
install -m 0755 rs9113_remove_modules.sh ${D}${prefix}/sbin
install -m 0755 -d ${D}${sysconfdir}/modprobe.d
install -m 0644 rsi_91x.conf ${D}${sysconfdir}/modprobe.d
install -m 0644 -d ${D}${sysconfdir}/default
install -m 0644 rs9113.default ${D}${sysconfdir}/default/rs9113
install -m 0755 -d ${D}${base_libdir}/firmware/
install ${S}/Firmware/* ${D}${base_libdir}/firmware
install -m 0755 -d ${D}${prefix}/share/${PN}
sed -n '1,29p' git/rsi/Makefile >${D}${prefix}/share/${PN}/LICENSE
install -m 0755 -d ${D}${sysconfdir}/init.d
install -m 0755 rs9113.init ${D}${sysconfdir}/init.d/rs9113
install -m 0755 rs9113.reset ${D}${sysconfdir}/init.d/rs9113-reset
install -m 0755 -d ${D}/opt/rs9113/tables
for f in ${S}/rsi/release/* ; do
if file "${f}" | grep ELF ; then
# Package from SiliconLabs is contaminated
continue
fi
install ${f} ${instdir}/tables
done
install -m 0755 -d ${instdir}/examples
cd ${S}/scripts
for d in $(find . -type d) ; do
install -m 0755 -d "${instdir}/examples/${d}"
dest="${instdir}/examples/${d}"
(
cd "${d}"
for f in $(find . -maxdepth 1 -type f) ; do
ftype=$(file "$f")
if file "${f}" | grep ELF ; then
# Package from SiliconLabs is contaminated
continue
fi
echo "Installing ${f} into ${instdir}/examples/${d}"
install -m 0644 "${f}" "${instdir}/examples/${d}"
done
)
done
}
|