rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" |
| 2 | |
| 3 | # don't include kernel-image to rootfs |
| 4 | RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" |
| 5 | |
| 6 | DEPENDS += "kern-tools-native" |
| 7 | |
| 8 | SRC_URI += " \ |
| 9 | file://kernel_nfsb_enable.cfg \ |
| 10 | file://auto2731fpga_ivt_mcp_nand_defconfig.cfg \ |
| 11 | file://auto2731evb_ivt_mcp_lp2_nand_defconfig.cfg \ |
| 12 | file://auto2731evb_ivt_mt6389.cfg \ |
| 13 | file://auto2731evb_ivt_mt6356.cfg \ |
| 14 | file://auto2731evb_ivt_trustonic.cfg \ |
| 15 | file://auto2731evb_ivt_optee.cfg \ |
| 16 | file://debug_aee.cfg \ |
| 17 | file://debug.cfg \ |
| 18 | file://user_build.cfg \ |
| 19 | file://bt_audio_pcm.cfg \ |
| 20 | file://hsm.cfg \ |
| 21 | " |
| 22 | |
| 23 | merge_defconfig_function () { |
| 24 | if [ -f "${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/.config" ]; then |
| 25 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/.config ${WORKDIR}/$2 |
| 26 | else |
| 27 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/$1 ${WORKDIR}/$2 |
| 28 | fi |
| 29 | } |
| 30 | |
| 31 | do_configure_prepend () { |
| 32 | if [ "${KBUILD_DEFCONFIG}" = "auto2731evb_ivt_emmc_defconfig" ]; then |
| 33 | if [ "${MTK_PMIC_CHIP_TYPE}" = "MT6389" ]; then |
| 34 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/mt2731_defconfig ${WORKDIR}/auto2731evb_ivt_mt6389.cfg |
| 35 | fi |
| 36 | if [ "${MTK_PMIC_CHIP_TYPE}" = "MT6356" ]; then |
| 37 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/mt2731_sub_defconfig ${WORKDIR}/auto2731evb_ivt_mt6356.cfg |
| 38 | fi |
| 39 | if [ "${TEE_SUPPORT}" = "tbase" ]; then |
| 40 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/.config ${WORKDIR}/auto2731evb_ivt_trustonic.cfg |
| 41 | fi |
| 42 | if [ "${TEE_SUPPORT}" = "optee" ]; then |
| 43 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/.config ${WORKDIR}/auto2731evb_ivt_optee.cfg |
| 44 | fi |
| 45 | if [ "${KERNEL_AEE_CFG}" = "yes" ] ; then |
| 46 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/.config ${WORKDIR}/debug_aee.cfg |
| 47 | fi |
| 48 | fi |
| 49 | |
| 50 | if [ "${KBUILD_DEFCONFIG}" = "auto2731evb_ivt_mcp_lp2_nand_defconfig" ]; then |
| 51 | if [ "${MTK_PMIC_CHIP_TYPE}" = "MT6389" ]; then |
| 52 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/mt2731_defconfig ${WORKDIR}/${KBUILD_DEFCONFIG}.cfg |
| 53 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/.config ${WORKDIR}/auto2731evb_ivt_mt6389.cfg |
| 54 | fi |
| 55 | if [ "${MTK_PMIC_CHIP_TYPE}" = "MT6356" ]; then |
| 56 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/mt2731_sub_defconfig ${WORKDIR}/${KBUILD_DEFCONFIG}.cfg |
| 57 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/.config ${WORKDIR}/auto2731evb_ivt_mt6356.cfg |
| 58 | fi |
| 59 | if [ "${TEE_SUPPORT}" = "tbase" ]; then |
| 60 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/.config ${WORKDIR}/auto2731evb_ivt_trustonic.cfg |
| 61 | fi |
| 62 | if [ "${TEE_SUPPORT}" = "optee" ]; then |
| 63 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/.config ${WORKDIR}/auto2731evb_ivt_optee.cfg |
| 64 | fi |
| 65 | if [ "${KERNEL_AEE_CFG}" = "yes" ] ; then |
| 66 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/.config ${WORKDIR}/debug_aee.cfg |
| 67 | fi |
| 68 | fi |
| 69 | |
| 70 | if [ "${KBUILD_DEFCONFIG}" = "auto2731evb_ivt_spi_nand_defconfig" ]; then |
| 71 | if [ "${MTK_PMIC_CHIP_TYPE}" = "MT6389" ]; then |
| 72 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/mt2731_defconfig ${WORKDIR}/${KBUILD_DEFCONFIG}.cfg |
| 73 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/.config ${WORKDIR}/auto2731evb_ivt_mt6389.cfg |
| 74 | fi |
| 75 | if [ "${MTK_PMIC_CHIP_TYPE}" = "MT6356" ]; then |
| 76 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/mt2731_sub_defconfig ${WORKDIR}/${KBUILD_DEFCONFIG}.cfg |
| 77 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/.config ${WORKDIR}/auto2731evb_ivt_mt6356.cfg |
| 78 | fi |
| 79 | if [ "${TEE_SUPPORT}" = "tbase" ]; then |
| 80 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/.config ${WORKDIR}/auto2731evb_ivt_trustonic.cfg |
| 81 | fi |
| 82 | if [ "${TEE_SUPPORT}" = "optee" ]; then |
| 83 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/.config ${WORKDIR}/auto2731evb_ivt_optee.cfg |
| 84 | fi |
| 85 | if [ "${KERNEL_AEE_CFG}" = "yes" ] ; then |
| 86 | merge_config.sh -O ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/ -m ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/.config ${WORKDIR}/debug_aee.cfg |
| 87 | fi |
| 88 | fi |
| 89 | |
| 90 | if [ "${SECURE_BOOT_ENABLE}" = "yes" ]; then |
| 91 | merge_defconfig_function mt2731_defconfig kernel_nfsb_enable.cfg |
| 92 | fi |
| 93 | |
| 94 | if [ "${BT_AUDIO_PCM_INTERFACE}" = "yes" ]; then |
| 95 | merge_defconfig_function mt2731_defconfig bt_audio_pcm.cfg |
| 96 | fi |
| 97 | |
| 98 | if [ "${BUILD_LOAD_TYPE}" = "eng" ]; then |
| 99 | merge_defconfig_function mt2731_defconfig debug.cfg |
| 100 | fi |
| 101 | if [ "${BUILD_LOAD_TYPE}" = "user" ]; then |
| 102 | merge_defconfig_function mt2731_defconfig user_build.cfg |
| 103 | fi |
| 104 | |
| 105 | if [ "${HSM_OS_SUPPORT}" = "yes" ]; then |
| 106 | merge_defconfig_function mt2731_defconfig hsm.cfg |
| 107 | fi |
| 108 | |
| 109 | if [ -f "${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/.config" ]; then |
| 110 | mv ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/.config ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/${KBUILD_DEFCONFIG} |
| 111 | fi |
| 112 | } |
| 113 | |
| 114 | do_configure_append () { |
| 115 | if [ "${KBUILD_DEFCONFIG}" = "auto2731evb_ivt_emmc_defconfig" ]; then |
| 116 | rm ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/${KBUILD_DEFCONFIG} |
| 117 | fi |
| 118 | if [ "${KBUILD_DEFCONFIG}" = "auto2731fpga_ivt_mcp_nand_defconfig" ]; then |
| 119 | rm ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/${KBUILD_DEFCONFIG} |
| 120 | fi |
| 121 | if [ "${KBUILD_DEFCONFIG}" = "auto2731evb_ivt_mcp_lp2_nand_defconfig" ]; then |
| 122 | rm ${TOPDIR}/../src/kernel/linux/v4.14/arch/${KERNEL_ARCH}/configs/${KBUILD_DEFCONFIG} |
| 123 | fi |
| 124 | } |
| 125 | |
| 126 | KERNEL_MODULE_AUTOLOAD += "wmt_drv" |
| 127 | KERNEL_MODULE_AUTOLOAD += "stp_chrdev_bt" |