From: Bob Cochran <yocto@mindchasers.com>
To: meta-freescale@yoctoproject.org, b40527@freescale.com,
Zongchun.Yu@freescale.com
Subject: Re: [meta-fsl-ppc][PATCH][v2] linux: add support for kernel fragmentation
Date: Thu, 02 Oct 2014 00:48:48 -0400 [thread overview]
Message-ID: <542CD930.80402@mindchasers.com> (raw)
In-Reply-To: <1412066545-24009-1-git-send-email-b40527@freescale.com>
On 09/30/2014 04:42 AM, b40527@freescale.com wrote:
> From: Zongchun Yu <Zongchun.Yu@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.
I think you mean to say 'add support for kernel configuration
fragments', not 'kernel fragmentation'. However, perhaps stating that
you are adding support for scc description files would be more
appropriate.
I'm wondering why you are adding this abstraction to the base
configuration. Is this the start of further customization following the
linux-yocto model as described in the Yocto Project Linux Kernel
Development Manual? My impression of scc files is that they are useful
for describing various features and BSPs. They only seem to make sense
if multiple scc files exist and can be chosen for various reasons.
This single, particular scc file just describes the base kernel, so I'm
wondering why it's being added now & if multiple scc files are going to
follow for linux-qoriq. If not, I think it just adds unneeded
abstraction / complexity.
And will the use of scc files also be adopted in meta-fsl-arm / linux-imx?
>
> Signed-off-by: Zongchun Yu <Zongchun.Yu@freescale.com>
> ---
> recipes-kernel/linux/files/base.scc | 7 +++++++
> recipes-kernel/linux/linux-qoriq.inc | 36 +++++++++++++++++++-------------
> recipes-kernel/linux/linux-qoriq_3.12.bb | 5 +----
> 3 files changed, 29 insertions(+), 19 deletions(-)
> create mode 100644 recipes-kernel/linux/files/base.scc
>
> diff --git a/recipes-kernel/linux/files/base.scc b/recipes-kernel/linux/files/base.scc
> new file mode 100644
> index 0000000..9076e6b
> --- /dev/null
> +++ b/recipes-kernel/linux/files/base.scc
> @@ -0,0 +1,7 @@
> +# Force the base configuration
> +force kconf non-hardware base.cfg
> +
> +patch powerpc-Fix-64-bit-builds-with-binutils-2.24.patch
> +patch Fix-for-CVE-2014-5045-fs-umount-on-symlink-leak.patch
> +patch Fix-CVE-2014-5471_CVE-2014-5472.patch
> +patch Fix-CVE-2014-5077-sctp-inherit-auth-capable-on-INIT-collisions.patch
> diff --git a/recipes-kernel/linux/linux-qoriq.inc b/recipes-kernel/linux/linux-qoriq.inc
> index 9e463dd..1fb5653 100644
> --- a/recipes-kernel/linux/linux-qoriq.inc
> +++ b/recipes-kernel/linux/linux-qoriq.inc
> @@ -1,5 +1,5 @@
> -inherit kernel qoriq_build_64bit_kernel
> -require recipes-kernel/linux/linux-dtb.inc
> +inherit qoriq_build_64bit_kernel
> +require recipes-kernel/linux/linux-yocto.inc
>
> DESCRIPTION = "Linux kernel for Freescale platforms"
> SECTION = "kernel"
> @@ -14,20 +14,24 @@ KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}"
> KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}"
>
> SCMVERSION ?= "y"
> -DELTA_KERNEL_DEFCONFIG ?= ""
> +LINUX_VERSION_EXTENSION = ""
> +BASECFGDIR = "${FILE_DIRNAME}/files"
> +
> +do_patch_prepend() {
> + # if bbappend file is used. copy the kernel configure file as base.cfg
> + # to the folder defined in FILESEXTRAPATHS.
> + if [ -n "${FILESEXTRAPATHS}" ]; then
> + BASECFGDIR=`echo ${FILESEXTRAPATHS} | cut -d ':' -f1`
> + fi
> + cp ${KERNEL_DEFCONFIG} ${BASECFGDIR}/base.cfg
> +}
> +
> do_configure_prepend() {
> - # copy desired defconfig so we pick it up for the real kernel_do_configure
> - cp ${KERNEL_DEFCONFIG} ${B}/.config
> -
> - # add config fragments
> - for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do
> - if [ -f "${deltacfg}" ]; then
> - ${S}/scripts/kconfig/merge_config.sh -m .config ${deltacfg}
> - elif [ -f "${S}/arch/powerpc/configs/${deltacfg}" ]; then
> - ${S}/scripts/kconfig/merge_config.sh -m .config \
> - ${S}/arch/powerpc/configs/${deltacfg}
> - fi
> - done
> + if [ -n "${FILESEXTRAPATHS}" ]; then
> + BASECFGDIR=`echo ${FILESEXTRAPATHS} | cut -d ':' -f1`
> + fi
> + # remove the base.cfg generated in do_patch task.
> + rm -f ${BASECFGDIR}/base.cfg
>
> #add git revision to the local version
> if [ "${SCMVERSION}" = "y" ]; then
> @@ -36,7 +40,9 @@ do_configure_prepend() {
> if [ -n "${SDK_VERSION}" ]; then
> sdkversion="-${SDK_VERSION}"
> fi
> + cd source
> head=`git rev-parse --verify --short HEAD 2> /dev/null`
> + cd -
> printf "%s%s%s" $sdkversion +g $head > ${S}/.scmversion
> fi
> }
> diff --git a/recipes-kernel/linux/linux-qoriq_3.12.bb b/recipes-kernel/linux/linux-qoriq_3.12.bb
> index 39270d4..ecae8cd 100644
> --- a/recipes-kernel/linux/linux-qoriq_3.12.bb
> +++ b/recipes-kernel/linux/linux-qoriq_3.12.bb
> @@ -1,10 +1,7 @@
> require recipes-kernel/linux/linux-qoriq.inc
>
> SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \
> - file://powerpc-Fix-64-bit-builds-with-binutils-2.24.patch \
> - file://Fix-for-CVE-2014-5045-fs-umount-on-symlink-leak.patch \
> - file://Fix-CVE-2014-5077-sctp-inherit-auth-capable-on-INIT-collisions.patch \
> - file://Fix-CVE-2014-5471_CVE-2014-5472.patch \
> + file://base.scc \
> "
> SRCREV = "c29fe1a733308cbe592b3af054a97be1b91cf2dd"
>
>
next prev parent reply other threads:[~2014-10-02 4:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-30 8:42 [meta-fsl-ppc][PATCH][v2] linux: add support for kernel fragmentation b40527
2014-10-02 4:48 ` Bob Cochran [this message]
2014-10-03 14:01 ` Otavio Salvador
2014-10-09 6:23 ` Zongchun.Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=542CD930.80402@mindchasers.com \
--to=yocto@mindchasers.com \
--cc=Zongchun.Yu@freescale.com \
--cc=b40527@freescale.com \
--cc=meta-freescale@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.