[meta-freescale] [meta-fsl-arm][PATCH] linux-ls1: add support for kernel configuration fragments
Otavio Salvador
otavio at ossystems.com.br
Tue Oct 14 11:54:44 PDT 2014
Hello,
On Tue, Oct 14, 2014 at 4:50 AM, <b40527 at freescale.com> wrote:
> From: Zongchun Yu <Zongchun.Yu at freescale.com>
>
> Using the metadata which is stored in recipe-space, and adding the .scc
> files on the SRC_URI. BitBake can parses them and fetches any files
> referenced in the .scc files by the include, patch, or kconf
> commands. these commands can achieve kernel fragmentation configuration,
> appliying patch and so on.
>
> Signed-off-by: Zongchun Yu <Zongchun.Yu at freescale.com>
> ---
> recipes-kernel/linux/linux-ls1.inc | 27 ++++++++++++++++++++--
> .../linux/linux-ls1/{defconfig => base.cfg} | 0
> recipes-kernel/linux/linux-ls1/base.scc | 2 ++
> recipes-kernel/linux/linux-ls1_3.12.bb | 1 -
> 4 files changed, 27 insertions(+), 3 deletions(-)
> rename recipes-kernel/linux/linux-ls1/{defconfig => base.cfg} (100%)
> create mode 100644 recipes-kernel/linux/linux-ls1/base.scc
>
> diff --git a/recipes-kernel/linux/linux-ls1.inc b/recipes-kernel/linux/linux-ls1.inc
> index 19614fd..c68a2c5 100644
> --- a/recipes-kernel/linux/linux-ls1.inc
> +++ b/recipes-kernel/linux/linux-ls1.inc
> @@ -1,13 +1,36 @@
> LICENSE = "GPLv2"
> LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
>
> -inherit kernel fsl-kernel-localversion
Why?
> +require recipes-kernel/linux/linux-yocto.inc
> +SCMVERSION ??= "y"
> LOCALVERSION ?= "+ls1"
>
> SRC_URI = "git://git.freescale.com/layerscape/ls1021a/linux.git;branch=${SRCBRANCH} \
> - file://defconfig \
> + file://base.scc \
> "
>
> KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
>
> S = "${WORKDIR}/git"
> +
> +kernel_conf_variable() {
> + if test "$2" = "n"
> + then
> + echo "# CONFIG_$1 is not set" >> ${B}/.config
> + else
> + echo "CONFIG_$1=$2" >> ${B}/.config
> + fi
> +}
> +
> +do_configure_prepend() {
> + kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\""
> + kernel_conf_variable LOCALVERSION_AUTO y
> +
> + if [ "${SCMVERSION}" = "y" ]; then
> + # Add GIT revision to the local version
> + cd source
> + head=`git rev-parse --verify --short HEAD 2> /dev/null`
> + cd -
> + printf "%s%s" +g $head > ${S}/.scmversion
> + fi
> +}
This block seems duplicated. Did you review the class you removed?
> diff --git a/recipes-kernel/linux/linux-ls1/defconfig b/recipes-kernel/linux/linux-ls1/base.cfg
> similarity index 100%
> rename from recipes-kernel/linux/linux-ls1/defconfig
> rename to recipes-kernel/linux/linux-ls1/base.cfg
> diff --git a/recipes-kernel/linux/linux-ls1/base.scc b/recipes-kernel/linux/linux-ls1/base.scc
> new file mode 100644
> index 0000000..cd12200
> --- /dev/null
> +++ b/recipes-kernel/linux/linux-ls1/base.scc
> @@ -0,0 +1,2 @@
> +# Force the base configuration
> +force kconf non-hardware base.cfg
> diff --git a/recipes-kernel/linux/linux-ls1_3.12.bb b/recipes-kernel/linux/linux-ls1_3.12.bb
> index 7aa5bd8..2279c2e 100644
> --- a/recipes-kernel/linux/linux-ls1_3.12.bb
> +++ b/recipes-kernel/linux/linux-ls1_3.12.bb
> @@ -3,7 +3,6 @@ DESCRIPTION = "Linux Kernel provided and supported by Freescale with focus on \
> Layerscape1 Family Boards. "
>
> require recipes-kernel/linux/linux-ls1.inc
> -require recipes-kernel/linux/linux-dtb.inc
>
> SRCBRANCH = "ls1-dev"
> SRCREV = "de1cb4b3c16be38cf3981fd0afa143ad24283d07"
> --
> 1.8.3.2
>
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
More information about the meta-freescale
mailing list