LIC_FILES_CHKSUM = "file://${WORKDIR}/git/rsi/Makefile;beginline=1;endline=29;md5=5eb8ffe925477437d8fcd5e2859c96a1" LICENSE = "BSD-3-Clause" PR = "r2" 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 }