]> code.ossystems Code Review - meta-freescale.git/commitdiff
linux-fslc: Refactor to use linux-imx.inc and avoid duplication of code
authorOtavio Salvador <otavio@ossystems.com.br>
Wed, 17 Apr 2013 18:58:18 +0000 (15:58 -0300)
committerOtavio Salvador <otavio@ossystems.com.br>
Fri, 19 Apr 2013 13:29:26 +0000 (10:29 -0300)
Provides a new linux-fslc.inc file which abstracts the specific
changes for the linux-fslc based kernels. A new variable has been add
to linux-imx.inc to allow to skip the 'imx-test' specific hacks after
kernel install as 'imx-test' is not supported for Linux mainline.

Change-Id: I309ee9fa70f359e4d3b03af6cb68bf15d0745257
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
meta-fsl-arm/recipes-kernel/linux/linux-fslc.inc [new file with mode: 0644]
meta-fsl-arm/recipes-kernel/linux/linux-fslc_3.8.bb
meta-fsl-arm/recipes-kernel/linux/linux-imx.inc

diff --git a/meta-fsl-arm/recipes-kernel/linux/linux-fslc.inc b/meta-fsl-arm/recipes-kernel/linux/linux-fslc.inc
new file mode 100644 (file)
index 0000000..6ebf833
--- /dev/null
@@ -0,0 +1,20 @@
+# Copyright (C) 2012-2013 O.S. Systems Software LTDA.
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Freescale Community mainline based Linux kernel"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+DEPENDS += "lzop-native"
+PROVIDES = "virtual/kernel linux-mainline"
+
+inherit kernel
+
+require recipes-kernel/linux/linux-imx.inc
+require recipes-kernel/linux/linux-dtb.inc
+
+# Avoid imx-test installation hacks
+IMX_TEST_SUPPORT = "n"
+
+SRC_URI = "git://github.com/Freescale/linux-mainline.git \
+           file://defconfig"
+LOCALVERSION = "-fslc"
index 06f6dfb87a49f0f2a671dbb786105d9ab1119c9d..68fa8e17b2ad7808d3187e88fc8f6b4de501607d 100644 (file)
@@ -1,15 +1,7 @@
 # Copyright (C) 2012-2013 O.S. Systems Software LTDA.
 # Released under the MIT license (see COPYING.MIT for the terms)
 
-DESCRIPTION = "Linux mainline kernel"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
-DEPENDS += "lzop-native"
-PROVIDES = "virtual/kernel linux-mainline"
-
-inherit kernel
-
-require recipes-kernel/linux/linux-dtb.inc
+include linux-fslc.inc
 
 PV = "3.8+git${SRCPV}"
 PR = "r5"
@@ -17,19 +9,4 @@ PR = "r5"
 # patches-3.8
 SRCREV = "9674b8d96fca62bc47be48fd857591dcfca874b1"
 
-SRC_URI = "git://github.com/Freescale/linux-mainline.git \
-           \
-           file://defconfig"
-
-S = "${WORKDIR}/git"
-
-do_configure_append () {
-    # Ensure we have a proper GIT hash in kernel version
-    rm ${S}/.scmversion
-}
-
-# We need to pass it as param since kernel might support more then one
-# machine, with different entry points
-EXTRA_OEMAKE += "LOADADDR=${UBOOT_ENTRYPOINT}"
-
 COMPATIBLE_MACHINE = "(mxs|mx3|mx5|mx6)"
index 9020f571f8253533d6119ff433961dfe6f1ad9ac..6a8eeb81d03011a2fcfcaa0fca9460702bdcf07a 100644 (file)
@@ -13,6 +13,9 @@ inherit kernel
 LOCALVERSION ?= "+yocto"
 SCMVERSION ?= "y"
 
+# Add imx-test support hacks
+IMX_TEST_SUPPORT ?= "y"
+
 SRC_URI = "git://git.freescale.com/imx/linux-2.6-imx.git \
            file://defconfig \
 "
@@ -51,13 +54,15 @@ do_configure_prepend() {
 
 # install nedded headers for imx-test compilation
 do_install_append() {
-       # bounds.h may be used by a module and is currently missing
-       if [ -d include/generated ]; then
-               cp include/generated/* $kerneldir/include/generated/
-       fi
+       if [ "${IMX_TEST_SUPPORT}" = "y" ]; then
+               # bounds.h may be used by a module and is currently missing
+               if [ -d include/generated ]; then
+                       cp include/generated/* $kerneldir/include/generated/
+               fi
 
-       # Host architecture object file
-       rm -f $kerneldir/scripts/kconfig/kxgettext.o
+               # Host architecture object file
+               rm -f $kerneldir/scripts/kconfig/kxgettext.o
+       fi
 }
 
 sysroot_stage_all_append() {