DESCRIPTION = "Linux kernel for various NetModule hardware"
COMPATIBLE_MACHINE = "cn913x"

inherit kernel

CVE_VERSION = "5.15"

SRC_URI = "git://gitlab.com/netmodule/kernel/linux-netmodule.git;protocol=ssh;user=git;branch=5.15/solidrun/base \
           file://0001-cn913x-fix-compatible-node-inside-dts.patch \
           file://netfilter.cfg \
           file://0001-cn913x-fix-compatible-node-inside-dts-pt-2.patch \
           file://0001-fix-phy-support-for-falcon-board.patch \
           file://0001-refactor-cn913x-defconfig-cleanup.patch \
           file://cn913x_additions.cfg \
           "
SRCREV ?= "be2f2f0c96e85ecec9d807397194e46bb8bea4a5"

LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"

S = "${WORKDIR}/git"

#If a KERNEL_DEFCONFIG is specified, the defconfig specified in SRC_URI will be overwritten!
do_configure:append(){
    if [ "${KERNEL_DEFCONFIG}" != "" ]; then
        oe_runmake ${KERNEL_DEFCONFIG}
    fi
    configs="${@" ".join(find_cfgs(d))}"
    if [ ! -z "${configs}" ]; then
        ${S}/scripts/kconfig/merge_config.sh -m -O ${WORKDIR}/build ${WORKDIR}/build/.config ${WORKDIR}/*.cfg
    fi
}

require recipes-kernel/linux/linux-yocto-coreos-efi.inc
