rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | #Basic Configuration |
| 2 | DESCRIPTION = "Log multiplexier kernel module." |
| 3 | SECTION = "base" |
| 4 | LICENSE = "MediaTekProprietary" |
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff" |
| 6 | DEPENDS = "custom virtual/kernel" |
| 7 | MTK_SRC = "${BACH_SRC}/mod-logmux" |
| 8 | |
| 9 | WORKONSRC = "${MTK_SRC}" |
| 10 | BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST} -I${BACH_SRC}/mod-crosslink/include " |
| 11 | BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST}" |
| 12 | |
| 13 | inherit deploy workonsrc |
| 14 | |
| 15 | #Parameters passed to do_compile() |
| 16 | EXTRA_OEMAKE += "'CROSS=${TARGET_PREFIX}'\ |
| 17 | 'PREFIX=${BACH_PREFIX}'\ |
| 18 | 'PACKAGE_ARCH=${PACKAGE_ARCH}'\ |
| 19 | 'ARCH=${KERNEL_ARCH}'\ |
| 20 | 'KERNELDIR=${KERNEL_OUT_DIR}'\ |
| 21 | 'CONFIG=${BB_INCLUDE_ADD}'" |
| 22 | |
| 23 | FILES_${PN} = "/lib/modules" |
| 24 | |
| 25 | FILES_${PN}-dev = "${includedir}" |
| 26 | |
| 27 | #Skip strip check in QA test. |
| 28 | INSANE_SKIP_${PN} += "already-stripped" |
| 29 | |
| 30 | |
| 31 | do_compile () { |
| 32 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE |
| 33 | oe_runmake KBUILD_EXTRA_INCLUDE=${STAGING_INCDIR}/asm/arch |
| 34 | } |
| 35 | |
| 36 | do_install () { |
| 37 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE |
| 38 | oe_runmake install SYSROOT=${D} KBUILD_EXTRA_INCLUDE=${D}/include/asm/arch |
| 39 | find ${D} -name "modules.*" -exec rm -f '{}' \; |
| 40 | |
| 41 | if [ -d "${D}/include" ]; then |
| 42 | install -d ${D}${includedir} |
| 43 | cp -af ${D}/include/* ${D}${includedir} |
| 44 | rm -rf ${D}/include |
| 45 | fi |
| 46 | } |
| 47 | |
| 48 | addtask bachclean |
| 49 | do_bachclean () { |
| 50 | oe_runmake clean |
| 51 | } |