From 8df1f31998bdcd822fa91f471361be9185680dd0 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Wed, 17 Apr 2013 15:58:18 -0300 Subject: [PATCH] linux-fslc: Refactor to use linux-imx.inc and avoid duplication of code 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 --- .../recipes-kernel/linux/linux-fslc.inc | 20 +++++++++++++++ .../recipes-kernel/linux/linux-fslc_3.8.bb | 25 +------------------ .../recipes-kernel/linux/linux-imx.inc | 17 ++++++++----- 3 files changed, 32 insertions(+), 30 deletions(-) create mode 100644 meta-fsl-arm/recipes-kernel/linux/linux-fslc.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 index 00000000..6ebf8335 --- /dev/null +++ b/meta-fsl-arm/recipes-kernel/linux/linux-fslc.inc @@ -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" diff --git a/meta-fsl-arm/recipes-kernel/linux/linux-fslc_3.8.bb b/meta-fsl-arm/recipes-kernel/linux/linux-fslc_3.8.bb index 06f6dfb8..68fa8e17 100644 --- a/meta-fsl-arm/recipes-kernel/linux/linux-fslc_3.8.bb +++ b/meta-fsl-arm/recipes-kernel/linux/linux-fslc_3.8.bb @@ -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)" diff --git a/meta-fsl-arm/recipes-kernel/linux/linux-imx.inc b/meta-fsl-arm/recipes-kernel/linux/linux-imx.inc index 9020f571..6a8eeb81 100644 --- a/meta-fsl-arm/recipes-kernel/linux/linux-imx.inc +++ b/meta-fsl-arm/recipes-kernel/linux/linux-imx.inc @@ -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() { -- 2.40.1