npcm7xx: kernel: replace linux-obmc with linux-nuvoton

The linux-obmc recipe has been removed and BSPs are expected to provide
their own Linux recipes now. This updates the Nuvoton BSP to include its
own Linux recipe so it can build successfully again.

Change-Id: I61e0cf0745be6ae4e282b32abf36aad4c5f4b860
Signed-off-by: Benjamin Fair <benjaminfair@google.com>
diff --git a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/conf/machine/include/npcm7xx.inc b/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/conf/machine/include/npcm7xx.inc
index c48b308..e2fd260 100644
--- a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/conf/machine/include/npcm7xx.inc
+++ b/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/conf/machine/include/npcm7xx.inc
@@ -2,11 +2,11 @@
 #@NAME: Nuvoton NPCM7XX
 #@DESCRIPTION: Common machine configuration for Nuvoton NPCM7XX Chip
 
-PREFERRED_PROVIDER_virtual/kernel ?= "linux-obmc"
-
+PREFERRED_PROVIDER_virtual/kernel ?= "linux-nuvoton"
 KERNEL_IMAGETYPE ?= "uImage"
 KERNEL_EXTRA_ARGS ?= "UIMAGE_LOADADDR=0x00008000"
 
+PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-nuvoton"
 PREFERRED_PROVIDER_u-boot ?= "u-boot-nuvoton"
 PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-fw-utils-nuvoton"
 UBOOT_MACHINE ?= "PolegSVB_config"
diff --git a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-nuvoton.inc b/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-nuvoton.inc
new file mode 100644
index 0000000..5380478
--- /dev/null
+++ b/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-nuvoton.inc
@@ -0,0 +1,21 @@
+DESCRIPTION = "Linux kernel for Nuvoton NPCM7xx"
+SECTION = "kernel"
+LICENSE = "GPLv2"
+
+PROVIDES += "virtual/kernel"
+
+KCONFIG_MODE="--alldefconfig"
+
+KSRC ?= "git://github.com/openbmc/linux;protocol=git;branch=${KBRANCH}"
+SRC_URI = "${KSRC}"
+SRC_URI_append_npcm7xx = " file://defconfig"
+
+LINUX_VERSION_EXTENSION ?= "-${SRCREV}"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+inherit kernel
+require recipes-kernel/linux/linux-yocto.inc
+
+# From 4.16+ the COPYING file changed
+LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
diff --git a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-obmc/defconfig b/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-nuvoton/defconfig
similarity index 100%
rename from meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-obmc/defconfig
rename to meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-nuvoton/defconfig
diff --git a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-nuvoton_git.bb b/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-nuvoton_git.bb
new file mode 100644
index 0000000..91d7437
--- /dev/null
+++ b/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-nuvoton_git.bb
@@ -0,0 +1,6 @@
+KBRANCH ?= "dev-4.17"
+LINUX_VERSION ?= "4.17.4"
+
+SRCREV="8fb9a0714f8ff91756a9746707c4f884b3745a40"
+
+require linux-nuvoton.inc
diff --git a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-obmc_%.bbappend b/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-obmc_%.bbappend
deleted file mode 100644
index e59c109..0000000
--- a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-obmc_%.bbappend
+++ /dev/null
@@ -1,2 +0,0 @@
-FILESEXTRAPATHS_prepend_npcm7xx := "${THISDIR}/${PN}:"
-SRC_URI_append_npcm7xx = " file://defconfig"