From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 2EC2BE0086A; Wed, 1 Oct 2014 21:48:56 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from smtp.webfaction.com (mail6.webfaction.com [74.55.86.74]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id DAF82E0077F for ; Wed, 1 Oct 2014 21:48:51 -0700 (PDT) Received: from [192.168.1.10] (c-68-38-40-177.hsd1.nj.comcast.net [68.38.40.177]) by smtp.webfaction.com (Postfix) with ESMTP id 6B00420E2462; Thu, 2 Oct 2014 04:48:50 +0000 (UTC) Message-ID: <542CD930.80402@mindchasers.com> Date: Thu, 02 Oct 2014 00:48:48 -0400 From: Bob Cochran User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: meta-freescale@yoctoproject.org, b40527@freescale.com, Zongchun.Yu@freescale.com References: <1412066545-24009-1-git-send-email-b40527@freescale.com> In-Reply-To: <1412066545-24009-1-git-send-email-b40527@freescale.com> Subject: Re: [meta-fsl-ppc][PATCH][v2] linux: add support for kernel fragmentation X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 04:48:56 -0000 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 09/30/2014 04:42 AM, b40527@freescale.com wrote: > From: Zongchun Yu > > 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 > --- > 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" > >