--- /dev/null
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -558,7 +558,7 @@ endif # $(dot-config)
+ # Defaults to vmlinux, but the arch makefile usually adds further targets
+ all: vmlinux
+
+-KBUILD_CFLAGS += -Wno-unused-but-set-variable
++KBUILD_CFLAGS += -Wno-unused-but-set-variable -Wno-error=array-bounds
+
+ ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
+ KBUILD_CFLAGS += -Os
--- /dev/null
+diff --git a/Makefile b/Makefile
+index e821f72..cb2fcba 100644
+--- a/Makefile
++++ b/Makefile
+@@ -526,6 +526,8 @@ endif # $(dot-config)
+ # Defaults vmlinux but it is usually overridden in the arch makefile
+ all: vmlinux
+
++KBUILD_CFLAGS += -Wno-unused-but-set-variable
++
+ ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
+ KBUILD_CFLAGS += -Os
+ else
--- /dev/null
+PROVIDES = "linux-libc-headers"
+
+DESCRIPTION = "Linux kernel headers for Freescale platforms"
+SECTION = "devel"
+LICENSE = "GPLv2"
+
+INHIBIT_DEFAULT_DEPS = "1"
+PROVIDES = "linux-libc-headers linux-qoriq-sdk-headers"
+RPROVIDES_${PN}-dev = "linux-libc-headers-dev"
+RPROVIDES_${PN}-dbg = "linux-libc-headers-dbg"
+RDEPENDS_${PN}-dev = ""
+RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
+
+require recipes-kernel/linux/linux-qoriq-sdk.inc
+
+set_arch() {
+ case ${TARGET_ARCH} in
+ arm*) ARCH=arm ;;
+ i*86*) ARCH=i386 ;;
+ ia64*) ARCH=ia64 ;;
+ mips*) ARCH=mips ;;
+ powerpc*) ARCH=powerpc ;;
+ x86_64*) ARCH=x86_64 ;;
+ esac
+}
+
+do_configure () {
+ set_arch
+ cp ${KERNEL_DEFCONFIG} ${B}/.config
+ oe_runmake oldconfig ARCH=${ARCH}
+}
+
+do_compile () {
+}
+
+do_install() {
+ set_arch
+ cd ${S}
+ oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix} ARCH=${ARCH}
+
+ # The ..install.cmd conflicts between various configure runs
+ find ${D}${includedir} -name ..install.cmd | xargs rm -f
+}
+
+BBCLASSEXTEND = "nativesdk"
--- /dev/null
+inherit kernel
+require recipes-kernel/linux/linux-dtb.inc
+
+DESCRIPTION = "Linux kernel for Freescale platforms"
+SECTION = "kernel"
+LICENSE = "GPLv2"
+
+require recipes-kernel/linux/linux-qoriq-sdk.inc
+
+kernel_do_configure_prepend() {
+ # copy desired defconfig so we pick it up for the real kernel_do_configure
+ cp ${KERNEL_DEFCONFIG} ${B}/.config
+}
+
+require recipes-kernel/linux/linux-tools.inc
--- /dev/null
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+
+PV = "3.0.6"
+PR = "r2"
+
+SRCREV = "1e3e8ed15249d73a066ddfe2e80882935c35dcb7"
+SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git \
+ file://add-no-unused-but-set-variable.patch \
+ file://add-no-error-array-bounds.patch \
+ "
+
+KSRC ?= ""
+S = ${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)}
+
+# make everything compatible for the time being
+COMPATIBLE_MACHINE_$MACHINE = $MACHINE
+
+# only powerpc and powerpc64 are compatible
+COMPATIBLE_HOST = "(powerpc|powerpc64)"
--- /dev/null
+KMACHINE_e500v2 = "yocto/standard/fsl-mpc8315e-rdb"
+KMACHINE_e500mc = "yocto/standard/fsl-mpc8315e-rdb"
+
+SRCREV_machine_e500v2 = "5d3c0b06071abd663c7790df141060ae462660a9"
+SRCREV_machine_e500mc = "5d3c0b06071abd663c7790df141060ae462660a9"
+
+COMPATIBLE_MACHINE_mpc8572ds = "mpc8572ds"
+COMPATIBLE_MACHINE_p1020rdb = "p1020rdb"
+COMPATIBLE_MACHINE_p2020ds = "p2020ds"
+COMPATIBLE_MACHINE_p3041ds = "p3041ds"
+COMPATIBLE_MACHINE_p4080ds = "p4080ds"
+COMPATIBLE_MACHINE_p5020ds-64b = "p5020ds-64b"
+COMPATIBLE_MACHINE_p5020ds = "p5020ds"