firefox: Perform a number of cleanups and fix consistency issues.
[openembedded.git] / classes / linux-kernel-base.bbclass
index e58c228..510951a 100644 (file)
@@ -1,8 +1,11 @@
 # parse kernel ABI version out of <linux/version.h>
 def get_kernelversion(p):
-    import re, os
+    import re
 
     fn = p + '/include/linux/utsrelease.h'
+    if not os.path.isfile(fn):
+        # after 2.6.33-rc1
+        fn = p + '/include/generated/utsrelease.h'
     if not os.path.isfile(fn):
         fn = p + '/include/linux/version.h'
 
@@ -30,12 +33,7 @@ def get_kernelmajorversion(p):
        return None
 
 def linux_module_packages(s, d):
-       import bb, os.path
        suffix = ""
-       if (bb.data.getVar("PARALLEL_INSTALL_MODULES", d, 1) == "1"):
-               file = bb.data.expand('${STAGING_KERNEL_DIR}/kernel-abiversion', d)
-               if (os.path.exists(file)):
-                    suffix = "-%s" % (get_kernelmajorversion(base_read_file(file)))
        return " ".join(map(lambda s: "kernel-module-%s%s" % (s.lower().replace('_', '-').replace('@', '+'), suffix), s.split()))
 
 # that's all