rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | #Basic Configuration |
| 2 | DESCRIPTION = "emdlogger is a MD log control application." |
| 3 | SECTION = "base" |
| 4 | LICENSE = "MediaTekProprietary" |
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff" |
| 6 | MTK_SRC = "${BACH_SRC}/telephony/frameworks/opt/mdlogger" |
| 7 | EMD_OUT = "${WORKDIR}/out" |
| 8 | CROSS = "${TARGET_PREFIX}" |
| 9 | PROJECT = "${PROJ}" |
| 10 | PRODUCT_MODE = "${PROD_MODE}" |
| 11 | WORKONSRC = "${MTK_SRC}" |
| 12 | DEPENDS = "platform-libs libsncfg telephonyware" |
| 13 | |
| 14 | CFLAGS = "--sysroot=${STAGING_DIR_HOST}\ -I${STAGING_DIR_HOST}/usr/include/logger" |
| 15 | |
| 16 | |
| 17 | inherit deploy workonsrc |
| 18 | |
| 19 | #Parameters passed to do_compile() |
| 20 | EXTRA_OEMAKE = "'CROSS=${CROSS}'\ |
| 21 | 'PREFIX=${BACH_PREFIX}'\ |
| 22 | 'PACKAGE_ARCH=${PACKAGE_ARCH}'\ |
| 23 | 'ROOT=${STAGING_DIR_HOST}'" |
| 24 | |
| 25 | |
| 26 | FILES_${PN} = "${base_sbindir}/emdlogger1 \ |
| 27 | ${base_sbindir}/emdlogger_ctrl" |
| 28 | |
| 29 | FILES_${PN}-dbg = "${base_sbindir}/.debug" |
| 30 | |
| 31 | #Skip strip check in QA test. |
| 32 | #RDEPENDS_${PN} += "telephonyware-dev" |
| 33 | INSANE_SKIP_${PN} += "dev-deps already-stripped" |
| 34 | |
| 35 | |
| 36 | do_compile () { |
| 37 | if [ -d "${WORKONSRC}" ]; then |
| 38 | if test "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" || test "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4"; then |
| 39 | oe_runmake all ROOT=${STAGING_DIR_HOST} DEF_CFLAGS="--sysroot=${STAGING_DIR_HOST} -I${STAGING_DIR_HOST}/usr/include/logger -mhard-float" |
| 40 | |
| 41 | else |
| 42 | oe_runmake all ROOT=${STAGING_DIR_HOST} DEF_CFLAGS=${CFLAGS} |
| 43 | fi |
| 44 | else |
| 45 | oe_runmake all ROOT=${STAGING_DIR_HOST} |
| 46 | fi |
| 47 | |
| 48 | } |
| 49 | |
| 50 | do_install () { |
| 51 | oe_runmake install ROOT=${D} |
| 52 | |
| 53 | if [ -d ${WORKONSRC} ]; then |
| 54 | install -d ${D}${base_sbindir} |
| 55 | cp -af mdlogger.elf ${D}${base_sbindir}/emdlogger1 |
| 56 | cp -af mdlogger_ctrl.elf ${D}${base_sbindir}/emdlogger_ctrl |
| 57 | fi |
| 58 | } |
| 59 | |
| 60 | addtask bachclean |
| 61 | do_bachclean () { |
| 62 | oe_runmake clean |
| 63 | } |