Files
BPI-M2C/source_sync_rls_25c/layers/meta-unisoc/recipes-connectivity/modem/halo-control.bb
T
2026-09-22 09:38:26 +08:00

77 lines
2.2 KiB
BlitzBasic
Executable File

DESCRIPTION = "Unisoc halo control module"
HOMEPAGE = "http://www.unisoc.com/"
LICENSE = "CLOSED"
require halo.inc
SECTION = "bins"
PROVIDES = "halo-control"
DEPENDS = "modem-utils iniparser libtrusty"
RDEPENDS:${PN} = "modem-utils iniparser libtrusty"
export HALO_SUPPORT_CFLAGS = "${HALO_SUPPORT_SET}"
export HALO_TYPE_CFLAGS = "${HALO_TYPE_SET}"
inherit systemd update-rc.d
MOUDULE_SRC_DIR ?= ""
EXTERNALSRC = "${EXTERNALSRC_DIR}/halo_rec_base/${MOUDULE_SRC_DIR}"
EXTERNALSRC_BUILD = "${EXTERNALSRC_DIR}/halo_rec_base/${MOUDULE_SRC_DIR}"
SRC_URI = "\
file://halo_control.service \
file://halo_control-init \
"
do_install:prepend () {
if [ ${HALO_SRC_MODE} != "customer" ]; then
rm -rf ${HALO_INSTALL_DIR}/halo_control
rm -rf ${HALO_INSTALL_DIR}/libhaloap.so
install -d ${HALO_INSTALL_DIR}/halo_control
install -m 0755 ${S}/halo_control ${HALO_INSTALL_DIR}/halo_control/
install -m 0755 ${S}/libhaloap.so ${HALO_INSTALL_DIR}/halo_control/
fi
}
do_install () {
if [ ${HALO_SRC_MODE} != "customer" ]; then
install -d ${D}${bindir}
install -m 0755 ${S}/halo_control ${D}${bindir}/
install -d ${D}${libdir}/
install -m 0755 ${S}/libhaloap.so ${D}${libdir}/
else
install -d ${D}${bindir}
install -m 0755 ${HALO_RELEASE_DIR}/halo_control ${D}${bindir}/
install -d ${D}${libdir}/
install -m 0755 ${HALO_RELEASE_DIR}/libhaloap.so ${D}${libdir}/
fi
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/halo_control-init ${D}${sysconfdir}/init.d/halo_control-init
install -d ${D}${systemd_unitdir}/system/
install -m 0644 ${WORKDIR}/halo_control.service ${D}${systemd_unitdir}/system
}
INSANE_SKIP:${PN}-dev += "dev-elf"
INSANE_SKIP:${PN}-dev += "file-rdeps"
FILES:${PN} += " \
${libdir}/libhaloap.so \
"
FILES_SOLIBSDEV = ""
TARGET_CC_ARCH += "${LDFLAGS}"
FILES:${PN}-halo_control = " \
${systemd_unitdir}/system/halo_control.service \
"
SYSTEMD_PACKAGES = "${PN}"
INITSCRIPT_NAME = "halo_control-init"
OVERRIDES:append = ":${MODEM_CTRL_CHIP}"
INITSCRIPT_PARAMS = "start 08 S ."
#INITSCRIPT_PARAMS = "${@bb.utils.contains('MODEM_CTRL_CHIP', '8910', 'start 09 S .', 'start 08 S .',d)}"
SYSTEMD_SERVICE:${PN} = "halo_control.service"
NATIVE_SYSTEMD_SUPPORT = "1"