summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass11
1 files changed, 4 insertions, 7 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index b2266bee5d..74ec7d56b1 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -9,9 +9,6 @@ INHIBIT_DEFAULT_DEPS = "1"
9KERNEL_IMAGETYPE ?= "zImage" 9KERNEL_IMAGETYPE ?= "zImage"
10 10
11python __anonymous () { 11python __anonymous () {
12
13 import bb
14
15 kerneltype = bb.data.getVar('KERNEL_IMAGETYPE', d, 1) or '' 12 kerneltype = bb.data.getVar('KERNEL_IMAGETYPE', d, 1) or ''
16 if kerneltype == 'uImage': 13 if kerneltype == 'uImage':
17 depends = bb.data.getVar("DEPENDS", d, 1) 14 depends = bb.data.getVar("DEPENDS", d, 1)
@@ -271,7 +268,7 @@ module_conf_rfcomm = "alias bt-proto-3 rfcomm"
271 268
272python populate_packages_prepend () { 269python populate_packages_prepend () {
273 def extract_modinfo(file): 270 def extract_modinfo(file):
274 import os, re 271 import re
275 tmpfile = os.tmpnam() 272 tmpfile = os.tmpnam()
276 cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", file, tmpfile) 273 cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", file, tmpfile)
277 os.system(cmd) 274 os.system(cmd)
@@ -289,7 +286,7 @@ python populate_packages_prepend () {
289 return vals 286 return vals
290 287
291 def parse_depmod(): 288 def parse_depmod():
292 import os, re 289 import re
293 290
294 dvar = bb.data.getVar('D', d, 1) 291 dvar = bb.data.getVar('D', d, 1)
295 if not dvar: 292 if not dvar:
@@ -343,7 +340,7 @@ python populate_packages_prepend () {
343 file = file.replace(bb.data.getVar('D', d, 1) or '', '', 1) 340 file = file.replace(bb.data.getVar('D', d, 1) or '', '', 1)
344 341
345 if module_deps.has_key(file): 342 if module_deps.has_key(file):
346 import os.path, re 343 import re
347 dependencies = [] 344 dependencies = []
348 for i in module_deps[file]: 345 for i in module_deps[file]:
349 m = re.match(pattern, os.path.basename(i)) 346 m = re.match(pattern, os.path.basename(i))
@@ -411,7 +408,7 @@ python populate_packages_prepend () {
411 postrm = bb.data.getVar('pkg_postrm_modules', d, 1) 408 postrm = bb.data.getVar('pkg_postrm_modules', d, 1)
412 do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='update-modules kernel-%s' % bb.data.getVar("KERNEL_VERSION", d, 1)) 409 do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='update-modules kernel-%s' % bb.data.getVar("KERNEL_VERSION", d, 1))
413 410
414 import re, os 411 import re
415 metapkg = "kernel-modules" 412 metapkg = "kernel-modules"
416 bb.data.setVar('ALLOW_EMPTY_' + metapkg, "1", d) 413 bb.data.setVar('ALLOW_EMPTY_' + metapkg, "1", d)
417 bb.data.setVar('FILES_' + metapkg, "", d) 414 bb.data.setVar('FILES_' + metapkg, "", d)