diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2011-01-14 00:33:26 -0500 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2011-01-19 11:36:27 -0800 |
commit | 432e7619a7bd0c6a2075a618e5b17100fe459085 (patch) | |
tree | a1833661d9ae555ffb17431d11fd922d449be462 /meta/classes/kernel-yocto.bbclass | |
parent | 37c4345197461500e85612a3d25628c62ac620b8 (diff) | |
download | poky-432e7619a7bd0c6a2075a618e5b17100fe459085.tar.gz |
linux-yocto: streamline new BSP creation
By setting BOOTSTRAP to the branch that should be used for a
currently undefined BSP a build can be completed and an
environment for streamlining the BSP created.
With the appropriate machine.conf, and a defconfig any MACHINE
can be built against and inherit the configuration of the
standard yocto kernel.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta/classes/kernel-yocto.bbclass')
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index df2a8a43bc..88dcf32a06 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
@@ -24,7 +24,7 @@ python __anonymous () { | |||
24 | bb.data.setVar("KMACHINE", "${MACHINE}", d) | 24 | bb.data.setVar("KMACHINE", "${MACHINE}", d) |
25 | # track the global configuration on a bootstrapped BSP | 25 | # track the global configuration on a bootstrapped BSP |
26 | bb.data.setVar("SRCREV_machine", "${SRCREV_meta}", d) | 26 | bb.data.setVar("SRCREV_machine", "${SRCREV_meta}", d) |
27 | bb.data.setVar("BOOTSTRAP", "t", d) | 27 | bb.data.setVar("BOOTSTRAP", bb.data.expand("${MACHINE}",d) + "-standard", d) |
28 | else: | 28 | else: |
29 | # The branch for a build is: | 29 | # The branch for a build is: |
30 | # yocto/<kernel type>/${KMACHINE} or | 30 | # yocto/<kernel type>/${KMACHINE} or |
@@ -44,10 +44,10 @@ python __anonymous () { | |||
44 | bb.data.setVar('KMACHINE_' + bb.data.expand("${MACHINE}",d), kmachine, d) | 44 | bb.data.setVar('KMACHINE_' + bb.data.expand("${MACHINE}",d), kmachine, d) |
45 | 45 | ||
46 | if mach == "UNDEFINED": | 46 | if mach == "UNDEFINED": |
47 | bb.data.setVar("KBRANCH", "yocto/standard/base", d) | ||
48 | bb.data.setVar('KMACHINE_' + bb.data.expand("${MACHINE}",d), bb.data.expand("${MACHINE}",d), d) | 47 | bb.data.setVar('KMACHINE_' + bb.data.expand("${MACHINE}",d), bb.data.expand("${MACHINE}",d), d) |
48 | bb.data.setVar("KBRANCH", "yocto/standard/base", d) | ||
49 | bb.data.setVar("SRCREV_machine", "standard", d) | 49 | bb.data.setVar("SRCREV_machine", "standard", d) |
50 | bb.data.setVar("BOOTSTRAP", "t", d) | 50 | bb.data.setVar("BOOTSTRAP", "yocto/standard/" + bb.data.expand("${MACHINE}",d), d) |
51 | } | 51 | } |
52 | 52 | ||
53 | do_patch() { | 53 | do_patch() { |
@@ -57,6 +57,11 @@ do_patch() { | |||
57 | fi | 57 | fi |
58 | 58 | ||
59 | kbranch=${KBRANCH} | 59 | kbranch=${KBRANCH} |
60 | if [ -n "${BOOTSTRAP}" ]; then | ||
61 | # switch from a generic to a specific branch | ||
62 | kbranch=${BOOTSTRAP} | ||
63 | fi | ||
64 | |||
60 | 65 | ||
61 | # simply ensures that a branch of the right name has been created | 66 | # simply ensures that a branch of the right name has been created |
62 | createme ${ARCH} ${kbranch} ${defconfig} | 67 | createme ${ARCH} ${kbranch} ${defconfig} |