[meta-freescale] [meta-fsl-arm][PATCH v2 3/6] Add kernel recipe for Layerscape1 support

Otavio Salvador otavio at ossystems.com.br
Wed Aug 27 06:00:54 PDT 2014


On Wed, Aug 27, 2014 at 1:57 AM, Zhenhua Luo <zhenhua.luo at freescale.com> wrote:
> Signed-off-by: Zhenhua Luo <zhenhua.luo at freescale.com>
> ---
>  recipes-kernel/linux/linux-ls1.inc     | 30 ++++++++++++++++++++++++++++++
>  recipes-kernel/linux/linux-ls1_3.12.bb | 15 +++++++++++++++
>  2 files changed, 45 insertions(+)
>  create mode 100644 recipes-kernel/linux/linux-ls1.inc
>  create mode 100644 recipes-kernel/linux/linux-ls1_3.12.bb
>
> diff --git a/recipes-kernel/linux/linux-ls1.inc b/recipes-kernel/linux/linux-ls1.inc
> new file mode 100644
> index 0000000..c1c976b
> --- /dev/null
> +++ b/recipes-kernel/linux/linux-ls1.inc
> @@ -0,0 +1,30 @@
> +LICENSE = "GPLv2"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
> +
> +inherit kernel
> +
> +# Append a local version if it is defined
> +SCMVERSION ?= "y"
> +
> +SRC_URI = "git://git.freescale.com/layerscape/ls1021a/linux.git;branch=${SRCBRANCH}"
> +
> +KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
> +
> +S = "${WORKDIR}/git"
> +
> +do_configure_prepend() {
> +    # copy desired defconfig so we pick it up for the real kernel_do_configure
> +    cp ${KERNEL_DEFCONFIG} ${B}/.config
> +
> +    # add git revision to the local version
> +    if [ "${SCMVERSION}" = "y" ]; then
> +        # append sdk version if SDK_VERSION is defined
> +        sdkversion=''
> +        if [ -n "${SDK_VERSION}" ]; then
> +            sdkversion="-${SDK_VERSION}"
> +        fi
> +        head=`git rev-parse --verify --short HEAD 2> /dev/null`
> +        printf "%s%s%s" $sdkversion +g $head > ${S}/.scmversion
> +    fi
> +}

We have similar code in linux-imx.inc; I think we ought to move this
to a fsl-kernel-localversion.bbclass file to avoid duplicating the
logic here. I can work on this if you want.

> diff --git a/recipes-kernel/linux/linux-ls1_3.12.bb b/recipes-kernel/linux/linux-ls1_3.12.bb
> new file mode 100644
> index 0000000..c0a4de4
> --- /dev/null
> +++ b/recipes-kernel/linux/linux-ls1_3.12.bb
> @@ -0,0 +1,15 @@
> +SUMMARY = "Linux Kernel for Freescale layerscape platforms"
> +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
> +
> +DEPENDS_append = " libgcc"
> +KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}"
> +KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}"

Seems very wrong. What the reasion for this?

> +SRCBRANCH = "ls1-dev"
> +SRCREV = "de1cb4b3c16be38cf3981fd0afa143ad24283d07"
> +
> +COMPATIBLE_MACHINE = "(ls1021aqds|ls1021atwr)"

I'd use the SoC family here.

-- 
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