diff options
Diffstat (limited to 'meta/classes/linux-kernel-base.bbclass')
-rw-r--r-- | meta/classes/linux-kernel-base.bbclass | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/meta/classes/linux-kernel-base.bbclass b/meta/classes/linux-kernel-base.bbclass index 4f2b0a4a98..89ce71605c 100644 --- a/meta/classes/linux-kernel-base.bbclass +++ b/meta/classes/linux-kernel-base.bbclass | |||
@@ -1,5 +1,5 @@ | |||
1 | # parse kernel ABI version out of <linux/version.h> | 1 | # parse kernel ABI version out of <linux/version.h> |
2 | def get_kernelversion(p): | 2 | def get_kernelversion_headers(p): |
3 | import re | 3 | import re |
4 | 4 | ||
5 | fn = p + '/include/linux/utsrelease.h' | 5 | fn = p + '/include/linux/utsrelease.h' |
@@ -9,7 +9,6 @@ def get_kernelversion(p): | |||
9 | if not os.path.isfile(fn): | 9 | if not os.path.isfile(fn): |
10 | fn = p + '/include/linux/version.h' | 10 | fn = p + '/include/linux/version.h' |
11 | 11 | ||
12 | import re | ||
13 | try: | 12 | try: |
14 | f = open(fn, 'r') | 13 | f = open(fn, 'r') |
15 | except IOError: | 14 | except IOError: |
@@ -24,6 +23,16 @@ def get_kernelversion(p): | |||
24 | return m.group(1) | 23 | return m.group(1) |
25 | return None | 24 | return None |
26 | 25 | ||
26 | |||
27 | def get_kernelversion_file(p): | ||
28 | fn = p + '/kernel-abiversion' | ||
29 | |||
30 | try: | ||
31 | with open(fn, 'r') as f: | ||
32 | return f.readlines()[0].strip() | ||
33 | except IOError: | ||
34 | return None | ||
35 | |||
27 | def linux_module_packages(s, d): | 36 | def linux_module_packages(s, d): |
28 | suffix = "" | 37 | suffix = "" |
29 | return " ".join(map(lambda s: "kernel-module-%s%s" % (s.lower().replace('_', '-').replace('@', '+'), suffix), s.split())) | 38 | return " ".join(map(lambda s: "kernel-module-%s%s" % (s.lower().replace('_', '-').replace('@', '+'), suffix), s.split())) |