blob: 6524e6cc367af43ef656de8bbbb8af7581833e78 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001#Basic Configuration
2DESCRIPTION = "Log multiplexier kernel module."
3SECTION = "base"
4LICENSE = "MediaTekProprietary"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
6DEPENDS = "custom virtual/kernel"
7MTK_SRC = "${BACH_SRC}/mod-logmux"
8
9WORKONSRC = "${MTK_SRC}"
10BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST} -I${BACH_SRC}/mod-crosslink/include "
11BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST}"
12
13inherit deploy workonsrc
14
15#Parameters passed to do_compile()
16EXTRA_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
23FILES_${PN} = "/lib/modules"
24
25FILES_${PN}-dev = "${includedir}"
26
27#Skip strip check in QA test.
28INSANE_SKIP_${PN} += "already-stripped"
29
30
31do_compile () {
32 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
33 oe_runmake KBUILD_EXTRA_INCLUDE=${STAGING_INCDIR}/asm/arch
34}
35
36do_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
48addtask bachclean
49do_bachclean () {
50 oe_runmake clean
51}