yocto-bsp: add standard branch mapping
authorTom Zanussi <tom.zanussi@intel.com>
Sun, 5 Aug 2012 21:27:00 +0000 (16:27 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 25 Aug 2012 13:47:03 +0000 (14:47 +0100)
Add a mechanism to distinguish common-pc variants of standard
branches.

(From meta-yocto rev: c313ad936499104235c47f05bd98ef86b990d713)

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/bsp/engine.py

index bf6ebaa..857e5a0 100644 (file)
@@ -1493,3 +1493,24 @@ def yocto_bsp_list(args, scripts_path, properties_file):
             return False
 
     return True
+
+
+def map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch):
+    """
+    Return the linux-yocto bsp branch to use with the specified
+    kbranch.  This handles the -standard variants for 3.0 and 3.2; the
+    other variants don't need mappings.
+    """
+    if need_new_kbranch == "y":
+        kbranch = new_kbranch
+    else:
+        kbranch = existing_kbranch
+
+    if (kbranch.startswith("standard/default/common-pc-64") or
+        kbranch.startswith("yocto/standard/common-pc-64")):
+        return "bsp/common-pc-64/common-pc-64-standard"
+    if (kbranch.startswith("standard/default/common-pc") or
+        kbranch.startswith("yocto/standard/common-pc")):
+        return "bsp/common-pc/common-pc-standard"
+    else:
+        return "ktypes/standard"