[meta-freescale] [meta-fsl-ppc][PATCH][v2] linux: add support for kernel fragmentation
b40527 at freescale.com
b40527 at freescale.com
Tue Sep 30 01:42:25 PDT 2014
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/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"
--
1.8.3.2
More information about the meta-freescale
mailing list