summaryrefslogtreecommitdiff
path: root/recipes-core/multitech/cell-radio-fwswitch_1.0.bb
blob: 8c190296de25cf9be4dcbc752735f9b833fc8232 (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
DESCRIPTION = "Radio firmware switching functionality for dual image units (only LNA3 radios for now)"
SECTION = "base"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PR = "r1"

RDEPENDS_${PN} = "radio-query radio-cmd"

inherit update-rc.d

INITSCRIPT_NAME = "cell-radio-fwswitch"
INITSCRIPT_PARAMS = "start 63 5 ."

SRC_URI = "\
  file://cell-radio-fwswitch.default \
  file://cell-radio-fwswitch.init \
  file://cell-radio-fwswitch.sh \
"

do_install () {
    install -d ${D}${sysconfdir}/init.d
    install -m 0755 ${WORKDIR}/cell-radio-fwswitch.init ${D}${sysconfdir}/init.d/cell-radio-fwswitch

    install -d ${D}${sysconfdir}/default
    install -m 0644 ${WORKDIR}/cell-radio-fwswitch.default ${D}${sysconfdir}/default/cell-radio-fwswitch

    install -d ${D}${sbindir}
    install -m 0755 ${WORKDIR}/cell-radio-fwswitch.sh ${D}${sbindir}/cell-radio-fwswitch
}

do_install_append_mtcap() {
    # enable cell-radio-fwswitch init script on boot for MTCAP
    sed -i 's/ENABLED="no"/ENABLED="yes"/g' ${D}${sysconfdir}/default/cell-radio-fwswitch
}