On 09/30/2014 04:42 AM, [email protected] wrote:
From: Zongchun Yu <[email protected]>

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 <[email protected]>
---
  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"



--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale

Reply via email to