rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | #Basic Configuration |
| 2 | DESCRIPTION = "Customization." |
| 3 | SECTION = "base" |
| 4 | LICENSE = "MediaTekProprietary" |
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff" |
| 6 | DEPENDS = "custom" |
| 7 | MTK_SRC = "${TOPDIR}/../src/support/libnvram_custom" |
| 8 | NVRAM_PREFIX = "${STAGING_DIR}/${MACHINE}${includedir}/install" |
| 9 | |
| 10 | WORKONSRC = "${MTK_SRC}" |
| 11 | BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST} -I${TOPDIR}/../src/support/nvram/libnvram" |
| 12 | BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST}" |
| 13 | |
| 14 | inherit deploy workonsrc |
| 15 | PRJ_FILENAME = "${MTK_PROJECT}" |
| 16 | #Parameters passed to do_compile() |
| 17 | EXTRA_OEMAKE = "'CROSS=${TARGET_PREFIX}'\ |
| 18 | 'PREFIX=${NVRAM_PREFIX}'\ |
| 19 | 'PACKAGE_ARCH=${PACKAGE_ARCH}'\ |
| 20 | 'BB_INCLUDE_ADD=${BB_INCLUDE_ADD}'\ |
| 21 | 'BB_LDFLAGS_ADD=${BB_LDFLAGS_ADD}'\ |
| 22 | 'PRJ_FILENAME=${PRJ_FILENAME}'\ |
| 23 | 'NVRAM_COMBO_CHIP_ID=${COMBO_CHIP_ID}'" |
| 24 | |
| 25 | FILES_${PN} = "${base_libdir}/*.so\ |
| 26 | ${base_bindir}\ |
| 27 | ${base_sbindir}\ |
| 28 | /mnt\ |
| 29 | /tmp\ |
| 30 | /etc\ |
| 31 | /test" |
| 32 | |
| 33 | FILES_${PN}-dev = "${includedir}" |
| 34 | |
| 35 | FILES_${PN}-staticdev = "${base_libdir}/*.a" |
| 36 | |
| 37 | FILES_${PN}-doc = "/doc" |
| 38 | |
| 39 | FILES_${PN}-dbg = "/usr/src/debug \ |
| 40 | ${base_bindir}/.debug \ |
| 41 | ${base_libdir}/.debug \ |
| 42 | ${base_sbindir}/.debug" |
| 43 | |
| 44 | |
| 45 | #Skip strip check in QA test. |
| 46 | INSANE_SKIP_${PN} += "already-stripped" |
| 47 | |
| 48 | |
| 49 | do_compile () { |
| 50 | unset LDFLAGS |
| 51 | oe_runmake all ROOT=${STAGING_DIR_HOST}${exec_prefix} BOOTDEV_TYPE=${BOOTDEV_TYPE} |
| 52 | } |
| 53 | |
| 54 | do_install () { |
| 55 | oe_runmake install ROOT=${D} |
| 56 | |
| 57 | if [ -d "${S}/CFG/${PRJ_FILENAME}/cgen/" ]; then |
| 58 | install -d ${D}${includedir} |
| 59 | cp -af ${S}/CFG/${PRJ_FILENAME}/cgen/* ${D}${includedir} |
| 60 | else |
| 61 | if [ -d "${D}/include" ]; then |
| 62 | install -d ${D}${includedir} |
| 63 | cp -af ${D}/include/* ${D}${includedir} |
| 64 | rm -rf ${D}/include |
| 65 | fi |
| 66 | fi |
| 67 | } |
| 68 | |
| 69 | addtask nvramclean |
| 70 | do_nvramclean () { |
| 71 | oe_runmake clean |
| 72 | } |
| 73 | |
| 74 | INSANE_SKIP_${PN} += "ldflags" |
| 75 | INSANE_SKIP_${PN} += "installed-vs-shipped" |