diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2016-04-21 11:23:45 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-17 20:53:37 +0100 |
commit | de9f4b6982696bed40cd1038adbb7f9fc88523cd (patch) | |
tree | 9ebb767bdb537913dc20840708a79404eecbd28b /meta | |
parent | f9112992958b32a3223c054356ab7d7e2568c8ae (diff) | |
download | poky-de9f4b6982696bed40cd1038adbb7f9fc88523cd.tar.gz |
kernel-yocto: allow branch auditing to be suspended
When working on the yocto-bsp and kernel-lab update for yocto 1.2
we found it was impossible for a end-user BSP to isolate patches
on a branch, since with the following commit:
[kernel-yocto: enforce SRC_URI specified branch]
Any new branch would be switched to whatever was specified on the
SRC_URI and undoing the work that the yocto-bsp tool did to support
board specific patches.
To fix this, we'll keep the enforcing of branch consistency enabled
by default, but introduce a variable "KMETA_AUDIT" that when not
set will skip the check.
There's no impact for existing users, and it is only something that
other plumbing commands and tools will need to use (or care about).
[YOCTO: #9120]
(From OE-Core rev: 1d4c120edeb6e45665eafd6962a10ebb89d758eb)
(From OE-Core rev: 364a3ba6a3e92fd24be1f9898683f3ae71ac143d)
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 23 | ||||
-rw-r--r-- | meta/recipes-kernel/linux/linux-yocto.inc | 1 |
2 files changed, 15 insertions, 9 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index f86b3ef011..a9d42053da 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
@@ -170,15 +170,20 @@ do_patch() { | |||
170 | fi | 170 | fi |
171 | fi | 171 | fi |
172 | 172 | ||
173 | current_branch=`git rev-parse --abbrev-ref HEAD` | 173 | if [ -n "${KMETA_AUDIT}" ]; then |
174 | machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}" | 174 | current_branch=`git rev-parse --abbrev-ref HEAD` |
175 | if [ "${current_branch}" != "${machine_branch}" ]; then | 175 | machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}" |
176 | bbwarn "After meta data application, the kernel tree branch is ${current_branch}. The" | 176 | if [ "${current_branch}" != "${machine_branch}" ]; then |
177 | bbwarn "SRC_URI specified branch ${machine_branch}. The branch will be forced to ${machine_branch}," | 177 | bbwarn "After meta data application, the kernel tree branch is ${current_branch}." |
178 | bbwarn "but this means the board meta data (.scc files) do not match the SRC_URI specification." | 178 | bbwarn "The SRC_URI specified branch ${machine_branch}." |
179 | bbwarn "The meta data and branch ${machine_branch} should be inspected to ensure the proper" | 179 | bbwarn "" |
180 | bbwarn "kernel is being built." | 180 | bbwarn "The branch will be forced to ${machine_branch}, but this means the board meta data" |
181 | git checkout -f ${machine_branch} | 181 | bbwarn "(.scc files) do not match the SRC_URI specification." |
182 | bbwarn "" | ||
183 | bbwarn "The meta data and branch ${machine_branch} should be inspected to ensure the proper" | ||
184 | bbwarn "kernel is being built." | ||
185 | git checkout -f ${machine_branch} | ||
186 | fi | ||
182 | fi | 187 | fi |
183 | 188 | ||
184 | if [ "${machine_srcrev}" != "AUTOINC" ]; then | 189 | if [ "${machine_srcrev}" != "AUTOINC" ]; then |
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc index 6b161fc064..bd91570442 100644 --- a/meta/recipes-kernel/linux/linux-yocto.inc +++ b/meta/recipes-kernel/linux/linux-yocto.inc | |||
@@ -35,6 +35,7 @@ SRCREV_FORMAT ?= "meta_machine" | |||
35 | # 2: report options that are not hardware related, but set by a BSP | 35 | # 2: report options that are not hardware related, but set by a BSP |
36 | KCONF_AUDIT_LEVEL ?= "1" | 36 | KCONF_AUDIT_LEVEL ?= "1" |
37 | KCONF_BSP_AUDIT_LEVEL ?= "0" | 37 | KCONF_BSP_AUDIT_LEVEL ?= "0" |
38 | KMETA_AUDIT ?= "yes" | ||
38 | 39 | ||
39 | LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" | 40 | LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" |
40 | 41 | ||