diff options
author | Denys Dmytriyenko <denys@ti.com> | 2012-05-30 18:01:41 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2012-05-31 18:31:18 -0400 |
commit | 16e8d191973677957ca9ebf2f998326f169ebd50 (patch) | |
tree | 7eaa452534baa66781b96d6f5abef61ad2c07fa2 | |
parent | da7c9449fa3272f63e0ba1f8a42fd3aba66e1ceb (diff) | |
download | meta-ti-16e8d191973677957ca9ebf2f998326f169ebd50.tar.gz |
tipspkernel: add extra level to FILESPATH with major version in the name
Add PMV variable to contain major version by extracting first 2 numbers from PV
Insert new level to FILESPATH - PN-PV-PR:PN-PV:PN-PMV:PN:files:.
Allow keeping patches and configs generic for the series (i.e. 3.2) while
incrementing stable releases (i.e. 3.2.18)
Drop use of BP and BPN, as they don't change for the kernel
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Acked-by: Koen Kooi <koen@circuitco.com>
-rw-r--r-- | recipes-kernel/linux/tipspkernel.inc | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/recipes-kernel/linux/tipspkernel.inc b/recipes-kernel/linux/tipspkernel.inc index c23fa577..ba93530f 100644 --- a/recipes-kernel/linux/tipspkernel.inc +++ b/recipes-kernel/linux/tipspkernel.inc | |||
@@ -1,11 +1,26 @@ | |||
1 | # Include this file for kernel recipes that need to handle different defconfigs | 1 | # Include this file for kernel recipes that need to handle different defconfigs |
2 | # and apply patches based on "tipspkernel" DISTRO_FEATURES | 2 | # and apply patches based on "tipspkernel" DISTRO_FEATURES |
3 | 3 | ||
4 | def get_major_pv(p): | ||
5 | import re | ||
6 | r = re.compile("([0-9]+\.[0-9]+).*") | ||
7 | m = r.match(p); | ||
8 | if m: | ||
9 | return m.group(1) | ||
10 | return None | ||
11 | |||
12 | PMV = "${@get_major_pv(d.getVar('PV', True))}" | ||
13 | |||
14 | # First of all, set own FILESPATH avoiding unnecessary BP and BPN, but adding | ||
15 | # extra level of major version | ||
16 | FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}-${PMV}", \ | ||
17 | "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}" | ||
18 | |||
4 | # We don't want "tipspkernel" to be another OVERRIDE, but rather a new level of | 19 | # We don't want "tipspkernel" to be another OVERRIDE, but rather a new level of |
5 | # FILESPATH with all the OVERRIDES applied to it | 20 | # FILESPATH with all the OVERRIDES applied to it |
6 | CONFIGS_PSP = "${@base_set_filespath(["${FILE_DIRNAME}/${PF}/tipspkernel", "${FILE_DIRNAME}/${P}/tipspkernel", \ | 21 | CONFIGS_PSP = "${@base_set_filespath(["${FILE_DIRNAME}/${PF}/tipspkernel", "${FILE_DIRNAME}/${P}/tipspkernel", \ |
7 | "${FILE_DIRNAME}/${PN}/tipspkernel", "${FILE_DIRNAME}/${BP}/tipspkernel", "${FILE_DIRNAME}/${BPN}/tipspkernel", \ | 22 | "${FILE_DIRNAME}/${PN}-${PMV}/tipspkernel", "${FILE_DIRNAME}/${PN}/tipspkernel", "${FILE_DIRNAME}/files/tipspkernel", \ |
8 | "${FILE_DIRNAME}/files/tipspkernel", "${FILE_DIRNAME}/tipspkernel"], d)}:" | 23 | "${FILE_DIRNAME}/tipspkernel"], d)}:" |
9 | 24 | ||
10 | # When "tipspkernel" is ENABLED, prepend additional set of directories to FILESPATH | 25 | # When "tipspkernel" is ENABLED, prepend additional set of directories to FILESPATH |
11 | FILESPATH =. "${@base_contains('DISTRO_FEATURES', 'tipspkernel', "${CONFIGS_PSP}", "", d)}" | 26 | FILESPATH =. "${@base_contains('DISTRO_FEATURES', 'tipspkernel', "${CONFIGS_PSP}", "", d)}" |