blob: 289c6758483b45c6a501cb4622008a672c08f412 [file] [log] [blame]
DESCRIPTION = "MTK GNSS driver"
LICENSE = "MediaTekProprietary"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
inherit workonsrc
WORKONSRC = "${TOPDIR}/../src/connectivity/gps/mtk_mnld/"
inherit systemd
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "mnld.service"
FILES_${PN} += "${systemd_unitdir}/system/mnld.service"
FILES_${PN} += "${libdir}/libmnl_gnss.so*"
FILES_${PN} += "${bindir}/mnld0"
FILES_${PN} += "/usr/share/gps"
DEPENDS += "openssl curl"
# Avoid QA Issue: No GNU_HASH in the elf binary
INSANE_SKIP_${PN} = "ldflags"
INSANE_SKIP_${PN}-dev = "ldflags"
#FILES_${PN} = "${libdir}/*.so"
FILES_${PN}-dev = "${includedir}"
# Avoid QA Issue: 'Files/directories were installed but not shipped'
INSANE_SKIP_${PN} += "installed-vs-shipped"
FLAGS = "-Os -flto -DCONFIG_GPS_MT3303 ${@bb.utils.contains("ADR_SUPPORT","YES", "-DMTK_ADR_SUPPORT","",d)}"
FLAGS += "${@bb.utils.contains('TARGET_PLATFORM','mt2712', '-DCONFIG_GPS_MT3303_TTYS1','',d)}"
FLAGS += "${@bb.utils.contains('TARGET_PLATFORM','mt2712', '-DCONFIG_GPS_MT3303_WITHOUT_POWER_CONTROL','',d)}"
EXTRA_OEMAKE = "\
'PACKAGE_ARCH=${PACKAGE_ARCH}' \
'TARGET_PLATFORM=${TARGET_PLATFORM}' \
'DNS_FLAGS=${FLAGS}' \
"
do_compile_append() {
cp mnl/libs/linux/${PACKAGE_ARCH}/lib* mnl/libs/
}
do_install_append() {
install -d ${D}${libdir}
install -d ${D}/usr/share/gps
install -m 0755 mnld0 ${D}${bindir}
install -m 0755 ${TOPDIR}/../src/connectivity/gps/mtk_mnld/flashdownload/bin/* ${D}/usr/share/gps
install -m 0755 ${TOPDIR}/../src/connectivity/gps/mtk_mnld/mnl/libs/linux/${PACKAGE_ARCH}/libmnl_gnss.so ${D}${libdir}
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${systemd_unitdir}/system/
fi
if ${@bb.utils.contains('TARGET_PLATFORM','mt2731','true','false',d)}; then
install -m 0644 ${B}/mnld_mt33xx.service ${D}${systemd_unitdir}/system/mnld.service
fi
if ${@bb.utils.contains('TARGET_PLATFORM','mt2712','true','false',d)}; then
install -m 0644 ${B}/mnld.service ${D}${systemd_unitdir}/system/mnld.service
fi
}
INSANE_SKIP_${PN} += "already-stripped"
inherit autotools