This adds some anonymous code that checks for an INTEL_BSP_SUBSTPYE
and if it exists uses the getVarFlag() to pull the appropriate SRCREV
and KBRACH with additional info as needed to build a kernel.

Also adds support for Broxton-m/Joule device as an example.

Signed-off-by: Saul Wold <[email protected]>
---
 common/recipes-kernel/linux/linux-yocto_4.4.bbappend | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/common/recipes-kernel/linux/linux-yocto_4.4.bbappend 
b/common/recipes-kernel/linux/linux-yocto_4.4.bbappend
index fca6231..29ce4f0 100644
--- a/common/recipes-kernel/linux/linux-yocto_4.4.bbappend
+++ b/common/recipes-kernel/linux/linux-yocto_4.4.bbappend
@@ -39,3 +39,23 @@ KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio"
 # For FRI2, NUC
 KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi"
 KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi"
+
+python __anonymous () {
+        bsp_subtype = d.getVar('INTEL_BSP_SUBTYPE', True)
+        if bsp_subtype is not None:
+            kmachine = d.getVarFlag('INTEL_KMACHINE', bsp_subtype, False)
+            kbranch = d.getVarFlag('INTEL_KBRANCH', bsp_subtype, False)
+            ksrcrev_mach = d.getVarFlag('INTEL_KSRCREV_MACH', bsp_subtype, 
False)
+            ksrcrev_meta = d.getVarFlag('INTEL_KSRCREV_META', bsp_subtype, 
False)
+            if kmachine is not None:
+                d.setVar("KMACHINE_corei7-64-intel-common", kmachine)
+            if kbranch is not None:
+                d.setVar("KBRANCH_corei7-64-intel-common",  kbranch)
+            if ksrcrev_mach is not None:
+                d.setVar("SRCREV_machine_corei7-64-intel-common", ksrcrev_mach)
+            if ksrcrev_meta is not None:
+                d.setVar("SRCREV_meta-corei7-64-intel-common", ksrcrev_meta)
+}
+
+INTEL_KBRANCH[broxton-m] = "standard/intel/bxt-rebase;rebaseable=1"
+INTEL_KSRCREV_MACH[broxton-m] = "b7ddcae5f0f374ab7ffd49b0f8636328f5e3386f"
-- 
2.7.4

-- 
_______________________________________________
meta-intel mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-intel

Reply via email to