blob: 37cd529ac523bcf9140672a2b3e3308451a18299 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001#Basic Configuration
2DESCRIPTION = "Customization."
3SECTION = "base"
4LICENSE = "MediaTekProprietary"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
6DEPENDS = "custom"
7MTK_SRC = "${TOPDIR}/../src/support/libnvram_custom"
8NVRAM_PREFIX = "${STAGING_DIR}/${MACHINE}${includedir}/install"
9
10WORKONSRC = "${MTK_SRC}"
11BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST} -I${TOPDIR}/../src/support/nvram/libnvram"
12BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST}"
13
14inherit deploy workonsrc
15PRJ_FILENAME = "${MTK_PROJECT}"
16#Parameters passed to do_compile()
17EXTRA_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
25FILES_${PN} = "${base_libdir}/*.so\
26 ${base_bindir}\
27 ${base_sbindir}\
28 /mnt\
29 /tmp\
30 /etc\
31 /test"
32
33FILES_${PN}-dev = "${includedir}"
34
35FILES_${PN}-staticdev = "${base_libdir}/*.a"
36
37FILES_${PN}-doc = "/doc"
38
39FILES_${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.
46INSANE_SKIP_${PN} += "already-stripped"
47
48
49do_compile () {
50 unset LDFLAGS
51 oe_runmake all ROOT=${STAGING_DIR_HOST}${exec_prefix} BOOTDEV_TYPE=${BOOTDEV_TYPE}
52}
53
54do_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
69addtask nvramclean
70do_nvramclean () {
71 oe_runmake clean
72}
73
74INSANE_SKIP_${PN} += "ldflags"
75INSANE_SKIP_${PN} += "installed-vs-shipped"