# Copyright (C) 2013-2016 Freescale Semiconductor # Copyright 2017-2021 NXP # Released under the MIT license (see COPYING.MIT for the terms) SUMMARY = "Linux Kernel provided and supported by NXP" DESCRIPTION = "Linux Kernel provided and supported by NXP with focus on \ i.MX Family Reference Boards. It includes support for many IPs such as GPU, VPU and IPU." require recipes-kernel/linux/linux-imx.inc LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" DEPENDS += "lzop-native bc-native" SRCBRANCH = "smarc_8mq_lf-5.10.y" LOCALVERSION = "-1.0.0" KERNEL_DEFCONFIG = "${S}/arch/arm64/configs/smarcimx8mq_defconfig" KERNEL_SRC ?= "git@git.embedian.com:developer/smarc-fsl-linux-kernel.git;protocol=git" SRC_URI = "${EMB_KERNEL_MIRROR};protocol=ssh;branch=${SRCBRANCH}" SRCREV = "c4aa46bd382d293fac44fd4bee31f698ebe7b940" LINUX_VERSION = "5.10.9" FILES_${KERNEL_PACKAGE_NAME}-base += "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin.modinfo " KERNEL_CONFIG_COMMAND = "oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} olddefconfig" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" DEFAULT_PREFERENCE = "1" DO_CONFIG_V7_COPY = "no" DO_CONFIG_V7_COPY_mx6 = "yes" DO_CONFIG_V7_COPY_mx7 = "yes" DO_CONFIG_V7_COPY_mx8 = "no" # Add setting for LF Mainline build IMX_KERNEL_CONFIG_AARCH32 = "imx_v7_defconfig" IMX_KERNEL_CONFIG_AARCH64 = "smarcimx8mq_defconfig" KBUILD_DEFCONFIG ?= "" KBUILD_DEFCONFIG_mx6= "${IMX_KERNEL_CONFIG_AARCH32}" KBUILD_DEFCONFIG_mx7= "${IMX_KERNEL_CONFIG_AARCH32}" KBUILD_DEFCONFIG_mx8= "${IMX_KERNEL_CONFIG_AARCH64}" # Use a verbatim copy of the defconfig from the linux-imx repo. # IMPORTANT: This task effectively disables kernel config fragments # since the config fragments applied in do_kernel_configme are replaced. addtask copy_defconfig after do_kernel_configme before do_preconfigure do_copy_defconfig () { install -d ${B} if [ ${DO_CONFIG_V7_COPY} = "yes" ]; then # copy latest IMX_KERNEL_CONFIG_AARCH32 to use for mx6, mx6ul and mx7 mkdir -p ${B} cp ${S}/arch/arm/configs/${IMX_KERNEL_CONFIG_AARCH32} ${B}/.config else # copy latest IMX_KERNEL_CONFIG_AARCH64 to use for mx8 mkdir -p ${B} cp ${S}/arch/arm64/configs/${IMX_KERNEL_CONFIG_AARCH64} ${B}/.config fi } DELTA_KERNEL_DEFCONFIG ?= "" #DELTA_KERNEL_DEFCONFIG_mx8 = "imx.config" do_merge_delta_config[dirs] = "${B}" do_merge_delta_config[depends] += " \ flex-native:do_populate_sysroot \ bison-native:do_populate_sysroot \ " do_merge_delta_config() { for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do if [ -f ${S}/arch/${ARCH}/configs/${deltacfg} ]; then ${KERNEL_CONFIG_COMMAND} oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} ${deltacfg} elif [ -f "${WORKDIR}/${deltacfg}" ]; then ${S}/scripts/kconfig/merge_config.sh -m .config ${WORKDIR}/${deltacfg} elif [ -f "${deltacfg}" ]; then ${S}/scripts/kconfig/merge_config.sh -m .config ${deltacfg} fi done cp .config ${WORKDIR}/defconfig } addtask merge_delta_config before do_preconfigure after do_copy_defconfig COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"