Compare commits
319 Commits
1.3_M5.rc2
...
1.3_M5.rc4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9de24d3f4 | ||
|
|
58a7160419 | ||
|
|
767ced9fa5 | ||
|
|
5ecc6d0d6f | ||
|
|
c030e463ab | ||
|
|
709f570c82 | ||
|
|
cfbf6fad48 | ||
|
|
650d20107d | ||
|
|
a8a5765fed | ||
|
|
e369448f32 | ||
|
|
d1fe084c03 | ||
|
|
486441be18 | ||
|
|
0eca2b4cb2 | ||
|
|
7c08b602e6 | ||
|
|
970d00de04 | ||
|
|
f058e96728 | ||
|
|
11fdbf2b27 | ||
|
|
bc02fb725b | ||
|
|
5d4b08853e | ||
|
|
c29e8cbb2f | ||
|
|
784f93baf3 | ||
|
|
755ca76f8e | ||
|
|
1e892fb5a0 | ||
|
|
af811fbc0b | ||
|
|
0dc25d42ef | ||
|
|
5a816edcf9 | ||
|
|
f4434bd16e | ||
|
|
e83c7d3056 | ||
|
|
571259cc48 | ||
|
|
ad41126681 | ||
|
|
f2533f35e8 | ||
|
|
dcd1428716 | ||
|
|
d81ab9f844 | ||
|
|
13bf7c1299 | ||
|
|
6d45c9f72d | ||
|
|
5ae465073f | ||
|
|
2de77b3c38 | ||
|
|
f6092be1de | ||
|
|
babe0fa137 | ||
|
|
5647682c2f | ||
|
|
77b92b01ce | ||
|
|
0a4f7521bb | ||
|
|
c1261f843e | ||
|
|
e3a3bdd81f | ||
|
|
a8def2777c | ||
|
|
9884bc2d48 | ||
|
|
2f1b47e416 | ||
|
|
016d00123a | ||
|
|
fdabda6345 | ||
|
|
99dabeb2e9 | ||
|
|
f56a4774a9 | ||
|
|
4a4cdae234 | ||
|
|
7396cef1b9 | ||
|
|
6676fb5e32 | ||
|
|
be11294d17 | ||
|
|
2d93461815 | ||
|
|
1e9d77c3b2 | ||
|
|
3634379cea | ||
|
|
43c4cdb0df | ||
|
|
28c39928d3 | ||
|
|
703eadc55f | ||
|
|
e7134d50f3 | ||
|
|
ddef53b962 | ||
|
|
c1392638ce | ||
|
|
fbd21995ae | ||
|
|
9e21f5b114 | ||
|
|
b5ad96f86b | ||
|
|
33dcf6960b | ||
|
|
5979f64829 | ||
|
|
b0ac293871 | ||
|
|
6915004b18 | ||
|
|
90d45f4264 | ||
|
|
eb1782f715 | ||
|
|
503023dd69 | ||
|
|
1164f70c34 | ||
|
|
31e19a34a5 | ||
|
|
86c9aa8081 | ||
|
|
ef5298eebd | ||
|
|
09aaad16be | ||
|
|
73182ed4ea | ||
|
|
9c7189d74c | ||
|
|
93fdfafbfc | ||
|
|
0e6cc44a11 | ||
|
|
27c30e46d9 | ||
|
|
3b664d0cfc | ||
|
|
ef5dcad3e3 | ||
|
|
595b119894 | ||
|
|
2f9328ff32 | ||
|
|
423bb6b276 | ||
|
|
3f0591a8ca | ||
|
|
0d43dc75e4 | ||
|
|
7da9f109e8 | ||
|
|
094c4a0878 | ||
|
|
6d1aa1dc31 | ||
|
|
71030c6b37 | ||
|
|
e6663ffa5f | ||
|
|
8609051d8d | ||
|
|
029a744078 | ||
|
|
7067717113 | ||
|
|
5a18ea1b00 | ||
|
|
dd7db5cf83 | ||
|
|
56e07f6510 | ||
|
|
734d58c561 | ||
|
|
371a19f684 | ||
|
|
85e5dffb72 | ||
|
|
4afdff4757 | ||
|
|
6c5691a5ca | ||
|
|
99a1bf091e | ||
|
|
d46ab5a576 | ||
|
|
6c15b345ea | ||
|
|
fd67c63d0d | ||
|
|
876a87ba1c | ||
|
|
13d147178a | ||
|
|
e6ed2118fc | ||
|
|
5fd5ef78c4 | ||
|
|
1628d3c4c5 | ||
|
|
a32c0b2bab | ||
|
|
5e1460de1f | ||
|
|
873ac6a8c2 | ||
|
|
2685ff4fbd | ||
|
|
201bf86c28 | ||
|
|
3388abdd8f | ||
|
|
9c7f3c35b1 | ||
|
|
175e4bd923 | ||
|
|
fc50139a1a | ||
|
|
965f760388 | ||
|
|
25141d544d | ||
|
|
dff62da6de | ||
|
|
1b02ad9d4a | ||
|
|
eb9682f98c | ||
|
|
1040961076 | ||
|
|
93e7454bd7 | ||
|
|
70c657200f | ||
|
|
418d7d6435 | ||
|
|
f85c5a559c | ||
|
|
050263f1aa | ||
|
|
cc5f361da8 | ||
|
|
08996b37f4 | ||
|
|
c63ff82422 | ||
|
|
999f7c2601 | ||
|
|
42b3fc6dd3 | ||
|
|
89386fde89 | ||
|
|
aea363afaa | ||
|
|
425df23c02 | ||
|
|
b0862a5cf2 | ||
|
|
ee14710dbf | ||
|
|
d4ad1b760d | ||
|
|
a0a29221c8 | ||
|
|
248e9f48c7 | ||
|
|
8ceea528a7 | ||
|
|
9c3e605390 | ||
|
|
5112da2c69 | ||
|
|
6e8d68de7f | ||
|
|
be8dd82ce9 | ||
|
|
51ad952626 | ||
|
|
e2519ae2b0 | ||
|
|
bf3d0ca9d1 | ||
|
|
40a3cf008f | ||
|
|
32cc952460 | ||
|
|
34bd4e1743 | ||
|
|
cbddb898c2 | ||
|
|
7c2b1d5366 | ||
|
|
f18208a94c | ||
|
|
0ca8b6248e | ||
|
|
57977d77a4 | ||
|
|
faee028b66 | ||
|
|
7c02bb4cef | ||
|
|
2984c87f27 | ||
|
|
6494c05e80 | ||
|
|
876ef4918f | ||
|
|
a2783d2f64 | ||
|
|
2df5a30ef0 | ||
|
|
58a99ebe3c | ||
|
|
d3529e2fab | ||
|
|
c4d857debf | ||
|
|
9a283519b2 | ||
|
|
e7ba10c1de | ||
|
|
5fdbda6922 | ||
|
|
0bfb2094e3 | ||
|
|
35e6121a58 | ||
|
|
ae4552ac1b | ||
|
|
31dec3c6d3 | ||
|
|
97160f8e92 | ||
|
|
31fcfefbfd | ||
|
|
56c677a338 | ||
|
|
cf7cff7d23 | ||
|
|
eab4995400 | ||
|
|
e602247c08 | ||
|
|
a2e7adad27 | ||
|
|
fc3b6656af | ||
|
|
6b76d9e764 | ||
|
|
b616c9461d | ||
|
|
95c0e78278 | ||
|
|
7cf3214567 | ||
|
|
42ac02e097 | ||
|
|
7855192e78 | ||
|
|
02a1ed4c55 | ||
|
|
24da1b8ba6 | ||
|
|
a47106a43a | ||
|
|
4b17b2dd80 | ||
|
|
6acea5861e | ||
|
|
56ac2d90fa | ||
|
|
ebd71dd979 | ||
|
|
452332445a | ||
|
|
8cd203a46c | ||
|
|
5992839b92 | ||
|
|
d399b589b2 | ||
|
|
12ba89a88a | ||
|
|
332e696958 | ||
|
|
07925515ac | ||
|
|
6bf96aa1f9 | ||
|
|
8606f28cb4 | ||
|
|
78aedfa4d4 | ||
|
|
a1fc37eabc | ||
|
|
5bd37e57e1 | ||
|
|
e25d32bd2f | ||
|
|
a206035698 | ||
|
|
2977ae4021 | ||
|
|
52780ddb3e | ||
|
|
ee198802a3 | ||
|
|
0101e9edf4 | ||
|
|
33547c2f0c | ||
|
|
655264abcf | ||
|
|
0824517235 | ||
|
|
b7eb759920 | ||
|
|
a8ceece7d6 | ||
|
|
f38b88a66c | ||
|
|
25fb8ec27d | ||
|
|
dce39b7494 | ||
|
|
5473c28ac8 | ||
|
|
2b8d3c2db9 | ||
|
|
76dd4dd7b4 | ||
|
|
7c39c87d52 | ||
|
|
b99414e1d4 | ||
|
|
691d46286c | ||
|
|
43f295d3f1 | ||
|
|
db70697baa | ||
|
|
ed52eec109 | ||
|
|
894324908a | ||
|
|
35800afcc5 | ||
|
|
af8a6a2912 | ||
|
|
8711ca817a | ||
|
|
71107aa1ad | ||
|
|
183ffd2048 | ||
|
|
1a85fc8f5b | ||
|
|
e2ac27c051 | ||
|
|
409859e739 | ||
|
|
facb5f902f | ||
|
|
1ed2073a01 | ||
|
|
15216fc1ec | ||
|
|
3d3893d261 | ||
|
|
c4788b7330 | ||
|
|
856d5794e8 | ||
|
|
81de52f3f2 | ||
|
|
7bdcc26046 | ||
|
|
3129c32e1b | ||
|
|
25804ed8fc | ||
|
|
001297ed4c | ||
|
|
574d72803c | ||
|
|
7c6d679de0 | ||
|
|
f88ee2e28f | ||
|
|
49649451cb | ||
|
|
b85c30bb7d | ||
|
|
649048e537 | ||
|
|
1ad53437c4 | ||
|
|
edb2890f1c | ||
|
|
a42dffc0ba | ||
|
|
b0f4a5bc23 | ||
|
|
ad1aa810ac | ||
|
|
0f9ca5da65 | ||
|
|
4f82c4eaf7 | ||
|
|
7d95141c5a | ||
|
|
39a091fe1d | ||
|
|
ffb6928f57 | ||
|
|
6d3d4baeeb | ||
|
|
f786991c3a | ||
|
|
f31d114b48 | ||
|
|
71c0ff2e1b | ||
|
|
629282ecd0 | ||
|
|
e1913fbb01 | ||
|
|
ea5913fa84 | ||
|
|
a8c78aa835 | ||
|
|
3c58f92d46 | ||
|
|
f40bfd2e5f | ||
|
|
81602499c9 | ||
|
|
31f0de42fc | ||
|
|
bc90dedc3a | ||
|
|
faaa0653c2 | ||
|
|
5c1345c75d | ||
|
|
87a1f631ad | ||
|
|
7414ba713d | ||
|
|
6fdff49d9b | ||
|
|
0e1a427a25 | ||
|
|
4c229615ea | ||
|
|
d658f48efa | ||
|
|
dcd607ecc1 | ||
|
|
d93a5e190c | ||
|
|
876ec81c03 | ||
|
|
30b0c3c6f4 | ||
|
|
8bb52d817a | ||
|
|
6d7e9d42eb | ||
|
|
3d25fc9aeb | ||
|
|
0b09e50810 | ||
|
|
5a18ffd64e | ||
|
|
7d408d3781 | ||
|
|
0c7ef5214d | ||
|
|
598528484c | ||
|
|
65d2b3af37 | ||
|
|
4f68dd9303 | ||
|
|
6bc5925ea9 | ||
|
|
04ced3d738 | ||
|
|
8c32bcb36d | ||
|
|
074d49d2cc | ||
|
|
fd464e0886 | ||
|
|
0c340611de | ||
|
|
9eacffe137 | ||
|
|
42e8c80567 | ||
|
|
8593c6c1d8 | ||
|
|
acd52fd17d |
@@ -40,7 +40,7 @@ from bb import cooker
|
||||
from bb import ui
|
||||
from bb import server
|
||||
|
||||
__version__ = "1.15.3"
|
||||
__version__ = "1.16.0"
|
||||
logger = logging.getLogger("BitBake")
|
||||
|
||||
# Unbuffer stdout to avoid log truncation in the event
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
__version__ = "1.15.3"
|
||||
__version__ = "1.16.0"
|
||||
|
||||
import sys
|
||||
if sys.version_info < (2, 6, 0):
|
||||
|
||||
@@ -939,13 +939,13 @@ class BBCooker:
|
||||
errors = True
|
||||
continue
|
||||
if lver <> depver:
|
||||
parselog.error("Layer dependency %s of layer %s is at version %d, expected %d", dep, c, lver, depver)
|
||||
parselog.error("Layer '%s' depends on version %d of layer '%s', but version %d is enabled in your configuration", c, depver, dep, lver)
|
||||
errors = True
|
||||
else:
|
||||
parselog.error("Layer dependency %s of layer %s has no version, expected %d", dep, c, depver)
|
||||
parselog.error("Layer '%s' depends on version %d of layer '%s', which exists in your configuration but does not specify a version", c, depver, dep)
|
||||
errors = True
|
||||
else:
|
||||
parselog.error("Layer dependency %s of layer %s not found", dep, c)
|
||||
parselog.error("Layer '%s' depends on layer '%s', but this layer is not enabled in your configuration", c, dep)
|
||||
errors = True
|
||||
collection_depends[c] = depnamelist
|
||||
else:
|
||||
|
||||
@@ -323,9 +323,8 @@ def build_dependencies(key, keys, shelldeps, vardepvals, d):
|
||||
|
||||
deps |= set((vardeps or "").split())
|
||||
deps -= set((d.getVarFlag(key, "vardepsexclude", True) or "").split())
|
||||
except:
|
||||
bb.note("Error expanding variable %s" % key)
|
||||
raise
|
||||
except Exception as e:
|
||||
raise bb.data_smart.ExpansionError(key, None, e)
|
||||
return deps, value
|
||||
#bb.note("Variable %s references %s and calls %s" % (key, str(deps), str(execs)))
|
||||
#d.setVarFlag(key, "vardeps", deps)
|
||||
|
||||
@@ -103,7 +103,10 @@ class ExpansionError(Exception):
|
||||
self.variablename = varname
|
||||
self.exception = exception
|
||||
if varname:
|
||||
self.msg = "Failure expanding variable %s, expression was %s which triggered exception %s: %s" % (varname, expression, type(exception).__name__, exception)
|
||||
if expression:
|
||||
self.msg = "Failure expanding variable %s, expression was %s which triggered exception %s: %s" % (varname, expression, type(exception).__name__, exception)
|
||||
else:
|
||||
self.msg = "Failure expanding variable %s: %s: %s" % (varname, type(exception).__name__, exception)
|
||||
else:
|
||||
self.msg = "Failure expanding expression %s which triggered exception %s: %s" % (expression, type(exception).__name__, exception)
|
||||
Exception.__init__(self, self.msg)
|
||||
|
||||
@@ -562,6 +562,7 @@ class SanityCheckFailed(Event):
|
||||
"""
|
||||
Event to indicate sanity check has failed
|
||||
"""
|
||||
def __init__(self, msg):
|
||||
def __init__(self, msg, network_error=False):
|
||||
Event.__init__(self)
|
||||
self._msg = msg
|
||||
self._network_error = network_error
|
||||
|
||||
@@ -950,11 +950,11 @@ class FetchMethod(object):
|
||||
elif file.endswith('.rpm') or file.endswith('.srpm'):
|
||||
if 'extract' in urldata.parm:
|
||||
unpack_file = urldata.parm.get('extract')
|
||||
cmd = 'rpm2cpio.sh %s | cpio -i %s' % (file, unpack_file)
|
||||
cmd = 'rpm2cpio.sh %s | cpio -id %s' % (file, unpack_file)
|
||||
iterate = True
|
||||
iterate_file = unpack_file
|
||||
else:
|
||||
cmd = 'rpm2cpio.sh %s | cpio -i' % (file)
|
||||
cmd = 'rpm2cpio.sh %s | cpio -id' % (file)
|
||||
elif file.endswith('.deb') or file.endswith('.ipk'):
|
||||
cmd = 'ar -p %s data.tar.gz | zcat | tar --no-same-owner -xpf -' % file
|
||||
|
||||
|
||||
@@ -49,6 +49,9 @@ class Wget(FetchMethod):
|
||||
return True
|
||||
|
||||
def urldata_init(self, ud, d):
|
||||
if 'protocol' in ud.parm:
|
||||
if ud.parm['protocol'] == 'git':
|
||||
raise bb.fetch2.ParameterError("Invalid protocol - if you wish to fetch from a git repository using http, you need to instead use the git:// prefix with protocol=http", ud.url)
|
||||
|
||||
if 'downloadfilename' in ud.parm:
|
||||
ud.basename = ud.parm['downloadfilename']
|
||||
|
||||
@@ -29,7 +29,7 @@ import logging
|
||||
import bb.utils
|
||||
from bb.parse import ParseError, resolve_file, ast, logger
|
||||
|
||||
__config_regexp__ = re.compile( r"(?P<exp>export\s*)?(?P<var>[a-zA-Z0-9\-_+.${}/]+)(\[(?P<flag>[a-zA-Z0-9\-_+.]+)\])?\s*((?P<colon>:=)|(?P<lazyques>\?\?=)|(?P<ques>\?=)|(?P<append>\+=)|(?P<prepend>=\+)|(?P<predot>=\.)|(?P<postdot>\.=)|=)\s*(?P<apo>['\"])(?P<value>.*)(?P=apo)$")
|
||||
__config_regexp__ = re.compile( r"(?P<exp>export\s*)?(?P<var>[a-zA-Z0-9\-_+.${}/]+)(\[(?P<flag>[a-zA-Z0-9\-_+.]+)\])?\s*((?P<colon>:=)|(?P<lazyques>\?\?=)|(?P<ques>\?=)|(?P<append>\+=)|(?P<prepend>=\+)|(?P<predot>=\.)|(?P<postdot>\.=)|=)\s*(?!'[^']*'[^']*'$)(?!\"[^\"]*\"[^\"]*\"$)(?P<apo>['\"])(?P<value>.*)(?P=apo)$")
|
||||
__include_regexp__ = re.compile( r"include\s+(.+)" )
|
||||
__require_regexp__ = re.compile( r"require\s+(.+)" )
|
||||
__export_regexp__ = re.compile( r"export\s+([a-zA-Z0-9\-_+.${}/]+)$" )
|
||||
|
||||
@@ -130,7 +130,7 @@ def findPreferredProvider(pn, cfgData, dataCache, pkg_pn = None, item = None):
|
||||
m = re.match('(\d+:)*(.*)(_.*)*', preferred_v)
|
||||
if m:
|
||||
if m.group(1):
|
||||
preferred_e = int(m.group(1)[:-1])
|
||||
preferred_e = m.group(1)[:-1]
|
||||
else:
|
||||
preferred_e = None
|
||||
preferred_v = m.group(2)
|
||||
|
||||
@@ -34,3 +34,18 @@ class VerCmpString(unittest.TestCase):
|
||||
result = bb.utils.vercmp_string('1.1', '1_p2')
|
||||
self.assertTrue(result < 0)
|
||||
|
||||
def test_explode_dep_versions(self):
|
||||
correctresult = {"foo" : ["= 1.10"]}
|
||||
result = bb.utils.explode_dep_versions2("foo (= 1.10)")
|
||||
self.assertEqual(result, correctresult)
|
||||
result = bb.utils.explode_dep_versions2("foo (=1.10)")
|
||||
self.assertEqual(result, correctresult)
|
||||
result = bb.utils.explode_dep_versions2("foo ( = 1.10)")
|
||||
self.assertEqual(result, correctresult)
|
||||
result = bb.utils.explode_dep_versions2("foo ( =1.10)")
|
||||
self.assertEqual(result, correctresult)
|
||||
result = bb.utils.explode_dep_versions2("foo ( = 1.10 )")
|
||||
self.assertEqual(result, correctresult)
|
||||
result = bb.utils.explode_dep_versions2("foo ( =1.10 )")
|
||||
self.assertEqual(result, correctresult)
|
||||
|
||||
|
||||
@@ -99,6 +99,8 @@ class BuildConfigurationTreeView(gtk.TreeView):
|
||||
import os, os.path
|
||||
if os.path.exists(path):
|
||||
branch = bb.process.run('cd %s; git branch | grep "^* " | tr -d "* "' % path)[0]
|
||||
if branch.startswith("fatal:"):
|
||||
branch = "(unknown)"
|
||||
if branch:
|
||||
branch = branch.strip('\n')
|
||||
vars.append(self.set_vars("Branch:", branch))
|
||||
@@ -206,7 +208,7 @@ class BuildDetailsPage (HobPage):
|
||||
|
||||
color = HobColors.ERROR
|
||||
build_fail_top = gtk.EventBox()
|
||||
build_fail_top.set_size_request(-1, 200)
|
||||
#build_fail_top.set_size_request(-1, 200)
|
||||
build_fail_top.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(color))
|
||||
|
||||
build_fail_tab = gtk.Table(14, 46, True)
|
||||
@@ -229,7 +231,7 @@ class BuildDetailsPage (HobPage):
|
||||
|
||||
# create button 'Edit packages'
|
||||
action_button = HobButton(primary_action)
|
||||
action_button.set_size_request(-1, 40)
|
||||
#action_button.set_size_request(-1, 40)
|
||||
action_button.set_tooltip_text("Edit the %s parameters" % actions)
|
||||
action_button.connect('clicked', self.failure_primary_action_button_clicked_cb, primary_action)
|
||||
build_fail_tab.attach(action_button, 4, 13, 9, 12)
|
||||
@@ -261,15 +263,13 @@ class BuildDetailsPage (HobPage):
|
||||
self.box_group_area.pack_start(self.vbox, expand=True, fill=True)
|
||||
|
||||
self.vbox.pack_start(self.notebook, expand=True, fill=True)
|
||||
|
||||
self.box_group_area.pack_end(self.button_box, expand=False, fill=False)
|
||||
self.show_all()
|
||||
self.back_button.hide()
|
||||
|
||||
def add_build_stop_top_bar(self, action, log_file=None):
|
||||
color = HobColors.LIGHT_GRAY
|
||||
build_stop_top = gtk.EventBox()
|
||||
build_stop_top.set_size_request(-1, 200)
|
||||
#build_stop_top.set_size_request(-1, 200)
|
||||
build_stop_top.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(color))
|
||||
build_stop_top.set_flags(gtk.CAN_DEFAULT)
|
||||
build_stop_top.grab_default()
|
||||
@@ -307,7 +307,7 @@ class BuildDetailsPage (HobPage):
|
||||
|
||||
attach_pos = (24 if log_file else 14)
|
||||
build_button = HobAltButton("Build new image")
|
||||
build_button.set_size_request(-1, 40)
|
||||
#build_button.set_size_request(-1, 40)
|
||||
build_button.set_tooltip_text("Create a new image from scratch")
|
||||
build_button.connect('clicked', self.new_image_button_clicked_cb)
|
||||
build_stop_tab.attach(build_button, attach_pos, attach_pos + 9, 6, 9)
|
||||
@@ -390,7 +390,7 @@ class BuildDetailsPage (HobPage):
|
||||
self.builder.show_recipes()
|
||||
elif "Edit packages" in action:
|
||||
self.builder.show_packages()
|
||||
elif "Edit image configuration" in action:
|
||||
elif "Edit image" in action:
|
||||
self.builder.show_configuration()
|
||||
|
||||
def stop_primary_action_button_clicked_cb(self, button, action):
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
import glib
|
||||
import gtk
|
||||
import gtk, gobject
|
||||
import copy
|
||||
import os
|
||||
import subprocess
|
||||
@@ -36,6 +36,7 @@ from bb.ui.crumbs.recipeselectionpage import RecipeSelectionPage
|
||||
from bb.ui.crumbs.packageselectionpage import PackageSelectionPage
|
||||
from bb.ui.crumbs.builddetailspage import BuildDetailsPage
|
||||
from bb.ui.crumbs.imagedetailspage import ImageDetailsPage
|
||||
from bb.ui.crumbs.sanitycheckpage import SanityCheckPage
|
||||
from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton
|
||||
from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \
|
||||
AdvancedSettingDialog, SimpleSettingsDialog, \
|
||||
@@ -126,6 +127,7 @@ class Configuration:
|
||||
self.selected_recipes = []
|
||||
self.selected_packages = []
|
||||
self.initial_selected_packages = []
|
||||
self.initial_user_selected_packages = []
|
||||
|
||||
def split_proxy(self, protocol, proxy):
|
||||
entry = []
|
||||
@@ -187,7 +189,7 @@ class Configuration:
|
||||
self.curr_distro = template.getVar("DISTRO")
|
||||
self.dldir = template.getVar("DL_DIR")
|
||||
self.sstatedir = template.getVar("SSTATE_DIR")
|
||||
self.sstatemirror = template.getVar("SSTATE_MIRROR")
|
||||
self.sstatemirror = template.getVar("SSTATE_MIRRORS")
|
||||
try:
|
||||
self.pmake = int(template.getVar("PARALLEL_MAKE").split()[1])
|
||||
except:
|
||||
@@ -237,7 +239,7 @@ class Configuration:
|
||||
template.setVar("DISTRO", self.curr_distro)
|
||||
template.setVar("DL_DIR", self.dldir)
|
||||
template.setVar("SSTATE_DIR", self.sstatedir)
|
||||
template.setVar("SSTATE_MIRROR", self.sstatemirror)
|
||||
template.setVar("SSTATE_MIRRORS", self.sstatemirror)
|
||||
template.setVar("PARALLEL_MAKE", "-j %s" % self.pmake)
|
||||
template.setVar("BB_NUMBER_THREADS", self.bbthread)
|
||||
template.setVar("PACKAGE_CLASSES", " ".join(["package_" + i for i in self.curr_package_format.split()]))
|
||||
@@ -266,6 +268,22 @@ class Configuration:
|
||||
template.setVar("CVS_PROXY_HOST", self.combine_host_only("cvs"))
|
||||
template.setVar("CVS_PROXY_PORT", self.combine_port_only("cvs"))
|
||||
|
||||
def __str__(self):
|
||||
s = "VERSION: '%s', BBLAYERS: '%s', MACHINE: '%s', DISTRO: '%s', DL_DIR: '%s'," % \
|
||||
(hobVer, " ".join(self.layers), self.curr_mach, self.curr_distro, self.dldir )
|
||||
s += "SSTATE_DIR: '%s', SSTATE_MIRROR: '%s', PARALLEL_MAKE: '-j %s', BB_NUMBER_THREADS: '%s', PACKAGE_CLASSES: '%s', " % \
|
||||
(self.sstatedir, self.sstatemirror, self.pmake, self.bbthread, " ".join(["package_" + i for i in self.curr_package_format.split()]))
|
||||
s += "IMAGE_ROOTFS_SIZE: '%s', IMAGE_EXTRA_SPACE: '%s', INCOMPATIBLE_LICENSE: '%s', SDKMACHINE: '%s', CONF_VERSION: '%s', " % \
|
||||
(self.image_rootfs_size, self.image_extra_size, self.incompat_license, self.curr_sdk_machine, self.conf_version)
|
||||
s += "LCONF_VERSION: '%s', EXTRA_SETTING: '%s', TOOLCHAIN_BUILD: '%s', IMAGE_FSTYPES: '%s', __SELECTED_IMAGE__: '%s', " % \
|
||||
(self.lconf_version, self.extra_setting, self.toolchain_build, self.image_fstypes, self.selected_image)
|
||||
s += "DEPENDS: '%s', IMAGE_INSTALL: '%s', enable_proxy: '%s', use_same_proxy: '%s', http_proxy: '%s', " % \
|
||||
(self.selected_recipes, self.user_selected_packages, self.enable_proxy, self.same_proxy, self.combine_proxy("http"))
|
||||
s += "https_proxy: '%s', ftp_proxy: '%s', GIT_PROXY_HOST: '%s', GIT_PROXY_PORT: '%s', CVS_PROXY_HOST: '%s', CVS_PROXY_PORT: '%s'" % \
|
||||
(self.combine_proxy("https"), self.combine_proxy("ftp"),self.combine_host_only("git"), self.combine_port_only("git"),
|
||||
self.combine_host_only("cvs"), self.combine_port_only("cvs"))
|
||||
return s
|
||||
|
||||
class Parameters:
|
||||
'''Represents other variables like available machines, etc.'''
|
||||
|
||||
@@ -326,7 +344,7 @@ def hob_conf_filter(fn, data):
|
||||
|
||||
keys = ["MACHINE_HOB", "SDKMACHINE_HOB", "PACKAGE_CLASSES_HOB", \
|
||||
"BB_NUMBER_THREADS_HOB", "PARALLEL_MAKE_HOB", "DL_DIR_HOB", \
|
||||
"SSTATE_DIR_HOB", "SSTATE_MIRROR_HOB", "INCOMPATIBLE_LICENSE_HOB"]
|
||||
"SSTATE_DIR_HOB", "SSTATE_MIRRORS_HOB", "INCOMPATIBLE_LICENSE_HOB"]
|
||||
for key in keys:
|
||||
var_hob = data.getVar(key)
|
||||
if var_hob:
|
||||
@@ -341,7 +359,8 @@ def hob_conf_filter(fn, data):
|
||||
|
||||
class Builder(gtk.Window):
|
||||
|
||||
(MACHINE_SELECTION,
|
||||
(INITIAL_CHECKS,
|
||||
MACHINE_SELECTION,
|
||||
RCPPKGINFO_POPULATING,
|
||||
RCPPKGINFO_POPULATED,
|
||||
BASEIMG_SELECTED,
|
||||
@@ -354,16 +373,18 @@ class Builder(gtk.Window):
|
||||
IMAGE_GENERATED,
|
||||
MY_IMAGE_OPENED,
|
||||
BACK,
|
||||
END_NOOP) = range(14)
|
||||
END_NOOP) = range(15)
|
||||
|
||||
(IMAGE_CONFIGURATION,
|
||||
(SANITY_CHECK,
|
||||
IMAGE_CONFIGURATION,
|
||||
RECIPE_DETAILS,
|
||||
BUILD_DETAILS,
|
||||
PACKAGE_DETAILS,
|
||||
IMAGE_DETAILS,
|
||||
END_TAB) = range(6)
|
||||
END_TAB) = range(7)
|
||||
|
||||
__step2page__ = {
|
||||
INITIAL_CHECKS : SANITY_CHECK,
|
||||
MACHINE_SELECTION : IMAGE_CONFIGURATION,
|
||||
RCPPKGINFO_POPULATING : IMAGE_CONFIGURATION,
|
||||
RCPPKGINFO_POPULATED : IMAGE_CONFIGURATION,
|
||||
@@ -379,6 +400,8 @@ class Builder(gtk.Window):
|
||||
END_NOOP : None,
|
||||
}
|
||||
|
||||
SANITY_CHECK_MIN_DISPLAY_TIME = 5
|
||||
|
||||
def __init__(self, hobHandler, recipe_model, package_model):
|
||||
super(Builder, self).__init__()
|
||||
|
||||
@@ -474,9 +497,14 @@ class Builder(gtk.Window):
|
||||
self.build_details_page = BuildDetailsPage(self)
|
||||
self.package_details_page = PackageSelectionPage(self)
|
||||
self.image_details_page = ImageDetailsPage(self)
|
||||
self.sanity_check_page = SanityCheckPage(self)
|
||||
self.display_sanity_check = False
|
||||
self.sanity_check_post_func = False
|
||||
self.had_network_error = False
|
||||
|
||||
self.nb = gtk.Notebook()
|
||||
self.nb.set_show_tabs(False)
|
||||
self.nb.insert_page(self.sanity_check_page, None, self.SANITY_CHECK)
|
||||
self.nb.insert_page(self.image_configuration_page, None, self.IMAGE_CONFIGURATION)
|
||||
self.nb.insert_page(self.recipe_details_page, None, self.RECIPE_DETAILS)
|
||||
self.nb.insert_page(self.build_details_page, None, self.BUILD_DETAILS)
|
||||
@@ -487,17 +515,46 @@ class Builder(gtk.Window):
|
||||
self.show_all()
|
||||
self.nb.set_current_page(0)
|
||||
|
||||
def sanity_check_timeout(self):
|
||||
# The minimum time for showing the 'sanity check' page has passe
|
||||
# If someone set the 'sanity_check_post_step' meanwhile, execute it now
|
||||
self.display_sanity_check = False
|
||||
if self.sanity_check_post_func:
|
||||
temp = self.sanity_check_post_func
|
||||
self.sanity_check_post_func = None
|
||||
temp()
|
||||
return False
|
||||
|
||||
def show_sanity_check_page(self):
|
||||
# This window must stay on screen for at least 5 seconds, according to the design document
|
||||
self.nb.set_current_page(self.SANITY_CHECK)
|
||||
self.sanity_check_post_step = None
|
||||
self.display_sanity_check = True
|
||||
self.sanity_check_page.start()
|
||||
gobject.timeout_add(self.SANITY_CHECK_MIN_DISPLAY_TIME * 1000, self.sanity_check_timeout)
|
||||
|
||||
def execute_after_sanity_check(self, func):
|
||||
if not self.display_sanity_check:
|
||||
func()
|
||||
else:
|
||||
sanity_check_post_func = func
|
||||
|
||||
def generate_configuration(self):
|
||||
self.show_sanity_check_page()
|
||||
self.handler.generate_configuration()
|
||||
|
||||
def initiate_new_build_async(self):
|
||||
self.switch_page(self.MACHINE_SELECTION)
|
||||
if self.load_template(TemplateMgr.convert_to_template_pathfilename("default", ".hob/")) == False:
|
||||
self.show_sanity_check_page()
|
||||
self.handler.init_cooker()
|
||||
self.handler.set_extra_inherit("image_types")
|
||||
self.handler.generate_configuration()
|
||||
self.generate_configuration()
|
||||
|
||||
def update_config_async(self):
|
||||
self.switch_page(self.MACHINE_SELECTION)
|
||||
self.set_user_config()
|
||||
self.handler.generate_configuration()
|
||||
self.generate_configuration()
|
||||
|
||||
def sanity_check(self):
|
||||
self.handler.trigger_sanity_check()
|
||||
@@ -520,6 +577,7 @@ class Builder(gtk.Window):
|
||||
self.handler.generate_packages(all_recipes, self.configuration.default_task)
|
||||
|
||||
def restore_initial_selected_packages(self):
|
||||
self.package_model.set_selected_packages(self.configuration.initial_user_selected_packages, True)
|
||||
self.package_model.set_selected_packages(self.configuration.initial_selected_packages)
|
||||
for package in self.configuration.selected_packages:
|
||||
if package not in self.configuration.initial_selected_packages:
|
||||
@@ -653,6 +711,7 @@ class Builder(gtk.Window):
|
||||
|
||||
elif next_step == self.PACKAGE_SELECTION:
|
||||
self.configuration.initial_selected_packages = self.configuration.selected_packages
|
||||
self.configuration.initial_user_selected_packages = self.configuration.user_selected_packages
|
||||
self.package_details_page.set_title("Edit packages")
|
||||
if self.recipe_model.get_selected_image() == self.recipe_model.__custom_image__:
|
||||
self.package_details_page.set_packages_curr_tab(self.package_details_page.ALL)
|
||||
@@ -697,7 +756,7 @@ class Builder(gtk.Window):
|
||||
self.handler.set_distro(self.configuration.curr_distro)
|
||||
self.handler.set_dl_dir(self.configuration.dldir)
|
||||
self.handler.set_sstate_dir(self.configuration.sstatedir)
|
||||
self.handler.set_sstate_mirror(self.configuration.sstatemirror)
|
||||
self.handler.set_sstate_mirrors(self.configuration.sstatemirror)
|
||||
self.handler.set_pmake(self.configuration.pmake)
|
||||
self.handler.set_bbthreads(self.configuration.bbthread)
|
||||
self.handler.set_rootfs_size(self.configuration.image_rootfs_size)
|
||||
@@ -726,7 +785,10 @@ class Builder(gtk.Window):
|
||||
self.recipe_model.set_selected_image(selected_image)
|
||||
self.recipe_model.set_selected_recipes(selected_recipes)
|
||||
|
||||
def update_package_model(self, selected_packages):
|
||||
def update_package_model(self, selected_packages, user_selected_packages=None):
|
||||
if user_selected_packages:
|
||||
left = self.package_model.set_selected_packages(user_selected_packages, True)
|
||||
self.configuration.user_selected_packages += left
|
||||
left = self.package_model.set_selected_packages(selected_packages)
|
||||
self.configuration.selected_packages += left
|
||||
|
||||
@@ -754,6 +816,15 @@ class Builder(gtk.Window):
|
||||
def handler_package_formats_updated_cb(self, handler, formats):
|
||||
self.parameters.all_package_formats = formats
|
||||
|
||||
def switch_to_image_configuration_helper(self):
|
||||
self.sanity_check_page.stop()
|
||||
self.switch_page(self.IMAGE_CONFIGURATION)
|
||||
self.image_configuration_page.switch_machine_combo()
|
||||
|
||||
def show_network_error_dialog_helper(self):
|
||||
self.sanity_check_page.stop()
|
||||
self.show_network_error_dialog()
|
||||
|
||||
def handler_command_succeeded_cb(self, handler, initcmd):
|
||||
if initcmd == self.handler.GENERATE_CONFIGURATION:
|
||||
if not self.configuration.curr_mach:
|
||||
@@ -761,7 +832,13 @@ class Builder(gtk.Window):
|
||||
self.update_configuration_parameters(self.get_parameters_sync())
|
||||
self.sanity_check()
|
||||
elif initcmd == self.handler.SANITY_CHECK:
|
||||
self.image_configuration_page.switch_machine_combo()
|
||||
if self.had_network_error:
|
||||
self.had_network_error = False
|
||||
self.execute_after_sanity_check(self.show_network_error_dialog_helper)
|
||||
else:
|
||||
# Switch to the 'image configuration' page now, but we might need
|
||||
# to wait for the minimum display time of the sanity check page
|
||||
self.execute_after_sanity_check(self.switch_to_image_configuration_helper)
|
||||
elif initcmd in [self.handler.GENERATE_RECIPES,
|
||||
self.handler.GENERATE_PACKAGES,
|
||||
self.handler.GENERATE_IMAGE]:
|
||||
@@ -778,23 +855,47 @@ class Builder(gtk.Window):
|
||||
self.generate_image_async(True)
|
||||
|
||||
def show_error_dialog(self, msg):
|
||||
lbl = "<b>Error</b>\n"
|
||||
lbl = lbl + "%s\n\n" % glib.markup_escape_text(msg)
|
||||
dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR)
|
||||
lbl = "<b>Hob found an error</b>\n"
|
||||
dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR, msg)
|
||||
button = dialog.add_button("Close", gtk.RESPONSE_OK)
|
||||
HobButton.style_button(button)
|
||||
response = dialog.run()
|
||||
dialog.destroy()
|
||||
|
||||
def show_network_error_dialog(self):
|
||||
lbl = "<b>Hob cannot connect to the network</b>\n"
|
||||
msg = "Please check your network connection. If you are using a proxy server, please make sure it is configured correctly."
|
||||
lbl = lbl + "%s\n\n" % glib.markup_escape_text(msg)
|
||||
dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR)
|
||||
button = dialog.add_button("Close", gtk.RESPONSE_OK)
|
||||
HobButton.style_button(button)
|
||||
button = dialog.add_button("Proxy settings", gtk.RESPONSE_CANCEL)
|
||||
HobButton.style_button(button)
|
||||
res = dialog.run()
|
||||
dialog.destroy()
|
||||
if res == gtk.RESPONSE_CANCEL:
|
||||
res, settings_changed = self.show_simple_settings_dialog(SimpleSettingsDialog.PROXIES_PAGE_ID)
|
||||
if not res:
|
||||
return
|
||||
if settings_changed:
|
||||
self.reparse_post_adv_settings()
|
||||
|
||||
def handler_command_failed_cb(self, handler, msg):
|
||||
if msg:
|
||||
self.show_error_dialog(msg)
|
||||
self.reset()
|
||||
|
||||
def handler_sanity_failed_cb(self, handler, msg):
|
||||
msg = msg.replace("your local.conf", "Settings")
|
||||
self.show_error_dialog(msg)
|
||||
def handler_sanity_failed_cb(self, handler, msg, network_error):
|
||||
self.reset()
|
||||
if network_error:
|
||||
# Mark this in an internal field. The "network error" dialog will be
|
||||
# shown later, when a SanityCheckPassed event will be handled
|
||||
# (as sent by sanity.bbclass)
|
||||
self.had_network_error = True
|
||||
else:
|
||||
msg = msg.replace("your local.conf", "Settings")
|
||||
self.show_error_dialog(msg)
|
||||
self.reset()
|
||||
|
||||
def window_sensitive(self, sensitive):
|
||||
self.image_configuration_page.machine_combo.set_sensitive(sensitive)
|
||||
@@ -829,11 +930,12 @@ class Builder(gtk.Window):
|
||||
selected_image = self.configuration.selected_image
|
||||
selected_recipes = self.configuration.selected_recipes[:]
|
||||
selected_packages = self.configuration.selected_packages[:]
|
||||
user_selected_packages = self.configuration.user_selected_packages[:]
|
||||
|
||||
self.image_configuration_page.update_image_combo(self.recipe_model, selected_image)
|
||||
self.image_configuration_page.update_image_desc()
|
||||
self.update_recipe_model(selected_image, selected_recipes)
|
||||
self.update_package_model(selected_packages)
|
||||
self.update_package_model(selected_packages, user_selected_packages)
|
||||
|
||||
def recipelist_changed_cb(self, recipe_model):
|
||||
self.recipe_details_page.refresh_selection()
|
||||
@@ -1171,7 +1273,7 @@ class Builder(gtk.Window):
|
||||
|
||||
dialog.destroy()
|
||||
|
||||
def show_adv_settings_dialog(self):
|
||||
def show_adv_settings_dialog(self, tab=None):
|
||||
dialog = AdvancedSettingDialog(title = "Advanced configuration",
|
||||
configuration = copy.deepcopy(self.configuration),
|
||||
all_image_types = self.parameters.image_types,
|
||||
@@ -1187,6 +1289,7 @@ class Builder(gtk.Window):
|
||||
HobAltButton.style_button(button)
|
||||
button = dialog.add_button("Save", gtk.RESPONSE_YES)
|
||||
HobButton.style_button(button)
|
||||
dialog.set_save_button(button)
|
||||
response = dialog.run()
|
||||
settings_changed = False
|
||||
if response == gtk.RESPONSE_YES:
|
||||
@@ -1196,7 +1299,7 @@ class Builder(gtk.Window):
|
||||
dialog.destroy()
|
||||
return response == gtk.RESPONSE_YES, settings_changed
|
||||
|
||||
def show_simple_settings_dialog(self):
|
||||
def show_simple_settings_dialog(self, tab=None):
|
||||
dialog = SimpleSettingsDialog(title = "Settings",
|
||||
configuration = copy.deepcopy(self.configuration),
|
||||
all_image_types = self.parameters.image_types,
|
||||
@@ -1212,6 +1315,8 @@ class Builder(gtk.Window):
|
||||
HobAltButton.style_button(button)
|
||||
button = dialog.add_button("Save", gtk.RESPONSE_YES)
|
||||
HobButton.style_button(button)
|
||||
if tab:
|
||||
dialog.switch_to_page(tab)
|
||||
response = dialog.run()
|
||||
settings_changed = False
|
||||
if response == gtk.RESPONSE_YES:
|
||||
@@ -1375,6 +1480,8 @@ class Builder(gtk.Window):
|
||||
if response != gtk.RESPONSE_CANCEL:
|
||||
self.stopping = True
|
||||
if response == gtk.RESPONSE_OK:
|
||||
self.build_details_page.progress_bar.set_title("Stopping the build...")
|
||||
self.build_details_page.progress_bar.set_rcstyle("stop")
|
||||
self.cancel_build_sync()
|
||||
elif response == gtk.RESPONSE_YES:
|
||||
self.cancel_build_sync(True)
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
import glob
|
||||
import glib
|
||||
import gtk
|
||||
import gobject
|
||||
import hashlib
|
||||
@@ -51,6 +52,14 @@ class SettingsUIHelper():
|
||||
label.show()
|
||||
return label
|
||||
|
||||
def gen_label_info_widget(self, content, tooltip):
|
||||
table = gtk.Table(1, 10, False)
|
||||
label = self.gen_label_widget(content)
|
||||
info = HobInfoButton(tooltip, self)
|
||||
table.attach(label, 0, 1, 0, 1, xoptions=gtk.FILL)
|
||||
table.attach(info, 1, 2, 0, 1, xoptions=gtk.FILL, xpadding=10)
|
||||
return table
|
||||
|
||||
def gen_spinner_widget(self, content, lower, upper, tooltip=""):
|
||||
hbox = gtk.HBox(False, 12)
|
||||
adjust = gtk.Adjustment(value=content, lower=lower, upper=upper, step_incr=1)
|
||||
@@ -103,26 +112,122 @@ class SettingsUIHelper():
|
||||
hbox = gtk.HBox(False, 12)
|
||||
entry = gtk.Entry()
|
||||
entry.set_text(content)
|
||||
entry.set_size_request(350,30)
|
||||
|
||||
if need_button:
|
||||
table = gtk.Table(1, 10, True)
|
||||
table = gtk.Table(1, 10, False)
|
||||
hbox.pack_start(table, expand=True, fill=True)
|
||||
table.attach(entry, 0, 9, 0, 1)
|
||||
table.attach(entry, 0, 9, 0, 1, xoptions=gtk.SHRINK)
|
||||
image = gtk.Image()
|
||||
image.set_from_stock(gtk.STOCK_OPEN,gtk.ICON_SIZE_BUTTON)
|
||||
open_button = gtk.Button()
|
||||
open_button.set_image(image)
|
||||
open_button.connect("clicked", self.entry_widget_select_path_cb, parent, entry)
|
||||
table.attach(open_button, 9, 10, 0, 1)
|
||||
table.attach(open_button, 9, 10, 0, 1, xoptions=gtk.SHRINK)
|
||||
else:
|
||||
hbox.pack_start(entry, expand=True, fill=True)
|
||||
|
||||
info = HobInfoButton(tooltip, self)
|
||||
hbox.pack_start(info, expand=False, fill=False)
|
||||
if tooltip != "":
|
||||
info = HobInfoButton(tooltip, self)
|
||||
hbox.pack_start(info, expand=False, fill=False)
|
||||
|
||||
hbox.show_all()
|
||||
return hbox, entry
|
||||
|
||||
def gen_mirror_entry_widget(self, content, index, match_content=""):
|
||||
hbox = gtk.HBox(False)
|
||||
entry = gtk.Entry()
|
||||
content = content[:-2]
|
||||
entry.set_text(content)
|
||||
entry.set_size_request(350,30)
|
||||
|
||||
entry_match = gtk.Entry()
|
||||
entry_match.set_text(match_content)
|
||||
entry_match.set_size_request(100,30)
|
||||
|
||||
table = gtk.Table(2, 5, False)
|
||||
table.set_row_spacings(12)
|
||||
table.set_col_spacings(6)
|
||||
hbox.pack_start(table, expand=True, fill=True)
|
||||
|
||||
label_configuration = gtk.Label("Configuration")
|
||||
label_configuration.set_alignment(0.0,0.5)
|
||||
label_mirror_url = gtk.Label("Mirror URL")
|
||||
label_mirror_url.set_alignment(0.0,0.5)
|
||||
label_match = gtk.Label("Match")
|
||||
label_match.set_alignment(0.0,0.5)
|
||||
label_replace_with = gtk.Label("Replace with")
|
||||
label_replace_with.set_alignment(0.0,0.5)
|
||||
|
||||
combo = gtk.combo_box_new_text()
|
||||
combo.append_text("Standard")
|
||||
combo.append_text("Custom")
|
||||
if match_content == "":
|
||||
combo.set_active(0)
|
||||
else:
|
||||
combo.set_active(1)
|
||||
combo.connect("changed", self.on_combo_changed, index)
|
||||
combo.set_size_request(100,30)
|
||||
|
||||
delete_button = HobAltButton("Delete")
|
||||
delete_button.connect("clicked", self.delete_cb, index, entry)
|
||||
if content == "" and index == 0 and len(self.sstatemirrors_list) == 1:
|
||||
delete_button.set_sensitive(False)
|
||||
delete_button.set_size_request(100, 30)
|
||||
|
||||
entry_match.connect("changed", self.insert_entry_match_cb, index)
|
||||
entry.connect("changed", self.insert_entry_cb, index, delete_button)
|
||||
|
||||
if match_content == "":
|
||||
table.attach(label_configuration, 1, 2, 0, 1, xoptions=gtk.SHRINK|gtk.FILL)
|
||||
table.attach(label_mirror_url, 2, 3, 0, 1, xoptions=gtk.SHRINK|gtk.FILL)
|
||||
table.attach(combo, 1, 2, 1, 2, xoptions=gtk.SHRINK)
|
||||
table.attach(entry, 2, 3, 1, 2, xoptions=gtk.SHRINK)
|
||||
table.attach(delete_button, 3, 4, 1, 2, xoptions=gtk.SHRINK)
|
||||
else:
|
||||
table.attach(label_configuration, 1, 2, 0, 1, xoptions=gtk.SHRINK|gtk.FILL)
|
||||
table.attach(label_match, 2, 3, 0, 1, xoptions=gtk.SHRINK|gtk.FILL)
|
||||
table.attach(label_replace_with, 3, 4, 0, 1, xoptions=gtk.SHRINK|gtk.FILL)
|
||||
table.attach(combo, 1, 2, 1, 2, xoptions=gtk.SHRINK)
|
||||
table.attach(entry_match, 2, 3, 1, 2, xoptions=gtk.SHRINK)
|
||||
table.attach(entry, 3, 4, 1, 2, xoptions=gtk.SHRINK)
|
||||
table.attach(delete_button, 4, 5, 1, 2, xoptions=gtk.SHRINK)
|
||||
|
||||
hbox.show_all()
|
||||
return hbox
|
||||
|
||||
def insert_entry_match_cb(self, entry_match, index):
|
||||
self.sstatemirrors_list[index][2] = entry_match.get_text()
|
||||
|
||||
def insert_entry_cb(self, entry, index, button):
|
||||
self.sstatemirrors_list[index][1] = entry.get_text()
|
||||
if entry.get_text() == "" and index == 0:
|
||||
button.set_sensitive(False)
|
||||
else:
|
||||
button.set_sensitive(True)
|
||||
|
||||
def on_combo_changed(self, combo, index):
|
||||
if combo.get_active_text() == "Standard":
|
||||
self.sstatemirrors_list[index][0] = 0
|
||||
self.sstatemirrors_list[index][2] = "file://(.*)"
|
||||
else:
|
||||
self.sstatemirrors_list[index][0] = 1
|
||||
self.refresh_shared_state_page()
|
||||
|
||||
def delete_cb(self, button, index, entry):
|
||||
if index == 0 and len(self.sstatemirrors_list)==1:
|
||||
entry.set_text("")
|
||||
else:
|
||||
self.sstatemirrors_list.pop(index)
|
||||
self.refresh_shared_state_page()
|
||||
|
||||
def add_mirror(self, button):
|
||||
tooltip = "Select the pre-built mirror that will speed your build"
|
||||
index = len(self.sstatemirrors_list)
|
||||
sm_list = [0, "", "file://(.*)"]
|
||||
self.sstatemirrors_list.append(sm_list)
|
||||
self.refresh_shared_state_page()
|
||||
|
||||
#
|
||||
# CrumbsDialog
|
||||
#
|
||||
@@ -146,18 +251,18 @@ class CrumbsMessageDialog(CrumbsDialog):
|
||||
A GNOME HIG compliant dialog widget.
|
||||
Add buttons with gtk.Dialog.add_button or gtk.Dialog.add_buttons
|
||||
"""
|
||||
def __init__(self, parent=None, label="", icon=gtk.STOCK_INFO):
|
||||
super(CrumbsMessageDialog, self).__init__("", parent, gtk.DIALOG_DESTROY_WITH_PARENT)
|
||||
def __init__(self, parent=None, label="", icon=gtk.STOCK_INFO, msg=""):
|
||||
super(CrumbsMessageDialog, self).__init__("", parent, gtk.DIALOG_MODAL)
|
||||
|
||||
self.set_border_width(6)
|
||||
self.vbox.set_property("spacing", 12)
|
||||
self.action_area.set_property("spacing", 12)
|
||||
self.action_area.set_property("border-width", 6)
|
||||
|
||||
first_row = gtk.HBox(spacing=12)
|
||||
first_row.set_property("border-width", 6)
|
||||
first_row.show()
|
||||
self.vbox.add(first_row)
|
||||
first_column = gtk.HBox(spacing=12)
|
||||
first_column.set_property("border-width", 6)
|
||||
first_column.show()
|
||||
self.vbox.add(first_column)
|
||||
|
||||
self.icon = gtk.Image()
|
||||
# We have our own Info icon which should be used in preference of the stock icon
|
||||
@@ -165,21 +270,55 @@ class CrumbsMessageDialog(CrumbsDialog):
|
||||
self.icon.set_from_stock(self.icon_chk.check_stock_icon(icon), gtk.ICON_SIZE_DIALOG)
|
||||
self.icon.set_property("yalign", 0.00)
|
||||
self.icon.show()
|
||||
first_row.add(self.icon)
|
||||
|
||||
self.label = gtk.Label()
|
||||
self.label.set_use_markup(True)
|
||||
self.label.set_line_wrap(True)
|
||||
self.label.set_markup(label)
|
||||
self.label.set_property("yalign", 0.00)
|
||||
self.label.show()
|
||||
first_row.add(self.label)
|
||||
first_column.pack_start(self.icon, expand=False, fill=True, padding=0)
|
||||
|
||||
if 0 <= len(msg) < 200:
|
||||
lbl = label + "%s" % glib.markup_escape_text(msg)
|
||||
self.label_short = gtk.Label()
|
||||
self.label_short.set_use_markup(True)
|
||||
self.label_short.set_line_wrap(True)
|
||||
self.label_short.set_markup(lbl)
|
||||
self.label_short.set_property("yalign", 0.00)
|
||||
self.label_short.show()
|
||||
first_column.add(self.label_short)
|
||||
else:
|
||||
second_row = gtk.VBox(spacing=12)
|
||||
second_row.set_property("border-width", 6)
|
||||
self.label_long = gtk.Label()
|
||||
self.label_long.set_use_markup(True)
|
||||
self.label_long.set_line_wrap(True)
|
||||
self.label_long.set_markup(label)
|
||||
self.label_long.set_alignment(0.0, 0.0)
|
||||
second_row.pack_start(self.label_long, expand=False, fill=False, padding=0)
|
||||
self.label_long.show()
|
||||
self.textWindow = gtk.ScrolledWindow()
|
||||
self.textWindow.set_shadow_type(gtk.SHADOW_IN)
|
||||
self.textWindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
|
||||
self.msgView = gtk.TextView()
|
||||
self.msgView.set_editable(False)
|
||||
self.msgView.set_wrap_mode(gtk.WRAP_WORD)
|
||||
self.msgView.set_cursor_visible(False)
|
||||
self.msgView.set_size_request(300, 300)
|
||||
self.buf = gtk.TextBuffer()
|
||||
self.buf.set_text(msg)
|
||||
self.msgView.set_buffer(self.buf)
|
||||
self.textWindow.add(self.msgView)
|
||||
self.msgView.show()
|
||||
second_row.add(self.textWindow)
|
||||
self.textWindow.show()
|
||||
first_column.add(second_row)
|
||||
second_row.show()
|
||||
|
||||
#
|
||||
# SimpleSettings Dialog
|
||||
#
|
||||
class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
|
||||
|
||||
(BUILD_ENV_PAGE_ID,
|
||||
SHARED_STATE_PAGE_ID,
|
||||
PROXIES_PAGE_ID,
|
||||
OTHERS_PAGE_ID) = range(4)
|
||||
|
||||
def __init__(self, title, configuration, all_image_types,
|
||||
all_package_formats, all_distros, all_sdk_machines,
|
||||
max_threads, parent, flags, buttons=None):
|
||||
@@ -197,7 +336,8 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
|
||||
# class members for internal use
|
||||
self.dldir_text = None
|
||||
self.sstatedir_text = None
|
||||
self.sstatemirror_text = None
|
||||
self.sstatemirrors_list = []
|
||||
self.sstatemirrors_changed = 0
|
||||
self.bb_spinner = None
|
||||
self.pmake_spinner = None
|
||||
self.rootfs_size_spinner = None
|
||||
@@ -219,14 +359,6 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
|
||||
|
||||
def config_md5(self):
|
||||
data = ""
|
||||
data += ("PACKAGE_CLASSES: " + self.configuration.curr_package_format + '\n')
|
||||
data += ("DISTRO: " + self._get_sorted_value(self.configuration.curr_distro))
|
||||
data += ("IMAGE_ROOTFS_SIZE: " + self._get_sorted_value(self.configuration.image_rootfs_size))
|
||||
data += ("IMAGE_EXTRA_SIZE: " + self._get_sorted_value(self.configuration.image_extra_size))
|
||||
data += ("INCOMPATIBLE_LICENSE: " + self._get_sorted_value(self.configuration.incompat_license))
|
||||
data += ("SDK_MACHINE: " + self._get_sorted_value(self.configuration.curr_sdk_machine))
|
||||
data += ("TOOLCHAIN_BUILD: " + self._get_sorted_value(self.configuration.toolchain_build))
|
||||
data += ("IMAGE_FSTYPES: " + self._get_sorted_value(self.configuration.image_fstypes))
|
||||
data += ("ENABLE_PROXY: " + self._get_sorted_value(self.configuration.enable_proxy))
|
||||
if self.configuration.enable_proxy:
|
||||
for protocol in self.configuration.proxies.keys():
|
||||
@@ -331,7 +463,14 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
|
||||
def response_cb(self, dialog, response_id):
|
||||
self.configuration.dldir = self.dldir_text.get_text()
|
||||
self.configuration.sstatedir = self.sstatedir_text.get_text()
|
||||
self.configuration.sstatemirror = self.sstatemirror_text.get_text()
|
||||
self.configuration.sstatemirror = ""
|
||||
for mirror in self.sstatemirrors_list:
|
||||
if mirror[1] != "":
|
||||
if mirror[1].endswith("\\1"):
|
||||
smirror = mirror[2] + " " + mirror[1] + " \\n "
|
||||
else:
|
||||
smirror = mirror[2] + " " + mirror[1] + "\\1 \\n "
|
||||
self.configuration.sstatemirror += smirror
|
||||
self.configuration.bbthread = self.bb_spinner.get_value_as_int()
|
||||
self.configuration.pmake = self.pmake_spinner.get_value_as_int()
|
||||
|
||||
@@ -347,6 +486,14 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
|
||||
self.configuration.split_proxy("git", self.git_proxy.get_text() + ":" + self.git_proxy_port.get_text())
|
||||
self.configuration.split_proxy("cvs", self.cvs_proxy.get_text() + ":" + self.cvs_proxy_port.get_text())
|
||||
|
||||
self.configuration.extra_setting = {}
|
||||
it = self.setting_store.get_iter_first()
|
||||
while it:
|
||||
key = self.setting_store.get_value(it, 0)
|
||||
value = self.setting_store.get_value(it, 1)
|
||||
self.configuration.extra_setting[key] = value
|
||||
it = self.setting_store.iter_next(it)
|
||||
|
||||
md5 = self.config_md5()
|
||||
self.settings_changed = (self.md5 != md5)
|
||||
|
||||
@@ -354,9 +501,10 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
|
||||
advanced_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.set_border_width(6)
|
||||
|
||||
advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Parallel threads</span>'), expand=False, fill=False)
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">BB number threads:</span>")
|
||||
label = self.gen_label_widget("BitBake parallel threads")
|
||||
tooltip = "Sets the number of threads that BitBake tasks can simultaneously run. See the <a href=\""
|
||||
tooltip += "http://www.yoctoproject.org/docs/current/poky-ref-manual/"
|
||||
tooltip += "poky-ref-manual.html#var-BB_NUMBER_THREADS\">Poky reference manual</a> for information"
|
||||
@@ -366,7 +514,7 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
|
||||
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Parallel make:</span>")
|
||||
label = self.gen_label_widget("Make parallel threads")
|
||||
tooltip = "Sets the maximum number of threads the host can use during the build. See the <a href=\""
|
||||
tooltip += "http://www.yoctoproject.org/docs/current/poky-ref-manual/"
|
||||
tooltip += "poky-ref-manual.html#var-PARALLEL_MAKE\">Poky reference manual</a> for information"
|
||||
@@ -374,32 +522,93 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(pmake_widget, expand=False, fill=False)
|
||||
|
||||
advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Downloaded source code</span>'), expand=False, fill=False)
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Select download directory:</span>")
|
||||
label = self.gen_label_widget("Downloads directory")
|
||||
tooltip = "Select a folder that caches the upstream project source code"
|
||||
dldir_widget, self.dldir_text = self.gen_entry_widget(self.configuration.dldir, self, tooltip)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(dldir_widget, expand=False, fill=False)
|
||||
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Select SSTATE directory:</span>")
|
||||
tooltip = "Select a folder that caches your prebuilt results"
|
||||
sstatedir_widget, self.sstatedir_text = self.gen_entry_widget(self.configuration.sstatedir, self, tooltip)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(sstatedir_widget, expand=False, fill=False)
|
||||
return advanced_vbox
|
||||
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Select SSTATE mirror:</span>")
|
||||
tooltip = "Select the pre-built mirror that will speed your build"
|
||||
sstatemirror_widget, self.sstatemirror_text = self.gen_entry_widget(self.configuration.sstatemirror, self, tooltip)
|
||||
def create_shared_state_page(self):
|
||||
advanced_vbox = gtk.VBox(False)
|
||||
advanced_vbox.set_border_width(12)
|
||||
|
||||
sub_vbox = gtk.VBox(False)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False, padding=24)
|
||||
content = "<span>Shared state directory</span>"
|
||||
tooltip = "Select a folder that caches your prebuilt results"
|
||||
label = self.gen_label_info_widget(content, tooltip)
|
||||
sstatedir_widget, self.sstatedir_text = self.gen_entry_widget(self.configuration.sstatedir, self)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(sstatemirror_widget, expand=False, fill=False)
|
||||
sub_vbox.pack_start(sstatedir_widget, expand=False, fill=False, padding=12)
|
||||
|
||||
sub_vbox = gtk.VBox(False)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
content = "<span weight=\"bold\">Shared state mirrors</span>"
|
||||
tooltip = "URLs pointing to pre-built mirrors that will speed your build. "
|
||||
tooltip += "Select the \'Standard\' configuration if the structure of your "
|
||||
tooltip += "mirror replicates the structure of your local shared state directory. "
|
||||
tooltip += "For more information on shared state mirrors, check the <a href=\""
|
||||
tooltip += "http://www.yoctoproject.org/docs/current/poky-ref-manual/"
|
||||
tooltip += "poky-ref-manual.html#shared-state\">Yocto Project Reference Manual</a>."
|
||||
table = self.gen_label_info_widget(content, tooltip)
|
||||
sub_vbox.pack_start(table, expand=False, fill=False)
|
||||
|
||||
searched_string = "file://"
|
||||
|
||||
if self.sstatemirrors_changed == 0:
|
||||
self.sstatemirrors_changed = 1
|
||||
sstatemirrors = self.configuration.sstatemirror
|
||||
if sstatemirrors == "":
|
||||
sm_list = [ 0, "", "file://(.*)"]
|
||||
self.sstatemirrors_list.append(sm_list)
|
||||
else:
|
||||
while sstatemirrors.find(searched_string) != -1:
|
||||
if sstatemirrors.find(searched_string,1) != -1:
|
||||
sstatemirror = sstatemirrors[:sstatemirrors.find(searched_string,1)]
|
||||
sstatemirrors = sstatemirrors[sstatemirrors.find(searched_string,1):]
|
||||
else:
|
||||
sstatemirror = sstatemirrors
|
||||
sstatemirrors = sstatemirrors[1:]
|
||||
|
||||
sstatemirror_fields = [x for x in sstatemirror.split(' ') if x.strip()]
|
||||
if sstatemirror_fields[0] == "file://(.*)":
|
||||
sm_list = [ 0, sstatemirror_fields[1], "file://(.*)"]
|
||||
else:
|
||||
sm_list = [ 1, sstatemirror_fields[1], sstatemirror_fields[0]]
|
||||
self.sstatemirrors_list.append(sm_list)
|
||||
|
||||
index = 0
|
||||
for mirror in self.sstatemirrors_list:
|
||||
if mirror[0] == 0:
|
||||
sstatemirror_widget = self.gen_mirror_entry_widget(mirror[1], index)
|
||||
else:
|
||||
sstatemirror_widget = self.gen_mirror_entry_widget(mirror[1], index, mirror[2])
|
||||
sub_vbox.pack_start(sstatemirror_widget, expand=False, fill=False, padding=9)
|
||||
index += 1
|
||||
|
||||
table = gtk.Table(1, 1, False)
|
||||
table.set_col_spacings(6)
|
||||
add_mirror_button = HobAltButton("Add another mirror")
|
||||
add_mirror_button.connect("clicked", self.add_mirror)
|
||||
add_mirror_button.set_size_request(150,30)
|
||||
table.attach(add_mirror_button, 1, 2, 0, 1, xoptions=gtk.SHRINK)
|
||||
advanced_vbox.pack_start(table, expand=False, fill=False, padding=9)
|
||||
|
||||
return advanced_vbox
|
||||
|
||||
def refresh_shared_state_page(self):
|
||||
page_num = self.nb.get_current_page()
|
||||
self.nb.remove_page(page_num);
|
||||
self.nb.insert_page(self.create_shared_state_page(), gtk.Label("Shared state"),page_num)
|
||||
self.show_all()
|
||||
self.nb.set_current_page(page_num)
|
||||
|
||||
|
||||
def create_proxy_page(self):
|
||||
advanced_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.set_border_width(6)
|
||||
@@ -458,24 +667,9 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
|
||||
self.refresh_proxy_components()
|
||||
return advanced_vbox
|
||||
|
||||
def switch_to_page(self, page_id):
|
||||
self.nb.set_current_page(page_id)
|
||||
|
||||
def create_visual_elements(self):
|
||||
self.nb = gtk.Notebook()
|
||||
self.nb.set_show_tabs(True)
|
||||
self.nb.append_page(self.create_build_environment_page(), gtk.Label("Build environment"))
|
||||
self.nb.append_page(self.create_proxy_page(), gtk.Label("Proxies"))
|
||||
self.nb.set_current_page(0)
|
||||
self.vbox.pack_start(self.nb, expand=True, fill=True)
|
||||
self.vbox.pack_end(gtk.HSeparator(), expand=True, fill=True)
|
||||
|
||||
self.show_all()
|
||||
|
||||
|
||||
#
|
||||
# AdvancedSettings Dialog
|
||||
#
|
||||
class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
|
||||
|
||||
def details_cb(self, button, parent, protocol):
|
||||
dialog = ProxyDetailsDialog(title = protocol.upper() + " Proxy Details",
|
||||
user = self.configuration.proxies[protocol][1],
|
||||
@@ -564,7 +758,7 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
|
||||
if iter:
|
||||
path = model.get_path(iter)[0]
|
||||
model.remove(iter)
|
||||
|
||||
|
||||
def gen_editable_settings(self, setting, tooltip=""):
|
||||
setting_hbox = gtk.HBox(False, 12)
|
||||
|
||||
@@ -627,6 +821,109 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
|
||||
|
||||
return setting_hbox, setting_store
|
||||
|
||||
def create_others_page(self):
|
||||
advanced_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.set_border_width(6)
|
||||
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=True, fill=True)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Add your own variables:</span>")
|
||||
tooltip = "These are key/value pairs for your extra settings. Click \'Add\' and then directly edit the key and the value"
|
||||
setting_widget, self.setting_store = self.gen_editable_settings(self.configuration.extra_setting, tooltip)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(setting_widget, expand=True, fill=True)
|
||||
|
||||
return advanced_vbox
|
||||
|
||||
def create_visual_elements(self):
|
||||
self.nb = gtk.Notebook()
|
||||
self.nb.set_show_tabs(True)
|
||||
self.nb.append_page(self.create_build_environment_page(), gtk.Label("Build environment"))
|
||||
self.nb.append_page(self.create_shared_state_page(), gtk.Label("Shared state"))
|
||||
self.nb.append_page(self.create_proxy_page(), gtk.Label("Proxies"))
|
||||
self.nb.append_page(self.create_others_page(), gtk.Label("Others"))
|
||||
self.nb.set_current_page(0)
|
||||
self.vbox.pack_start(self.nb, expand=True, fill=True)
|
||||
self.vbox.pack_end(gtk.HSeparator(), expand=True, fill=True)
|
||||
|
||||
self.show_all()
|
||||
|
||||
|
||||
#
|
||||
# AdvancedSettings Dialog
|
||||
#
|
||||
class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
|
||||
|
||||
def details_cb(self, button, parent, protocol):
|
||||
dialog = ProxyDetailsDialog(title = protocol.upper() + " Proxy Details",
|
||||
user = self.configuration.proxies[protocol][1],
|
||||
passwd = self.configuration.proxies[protocol][2],
|
||||
parent = parent,
|
||||
flags = gtk.DIALOG_MODAL
|
||||
| gtk.DIALOG_DESTROY_WITH_PARENT
|
||||
| gtk.DIALOG_NO_SEPARATOR)
|
||||
dialog.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_OK)
|
||||
response = dialog.run()
|
||||
if response == gtk.RESPONSE_OK:
|
||||
self.configuration.proxies[protocol][1] = dialog.user
|
||||
self.configuration.proxies[protocol][2] = dialog.passwd
|
||||
self.refresh_proxy_components()
|
||||
dialog.destroy()
|
||||
|
||||
def set_save_button(self, button):
|
||||
self.save_button = button
|
||||
|
||||
def rootfs_combo_changed_cb(self, rootfs_combo, all_package_format, check_hbox):
|
||||
combo_item = self.rootfs_combo.get_active_text()
|
||||
modified = False
|
||||
for child in check_hbox.get_children():
|
||||
if isinstance(child, gtk.CheckButton):
|
||||
check_hbox.remove(child)
|
||||
modified = True
|
||||
for format in all_package_format:
|
||||
if format != combo_item:
|
||||
check_button = gtk.CheckButton(format)
|
||||
check_hbox.pack_start(check_button, expand=False, fill=False)
|
||||
modified = True
|
||||
if modified:
|
||||
check_hbox.remove(self.pkgfmt_info)
|
||||
check_hbox.pack_start(self.pkgfmt_info, expand=False, fill=False)
|
||||
check_hbox.show_all()
|
||||
|
||||
def gen_pkgfmt_widget(self, curr_package_format, all_package_format, tooltip_combo="", tooltip_extra=""):
|
||||
pkgfmt_vbox = gtk.VBox(False, 6)
|
||||
|
||||
label = self.gen_label_widget("Root file system package format")
|
||||
pkgfmt_vbox.pack_start(label, expand=False, fill=False)
|
||||
|
||||
rootfs_format = ""
|
||||
if curr_package_format:
|
||||
rootfs_format = curr_package_format.split()[0]
|
||||
|
||||
rootfs_format_widget, rootfs_combo = self.gen_combo_widget(rootfs_format, all_package_format, tooltip_combo)
|
||||
pkgfmt_vbox.pack_start(rootfs_format_widget, expand=False, fill=False)
|
||||
|
||||
label = self.gen_label_widget("Additional package formats")
|
||||
pkgfmt_vbox.pack_start(label, expand=False, fill=False)
|
||||
|
||||
check_hbox = gtk.HBox(False, 12)
|
||||
pkgfmt_vbox.pack_start(check_hbox, expand=False, fill=False)
|
||||
for format in all_package_format:
|
||||
if format != rootfs_format:
|
||||
check_button = gtk.CheckButton(format)
|
||||
is_active = (format in curr_package_format.split())
|
||||
check_button.set_active(is_active)
|
||||
check_hbox.pack_start(check_button, expand=False, fill=False)
|
||||
|
||||
self.pkgfmt_info = HobInfoButton(tooltip_extra, self)
|
||||
check_hbox.pack_start(self.pkgfmt_info, expand=False, fill=False)
|
||||
|
||||
rootfs_combo.connect("changed", self.rootfs_combo_changed_cb, all_package_format, check_hbox)
|
||||
|
||||
pkgfmt_vbox.show_all()
|
||||
|
||||
return pkgfmt_vbox, rootfs_combo, check_hbox
|
||||
|
||||
def __init__(self, title, configuration, all_image_types,
|
||||
all_package_formats, all_distros, all_sdk_machines,
|
||||
max_threads, parent, flags, buttons=None):
|
||||
@@ -637,7 +934,7 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
|
||||
self.configuration = configuration
|
||||
self.image_types = all_image_types
|
||||
self.all_package_formats = all_package_formats
|
||||
self.all_distros = all_distros
|
||||
self.all_distros = all_distros[:]
|
||||
self.all_sdk_machines = all_sdk_machines
|
||||
self.max_threads = max_threads
|
||||
|
||||
@@ -652,13 +949,13 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
|
||||
self.extra_size_spinner = None
|
||||
self.gplv3_checkbox = None
|
||||
self.toolchain_checkbox = None
|
||||
self.setting_store = None
|
||||
self.image_types_checkbuttons = {}
|
||||
|
||||
self.md5 = self.config_md5()
|
||||
self.settings_changed = False
|
||||
|
||||
# create visual elements on the dialog
|
||||
self.save_button = None
|
||||
self.create_visual_elements()
|
||||
self.connect("response", self.response_cb)
|
||||
|
||||
@@ -675,12 +972,6 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
|
||||
data += ("SDK_MACHINE: " + self._get_sorted_value(self.configuration.curr_sdk_machine))
|
||||
data += ("TOOLCHAIN_BUILD: " + self._get_sorted_value(self.configuration.toolchain_build))
|
||||
data += ("IMAGE_FSTYPES: " + self._get_sorted_value(self.configuration.image_fstypes))
|
||||
data += ("ENABLE_PROXY: " + self._get_sorted_value(self.configuration.enable_proxy))
|
||||
if self.configuration.enable_proxy:
|
||||
for protocol in self.configuration.proxies.keys():
|
||||
data += (protocol + ": " + self._get_sorted_value(self.configuration.combine_proxy(protocol)))
|
||||
for key in self.configuration.extra_setting.keys():
|
||||
data += (key + ": " + self._get_sorted_value(self.configuration.extra_setting[key]))
|
||||
return hashlib.md5(data).hexdigest()
|
||||
|
||||
def create_visual_elements(self):
|
||||
@@ -688,13 +979,34 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
|
||||
self.nb.set_show_tabs(True)
|
||||
self.nb.append_page(self.create_image_types_page(), gtk.Label("Image types"))
|
||||
self.nb.append_page(self.create_output_page(), gtk.Label("Output"))
|
||||
self.nb.append_page(self.create_others_page(), gtk.Label("Others"))
|
||||
self.nb.set_current_page(0)
|
||||
self.vbox.pack_start(self.nb, expand=True, fill=True)
|
||||
self.vbox.pack_end(gtk.HSeparator(), expand=True, fill=True)
|
||||
|
||||
self.show_all()
|
||||
|
||||
def get_num_checked_image_types(self):
|
||||
total = 0
|
||||
for b in self.image_types_checkbuttons.values():
|
||||
if b.get_active():
|
||||
total = total + 1
|
||||
return total
|
||||
|
||||
def set_save_button_state(self):
|
||||
if self.save_button:
|
||||
self.save_button.set_sensitive(self.get_num_checked_image_types() > 0)
|
||||
|
||||
def image_type_checkbutton_clicked_cb(self, button):
|
||||
self.set_save_button_state()
|
||||
if self.get_num_checked_image_types() == 0:
|
||||
# Show an error dialog
|
||||
lbl = "<b>Select an image type</b>\n\nYou need to select at least one image type."
|
||||
dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
|
||||
button = dialog.add_button("OK", gtk.RESPONSE_OK)
|
||||
HobButton.style_button(button)
|
||||
response = dialog.run()
|
||||
dialog.destroy()
|
||||
|
||||
def create_image_types_page(self):
|
||||
main_vbox = gtk.VBox(False, 16)
|
||||
main_vbox.set_border_width(6)
|
||||
@@ -703,8 +1015,16 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
|
||||
advanced_vbox.set_border_width(6)
|
||||
|
||||
distro_vbox = gtk.VBox(False, 6)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Distro:</span>")
|
||||
label = self.gen_label_widget("Distro:")
|
||||
tooltip = "Selects the Yocto Project distribution you want"
|
||||
try:
|
||||
i = self.all_distros.index( "defaultsetup" )
|
||||
except ValueError:
|
||||
i = -1
|
||||
if i != -1:
|
||||
self.all_distros[ i ] = "Default"
|
||||
if self.configuration.curr_distro == "defaultsetup":
|
||||
self.configuration.curr_distro = "Default"
|
||||
distro_widget, self.distro_combo = self.gen_combo_widget(self.configuration.curr_distro, self.all_distros, tooltip)
|
||||
distro_vbox.pack_start(label, expand=False, fill=False)
|
||||
distro_vbox.pack_start(distro_widget, expand=False, fill=False)
|
||||
@@ -717,19 +1037,22 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
|
||||
|
||||
tooltip = "Image file system types you want."
|
||||
info = HobInfoButton(tooltip, self)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Select image types:</span>")
|
||||
table.attach(label, 0, 9, 0, 1)
|
||||
table.attach(info, 9, 10, 0, 1)
|
||||
label = self.gen_label_widget("Image types:")
|
||||
align = gtk.Alignment(0, 0.5, 0, 0)
|
||||
table.attach(align, 0, 4, 0, 1)
|
||||
align.add(label)
|
||||
table.attach(info, 4, 5, 0, 1)
|
||||
|
||||
i = 1
|
||||
j = 1
|
||||
for image_type in self.image_types:
|
||||
for image_type in sorted(self.image_types):
|
||||
self.image_types_checkbuttons[image_type] = gtk.CheckButton(image_type)
|
||||
self.image_types_checkbuttons[image_type].connect("toggled", self.image_type_checkbutton_clicked_cb)
|
||||
article = ""
|
||||
if image_type.startswith(("a", "e", "i", "o", "u")):
|
||||
article = "n"
|
||||
self.image_types_checkbuttons[image_type].set_tooltip_text("Build a%s %s image" % (article, image_type))
|
||||
table.attach(self.image_types_checkbuttons[image_type], j, j + 4, i, i + 1)
|
||||
table.attach(self.image_types_checkbuttons[image_type], j - 1, j + 3, i, i + 1)
|
||||
if image_type in self.configuration.image_fstypes.split():
|
||||
self.image_types_checkbuttons[image_type].set_active(True)
|
||||
i += 1
|
||||
@@ -738,6 +1061,7 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
|
||||
j = j + 4
|
||||
|
||||
main_vbox.pack_start(advanced_vbox, expand=False, fill=False)
|
||||
self.set_save_button_state()
|
||||
|
||||
return main_vbox
|
||||
|
||||
@@ -745,18 +1069,18 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
|
||||
advanced_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.set_border_width(6)
|
||||
|
||||
advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Package format</span>'), expand=False, fill=False)
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Packaging format:</span>")
|
||||
tooltip_combo = "Selects the package format used to generate rootfs."
|
||||
tooltip_extra = "Selects extra package formats to build"
|
||||
pkgfmt_widget, self.rootfs_combo, self.check_hbox = self.gen_pkgfmt_widget(self.configuration.curr_package_format, self.all_package_formats, tooltip_combo, tooltip_extra)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(pkgfmt_widget, expand=False, fill=False)
|
||||
|
||||
advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Image size</span>'), expand=False, fill=False)
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Image rootfs size: (MB)</span>")
|
||||
label = self.gen_label_widget("Image basic size (in MB)")
|
||||
tooltip = "Sets the basic size of your target image.\nThis is the basic size of your target image unless your selected package size exceeds this value or you select \'Image Extra Size\'."
|
||||
rootfs_size_widget, self.rootfs_size_spinner = self.gen_spinner_widget(int(self.configuration.image_rootfs_size*1.0/1024), 0, 65536, tooltip)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
@@ -764,12 +1088,13 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
|
||||
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Image extra size: (MB)</span>")
|
||||
label = self.gen_label_widget("Additional free space (in MB)")
|
||||
tooltip = "Sets the extra free space of your target image.\nBy default, the system reserves 30% of your image size as free space. If your image contains zypper, it brings in 50MB more space. The maximum free space is 64GB."
|
||||
extra_size_widget, self.extra_size_spinner = self.gen_spinner_widget(int(self.configuration.image_extra_size*1.0/1024), 0, 65536, tooltip)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(extra_size_widget, expand=False, fill=False)
|
||||
|
||||
advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Licensing</span>'), expand=False, fill=False)
|
||||
self.gplv3_checkbox = gtk.CheckButton("Exclude GPLv3 packages")
|
||||
self.gplv3_checkbox.set_tooltip_text("Check this box to prevent GPLv3 packages from being included in your image")
|
||||
if "GPLv3" in self.configuration.incompat_license.split():
|
||||
@@ -778,6 +1103,7 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
|
||||
self.gplv3_checkbox.set_active(False)
|
||||
advanced_vbox.pack_start(self.gplv3_checkbox, expand=False, fill=False)
|
||||
|
||||
advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Toolchain</span>'), expand=False, fill=False)
|
||||
sub_hbox = gtk.HBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_hbox, expand=False, fill=False)
|
||||
self.toolchain_checkbox = gtk.CheckButton("Build toolchain")
|
||||
@@ -791,21 +1117,6 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
|
||||
|
||||
return advanced_vbox
|
||||
|
||||
def create_others_page(self):
|
||||
advanced_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.set_border_width(6)
|
||||
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=True, fill=True)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Add your own variables:</span>")
|
||||
tooltip = "These are key/value pairs for your extra settings. Click \'Add\' and then directly edit the key and the value"
|
||||
setting_widget, self.setting_store = self.gen_editable_settings(self.configuration.extra_setting, tooltip)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(setting_widget, expand=True, fill=True)
|
||||
|
||||
return advanced_vbox
|
||||
|
||||
|
||||
def response_cb(self, dialog, response_id):
|
||||
package_format = []
|
||||
package_format.append(self.rootfs_combo.get_active_text())
|
||||
@@ -814,7 +1125,10 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
|
||||
package_format.append(child.get_label())
|
||||
self.configuration.curr_package_format = " ".join(package_format)
|
||||
|
||||
self.configuration.curr_distro = self.distro_combo.get_active_text()
|
||||
distro = self.distro_combo.get_active_text()
|
||||
if distro == "Default":
|
||||
distro = "defaultsetup"
|
||||
self.configuration.curr_distro = distro
|
||||
self.configuration.image_rootfs_size = self.rootfs_size_spinner.get_value_as_int() * 1024
|
||||
self.configuration.image_extra_size = self.extra_size_spinner.get_value_as_int() * 1024
|
||||
|
||||
@@ -834,15 +1148,6 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
|
||||
self.configuration.incompat_license = self.configuration.incompat_license.strip()
|
||||
|
||||
self.configuration.toolchain_build = self.toolchain_checkbox.get_active()
|
||||
|
||||
self.configuration.extra_setting = {}
|
||||
it = self.setting_store.get_iter_first()
|
||||
while it:
|
||||
key = self.setting_store.get_value(it, 0)
|
||||
value = self.setting_store.get_value(it, 1)
|
||||
self.configuration.extra_setting[key] = value
|
||||
it = self.setting_store.iter_next(it)
|
||||
|
||||
self.configuration.curr_sdk_machine = self.sdk_machine_combo.get_active_text()
|
||||
md5 = self.config_md5()
|
||||
self.settings_changed = (self.md5 != md5)
|
||||
@@ -902,7 +1207,7 @@ class DeployImageDialog (CrumbsDialog):
|
||||
icon.set_from_pixbuf(pix_buffer)
|
||||
button = gtk.Button("Select Image")
|
||||
button.set_image(icon)
|
||||
button.set_size_request(140, 50)
|
||||
#button.set_size_request(140, 50)
|
||||
table.attach(button, 9, 10, 1, 2, gtk.FILL, 0, 0, 0)
|
||||
button.connect("clicked", self.select_image_button_clicked_cb)
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ class HobHandler(gobject.GObject):
|
||||
(gobject.TYPE_STRING,)),
|
||||
"sanity-failed" : (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
(gobject.TYPE_STRING,)),
|
||||
(gobject.TYPE_STRING, gobject.TYPE_INT)),
|
||||
"generating-data" : (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
()),
|
||||
@@ -101,7 +101,14 @@ class HobHandler(gobject.GObject):
|
||||
|
||||
def runCommand(self, commandline):
|
||||
try:
|
||||
return self.server.runCommand(commandline)
|
||||
result = self.server.runCommand(commandline)
|
||||
result_str = str(result)
|
||||
if (result_str.startswith("Busy (") or
|
||||
result_str == "No such command"):
|
||||
raise Exception('%s has failed with output "%s". ' %
|
||||
(str(commandline), result_str) +
|
||||
"We recommend that you restart Hob.")
|
||||
return result
|
||||
except Exception as e:
|
||||
self.commands_async = []
|
||||
self.clear_busy()
|
||||
@@ -166,7 +173,6 @@ class HobHandler(gobject.GObject):
|
||||
def handle_event(self, event):
|
||||
if not event:
|
||||
return
|
||||
|
||||
if self.building:
|
||||
self.current_phase = "building"
|
||||
self.build.handle_event(event)
|
||||
@@ -180,7 +186,7 @@ class HobHandler(gobject.GObject):
|
||||
self.run_next_command()
|
||||
|
||||
elif isinstance(event, bb.event.SanityCheckFailed):
|
||||
self.emit("sanity-failed", event._msg)
|
||||
self.emit("sanity-failed", event._msg, event._network_error)
|
||||
|
||||
elif isinstance(event, logging.LogRecord):
|
||||
if not self.building:
|
||||
@@ -297,8 +303,8 @@ class HobHandler(gobject.GObject):
|
||||
def set_sstate_dir(self, directory):
|
||||
self.runCommand(["setVariable", "SSTATE_DIR_HOB", directory])
|
||||
|
||||
def set_sstate_mirror(self, url):
|
||||
self.runCommand(["setVariable", "SSTATE_MIRROR_HOB", url])
|
||||
def set_sstate_mirrors(self, url):
|
||||
self.runCommand(["setVariable", "SSTATE_MIRRORS_HOB", url])
|
||||
|
||||
def set_extra_size(self, image_extra_size):
|
||||
self.runCommand(["setVariable", "IMAGE_ROOTFS_EXTRA_SPACE", str(image_extra_size)])
|
||||
@@ -421,7 +427,7 @@ class HobHandler(gobject.GObject):
|
||||
params["distro"] = self.runCommand(["getVariable", "DISTRO"]) or "defaultsetup"
|
||||
params["pclass"] = self.runCommand(["getVariable", "PACKAGE_CLASSES"]) or ""
|
||||
params["sstatedir"] = self.runCommand(["getVariable", "SSTATE_DIR"]) or ""
|
||||
params["sstatemirror"] = self.runCommand(["getVariable", "SSTATE_MIRROR"]) or ""
|
||||
params["sstatemirror"] = self.runCommand(["getVariable", "SSTATE_MIRRORS"]) or ""
|
||||
|
||||
num_threads = self.runCommand(["getCpuCount"])
|
||||
if not num_threads:
|
||||
|
||||
@@ -42,7 +42,7 @@ class PackageListModel(gtk.TreeStore):
|
||||
()),
|
||||
}
|
||||
|
||||
__toolchain_required_packages__ = ["task-core-standalone-sdk-target", "task-core-standalone-sdk-target-dbg"]
|
||||
__toolchain_required_packages__ = ["packagegroup-core-standalone-sdk-target", "packagegroup-core-standalone-sdk-target-dbg"]
|
||||
|
||||
def __init__(self):
|
||||
|
||||
@@ -337,13 +337,13 @@ class PackageListModel(gtk.TreeStore):
|
||||
set_selected_packages(), some packages will not be set included.
|
||||
Return the un-set packages list.
|
||||
"""
|
||||
def set_selected_packages(self, packagelist):
|
||||
def set_selected_packages(self, packagelist, user_selected=False):
|
||||
left = []
|
||||
binb = 'User Selected' if user_selected else ''
|
||||
for pn in packagelist:
|
||||
if pn in self.pkg_path.keys():
|
||||
path = self.pkg_path[pn]
|
||||
self.include_item(item_path=path,
|
||||
binb="User Selected")
|
||||
self.include_item(item_path=path, binb=binb)
|
||||
else:
|
||||
left.append(pn)
|
||||
|
||||
@@ -359,7 +359,7 @@ class PackageListModel(gtk.TreeStore):
|
||||
while child_it:
|
||||
if self.get_value(child_it, self.COL_INC):
|
||||
binb = self.get_value(child_it, self.COL_BINB)
|
||||
if not binb or binb == "User Selected":
|
||||
if binb == "User Selected":
|
||||
name = self.get_value(child_it, self.COL_NAME)
|
||||
packagelist.append(name)
|
||||
child_it = self.iter_next(child_it)
|
||||
@@ -672,6 +672,10 @@ class RecipeListModel(gtk.ListStore):
|
||||
self[dep_path][self.COL_BINB] = ', '.join(dep_bin).lstrip(', ')
|
||||
elif not dep_included:
|
||||
self.include_item(dep_path, binb=item_name, image_contents=image_contents)
|
||||
dep_bin = self[item_path][self.COL_BINB].split(', ')
|
||||
if self[item_path][self.COL_NAME] in dep_bin:
|
||||
dep_bin.remove(self[item_path][self.COL_NAME])
|
||||
self[item_path][self.COL_BINB] = ', '.join(dep_bin).lstrip(', ')
|
||||
|
||||
def exclude_item(self, item_path):
|
||||
if not self.path_included(item_path):
|
||||
|
||||
@@ -62,6 +62,7 @@ class HobPage (gtk.VBox):
|
||||
|
||||
hbox = gtk.HBox()
|
||||
|
||||
self.title_label = gtk.Label()
|
||||
self.title_label.set_markup("<span size='x-large'>%s</span>" % self.title)
|
||||
hbox.pack_start(self.title_label, expand=False, fill=False, padding=20)
|
||||
|
||||
|
||||
@@ -167,13 +167,12 @@ class ImageConfigurationPage (HobPage):
|
||||
markup += "dev-manual.html#understanding-and-using-layers\">reference manual</a>."
|
||||
self.layer_info_icon = HobInfoButton(markup, self.get_parent())
|
||||
|
||||
self.progress_box = gtk.HBox(False, 6)
|
||||
# self.progress_box = gtk.HBox(False, 6)
|
||||
self.progress_bar = HobProgressBar()
|
||||
self.progress_box.pack_start(self.progress_bar, expand=True, fill=True)
|
||||
# self.progress_box.pack_start(self.progress_bar, expand=True, fill=True)
|
||||
self.stop_button = HobAltButton("Stop")
|
||||
self.stop_button.connect("clicked", self.stop_button_clicked_cb)
|
||||
self.progress_box.pack_end(self.stop_button, expand=False, fill=False)
|
||||
|
||||
# self.progress_box.pack_end(stop_button, expand=False, fill=False)
|
||||
self.machine_separator = gtk.HSeparator()
|
||||
|
||||
def set_config_machine_layout(self, show_progress_bar = False):
|
||||
@@ -183,7 +182,9 @@ class ImageConfigurationPage (HobPage):
|
||||
self.gtable.attach(self.layer_button, 14, 36, 7, 12)
|
||||
self.gtable.attach(self.layer_info_icon, 36, 40, 7, 11)
|
||||
if show_progress_bar:
|
||||
self.gtable.attach(self.progress_box, 0, 40, 15, 19)
|
||||
#self.gtable.attach(self.progress_box, 0, 40, 15, 18)
|
||||
self.gtable.attach(self.progress_bar, 0, 37, 15, 18)
|
||||
self.gtable.attach(self.stop_button, 37, 40, 15, 18, 0, 0)
|
||||
self.gtable.attach(self.machine_separator, 0, 40, 13, 14)
|
||||
|
||||
def create_config_baseimg(self):
|
||||
@@ -232,14 +233,14 @@ class ImageConfigurationPage (HobPage):
|
||||
|
||||
# create button "Build image"
|
||||
self.just_bake_button = HobButton("Build image")
|
||||
self.just_bake_button.set_size_request(205, 49)
|
||||
#self.just_bake_button.set_size_request(205, 49)
|
||||
self.just_bake_button.set_tooltip_text("Build target image")
|
||||
self.just_bake_button.connect("clicked", self.just_bake_button_clicked_cb)
|
||||
button_box.pack_end(self.just_bake_button, expand=False, fill=False)
|
||||
|
||||
# create button "Edit Image"
|
||||
self.edit_image_button = HobAltButton("Edit image")
|
||||
self.edit_image_button.set_size_request(205, 49)
|
||||
#self.edit_image_button.set_size_request(205, 49)
|
||||
self.edit_image_button.set_tooltip_text("Edit target image")
|
||||
self.edit_image_button.connect("clicked", self.edit_image_button_clicked_cb)
|
||||
button_box.pack_end(self.edit_image_button, expand=False, fill=False)
|
||||
@@ -367,6 +368,7 @@ class ImageConfigurationPage (HobPage):
|
||||
if self.builder.parameters.image_black_pattern:
|
||||
for i in self.builder.parameters.image_black_pattern.split():
|
||||
black_pattern.append(re.compile(i))
|
||||
black_pattern.append(re.compile("hob-image"))
|
||||
|
||||
it = image_model.get_iter_first()
|
||||
self._image_combo_disconnect_signal()
|
||||
|
||||
@@ -41,10 +41,10 @@ class ImageDetailsPage (HobPage):
|
||||
style.bg[gtk.STATE_NORMAL] = self.get_colormap().alloc_color(color, False, False)
|
||||
self.set_style(style)
|
||||
|
||||
self.hbox = gtk.HBox()
|
||||
self.hbox.set_border_width(10)
|
||||
self.add(self.hbox)
|
||||
|
||||
self.row = gtk.Table(1, 2, False)
|
||||
self.row.set_border_width(10)
|
||||
self.add(self.row)
|
||||
|
||||
total_rows = 0
|
||||
if widget:
|
||||
total_rows = 10
|
||||
@@ -54,8 +54,8 @@ class ImageDetailsPage (HobPage):
|
||||
self.table = gtk.Table(total_rows, 20, True)
|
||||
self.table.set_row_spacings(6)
|
||||
self.table.set_size_request(100, -1)
|
||||
self.hbox.pack_start(self.table, expand=True, fill=True, padding=15)
|
||||
|
||||
self.row.attach(self.table, 0, 1, 0, 1, xoptions=gtk.FILL|gtk.EXPAND, yoptions=gtk.FILL)
|
||||
|
||||
colid = 0
|
||||
rowid = 0
|
||||
self.line_widgets = {}
|
||||
@@ -73,11 +73,80 @@ class ImageDetailsPage (HobPage):
|
||||
# pack the button on the right
|
||||
if button:
|
||||
self.bbox = gtk.VBox()
|
||||
self.bbox.pack_start(button, expand=True, fill=True)
|
||||
self.bbox.pack_start(button, expand=True, fill=False)
|
||||
if button2:
|
||||
self.bbox.pack_start(button2, expand=True, fill=True)
|
||||
self.hbox.pack_end(self.bbox, expand=False, fill=False)
|
||||
self.bbox.pack_start(button2, expand=True, fill=False)
|
||||
self.bbox.set_size_request(150,-1)
|
||||
self.row.attach(self.bbox, 1, 2, 0, 1, xoptions=gtk.FILL, yoptions=gtk.EXPAND)
|
||||
|
||||
def update_line_widgets(self, variable, value):
|
||||
if len(self.line_widgets) == 0:
|
||||
return
|
||||
if not isinstance(self.line_widgets[variable], gtk.Label):
|
||||
return
|
||||
self.line_widgets[variable].set_markup(self.format_line(variable, value))
|
||||
|
||||
def wrap_line(self, inputs):
|
||||
# wrap the long text of inputs
|
||||
wrap_width_chars = 75
|
||||
outputs = ""
|
||||
tmps = inputs
|
||||
less_chars = len(inputs)
|
||||
while (less_chars - wrap_width_chars) > 0:
|
||||
less_chars -= wrap_width_chars
|
||||
outputs += tmps[:wrap_width_chars] + "\n "
|
||||
tmps = inputs[less_chars:]
|
||||
outputs += tmps
|
||||
return outputs
|
||||
|
||||
def format_line(self, variable, value):
|
||||
wraped_value = self.wrap_line(value)
|
||||
markup = "<span weight=\'bold\'>%s</span>" % variable
|
||||
markup += "<span weight=\'normal\' foreground=\'#1c1c1c\' font_desc=\'14px\'>%s</span>" % wraped_value
|
||||
return markup
|
||||
|
||||
def text2label(self, variable, value):
|
||||
# append the name:value to the left box
|
||||
# such as "Name: hob-core-minimal-variant-2011-12-15-beagleboard"
|
||||
label = gtk.Label()
|
||||
label.set_alignment(0.0, 0.5)
|
||||
label.set_markup(self.format_line(variable, value))
|
||||
return label
|
||||
|
||||
class BuildDetailBox (gtk.EventBox):
|
||||
def __init__(self, varlist = None, vallist = None, icon = None, color = HobColors.LIGHT_GRAY):
|
||||
gtk.EventBox.__init__(self)
|
||||
|
||||
# set color
|
||||
style = self.get_style().copy()
|
||||
style.bg[gtk.STATE_NORMAL] = self.get_colormap().alloc_color(color, False, False)
|
||||
self.set_style(style)
|
||||
|
||||
self.hbox = gtk.HBox()
|
||||
self.hbox.set_border_width(10)
|
||||
self.add(self.hbox)
|
||||
|
||||
total_rows = 0
|
||||
if varlist and vallist:
|
||||
# pack the icon and the text on the left
|
||||
total_rows += len(varlist)
|
||||
self.table = gtk.Table(total_rows, 20, True)
|
||||
self.table.set_row_spacings(6)
|
||||
self.table.set_size_request(100, -1)
|
||||
self.hbox.pack_start(self.table, expand=True, fill=True, padding=15)
|
||||
|
||||
colid = 0
|
||||
rowid = 0
|
||||
self.line_widgets = {}
|
||||
if icon:
|
||||
self.table.attach(icon, colid, colid + 2, 0, 1)
|
||||
colid = colid + 2
|
||||
if varlist and vallist:
|
||||
for row in range(rowid, total_rows):
|
||||
index = row - rowid
|
||||
self.line_widgets[varlist[index]] = self.text2label(varlist[index], vallist[index])
|
||||
self.table.attach(self.line_widgets[varlist[index]], colid, 20, row, row + 1)
|
||||
|
||||
def update_line_widgets(self, variable, value):
|
||||
if len(self.line_widgets) == 0:
|
||||
return
|
||||
@@ -192,7 +261,7 @@ class ImageDetailsPage (HobPage):
|
||||
icon.set_from_pixbuf(pix_buffer)
|
||||
varlist = [""]
|
||||
vallist = ["Your image is ready"]
|
||||
self.build_result = self.DetailBox(varlist=varlist, vallist=vallist, icon=icon, color=color)
|
||||
self.build_result = self.BuildDetailBox(varlist=varlist, vallist=vallist, icon=icon, color=color)
|
||||
self.box_group_area.pack_start(self.build_result, expand=False, fill=False)
|
||||
|
||||
# create the buttons at the bottom first because the buttons are used in apply_button_per_image()
|
||||
@@ -263,15 +332,15 @@ class ImageDetailsPage (HobPage):
|
||||
if 'qemu' in image_name:
|
||||
self.sel_kernel = self.get_kernel_file_name()
|
||||
|
||||
varlist = ["Kernel: "]
|
||||
vallist = []
|
||||
vallist.append(self.sel_kernel)
|
||||
# varlist = ["Kernel: "]
|
||||
# vallist = []
|
||||
# vallist.append(self.sel_kernel)
|
||||
|
||||
change_kernel_button = HobAltButton("Change")
|
||||
change_kernel_button.connect("clicked", self.change_kernel_cb)
|
||||
change_kernel_button.set_tooltip_text("Change qemu kernel file")
|
||||
self.kernel_detail = self.DetailBox(varlist=varlist, vallist=vallist, button=change_kernel_button)
|
||||
self.box_group_area.pack_start(self.kernel_detail, expand=False, fill=False)
|
||||
# change_kernel_button = HobAltButton("Change")
|
||||
# change_kernel_button.connect("clicked", self.change_kernel_cb)
|
||||
# change_kernel_button.set_tooltip_text("Change qemu kernel file")
|
||||
# self.kernel_detail = self.DetailBox(varlist=varlist, vallist=vallist, button=change_kernel_button)
|
||||
# self.box_group_area.pack_start(self.kernel_detail, expand=True, fill=True)
|
||||
|
||||
# Machine, Base image and Layers
|
||||
layer_num_limit = 15
|
||||
@@ -316,7 +385,7 @@ class ImageDetailsPage (HobPage):
|
||||
else: # get to this page from "My images"
|
||||
edit_packages_button = None
|
||||
self.package_detail = self.DetailBox(varlist=varlist, vallist=vallist, button=edit_packages_button)
|
||||
self.box_group_area.pack_start(self.package_detail, expand=False, fill=False)
|
||||
self.box_group_area.pack_start(self.package_detail, expand=True, fill=True)
|
||||
|
||||
# pack the buttons at the bottom, at this time they are already created.
|
||||
if self.build_succeeded:
|
||||
@@ -357,6 +426,8 @@ class ImageDetailsPage (HobPage):
|
||||
return mach_runnable
|
||||
|
||||
def test_deployable(self, image_name):
|
||||
if self.builder.configuration.curr_mach.startswith("qemu"):
|
||||
return False
|
||||
deployable = False
|
||||
for t in self.builder.parameters.deployable_image_types:
|
||||
if image_name.endswith(t):
|
||||
@@ -478,7 +549,7 @@ class ImageDetailsPage (HobPage):
|
||||
name = "Deploy image"
|
||||
if name in buttonlist and self.test_deployable(image_name):
|
||||
deploy_button = HobButton('Deploy image')
|
||||
deploy_button.set_size_request(205, 49)
|
||||
#deploy_button.set_size_request(205, 49)
|
||||
deploy_button.set_tooltip_text("Burn a live image to a USB drive or flash memory")
|
||||
deploy_button.set_flags(gtk.CAN_DEFAULT)
|
||||
button_id = deploy_button.connect("clicked", self.deploy_button_clicked_cb)
|
||||
@@ -499,7 +570,7 @@ class ImageDetailsPage (HobPage):
|
||||
else:
|
||||
# create button "Run image" as the primary button
|
||||
run_button = HobButton("Run image")
|
||||
run_button.set_size_request(205, 49)
|
||||
#run_button.set_size_request(205, 49)
|
||||
run_button.set_flags(gtk.CAN_DEFAULT)
|
||||
packed = True
|
||||
run_button.set_tooltip_text("Start up an image with qemu emulator")
|
||||
@@ -520,7 +591,7 @@ class ImageDetailsPage (HobPage):
|
||||
save_button = HobAltButton("Save as template")
|
||||
else:
|
||||
save_button = HobButton("Save as template")
|
||||
save_button.set_size_request(205, 49)
|
||||
#save_button.set_size_request(205, 49)
|
||||
save_button.set_flags(gtk.CAN_DEFAULT)
|
||||
packed = True
|
||||
save_button.set_tooltip_text("Save the image configuration for reuse")
|
||||
@@ -537,7 +608,7 @@ class ImageDetailsPage (HobPage):
|
||||
else:
|
||||
build_new_button = HobButton("Build new image")
|
||||
build_new_button.set_flags(gtk.CAN_DEFAULT)
|
||||
build_new_button.set_size_request(205, 49)
|
||||
#build_new_button.set_size_request(205, 49)
|
||||
self.details_bottom_buttons.pack_end(build_new_button, expand=False, fill=False)
|
||||
build_new_button.set_tooltip_text("Create a new image from scratch")
|
||||
button_id = build_new_button.connect("clicked", self.build_new_button_clicked_cb)
|
||||
|
||||
@@ -146,7 +146,7 @@ class PackageSelectionPage (HobPage):
|
||||
self.box_group_area.pack_start(self.button_box, expand=False, fill=False)
|
||||
|
||||
self.build_image_button = HobButton('Build image')
|
||||
self.build_image_button.set_size_request(205, 49)
|
||||
#self.build_image_button.set_size_request(205, 49)
|
||||
self.build_image_button.set_tooltip_text("Build target image")
|
||||
self.build_image_button.set_flags(gtk.CAN_DEFAULT)
|
||||
self.build_image_button.grab_default()
|
||||
|
||||
@@ -170,7 +170,7 @@ class RecipeSelectionPage (HobPage):
|
||||
self.box_group_area.pack_end(button_box, expand=False, fill=False)
|
||||
|
||||
self.build_packages_button = HobButton('Build packages')
|
||||
self.build_packages_button.set_size_request(205, 49)
|
||||
#self.build_packages_button.set_size_request(205, 49)
|
||||
self.build_packages_button.set_tooltip_text("Build selected recipes into packages")
|
||||
self.build_packages_button.set_flags(gtk.CAN_DEFAULT)
|
||||
self.build_packages_button.grab_default()
|
||||
|
||||
@@ -374,7 +374,7 @@ class RunningBuild (gobject.GObject):
|
||||
for reason in event._reasons:
|
||||
msg += ("%s\n" % reason)
|
||||
self.emit("no-provider", msg)
|
||||
self.emit("log", msg)
|
||||
self.emit("log", "error", msg)
|
||||
elif isinstance(event, bb.event.LogExecTTY):
|
||||
icon = "dialog-warning"
|
||||
color = HobColors.WARNING
|
||||
|
||||
85
bitbake/lib/bb/ui/crumbs/sanitycheckpage.py
Normal file
@@ -0,0 +1,85 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# BitBake Graphical GTK User Interface
|
||||
#
|
||||
# Copyright (C) 2012 Intel Corporation
|
||||
#
|
||||
# Authored by Bogdan Marinescu <bogdan.a.marinescu@intel.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 2 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
import gtk, gobject
|
||||
from bb.ui.crumbs.progressbar import HobProgressBar
|
||||
from bb.ui.crumbs.hobwidget import hic
|
||||
from bb.ui.crumbs.hobpages import HobPage
|
||||
|
||||
#
|
||||
# SanityCheckPage
|
||||
#
|
||||
class SanityCheckPage (HobPage):
|
||||
|
||||
def __init__(self, builder):
|
||||
super(SanityCheckPage, self).__init__(builder)
|
||||
self.running = False
|
||||
self.create_visual_elements()
|
||||
self.show_all()
|
||||
|
||||
def make_label(self, text, bold=True):
|
||||
label = gtk.Label()
|
||||
label.set_alignment(0.0, 0.5)
|
||||
mark = "<span %s>%s</span>" % (self.span_tag('x-large', 'bold') if bold else self.span_tag('medium'), text)
|
||||
label.set_markup(mark)
|
||||
return label
|
||||
|
||||
def start(self):
|
||||
if not self.running:
|
||||
self.running = True
|
||||
gobject.timeout_add(100, self.timer_func)
|
||||
|
||||
def stop(self):
|
||||
self.running = False
|
||||
|
||||
def is_running(self):
|
||||
return self.running
|
||||
|
||||
def timer_func(self):
|
||||
self.progress_bar.pulse()
|
||||
return self.running
|
||||
|
||||
def create_visual_elements(self):
|
||||
# Table'd layout. 'rows' and 'cols' give the table size
|
||||
rows, cols = 30, 50
|
||||
self.table = gtk.Table(rows, cols, True)
|
||||
self.pack_start(self.table, expand=False, fill=False)
|
||||
sx, sy = 2, 2
|
||||
# 'info' icon
|
||||
image = gtk.Image()
|
||||
image.set_from_file(hic.ICON_INFO_DISPLAY_FILE)
|
||||
self.table.attach(image, sx, sx + 2, sy, sy + 3 )
|
||||
image.show()
|
||||
# 'Checking' message
|
||||
label = self.make_label('Hob is checking for correct build system setup')
|
||||
self.table.attach(label, sx + 2, cols, sy, sy + 3, xpadding=5 )
|
||||
label.show()
|
||||
# 'Shouldn't take long' message.
|
||||
label = self.make_label("The check shouldn't take long.", False)
|
||||
self.table.attach(label, sx + 2, cols, sy + 3, sy + 4, xpadding=5)
|
||||
label.show()
|
||||
# Progress bar
|
||||
self.progress_bar = HobProgressBar()
|
||||
self.table.attach(self.progress_bar, sx + 2, cols - 3, sy + 5, sy + 7, xpadding=5)
|
||||
self.progress_bar.show()
|
||||
# All done
|
||||
self.table.show()
|
||||
|
||||
@@ -137,7 +137,7 @@ class RecipeFile(ConfigFile):
|
||||
|
||||
class TemplateMgr(gobject.GObject):
|
||||
|
||||
__gLocalVars__ = ["MACHINE", "PACKAGE_CLASSES", "DISTRO", "DL_DIR", "SSTATE_DIR", "SSTATE_MIRROR", "PARALLEL_MAKE", "BB_NUMBER_THREADS", "CONF_VERSION"]
|
||||
__gLocalVars__ = ["MACHINE", "PACKAGE_CLASSES", "DISTRO", "DL_DIR", "SSTATE_DIR", "SSTATE_MIRRORS", "PARALLEL_MAKE", "BB_NUMBER_THREADS", "CONF_VERSION"]
|
||||
__gBBLayersVars__ = ["BBLAYERS", "LCONF_VERSION"]
|
||||
__gRecipeVars__ = ["DEPENDS", "IMAGE_INSTALL"]
|
||||
|
||||
|
||||
@@ -220,7 +220,8 @@ def main(server, eventHandler):
|
||||
|
||||
gtk.gdk.threads_enter()
|
||||
dep = DepExplorer()
|
||||
bardialog = gtk.Dialog(parent=dep)
|
||||
bardialog = gtk.Dialog(parent=dep,
|
||||
flags=gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT)
|
||||
bardialog.set_default_size(400, 50)
|
||||
pbar = HobProgressBar()
|
||||
bardialog.vbox.pack_start(pbar)
|
||||
|
||||
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.1 KiB |
@@ -183,11 +183,11 @@ class TerminalFilter(object):
|
||||
activetasks = self.helper.running_tasks
|
||||
failedtasks = self.helper.failed_tasks
|
||||
runningpids = self.helper.running_pids
|
||||
if self.footer_present and (self.lastpids == runningpids):
|
||||
if self.footer_present and (self.lastcount == self.helper.tasknumber_current) and (self.lastpids == runningpids):
|
||||
return
|
||||
if self.footer_present:
|
||||
self.clearFooter()
|
||||
if not activetasks:
|
||||
if not self.helper.tasknumber_total or self.helper.tasknumber_current == self.helper.tasknumber_total:
|
||||
return
|
||||
tasks = []
|
||||
for t in runningpids:
|
||||
@@ -195,6 +195,8 @@ class TerminalFilter(object):
|
||||
|
||||
if self.main.shutdown:
|
||||
content = "Waiting for %s running tasks to finish:" % len(activetasks)
|
||||
elif not len(activetasks):
|
||||
content = "No currently running tasks (%s of %s)" % (self.helper.tasknumber_current, self.helper.tasknumber_total)
|
||||
else:
|
||||
content = "Currently %s running tasks (%s of %s):" % (len(activetasks), self.helper.tasknumber_current, self.helper.tasknumber_total)
|
||||
print content
|
||||
@@ -205,6 +207,7 @@ class TerminalFilter(object):
|
||||
lines = lines + 1 + int(len(content) / (self.columns + 1))
|
||||
self.footer_present = lines
|
||||
self.lastpids = runningpids[:]
|
||||
self.lastcount = self.helper.tasknumber_current
|
||||
|
||||
def finish(self):
|
||||
if self.stdinbackup:
|
||||
|
||||
@@ -138,7 +138,7 @@ def explode_deps(s):
|
||||
#r[-1] += ' ' + ' '.join(j)
|
||||
return r
|
||||
|
||||
def explode_dep_versions(s):
|
||||
def explode_dep_versions2(s):
|
||||
"""
|
||||
Take an RDEPENDS style string of format:
|
||||
"DEPEND1 (optional version) DEPEND2 (optional version) ..."
|
||||
@@ -147,24 +147,70 @@ def explode_dep_versions(s):
|
||||
r = {}
|
||||
l = s.replace(",", "").split()
|
||||
lastdep = None
|
||||
lastcmp = ""
|
||||
lastver = ""
|
||||
incmp = False
|
||||
inversion = False
|
||||
for i in l:
|
||||
if i[0] == '(':
|
||||
inversion = True
|
||||
lastver = i[1:] or ""
|
||||
#j = []
|
||||
elif inversion and i.endswith(')'):
|
||||
inversion = False
|
||||
lastver = lastver + " " + (i[:-1] or "")
|
||||
r[lastdep] = lastver
|
||||
elif not inversion:
|
||||
r[i] = None
|
||||
lastdep = i
|
||||
lastver = ""
|
||||
elif inversion:
|
||||
lastver = lastver + " " + i
|
||||
incmp = True
|
||||
i = i[1:].strip()
|
||||
if not i:
|
||||
continue
|
||||
|
||||
if incmp:
|
||||
incmp = False
|
||||
inversion = True
|
||||
# This list is based on behavior and supported comparisons from deb, opkg and rpm.
|
||||
#
|
||||
# Even though =<, <<, ==, !=, =>, and >> may not be supported,
|
||||
# we list each possibly valid item.
|
||||
# The build system is responsible for validation of what it supports.
|
||||
if i.startswith(('<=', '=<', '<<', '==', '!=', '>=', '=>', '>>')):
|
||||
lastcmp = i[0:2]
|
||||
i = i[2:]
|
||||
elif i.startswith(('<', '>', '=')):
|
||||
lastcmp = i[0:1]
|
||||
i = i[1:]
|
||||
else:
|
||||
# This is an unsupported case!
|
||||
lastcmp = (i or "")
|
||||
i = ""
|
||||
i.strip()
|
||||
if not i:
|
||||
continue
|
||||
|
||||
if inversion:
|
||||
if i.endswith(')'):
|
||||
i = i[:-1] or ""
|
||||
inversion = False
|
||||
if lastver and i:
|
||||
lastver += " "
|
||||
if i:
|
||||
lastver += i
|
||||
if lastdep not in r:
|
||||
r[lastdep] = []
|
||||
r[lastdep].append(lastcmp + " " + lastver)
|
||||
continue
|
||||
|
||||
#if not inversion:
|
||||
lastdep = i
|
||||
lastver = ""
|
||||
lastcmp = ""
|
||||
if not (i in r and r[i]):
|
||||
r[lastdep] = []
|
||||
|
||||
return r
|
||||
|
||||
def explode_dep_versions(s):
|
||||
r = explode_dep_versions2(s)
|
||||
for d in r:
|
||||
if not r[d]:
|
||||
r[d] = None
|
||||
continue
|
||||
if len(r[d]) > 1:
|
||||
bb.warn("explode_dep_versions(): Item %s appeared in dependency string '%s' multiple times with different values. explode_dep_versions cannot cope with this." % (d, s))
|
||||
r[d] = r[d][0]
|
||||
return r
|
||||
|
||||
def join_deps(deps, commasep=True):
|
||||
@@ -174,7 +220,11 @@ def join_deps(deps, commasep=True):
|
||||
result = []
|
||||
for dep in deps:
|
||||
if deps[dep]:
|
||||
result.append(dep + " (" + deps[dep] + ")")
|
||||
if isinstance(deps[dep], list):
|
||||
for v in deps[dep]:
|
||||
result.append(dep + " (" + v + ")")
|
||||
else:
|
||||
result.append(dep + " (" + deps[dep] + ")")
|
||||
else:
|
||||
result.append(dep)
|
||||
if commasep:
|
||||
|
||||
@@ -24,13 +24,15 @@
|
||||
# manuals are being generated. The variable BRANCH is used to indicate the
|
||||
# branch (edison or denzil) and is used only when DOC=dev-manual or
|
||||
# DOC=mega-manual. If you do not specify a BRANCH, the default branch used
|
||||
# will be for the latest Yocto Project release.
|
||||
# will be for the latest Yocto Project release. If you build for either
|
||||
# edison or denzil, you must use BRANCH. You do not need to use BRANCH for
|
||||
# any release beyond denzil.
|
||||
#
|
||||
# To build a manual, you must invoke Makefile with the DOC argument. If you
|
||||
# are going to publish the manual, then you must invoke Makefile with both the
|
||||
# DOC and the VER argument. If you are building a particular version of the
|
||||
# Yocto Project Development Manual or you are building any version of the
|
||||
# mega-manual, you must use the DOC and BRANCH arguments.
|
||||
# DOC and the VER argument. Furthermore, if you are building or publishing
|
||||
# the edison or denzil versions of the Yocto Poject Development Manual or
|
||||
# the mega-manual, you must also use the BRANCH argument.
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
@@ -47,7 +49,8 @@
|
||||
# fourth example generates both the PDF and HTML 'edison' versions of the YP
|
||||
# Development Manual. The last exmample generates the HTML version of the
|
||||
# mega-manual and uses the 'denzil' branch when choosing figures for the
|
||||
# tarball of figures.
|
||||
# tarball of figures. Any example that does not use the BRANCH argument
|
||||
# builds the current version of the manual set.
|
||||
#
|
||||
# Use the publish target to push the generated manuals to the Yocto Project
|
||||
# website. All files needed for the manual's HTML form are pushed as well as the
|
||||
@@ -57,16 +60,13 @@
|
||||
# make publish DOC=bsp-guide VER=1.3
|
||||
# make publish DOC=adt-manual VER=1.3
|
||||
# make publish DOC=dev-manual VER=1.1.1 BRANCH=edison
|
||||
# make publish DOC=dev-manual VER=1.2
|
||||
# make publish DOC=mega-manual VER=1.3 BRANCH=denzil
|
||||
# make publish DOC=dev-manual VER=1.2 BRANCH=denzil
|
||||
#
|
||||
# The first example publishes the 1.2 version of both the PDF and HTML versions of
|
||||
# the BSP Guide. The second example publishes the 1.2 version of both the PDF and
|
||||
# The first example publishes the 1.3 version of both the PDF and HTML versions of
|
||||
# the BSP Guide. The second example publishes the 1.3 version of both the PDF and
|
||||
# HTML versions of the ADT Manual. The third example publishes the PDF and HTML
|
||||
# 'edison' versions of the YP Development Manual. The fourth example publishes
|
||||
# the PDF and HTML 'master' versions of the YP Development Manual. The last
|
||||
# example publishes the 1.3 version of the mega-manual (HTML-only) and the
|
||||
# version generated and published is based on the 'denzil' branch.
|
||||
# the PDF and HTML 'denzil' versions of the YP Development Manual.
|
||||
#
|
||||
|
||||
ifeq ($(DOC),bsp-guide)
|
||||
@@ -119,9 +119,9 @@ TARFILES = dev-style.css dev-manual.html dev-manual.pdf \
|
||||
TARFILES = dev-style.css dev-manual.html dev-manual.pdf \
|
||||
figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
|
||||
figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
|
||||
figures/kernel-example-repos-denzil.png \
|
||||
figures/kernel-overview-1.png figures/kernel-overview-2.png \
|
||||
figures/kernel-overview-3-denzil.png \
|
||||
figures/kernel-example-repos-generic.png \
|
||||
figures/kernel-overview-1.png figures/kernel-overview-2-generic.png \
|
||||
figures/kernel-overview-3-generic.png \
|
||||
figures/source-repos.png figures/yp-download.png \
|
||||
figures/wip.png
|
||||
endif
|
||||
@@ -184,9 +184,9 @@ TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png figures
|
||||
figures/kernel-title.png figures/kernel-architecture-overview.png \
|
||||
figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
|
||||
figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
|
||||
figures/kernel-example-repos-denzil.png \
|
||||
figures/kernel-overview-1.png figures/kernel-overview-2.png \
|
||||
figures/kernel-overview-3-denzil.png \
|
||||
figures/kernel-example-repos-generic.png \
|
||||
figures/kernel-overview-1.png figures/kernel-overview-2-generic.png \
|
||||
figures/kernel-overview-3-generic.png \
|
||||
figures/source-repos.png figures/yp-download.png \
|
||||
figures/wip.png
|
||||
endif
|
||||
|
||||
@@ -200,9 +200,10 @@
|
||||
</note>
|
||||
|
||||
<para>
|
||||
Once the installer begins to run, you are asked to confirm the location for
|
||||
cross-toolchain installation, which is <filename>/opt/poky/<release></filename>.
|
||||
After confirming the location, you are prompted to run in
|
||||
Once the installer begins to run, you are asked to enter the location for
|
||||
cross-toolchain installation.
|
||||
The default location is <filename>/opt/poky/<release></filename>.
|
||||
After selecting the location, you are prompted to run in
|
||||
interactive or silent mode.
|
||||
If you want to closely monitor the installation, choose “I” for interactive
|
||||
mode rather than “S” for silent mode.
|
||||
@@ -264,8 +265,10 @@
|
||||
be in <filename>tmp/deploy/sdk</filename> in the build directory.
|
||||
</para></note>
|
||||
</para></listitem>
|
||||
<listitem><para>Once you have the installer, run it to install the toolchain.
|
||||
The following command shows how to run the installer given a toolchain tarball
|
||||
<listitem><para>Once you have the installer, run it to install the toolchain.
|
||||
You must change the permissions on the toolchain installer
|
||||
script so that it is executable.</para>
|
||||
<para>The following command shows how to run the installer given a toolchain tarball
|
||||
for a 64-bit development host system and a 32-bit target architecture.
|
||||
The example assumes the toolchain installer is located in <filename>~/Downloads/</filename>.
|
||||
<literallayout class='monospaced'>
|
||||
@@ -402,7 +405,15 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you plan on remotely deploying and debugging your application from within the
|
||||
If you are planning on developing against your image and you are not
|
||||
building or using one of the Yocto Project development images
|
||||
(e.g. core-image-*-dev), you must be sure to include the development
|
||||
packages as part of your image recipe.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Furthermore, if you plan on remotely deploying and debugging your
|
||||
application from within the
|
||||
Eclipse IDE, you must have an image that contains the Yocto Target Communication
|
||||
Framework (TCF) agent (<filename>tcf-agent</filename>).
|
||||
By default, the Yocto Project provides only one type pre-built image that contains the
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
BBLAYERS = " \
|
||||
/usr/local/src/yocto/meta \
|
||||
/usr/local/src/yocto/meta-yocto \
|
||||
/usr/local/src/yocto/meta-yocto-bsp \
|
||||
/usr/local/src/yocto/meta-<bsp_name> \
|
||||
"
|
||||
</literallayout>
|
||||
@@ -388,7 +389,7 @@
|
||||
<para>
|
||||
Tuning files are found in the <filename>meta/conf/machine/include</filename>
|
||||
directory within the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>source directory</ulink>.
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
||||
Tuning files can also reside in the BSP Layer itself.
|
||||
For example, the <filename>ia32-base.inc</filename> file resides in the
|
||||
<filename>meta-intel</filename> BSP Layer in <filename>conf/machine/include</filename>.
|
||||
@@ -440,7 +441,7 @@
|
||||
formfactor recipe
|
||||
<filename>meta/recipes-bsp/formfactor/formfactor_0.0.bb</filename>,
|
||||
which is found in the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>source directory</ulink>.
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
||||
</para></note>
|
||||
</section>
|
||||
|
||||
@@ -485,7 +486,7 @@
|
||||
</para>
|
||||
<para>
|
||||
For your BSP, you typically want to use an existing Yocto Project kernel recipe found in the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>source directory</ulink>
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
|
||||
at <filename>meta/recipes-kernel/linux</filename>.
|
||||
You can append your specific changes to the kernel recipe by using a
|
||||
similarly named append file, which is located in the BSP Layer (e.g.
|
||||
@@ -557,7 +558,7 @@
|
||||
to ensure the build process uses the <filename>standard/default/crownbay</filename>
|
||||
kernel branch.
|
||||
Finally, the append file points to the specific top commits in the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>source directory</ulink> Git
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> Git
|
||||
repository and the <filename>meta</filename> Git repository branches to identify the
|
||||
exact kernel needed to build the Crown Bay BSP.
|
||||
</para>
|
||||
@@ -617,13 +618,6 @@
|
||||
<filename>meta</filename> branch for your BSP.
|
||||
The configuration options will likely end up in that location anyway if the BSP gets
|
||||
added to the Yocto Project.
|
||||
For an example showing how to change the BSP configuration, see the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#changing-the-bsp-configuration'>Changing the BSP Configuration</ulink>"
|
||||
section in the Yocto Project Development Manual.
|
||||
For a better understanding of working with a local clone of the kernel repository
|
||||
and a local bare clone of the kernel, see the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#modifying-the-kernel-source-code'>Modifying the Kernel
|
||||
Source Code</ulink>" section also in the Yocto Project Development Manual.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -706,7 +700,7 @@
|
||||
<filename>recipe-*</filename> subdirectory.
|
||||
You can find <filename>recipes.txt</filename> in the
|
||||
<filename>meta</filename> directory of the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>source directory</ulink>,
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
|
||||
or in the OpenEmbedded Core Layer
|
||||
(<filename>openembedded-core</filename>) found at
|
||||
<ulink url='http://git.openembedded.org/openembedded-core/tree/meta'></ulink>.
|
||||
@@ -714,7 +708,7 @@
|
||||
<para>Within any particular <filename>recipes-*</filename> category, the layout
|
||||
should match what is found in the OpenEmbedded Core
|
||||
Git repository (<filename>openembedded-core</filename>)
|
||||
or the source directory (<filename>poky</filename>).
|
||||
or the Source Directory (<filename>poky</filename>).
|
||||
In other words, make sure you place related files in appropriately
|
||||
related <filename>recipes-*</filename> subdirectories specific to the
|
||||
recipe's function, or within a subdirectory containing a set of closely-related
|
||||
@@ -871,7 +865,7 @@
|
||||
<para>
|
||||
To better understand this, consider an example that customizes a recipe by adding
|
||||
a BSP-specific configuration file named <filename>interfaces</filename> to the
|
||||
<filename>netbase_4.47.bb</filename> recipe for machine "xyz".
|
||||
<filename>netbase_5.0.bb</filename> recipe for machine "xyz".
|
||||
Do the following:
|
||||
<orderedlist>
|
||||
<listitem><para>Edit the <filename>netbase_4.47.bbappend</filename> file so that it
|
||||
@@ -1017,8 +1011,8 @@
|
||||
|
||||
<para>
|
||||
The following sections describe the common location and help features as well
|
||||
as details for the <filename>yocto-bsp</filename> and <filename>yocto-kernel</filename>
|
||||
tools.
|
||||
as provide details for the
|
||||
<filename>yocto-bsp</filename> and <filename>yocto-kernel</filename> tools.
|
||||
</para>
|
||||
|
||||
<section id='common-features'>
|
||||
@@ -1037,7 +1031,7 @@
|
||||
|
||||
<para>
|
||||
Both tools reside in the <filename>scripts/</filename> subdirectory
|
||||
of the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>source directory</ulink>.
|
||||
of the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
||||
Consequently, to use the scripts, you must <filename>source</filename> the
|
||||
environment just as you would when invoking a build:
|
||||
<literallayout class='monospaced'>
|
||||
@@ -1049,30 +1043,27 @@
|
||||
The most immediately useful function is to get help on both tools.
|
||||
The built-in help system makes it easy to drill down at
|
||||
any time and view the syntax required for any specific command.
|
||||
Simply enter the name of the command, or the command along with
|
||||
<filename>help</filename> to display a list of the available sub-commands.
|
||||
Here is an example:
|
||||
Simply enter the name of the command with the <filename>help</filename>
|
||||
switch:
|
||||
<literallayout class='monospaced'>
|
||||
$ yocto-bsp
|
||||
$ yocto-bsp help
|
||||
Usage:
|
||||
|
||||
Usage:
|
||||
Create a customized Yocto BSP layer.
|
||||
|
||||
Create a customized Yocto BSP layer.
|
||||
usage: yocto-bsp [--version] [--help] COMMAND [ARGS]
|
||||
|
||||
usage: yocto-bsp [--version] [--help] COMMAND [ARGS]
|
||||
Current 'yocto-bsp' commands are:
|
||||
create Create a new Yocto BSP
|
||||
list List available values for options and BSP properties
|
||||
|
||||
The most commonly used 'yocto-bsp' commands are:
|
||||
create Create a new Yocto BSP
|
||||
list List available values for options and BSP properties
|
||||
|
||||
See 'yocto-bsp help COMMAND' for more information on a specific command.
|
||||
See 'yocto-bsp help COMMAND' for more information on a specific command.
|
||||
|
||||
|
||||
Options:
|
||||
--version show program's version number and exit
|
||||
-h, --help show this help message and exit
|
||||
-D, --debug output debug information
|
||||
--version show program's version number and exit
|
||||
-h, --help show this help message and exit
|
||||
-D, --debug output debug information
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
@@ -1082,19 +1073,20 @@
|
||||
<literallayout class='monospaced'>
|
||||
$ yocto-bsp create
|
||||
|
||||
Usage:
|
||||
Usage:
|
||||
|
||||
Create a new Yocto BSP
|
||||
usage: yocto-bsp create <bsp-name> <karch> [-o <DIRNAME> | --outdir <DIRNAME>]
|
||||
Create a new Yocto BSP
|
||||
|
||||
usage: yocto-bsp create <bsp-name> <karch> [-o <DIRNAME> | --outdir <DIRNAME>]
|
||||
[-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
|
||||
|
||||
This command creates a Yocto BSP based on the specified parameters.
|
||||
The new BSP will be a new BSP layer contained by default within
|
||||
the top-level directory specified as 'meta-bsp-name'. The -o option
|
||||
can be used to place the BSP layer in a directory with a different
|
||||
name and location.
|
||||
This command creates a Yocto BSP based on the specified parameters.
|
||||
The new BSP will be a new Yocto BSP layer contained by default within
|
||||
the top-level directory specified as 'meta-bsp-name'. The -o option
|
||||
can be used to place the BSP layer in a directory with a different
|
||||
name and location.
|
||||
|
||||
...
|
||||
...
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
@@ -1105,33 +1097,26 @@
|
||||
$ yocto-bsp help create
|
||||
|
||||
NAME
|
||||
yocto-bsp create - Create a new Yocto BSP
|
||||
yocto-bsp create - Create a new Yocto BSP
|
||||
|
||||
SYNOPSIS
|
||||
yocto-bsp create <bsp-name> <karch> [-o <DIRNAME> | --outdir <DIRNAME>]
|
||||
yocto-bsp create <bsp-name> <karch> [-o <DIRNAME> | --outdir <DIRNAME>]
|
||||
[-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
|
||||
|
||||
DESCRIPTION
|
||||
This command creates a Yocto BSP based on the specified
|
||||
parameters. The new BSP will be a new Yocto BSP layer contained
|
||||
by default within the top-level directory specified as
|
||||
'meta-bsp-name'. The -o option can be used to place the BSP layer
|
||||
in a directory with a different name and location.
|
||||
|
||||
The value of the 'karch' parameter determines the set of files
|
||||
that will be generated for the BSP, along with the specific set of
|
||||
'properties' that will be used to fill out the BSP-specific
|
||||
portions of the BSP.
|
||||
|
||||
...
|
||||
|
||||
NOTE: Once created, you should add your new layer to your
|
||||
bblayers.conf file in order for it to be subsequently seen and
|
||||
modified by the yocto-kernel tool.
|
||||
|
||||
NOTE for x86- and x86_64-based BSPs: The generated BSP assumes the
|
||||
presence of the of the meta-intel layer, so you should also have a
|
||||
meta-intel layer present and added to your bblayers.conf as well.
|
||||
This command creates a Yocto BSP based on the specified
|
||||
parameters. The new BSP will be a new Yocto BSP layer contained
|
||||
by default within the top-level directory specified as
|
||||
'meta-bsp-name'. The -o option can be used to place the BSP layer
|
||||
in a directory with a different name and location.
|
||||
|
||||
The value of the 'karch' parameter determines the set of files
|
||||
that will be generated for the BSP, along with the specific set of
|
||||
'properties' that will be used to fill out the BSP-specific
|
||||
portions of the BSP. The possible values for the 'karch' paramter
|
||||
can be listed via 'yocto-bsp list karch'.
|
||||
|
||||
...
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
@@ -1158,33 +1143,33 @@
|
||||
For the current set of BSPs, the script prompts you for various important
|
||||
parameters such as:
|
||||
<itemizedlist>
|
||||
<listitem><para>which kernel to use</para></listitem>
|
||||
<listitem><para>which branch of that kernel to use (or re-use)</para></listitem>
|
||||
<listitem><para>whether or not to use X, and if so, which drivers to use</para></listitem>
|
||||
<listitem><para>whether to turn on SMP</para></listitem>
|
||||
<listitem><para>whether the BSP has a keyboard</para></listitem>
|
||||
<listitem><para>whether the BSP has a touchscreen</para></listitem>
|
||||
<listitem><para>any remaining configurable items associated with the BSP</para></listitem>
|
||||
<listitem><para>The kernel to use</para></listitem>
|
||||
<listitem><para>The branch of that kernel to use (or re-use)</para></listitem>
|
||||
<listitem><para>Whether or not to use X, and if so, which drivers to use</para></listitem>
|
||||
<listitem><para>Whether to turn on SMP</para></listitem>
|
||||
<listitem><para>Whether the BSP has a keyboard</para></listitem>
|
||||
<listitem><para>Whether the BSP has a touchscreen</para></listitem>
|
||||
<listitem><para>Remaining configurable items associated with the BSP</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You use the <filename>yocto-bsp create</filename> sub-command to create
|
||||
a new BSP layer.
|
||||
This command requires you to specify a particular architecture on which to
|
||||
base the BSP.
|
||||
This command requires you to specify a particular kernel architecture
|
||||
(<filename>karch</filename>) on which to base the BSP.
|
||||
Assuming you have sourced the environment, you can use the
|
||||
<filename>yocto-bsp list karch</filename> sub-command to list the
|
||||
architectures available for BSP creation as follows:
|
||||
<literallayout class='monospaced'>
|
||||
$ yocto-bsp list karch
|
||||
Architectures available:
|
||||
arm
|
||||
powerpc
|
||||
i386
|
||||
mips
|
||||
x86_64
|
||||
qemu
|
||||
x86_64
|
||||
i386
|
||||
powerpc
|
||||
arm
|
||||
mips
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
@@ -1205,53 +1190,46 @@
|
||||
the prompts appear in brackets.
|
||||
Pressing enter without supplying anything on the command line or pressing enter
|
||||
and providing an invalid response causes the script to accept the default value.
|
||||
Once the script completes, the new <filename>meta-myarm</filename> BSP layer
|
||||
is created in the current working directory.
|
||||
This example assumes you have source the &OE_INIT_FILE; and are currently
|
||||
in the top-level folder of the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Following is the complete example:
|
||||
<literallayout class='monospaced'>
|
||||
$ yocto-bsp create myarm qemu
|
||||
Which qemu architecture would you like to use? [default: x86]
|
||||
1) common 32-bit x86
|
||||
2) common 64-bit x86
|
||||
3) common 32-bit ARM
|
||||
4) common 32-bit PowerPC
|
||||
5) common 32-bit MIPS
|
||||
Which qemu architecture would you like to use? [default: i386]
|
||||
1) i386 (32-bit)
|
||||
2) x86_64 (64-bit)
|
||||
3) ARM (32-bit)
|
||||
4) PowerPC (32-bit)
|
||||
5) MIPS (32-bit)
|
||||
3
|
||||
Would you like to use the default (3.2) kernel? (Y/n)
|
||||
Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [Y/n]
|
||||
Getting branches from remote repo git://git.yoctoproject.org/linux-yocto-3.2...
|
||||
Please choose a machine branch to base this BSP on => [default: standard/default/common-pc]
|
||||
1) base
|
||||
Would you like to use the default (3.4) kernel? (y/n) [default: y]
|
||||
Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n] [default: y]
|
||||
Getting branches from remote repo git://git.yoctoproject.org/linux-yocto-3.4.git...
|
||||
Please choose a machine branch to base your new BSP branch on: [default: standard/base]
|
||||
1) standard/arm-versatile-926ejs
|
||||
2) standard/base
|
||||
3) standard/default/arm-versatile-926ejs
|
||||
4) standard/default/base
|
||||
5) standard/default/beagleboard
|
||||
6) standard/default/cedartrailbsp (copy).xml
|
||||
7) standard/default/common-pc-64/base
|
||||
8) standard/default/common-pc-64/jasperforest
|
||||
9) standard/default/common-pc-64/romley
|
||||
10) standard/default/common-pc-64/sugarbay
|
||||
11) standard/default/common-pc/atom-pc
|
||||
12) standard/default/common-pc/base
|
||||
13) standard/default/crownbay
|
||||
14) standard/default/emenlow
|
||||
15) standard/default/fishriver
|
||||
16) standard/default/fri2
|
||||
17) standard/default/fsl-mpc8315e-rdb
|
||||
18) standard/default/mti-malta32-be
|
||||
19) standard/default/mti-malta32-le
|
||||
20) standard/default/preempt-rt
|
||||
21) standard/default/qemu-ppc32
|
||||
22) standard/default/routerstationpro
|
||||
23) standard/preempt-rt/base
|
||||
24) standard/preempt-rt/qemu-ppc32
|
||||
25) standard/preempt-rt/routerstationpro
|
||||
26) standard/tiny
|
||||
3
|
||||
Do you need SMP support? (Y/n)
|
||||
Does your BSP have a touchscreen? (y/N)
|
||||
Does your BSP have a keyboard? (Y/n)
|
||||
3) standard/beagleboard
|
||||
4) standard/cedartrail
|
||||
5) standard/crownbay
|
||||
6) standard/emenlow
|
||||
7) standard/fishriver
|
||||
8) standard/fri2
|
||||
9) standard/fsl-mpc8315e-rdb
|
||||
10) standard/mti-malta32
|
||||
11) standard/mti-malta64
|
||||
12) standard/qemuppc
|
||||
13) standard/routerstationpro
|
||||
14) standard/sys940x
|
||||
1
|
||||
Would you like SMP support? (y/n) [default: y]
|
||||
Does your BSP have a touchscreen? (y/n) [default: n]
|
||||
Does your BSP have a keyboard? (y/n) [default: y]
|
||||
New qemu BSP created in meta-myarm
|
||||
</literallayout>
|
||||
Let's take a closer look at the example now:
|
||||
@@ -1261,10 +1239,10 @@
|
||||
In the example, we use the <filename>arm</filename> architecture.
|
||||
</para></listitem>
|
||||
<listitem><para>The script then prompts you for the kernel.
|
||||
The default kernel is 3.2 and is acceptable.
|
||||
The default 3.4 kernel is acceptable.
|
||||
So, the example accepts the default.
|
||||
If you enter 'n', the script prompts you to further enter the kernel
|
||||
you do want to use (e.g. 3.0, 3.2_preempt-rt, etc.).</para></listitem>
|
||||
you do want to use (e.g. 3.0, 3.2_preempt-rt, and so forth.).</para></listitem>
|
||||
<listitem><para>Next, the script asks whether you would like to have a new
|
||||
branch created especially for your BSP in the local
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#local-kernel-files'>Linux Yocto Kernel</ulink>
|
||||
@@ -1277,25 +1255,20 @@
|
||||
The reason a new branch is the default is that typically
|
||||
new BSPs do require BSP-specific patches.
|
||||
The tool thus assumes that most of time a new branch is required.
|
||||
<note>In the current implementation, creation or re-use of a branch does
|
||||
not actually matter.
|
||||
The reason is because the generated BSPs assume that patches and
|
||||
configurations live in recipe-space, which is something that can be done
|
||||
with or without a dedicated branch.
|
||||
Generated BSPs, however, are different.
|
||||
This difference becomes significant once the tool's 'publish' functionality
|
||||
is implemented.</note></para></listitem>
|
||||
<listitem><para>Regardless of which choice is made in the previous step,
|
||||
</para></listitem>
|
||||
<listitem><para>Regardless of which choice you make in the previous step,
|
||||
you are now given the opportunity to select a particular machine branch on
|
||||
which to base your new BSP-specific machine branch on
|
||||
which to base your new BSP-specific machine branch
|
||||
(or to re-use if you had elected to not create a new branch).
|
||||
Because this example is generating an <filename>arm</filename> BSP, the example
|
||||
uses <filename>#3</filename> at the prompt, which selects the arm-versatile branch.
|
||||
uses <filename>#1</filename> at the prompt, which selects the arm-versatile branch.
|
||||
</para></listitem>
|
||||
<listitem><para>The remainder of the prompts are routine.
|
||||
Defaults are accepted for each.</para></listitem>
|
||||
<listitem><para>By default, the script creates the new BSP Layer in the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>build directory</ulink>.
|
||||
current working directory of the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
|
||||
which is <filename>poky</filename> in this case.
|
||||
</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
@@ -1308,6 +1281,7 @@
|
||||
BBLAYERS = " \
|
||||
/usr/local/src/yocto/meta \
|
||||
/usr/local/src/yocto/meta-yocto \
|
||||
/usr/local/src/yocto/meta-yocto-bsp \
|
||||
/usr/local/src/yocto/meta-myarm \
|
||||
"
|
||||
</literallayout>
|
||||
@@ -1339,21 +1313,28 @@
|
||||
is to use the <filename>yocto-kernel</filename> built-in help as follows:
|
||||
<literallayout class='monospaced'>
|
||||
$ yocto-kernel
|
||||
Usage:
|
||||
Usage:
|
||||
|
||||
Modify and list Yocto BSP kernel config items and patches.
|
||||
Modify and list Yocto BSP kernel config items and patches.
|
||||
|
||||
usage: yocto-kernel [--version] [--help] COMMAND [ARGS]
|
||||
usage: yocto-kernel [--version] [--help] COMMAND [ARGS]
|
||||
|
||||
The most commonly used 'yocto-kernel' commands are:
|
||||
config list List the modifiable set of bare kernel config options for a BSP
|
||||
config add Add or modify bare kernel config options for a BSP
|
||||
config rm Remove bare kernel config options from a BSP
|
||||
patch list List the patches associated with a BSP
|
||||
patch add Patch the Yocto kernel for a BSP
|
||||
patch rm Remove patches from a BSP
|
||||
Current 'yocto-kernel' commands are:
|
||||
config list List the modifiable set of bare kernel config options for a BSP
|
||||
config add Add or modify bare kernel config options for a BSP
|
||||
config rm Remove bare kernel config options from a BSP
|
||||
patch list List the patches associated with a BSP
|
||||
patch add Patch the Yocto kernel for a BSP
|
||||
patch rm Remove patches from a BSP
|
||||
|
||||
See 'yocto-kernel help COMMAND' for more information on a specific command.
|
||||
See 'yocto-kernel help COMMAND' for more information on a specific command.
|
||||
|
||||
|
||||
|
||||
Options:
|
||||
--version show program's version number and exit
|
||||
-h, --help show this help message and exit
|
||||
-D, --debug output debug information
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
|
||||
@@ -1,687 +0,0 @@
|
||||
<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
|
||||
|
||||
<appendix id='dev-manual-bsp-appendix'>
|
||||
|
||||
<title>BSP Development Example</title>
|
||||
|
||||
<para>
|
||||
This appendix provides a complete BSP development example.
|
||||
The example assumes the following:
|
||||
<itemizedlist>
|
||||
<listitem><para>No previous preparation or use of the Yocto Project.</para></listitem>
|
||||
<listitem><para>Use of the Crown Bay Board Support Package (BSP) as a "base" BSP from
|
||||
which to work.
|
||||
The example begins with the Crown Bay BSP as the starting point
|
||||
but ends by building a new 'atom-pc' BSP, which was based on the Crown Bay BSP.
|
||||
</para></listitem>
|
||||
<listitem><para>Shell commands assume <filename>bash</filename></para></listitem>
|
||||
<listitem><para>Example was developed on an Intel-based Core i7 platform running
|
||||
Ubuntu 10.04 LTS released in April of 2010.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<section id='getting-local-yocto-project-files-and-bsp-files'>
|
||||
<title>Getting Local Source Files and BSP Files</title>
|
||||
|
||||
<para>
|
||||
You need to have the <link linkend='source-directory'>source directory</link>
|
||||
available on your host system.
|
||||
You can set up this directory through tarball extraction or by cloning the
|
||||
<filename>poky</filename> Git repository.
|
||||
The following paragraphs describe both methods.
|
||||
For additional information, see the bulleted item
|
||||
"<link linkend='local-yp-release'>Yocto Project Release</link>".
|
||||
</para>
|
||||
|
||||
<para>
|
||||
As mentioned, one way to set up the source directory is to use Git to clone the
|
||||
<filename>poky</filename> repository.
|
||||
These commands create a local copy of the Git repository.
|
||||
By default, the top-level directory of the repository is named <filename>poky</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
$ git clone git://git.yoctoproject.org/poky
|
||||
$ cd poky
|
||||
</literallayout>
|
||||
Alternatively, you can start with the downloaded Poky "&DISTRO_NAME;" tarball.
|
||||
These commands unpack the tarball into a source directory structure.
|
||||
By default, the top-level directory of the source directory is named
|
||||
<filename>&YOCTO_POKY;</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
$ tar xfj &YOCTO_POKY_TARBALL;
|
||||
$ cd &YOCTO_POKY;
|
||||
</literallayout>
|
||||
<note><para>If you're using the tarball method, you can ignore all the following steps that
|
||||
ask you to carry out Git operations.
|
||||
You already have the results of those operations
|
||||
in the form of the &DISTRO_NAME; release tarballs.
|
||||
Consequently, there is nothing left to do other than extract those tarballs into the
|
||||
proper locations.</para>
|
||||
|
||||
<para>Once you expand the released tarball, you have a snapshot of the Git repository
|
||||
that represents a specific release.
|
||||
Fundamentally, this is different than having a local copy of the Poky Git repository.
|
||||
Given the tarball method, changes you make are building on top of a release.
|
||||
With the Git repository method you have the ability to track development
|
||||
and keep changes in revision control.
|
||||
See the
|
||||
"<link linkend='repositories-tags-and-branches'>Repositories, Tags, and Branches</link>" section
|
||||
for more discussion around these differences.</para></note>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
With the local <filename>poky</filename> Git repository set up,
|
||||
you have all the development branches available to you from which you can work.
|
||||
Next, you need to be sure that your local repository reflects the exact
|
||||
release in which you are interested.
|
||||
From inside the repository you can see the development branches that represent
|
||||
areas of development that have diverged from the main (master) branch
|
||||
at some point, such as a branch to track a maintenance release's development.
|
||||
You can also see the tag names used to mark snapshots of stable releases or
|
||||
points in the repository.
|
||||
Use the following commands to list out the branches and the tags in the repository,
|
||||
respectively.
|
||||
<literallayout class='monospaced'>
|
||||
$ git branch -a
|
||||
$ git tag -l
|
||||
</literallayout>
|
||||
For this example, we are going to use the Yocto Project &DISTRO; Release, which is code
|
||||
named "&DISTRO_NAME;".
|
||||
To make sure we have a local area (branch in Git terms) on our machine that
|
||||
reflects the &DISTRO; release, we can use the following commands:
|
||||
<literallayout class='monospaced'>
|
||||
$ cd ~/poky
|
||||
$ git fetch --tags
|
||||
$ git checkout -b &DISTRO_NAME;-&POKYVERSION; origin/&DISTRO_NAME;
|
||||
Switched to a new branch '&DISTRO_NAME;'
|
||||
</literallayout>
|
||||
The <filename>git fetch --tags</filename> is somewhat redundant since you just set
|
||||
up the repository and should have all the tags.
|
||||
The <filename>fetch</filename> command makes sure all the tags are available in your
|
||||
local repository.
|
||||
The Git <filename>checkout</filename> command with the <filename>-b</filename> option
|
||||
creates a local branch for you named <filename>&DISTRO_NAME;</filename>.
|
||||
Your local branch begins in the same state as the Yocto Project &DISTRO; released tarball
|
||||
marked with the <filename>&DISTRO_NAME;-&POKYVERSION;</filename> tag in the source repositories.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='choosing-a-base-bsp-app'>
|
||||
<title>Choosing a Base BSP</title>
|
||||
|
||||
<para>
|
||||
For this example, the base BSP is the <trademark class='registered'>Intel</trademark>
|
||||
<trademark class='trade'>Atom</trademark> Processor E660 with Intel Platform
|
||||
Controller Hub EG20T Development Kit, which is otherwise referred to as "Crown Bay."
|
||||
The BSP layer is <filename>meta-crownbay</filename>.
|
||||
The base BSP is simply the BSP
|
||||
we will be using as a starting point, so don't worry if you don't actually have Crown Bay
|
||||
hardware.
|
||||
The remainder of the example transforms the base BSP into a BSP that should be
|
||||
able to boot on generic atom-pc (netbook) hardware.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For information on how to choose a base BSP, see
|
||||
"<link linkend='developing-a-board-support-package-bsp'>Developing a Board Support Package (BSP)</link>".
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='getting-your-base-bsp-app'>
|
||||
<title>Getting Your Base BSP</title>
|
||||
|
||||
<para>
|
||||
You need to have the base BSP layer on your development system.
|
||||
Similar to the local <link linkend='source-directory'>source directory</link>,
|
||||
you can get the BSP
|
||||
layer in a couple of different ways:
|
||||
download the BSP tarball and extract it, or set up a local Git repository that
|
||||
has the BSP layers.
|
||||
You should use the same method that you used to set up the source directory earlier.
|
||||
See "<link linkend='getting-setup'>Getting Setup</link>" for information on how to get
|
||||
the BSP files.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This example assumes the BSP layer will be located within a directory named
|
||||
<filename>meta-intel</filename> contained within the <filename>poky</filename>
|
||||
parent directory.
|
||||
The following steps will automatically create the
|
||||
<filename>meta-intel</filename> directory and the contained
|
||||
<filename>meta-crownbay</filename> starting point in both the Git and the tarball cases.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you're using the Git method, you could do the following to create
|
||||
the starting layout after you have made sure you are in the <filename>poky</filename>
|
||||
directory created in the previous steps:
|
||||
<literallayout class='monospaced'>
|
||||
$ git clone git://git.yoctoproject.org/meta-intel.git
|
||||
$ cd meta-intel
|
||||
</literallayout>
|
||||
Alternatively, you can start with the downloaded Crown Bay tarball.
|
||||
You can download the &DISTRO_NAME; version of the BSP tarball from the
|
||||
<ulink url='&YOCTO_HOME_URL;/download'>Download</ulink> page of the
|
||||
Yocto Project website.
|
||||
Here is the specific link for the tarball needed for this example:
|
||||
<ulink url='&YOCTO_MACHINES_DL_URL;/crownbay-noemgd/crownbay-noemgd-&DISTRO_NAME;-&POKYVERSION;.tar.bz2'></ulink>.
|
||||
Again, be sure that you are already in the <filename>poky</filename> directory
|
||||
as described previously before installing the tarball:
|
||||
<literallayout class='monospaced'>
|
||||
$ tar xfj crownbay-noemgd-&DISTRO_NAME;-&POKYVERSION;.tar.bz2
|
||||
$ cd meta-intel
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <filename>meta-intel</filename> directory contains all the metadata
|
||||
that supports BSP creation.
|
||||
If you're using the Git method, the following
|
||||
step will switch to the &DISTRO_NAME; metadata.
|
||||
If you're using the tarball method, you already have the correct metadata and can
|
||||
skip to the next step.
|
||||
Because <filename>meta-intel</filename> is its own Git repository, you will want
|
||||
to be sure you are in the appropriate branch for your work.
|
||||
For this example we are going to use the <filename>&DISTRO_NAME;</filename> branch.
|
||||
<literallayout class='monospaced'>
|
||||
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
|
||||
Branch &DISTRO_NAME; set up to track remote branch &DISTRO_NAME; from origin.
|
||||
Switched to a new branch '&DISTRO_NAME;'
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='making-a-copy-of-the-base bsp-to-create-your-new-bsp-layer-app'>
|
||||
<title>Making a Copy of the Base BSP to Create Your New BSP Layer</title>
|
||||
|
||||
<para>
|
||||
Now that you have set up the source directory and included the base BSP files, you need to
|
||||
create a new layer for your BSP.
|
||||
To create your BSP layer, you simply copy the <filename>meta-crownbay</filename>
|
||||
layer to a new layer.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For this example, the new layer will be named <filename>meta-mymachine</filename>.
|
||||
The name should follow the BSP layer naming convention, which is
|
||||
<filename>meta-<name></filename>.
|
||||
The following assumes your working directory is <filename>meta-intel</filename>
|
||||
inside your source directory.
|
||||
To start your new layer, just copy the new layer alongside the existing
|
||||
BSP layers in the <filename>meta-intel</filename> directory:
|
||||
<literallayout class='monospaced'>
|
||||
$ cp -a meta-crownbay/ meta-mymachine
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='making-changes-to-your-bsp-app'>
|
||||
<title>Making Changes to Your BSP</title>
|
||||
|
||||
<para>
|
||||
Right now you have two identical BSP layers with different names:
|
||||
<filename>meta-crownbay</filename> and <filename>meta-mymachine</filename>.
|
||||
You need to change your configurations so that they work for your new BSP and
|
||||
your particular hardware.
|
||||
The following sections look at each of these areas of the BSP.
|
||||
</para>
|
||||
|
||||
<section id='changing-the-bsp-configuration'>
|
||||
<title>Changing the BSP Configuration</title>
|
||||
|
||||
<para>
|
||||
We will look first at the configurations, which are all done in the layer’s
|
||||
<filename>conf</filename> directory.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
First, since in this example the new BSP will not support EMGD, we will get rid of the
|
||||
<filename>crownbay.conf</filename> file and then rename the
|
||||
<filename>crownbay-noemgd.conf</filename> file to <filename>mymachine.conf</filename>.
|
||||
Much of what we do in the configuration directory is designed to help the OpenEmbedded
|
||||
build system work with the new layer and to be able to find and use the right software.
|
||||
The following two commands result in a single machine configuration file named
|
||||
<filename>mymachine.conf</filename>.
|
||||
<literallayout class='monospaced'>
|
||||
$ rm meta-mymachine/conf/machine/crownbay.conf
|
||||
$ mv meta-mymachine/conf/machine/crownbay-noemgd.conf \
|
||||
meta-mymachine/conf/machine/mymachine.conf
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Next, we need to make changes to the <filename>mymachine.conf</filename> itself.
|
||||
The only changes we want to make for this example are to the comment lines.
|
||||
Changing comments, of course, is never strictly necessary, but it's alway good form to make
|
||||
them reflect reality as much as possible.
|
||||
|
||||
Here, simply substitute the Crown Bay name with an appropriate name for the BSP
|
||||
(<filename>mymachine</filename> in this case) and change the description to
|
||||
something that describes your hardware.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Note that inside the <filename>mymachine.conf</filename> is the
|
||||
<filename>PREFERRED_VERSION_linux-yocto</filename> statement.
|
||||
This statement identifies the kernel that the BSP is going to use.
|
||||
In this case, the BSP is using <filename>linux-yocto</filename>, which is the
|
||||
current Yocto Project kernel based on the Linux 3.2 release.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The next configuration file in the new BSP layer we need to edit is
|
||||
<filename>meta-mymachine/conf/layer.conf</filename>.
|
||||
This file identifies build information needed for the new layer.
|
||||
You can see the
|
||||
"<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout-layer'>Layer Configuration File</ulink>" section
|
||||
in The Board Support Packages (BSP) Development Guide for more information on this configuration file.
|
||||
Basically, we are changing the existing statements to work with our BSP.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The file contains these statements that reference the Crown Bay BSP:
|
||||
<literallayout class='monospaced'>
|
||||
BBFILE_COLLECTIONS += "crownbay"
|
||||
BBFILE_PATTERN_crownbay := "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_crownbay = "6"
|
||||
|
||||
LAYERDEPENDS_crownbay = "intel"
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Simply substitute the machine string name <filename>crownbay</filename>
|
||||
with the new machine name <filename>mymachine</filename> to get the following:
|
||||
<literallayout class='monospaced'>
|
||||
BBFILE_COLLECTIONS += "mymachine"
|
||||
BBFILE_PATTERN_mymachine := "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_mymachine = "6"
|
||||
|
||||
LAYERDEPENDS_mymachine = "intel"
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='changing-the-recipes-in-your-bsp'>
|
||||
<title>Changing the Recipes in Your BSP</title>
|
||||
|
||||
<para>
|
||||
Now we will take a look at the recipes in your new layer.
|
||||
The standard BSP structure has areas for BSP, graphics, core, and kernel recipes.
|
||||
When you create a BSP, you use these areas for appropriate recipes and append files.
|
||||
Recipes take the form of <filename>.bb</filename> files, while append files take
|
||||
the form of <filename>.bbappend</filename> files.
|
||||
If you want to leverage the existing recipes the OpenEmbedded build system uses
|
||||
but change those recipes, you can use <filename>.bbappend</filename> files.
|
||||
All new recipes and append files for your layer must go in the layer’s
|
||||
<filename>recipes-bsp</filename>, <filename>recipes-kernel</filename>,
|
||||
<filename>recipes-core</filename>, and
|
||||
<filename>recipes-graphics</filename> directories.
|
||||
</para>
|
||||
|
||||
<section id='changing-recipes-bsp'>
|
||||
<title>Changing <filename>recipes-bsp</filename></title>
|
||||
|
||||
<para>
|
||||
First, let's look at <filename>recipes-bsp</filename>.
|
||||
For this example we are not adding any new BSP recipes.
|
||||
And, we only need to remove the formfactor we do not want and change the name of
|
||||
the remaining one that doesn't support EMGD.
|
||||
These commands take care of the <filename>recipes-bsp</filename> recipes:
|
||||
<literallayout class='monospaced'>
|
||||
$ rm -rf meta-mymachine/recipes-bsp/formfactor/formfactor/crownbay
|
||||
$ mv meta-mymachine/recipes-bsp/formfactor/formfactor/crownbay-noemgd/ \
|
||||
meta-mymachine/recipes-bsp/formfactor/formfactor/mymachine
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='changing-recipes-graphics'>
|
||||
<title>Changing <filename>recipes-graphics</filename></title>
|
||||
|
||||
<para>
|
||||
Now let's look at <filename>recipes-graphics</filename>.
|
||||
For this example we want to remove anything that supports EMGD and
|
||||
be sure to rename remaining directories appropriately.
|
||||
The following commands clean up the <filename>recipes-graphics</filename> directory:
|
||||
<literallayout class='monospaced'>
|
||||
$ rm -rf meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay
|
||||
$ mv meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay-noemgd \
|
||||
meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-config/mymachine
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
At this point the <filename>recipes-graphics</filename> directory just has files that
|
||||
support Video Electronics Standards Association (VESA) graphics modes and not EMGD.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='changing-recipes-kernel'>
|
||||
<title>Changing <filename>recipes-kernel</filename></title>
|
||||
|
||||
<para>
|
||||
Finally, let's look at <filename>recipes-kernel</filename> changes.
|
||||
Recall that the BSP uses the <filename>linux-yocto</filename> kernel as determined
|
||||
earlier in the <filename>mymachine.conf</filename>.
|
||||
The recipe for that kernel is not located in the
|
||||
BSP layer but rather in the source directory at
|
||||
<filename>meta/recipes-kernel/linux</filename> and is
|
||||
named <filename>linux-yocto_3.2.bb</filename>.
|
||||
The <filename>SRCREV_machine</filename> and <filename>SRCREV_meta</filename>
|
||||
statements point to the exact commits used by the Yocto Project development team
|
||||
in their source repositories that identify the right kernel for our hardware.
|
||||
In other words, the <filename>SRCREV</filename> values are simply Git commit
|
||||
IDs that identify which commit on each
|
||||
of the kernel branches (machine and meta) will be checked out and used to build
|
||||
the kernel.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
However, in the <filename>meta-mymachine</filename> layer in
|
||||
<filename>recipes-kernel/linux</filename> resides a <filename>.bbappend</filename>
|
||||
file named <filename>linux-yocto_3.2.bbappend</filename> that
|
||||
appends information to the recipe of the same name in <filename>meta/recipes-kernel/linux</filename>.
|
||||
Thus, the <filename>SRCREV</filename> statements in the append file override
|
||||
the more general statements found in <filename>meta</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <filename>SRCREV</filename> statements in the append file currently identify
|
||||
the kernel that supports the Crown Bay BSP with and without EMGD support.
|
||||
Here are the statements:
|
||||
<note>The commit ID strings used in this manual might not match the actual commit
|
||||
ID strings found in the <filename>linux-yocto_3.2.bbappend</filename> file.
|
||||
For the example, this difference does not matter.</note>
|
||||
<literallayout class='monospaced'>
|
||||
SRCREV_machine_pn-linux-yocto_crownbay ?= \
|
||||
"211fc7f4d10ec2b82b424286aabbaff9254b7cbd"
|
||||
SRCREV_meta_pn-linux-yocto_crownbay ?= \
|
||||
"514847185c78c07f52e02750fbe0a03ca3a31d8f"
|
||||
|
||||
SRCREV_machine_pn-linux-yocto_crownbay-noemgd ?= \
|
||||
"211fc7f4d10ec2b82b424286aabbaff9254b7cbd"
|
||||
SRCREV_meta_pn-linux-yocto_crownbay-noemgd ?= \
|
||||
"514847185c78c07f52e02750fbe0a03ca3a31d8f"
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You will notice that there are two pairs of <filename>SRCREV</filename> statements.
|
||||
The top pair identifies the kernel that supports
|
||||
EMGD, which we don’t care about in this example.
|
||||
The bottom pair identifies the kernel that we will use:
|
||||
<filename>linux-yocto</filename>.
|
||||
At this point though, the unique commit strings all are still associated with
|
||||
Crown Bay and not <filename>meta-mymachine</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To fix this situation in <filename>linux-yocto_3.2.bbappend</filename>,
|
||||
we delete the two <filename>SRCREV</filename> statements that support
|
||||
EMGD (the top pair).
|
||||
We also change the remaining pair to specify <filename>mymachine</filename>
|
||||
and insert the commit identifiers to identify the kernel in which we
|
||||
are interested, which will be based on the <filename>atom-pc-standard</filename>
|
||||
kernel.
|
||||
In this case, because we're working with the &DISTRO_NAME; branch of everything, we
|
||||
need to use the <filename>SRCREV</filename> values for the atom-pc branch
|
||||
that are associated with the &DISTRO_NAME; release.
|
||||
To find those values, we need to find the <filename>SRCREV</filename>
|
||||
values that &DISTRO_NAME; uses for the atom-pc branch, which we find in the
|
||||
<filename>poky/meta-yocto/recipes-kernel/linux/linux-yocto_3.2.bbappend</filename>
|
||||
file.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The machine <filename>SRCREV</filename> we want is in the
|
||||
<filename>SRCREV_machine_atom-pc</filename> variable.
|
||||
The meta <filename>SRCREV</filename> isn't specified in this file, so it must be
|
||||
specified in the base kernel recipe in the
|
||||
<filename>poky/meta/recipes-kernel/linux/linux-yocto_3.2.bb</filename>
|
||||
file, in the <filename>SRCREV_meta</filename> variable found there.
|
||||
Here are the final <filename>SRCREV</filename> statements:
|
||||
<literallayout class='monospaced'>
|
||||
SRCREV_machine_pn-linux-yocto_mymachine ?= \
|
||||
"f29531a41df15d74be5ad47d958e4117ca9e489e"
|
||||
SRCREV_meta_pn-linux-yocto_mymachine ?= \
|
||||
"b14a08f5c7b469a5077c10942f4e1aec171faa9d"
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In this example, we're using the <filename>SRCREV</filename> values we
|
||||
found already captured in the &DISTRO_NAME; release because we're creating a BSP based on
|
||||
&DISTRO_NAME;.
|
||||
If, instead, we had based our BSP on the master branches, we would want to use
|
||||
the most recent <filename>SRCREV</filename> values taken directly from the kernel repo.
|
||||
We will not be doing that for this example.
|
||||
However, if you do base a future BSP on master and
|
||||
if you are familiar with Git repositories, you probably won’t have trouble locating the
|
||||
exact commit strings in the Yocto Project source repositories you need to change
|
||||
the <filename>SRCREV</filename> statements.
|
||||
You can find all the <filename>machine</filename> and <filename>meta</filename>
|
||||
branch points (commits) for the <filename>linux-yocto-3.2</filename> kernel at
|
||||
<ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/linux-yocto-3.2'></ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you need a little more assistance after going to the link then do the following:
|
||||
<orderedlist>
|
||||
<listitem><para>Expand the list of branches by clicking <filename>[…]</filename></para></listitem>
|
||||
<listitem><para>Click on the <filename>standard/default/common-pc/atom-pc</filename>
|
||||
branch</para></listitem>
|
||||
<listitem><para>Click on the commit column header to view the top commit</para></listitem>
|
||||
<listitem><para>Copy the commit string for use in the
|
||||
<filename>linux-yocto_3.2.bbappend</filename> file</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For the <filename>SRCREV</filename> statement that points to the <filename>meta</filename>
|
||||
branch use the same procedure except expand the <filename>meta</filename>
|
||||
branch in step 2 above.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Also in the <filename>linux-yocto_3.2.bbappend</filename> file are
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE'><filename>COMPATIBLE_MACHINE</filename></ulink>,
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>,
|
||||
and
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-KBRANCH'><filename>KBRANCH</filename></ulink> statements.
|
||||
Two sets of these exist: one set supports EMGD and one set does not.
|
||||
Because we are not interested in supporting EMGD those three can be deleted.
|
||||
The remaining three must be changed so that <filename>mymachine</filename> replaces
|
||||
<filename>crownbay-noemgd</filename> and <filename>crownbay</filename>.
|
||||
Because we are using the <filename>atom-pc</filename> branch for this new BSP, we can also find
|
||||
the exact branch we need for the <filename>KMACHINE</filename>
|
||||
and <filename>KBRANCH</filename> variables in our new BSP from the value
|
||||
we find in the
|
||||
<filename>poky/meta-yocto/recipes-kernel/linux/linux-yocto_3.2.bbappend</filename>
|
||||
file we looked at in a previous step.
|
||||
In this case, the values we want are in the <filename>KMACHINE_atom-pc</filename> variable
|
||||
and the <filename>KBRANCH_atom-pc</filename> variables in that file.
|
||||
Here is the final <filename>linux-yocto_3.2.bbappend</filename> file after all
|
||||
the edits:
|
||||
<literallayout class='monospaced'>
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
COMPATIBLE_MACHINE_mymachine = "mymachine"
|
||||
KMACHINE_mymachine = "atom-pc"
|
||||
KBRANCH_mymachine = "standard/default/common-pc/atom-pc"
|
||||
|
||||
SRCREV_machine_pn-linux-yocto_mymachine ?= \
|
||||
"f29531a41df15d74be5ad47d958e4117ca9e489e"
|
||||
SRCREV_meta_pn-linux-yocto_mymachine ?= \
|
||||
"b14a08f5c7b469a5077c10942f4e1aec171faa9d"
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id='bsp-recipe-change-summary'>
|
||||
<title>BSP Recipe Change Summary</title>
|
||||
|
||||
<para>
|
||||
In summary, the edits to the layer’s recipe files result in removal of any files and
|
||||
statements that do not support your targeted hardware in addition to the inclusion
|
||||
of any new recipes you might need.
|
||||
In this example, it was simply a matter of ridding the new layer
|
||||
<filename>meta-mymachine</filename> of any code that supported the EMGD features
|
||||
and making sure we were identifying the kernel that supports our example, which
|
||||
is the <filename>atom-pc-standard</filename> kernel.
|
||||
We did not introduce any new recipes to the layer.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Finally, it is also important to update the layer’s <filename>README</filename>
|
||||
file so that the information in it reflects your BSP.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id='preparing-for-the-build-app'>
|
||||
<title>Preparing for the Build</title>
|
||||
|
||||
<para>
|
||||
To get ready to build your image that uses the new layer you need to do the following:
|
||||
<orderedlist>
|
||||
<listitem><para>Get the environment ready for the build by sourcing the environment
|
||||
script.
|
||||
The environment script is in the top-level of the source directory.
|
||||
The script has the string
|
||||
<filename>init-build-env</filename> in the file’s name.
|
||||
For this example, the following command gets the build environment ready:
|
||||
<literallayout class='monospaced'>
|
||||
$ source oe-init-build-env yocto-build
|
||||
</literallayout>
|
||||
When you source the script, a build directory is created in the current
|
||||
working directory.
|
||||
In our example we were in the <filename>poky</filename> directory.
|
||||
Thus, entering the previous command created the <filename>yocto-build</filename> directory.
|
||||
If you do not provide a name for the build directory it defaults to
|
||||
<filename>build</filename>.
|
||||
The <filename>yocto-build</filename> directory contains a
|
||||
<filename>conf</filename> directory that has
|
||||
two configuration files you will need to check: <filename>bblayers.conf</filename>
|
||||
and <filename>local.conf</filename>.</para></listitem>
|
||||
<listitem><para>Check and edit the resulting <filename>local.conf</filename> file.
|
||||
This file minimally identifies the machine for which to build the image by
|
||||
configuring the <filename>MACHINE</filename> variable.
|
||||
For this example you must set the variable to mymachine as follows:
|
||||
<literallayout class='monospaced'>
|
||||
MACHINE ??= “mymachine”
|
||||
</literallayout>
|
||||
You should also be sure any other variables in which you are interested are set.
|
||||
Some variables to consider are <filename>BB_NUMBER_THREADS</filename>
|
||||
and <filename>PARALLEL_MAKE</filename>, both of which can greatly reduce your build time
|
||||
if your development system supports multiple cores.
|
||||
For development systems that support multiple cores, a good rule of thumb is to set
|
||||
both the <filename>BB_NUMBER_THREADS</filename> and <filename>PARALLEL_MAKE</filename>
|
||||
variables to twice the number of cores your system supports.</para></listitem>
|
||||
<listitem><para>Update the <filename>bblayers.conf</filename> file so that it includes
|
||||
both the path to your new BSP layer and the path to the
|
||||
<filename>meta-intel</filename> layer.
|
||||
In this example, you need to include both these paths as part of the
|
||||
<filename>BBLAYERS</filename> variable:
|
||||
<literallayout class='monospaced'>
|
||||
$HOME/poky/meta-intel
|
||||
$HOME/poky/meta-intel/meta-mymachine
|
||||
</literallayout></para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#ref-variables-glos'>Variables Glossary</ulink> chapter in the
|
||||
Yocto Project Reference Manual has more information on configuration variables.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='building-the-image-app'>
|
||||
<title>Building and Booting the Image</title>
|
||||
|
||||
<para>
|
||||
To build the image for our <filename>meta-mymachine</filename> BSP enter the following command
|
||||
from the same shell from which you ran the setup script.
|
||||
You should run the <filename>bitbake</filename> command without any intervening shell commands.
|
||||
For example, moving your working directory around could cause problems.
|
||||
Here is the command for this example:
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake -k core-image-sato
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This command specifies an image that has Sato support and that can be run from a USB device or
|
||||
from a CD without having to first install anything.
|
||||
The build process takes significant time and includes thousands of tasks, which are reported
|
||||
at the console.
|
||||
If the build results in any type of error you should check for misspellings in the
|
||||
files you changed or problems with your host development environment such as missing packages.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Finally, once you have an image, you can try booting it from a device
|
||||
(e.g. a USB device).
|
||||
To prepare a bootable USB device, insert a USB flash drive into your build system and
|
||||
copy the <filename>.hddimg</filename> file, located in the
|
||||
<filename>poky/build/tmp/deploy/images</filename>
|
||||
directory after a successful build to the flash drive.
|
||||
Assuming the USB flash drive takes device <filename>/dev/sdf</filename>,
|
||||
use <filename>dd</filename> to copy the live image to it.
|
||||
For example:
|
||||
<literallayout class='monospaced'>
|
||||
# dd if=core-image-sato-mymachine-20111101223904.hddimg of=/dev/sdf
|
||||
# sync
|
||||
# eject /dev/sdf
|
||||
</literallayout>
|
||||
You should now have a bootable USB flash device.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Insert the device
|
||||
into a bootable USB socket on the target, and power it on.
|
||||
The system should boot to the Sato graphical desktop.
|
||||
<footnote><para>Because
|
||||
this new image is not in any way tailored to the system you're
|
||||
booting it on, which is assumed to be some sort of atom-pc (netbook) system for this
|
||||
example, it might not be completely functional though it should at least boot to a text
|
||||
prompt.
|
||||
Specifically, it might fail to boot into graphics without some tweaking.
|
||||
If this ends up being the case, a possible next step would be to replace the
|
||||
<filename>mymachine.conf</filename>
|
||||
contents with the contents of <filename>atom-pc.conf</filename> and replace
|
||||
<filename>xorg.conf</filename> with <filename>atom-pc xorg.conf</filename>
|
||||
in <filename>meta-yocto</filename> and see if it fares any better.
|
||||
In any case, following the previous steps will give you a buildable image that
|
||||
will probably boot on most systems.
|
||||
Getting things working like you want
|
||||
them to for your hardware will normally require some amount of experimentation with
|
||||
configuration settings.</para></footnote>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For reference, the sato image produced by the previous steps for &DISTRO_NAME;
|
||||
should look like the following in terms of size.
|
||||
If your sato image is much different from this,
|
||||
you probably made a mistake in one of the above steps:
|
||||
<literallayout class='monospaced'>
|
||||
260538368 2012-04-27 01:44 core-image-sato-mymachine-20120427025051.hddimg
|
||||
</literallayout>
|
||||
<note>The previous instructions are also present in the README that was copied
|
||||
from meta-crownbay, which should also be updated to reflect the specifics of your
|
||||
new BSP.
|
||||
That file and the <filename>README.hardware</filename> file in the top-level
|
||||
<filename>poky</filename> directory
|
||||
also provides some suggestions for things to try if booting fails and produces
|
||||
strange error messages.</note>
|
||||
</para>
|
||||
</section>
|
||||
</appendix>
|
||||
|
||||
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
-->
|
||||
@@ -30,7 +30,7 @@
|
||||
These types of customizations typically reside in a BSP Layer.
|
||||
Furthermore, the machine customizations should be isolated from recipes and metadata that support
|
||||
a new GUI environment, for example.
|
||||
This situation gives you a couple a layers: one for the machine configurations, and one for the
|
||||
This situation gives you a couple of layers: one for the machine configurations, and one for the
|
||||
GUI environment.
|
||||
It is important to understand, however, that the BSP layer can still make machine-specific
|
||||
additions to recipes within the GUI environment layer without polluting the GUI layer itself
|
||||
@@ -50,8 +50,9 @@
|
||||
You can easily identify a layer in the source directory by its folder name.
|
||||
Folders that are layers begin with the string <filename>meta</filename>.
|
||||
For example, when you set up the <link linkend='source-directory'>source directory</link>
|
||||
structure, you will see several layers: <filename>meta</filename>, <filename>meta-demoapps</filename>,
|
||||
<filename>meta-skeleton</filename>, and <filename>meta-yocto</filename>.
|
||||
structure, you will see several layers: <filename>meta</filename>,
|
||||
<filename>meta-hob</filename>, <filename>meta-skeleton</filename>,
|
||||
<filename>meta-yocto</filename>, and <filename>meta-yocto-bsp</filename>.
|
||||
Each of these folders is a layer.
|
||||
</para>
|
||||
|
||||
@@ -210,14 +211,17 @@
|
||||
<link linkend='build-directory'>build directory</link>.
|
||||
The following example shows how to enable a layer named <filename>meta-mylayer</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
LCONF_VERSION = "1"
|
||||
LCONF_VERSION = "6"
|
||||
|
||||
BBPATH = "${TOPDIR}"
|
||||
BBFILES ?= ""
|
||||
BBLAYERS = " \
|
||||
|
||||
BBLAYERS ?= " \
|
||||
/path/to/poky/meta \
|
||||
/path/to/poky/meta-yocto \
|
||||
/path/to/poky/meta-yocto-bsp \
|
||||
/path/to/poky/meta-mylayer \
|
||||
"
|
||||
"
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
@@ -228,6 +232,14 @@
|
||||
During the processing of each <filename>conf/layer.conf</filename> file, BitBake adds the
|
||||
recipes, classes and configurations contained within the particular layer to the source
|
||||
directory.
|
||||
<note>
|
||||
Removing the <filename>meta-yocto</filename> layer exposes a bug for the
|
||||
current release of the Yocto Project.
|
||||
If for some reason you do remove this layer from the
|
||||
<filename>bblayers.conf</filename>, you must set the
|
||||
<filename>LCONF_VERSION</filename> variable to "5".
|
||||
See <ulink url='https://bugzilla.yoctoproject.org/show_bug.cgi?id=3176'>[YOCTO_#3176]</ulink>
|
||||
for more information.</note>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -237,7 +249,7 @@
|
||||
<para>
|
||||
Recipes used to append metadata to other recipes are called BitBake append files.
|
||||
BitBake append files use the <filename>.bbappend</filename> file type suffix, while
|
||||
underlying recipes to which metadata is being appended use the
|
||||
the corresponding recipes to which metadata is being appended use the
|
||||
<filename>.bb</filename> file type suffix.
|
||||
</para>
|
||||
|
||||
@@ -251,14 +263,14 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Append files files must have the same name as the underlying recipe.
|
||||
Append files files must have the same name as the corresponding recipe.
|
||||
For example, the append file <filename>someapp_&DISTRO;.bbappend</filename> must
|
||||
apply to <filename>someapp_&DISTRO;.bb</filename>.
|
||||
This means the original recipe and append file names are version number specific.
|
||||
If the underlying recipe is renamed to update to a newer version, the
|
||||
corresponding <filename>.bbappend</filename> file must be renamed as well.
|
||||
If the corresponding recipe is renamed to update to a newer version, the
|
||||
underlying <filename>.bbappend</filename> file must be renamed as well.
|
||||
During the build process, BitBake displays an error on starting if it detects a
|
||||
<filename>.bbappend</filename> file that does not have an underlying recipe
|
||||
<filename>.bbappend</filename> file that does not have a corresponding recipe
|
||||
with a matching name.
|
||||
</para>
|
||||
|
||||
@@ -303,7 +315,7 @@
|
||||
<literallayout class='monospaced'>
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
PRINC = "1"
|
||||
PRINC := "${@int(PRINC) + 1}"
|
||||
</literallayout>
|
||||
This example adds or overrides files in
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
|
||||
@@ -326,12 +338,6 @@
|
||||
paths in the final list.
|
||||
</note>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For another example on how to use a <filename>.bbappend</filename> file, see the
|
||||
"<link linkend='changing-recipes-kernel'>Changing <filename>recipes-kernel</filename></link>"
|
||||
section.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='prioritizing-your-layer'>
|
||||
@@ -545,7 +551,7 @@
|
||||
In the previous example, two package group packages are created with their dependencies and their
|
||||
recommended package dependencies listed: <filename>packagegroup-custom-apps</filename>, and
|
||||
<filename>packagegroup-custom-tools</filename>.
|
||||
To build an image using these packagegroup packages, you need to add
|
||||
To build an image using these package group packages, you need to add
|
||||
<filename>packagegroup-custom-apps</filename> and/or
|
||||
<filename>packagegroup-custom-tools</filename> to
|
||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename>.
|
||||
@@ -562,11 +568,12 @@
|
||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'>IMAGE_FEATURES</ulink></filename>
|
||||
variable.
|
||||
To create these features, the best reference is
|
||||
<filename>meta/classes/core-image.bbclass</filename>, which shows how to achieve this.
|
||||
<filename>meta/classes/core-image.bbclass</filename>, which shows how this is
|
||||
achieved.
|
||||
In summary, the file looks at the contents of the
|
||||
<filename>IMAGE_FEATURES</filename>
|
||||
variable and then maps that into a set of tasks or packages.
|
||||
Based on this information the
|
||||
Based on this information, the
|
||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'> IMAGE_INSTALL</ulink></filename>
|
||||
variable is generated automatically.
|
||||
Users can add extra features by extending the class or creating a custom class for use
|
||||
@@ -773,7 +780,7 @@
|
||||
variable.
|
||||
BitBake passes these options into the <filename>make</filename> GNU invocation.
|
||||
Note that a <filename>do_install</filename> task is still required.
|
||||
Otherwise BitBake runs an empty <filename>do_install</filename> task by default.
|
||||
Otherwise, BitBake runs an empty <filename>do_install</filename> task by default.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -906,7 +913,9 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <filename>PACKAGES</filename> and <filename>FILES_*</filename> variables in the
|
||||
The <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'><filename>PACKAGES</filename></ulink>
|
||||
and <ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'><filename>FILES_*</filename></ulink>
|
||||
variables in the
|
||||
<filename>meta/conf/bitbake.conf</filename> configuration file define how files installed
|
||||
by the <filename>do_install</filename> task are packaged.
|
||||
By default, the <filename>PACKAGES</filename> variable contains
|
||||
@@ -1021,8 +1030,8 @@
|
||||
<para>
|
||||
For a complete example that shows how to add a new machine,
|
||||
see the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-bsp-appendix'>BSP Development Example</ulink>"
|
||||
in Appendix A.
|
||||
"<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
|
||||
in the Yocto Project Board Support Package (BSP) Developer's Guide.
|
||||
</para>
|
||||
|
||||
<section id="platdev-newmachine-conffile">
|
||||
@@ -1198,7 +1207,9 @@
|
||||
Many standard recipes are already extended and support multiple libraries.
|
||||
You can check in the <filename>meta/conf/multilib.conf</filename>
|
||||
configuration file in the source directory to see how this is
|
||||
done using the <filename>BBCLASSEXTEND</filename> variable.
|
||||
done using the
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></ulink>
|
||||
variable.
|
||||
Eventually, all recipes will be covered and this list will be unneeded.
|
||||
</para>
|
||||
|
||||
@@ -1207,10 +1218,13 @@
|
||||
extend the package name from <filename>${PN}</filename> to
|
||||
<filename>${MLPREFIX}${PN}</filename>, where <filename>MLPREFIX</filename>
|
||||
is the particular multilib (e.g. "lib32-" or "lib64-").
|
||||
Standard variables such as <filename>DEPENDS</filename>,
|
||||
<filename>RDEPENDS</filename>, <filename>RPROVIDES</filename>,
|
||||
<filename>RRECOMMENDS</filename>, <filename>PACKAGES</filename>, and
|
||||
<filename>PACKAGES_DYNAMIC</filename> are automatically extended by the system.
|
||||
Standard variables such as
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>,
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>,
|
||||
<filename>RPROVIDES</filename>,
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'><filename>RRECOMMENDS</filename></ulink>,
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'><filename>PACKAGES</filename></ulink>,
|
||||
and <filename>PACKAGES_DYNAMIC</filename> are automatically extended by the system.
|
||||
If you are extending any manual code in the recipe, you can use the
|
||||
<filename>${MLPREFIX}</filename> variable to ensure those names are extended
|
||||
correctly.
|
||||
@@ -1338,6 +1352,8 @@
|
||||
<para>
|
||||
The easiest way to define kernel configurations is to set them through the
|
||||
<filename>menuconfig</filename> tool.
|
||||
This tool provides an interactive method with which
|
||||
to set kernel configurations.
|
||||
For general information on <filename>menuconfig</filename>, see
|
||||
<ulink url='http://en.wikipedia.org/wiki/Menuconfig'></ulink>.
|
||||
</para>
|
||||
@@ -1345,6 +1361,9 @@
|
||||
<para>
|
||||
To use the <filename>menuconfig</filename> tool in the Yocto Project development
|
||||
environment, you must build the tool using BitBake.
|
||||
Thus, the environment must be set up using the <filename>&OE_INIT_FILE;</filename>
|
||||
script found in the
|
||||
<link linkend='build-directory'>Build Directory</link>.
|
||||
The following commands build and invoke <filename>menuconfig</filename> assuming the
|
||||
source directory top-level folder is <filename>~/poky</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
@@ -1353,17 +1372,86 @@
|
||||
$ bitbake linux-yocto -c menuconfig
|
||||
</literallayout>
|
||||
Once <filename>menuconfig</filename> comes up, its standard interface allows you to
|
||||
examine and configure all the kernel configuration parameters.
|
||||
Once you have made your changes, simply exit the tool and save your changes to
|
||||
interactively examine and configure all the kernel configuration parameters.
|
||||
After making your changes, simply exit the tool and save your changes to
|
||||
create an updated version of the <filename>.config</filename> configuration file.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For an example that shows how to change a specific kernel option
|
||||
using <filename>menuconfig</filename>, see the
|
||||
"<link linkend='changing-the-config-smp-configuration-using-menuconfig'>Changing
|
||||
the <filename>CONFIG_SMP</filename> Configuration Using <filename>menuconfig</filename></link>"
|
||||
section.
|
||||
Consider an example that configures the <filename>linux-yocto-3.4</filename>
|
||||
kernel.
|
||||
The OpenEmbedded build system recognizes this kernel as
|
||||
<filename>linux-yocto</filename>.
|
||||
Thus, the following commands from the shell in which you previously sourced the
|
||||
environment initialization script cleans the shared state cache and the
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>
|
||||
directory and then builds and launches <filename>menuconfig</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake linux-yocto -c menuconfig
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Once <filename>menuconfig</filename> launches, you use the interface
|
||||
to navigate through the selections to find the configuration settings in
|
||||
which you are interested.
|
||||
For example, consider the <filename>CONFIG_SMP</filename> configuration setting.
|
||||
You can find it at <filename>Processor Type and Features</filename> under
|
||||
the configuration selection <filename>Symmetric Multi-processing Support</filename>.
|
||||
After highlighting the selection, you can use the arrow keys to select or deselect
|
||||
the setting.
|
||||
When you are finished with all your selections, exit out and save them.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Saving the selections updates the <filename>.config</filename> configuration file.
|
||||
This is the file that the OpenEmbedded build system uses to configure the
|
||||
kernel during the build.
|
||||
You can find and examine this file in the build directory in
|
||||
<filename>tmp/work/</filename>.
|
||||
The actual <filename>.config</filename> is located in the area where the
|
||||
specific kernel is built.
|
||||
For example, if you were building a Linux Yocto kernel based on the
|
||||
Linux 3.4 kernel and you were building a QEMU image targeted for
|
||||
<filename>x86</filename> architecture, the
|
||||
<filename>.config</filename> file would be located here:
|
||||
<literallayout class='monospaced'>
|
||||
~/poky/build/tmp/work/qemux86-poky-linux/linux-yocto-3.4.11+git1+84f...
|
||||
...656ed30-r1/linux-qemux86-standard-build
|
||||
</literallayout>
|
||||
<note>
|
||||
The previous example directory is artificially split and many of the characters
|
||||
in the actual filename are omitted in order to make it more readable.
|
||||
Also, depending on the kernel you are using, the exact pathname
|
||||
for <filename>linux-yocto-3.4...</filename> might differ.
|
||||
</note>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Within the <filename>.config</filename> file, you can see the kernel settings.
|
||||
For example, the following entry shows that symmetric multi-processor support
|
||||
is not set:
|
||||
<literallayout class='monospaced'>
|
||||
# CONFIG_SMP is not set
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A good method to isolate changed configurations is to use a combination of the
|
||||
<filename>menuconfig</filename> tool and simple shell commands.
|
||||
Before changing configurations with <filename>menuconfig</filename>, copy the
|
||||
existing <filename>.config</filename> and rename it to something else,
|
||||
use <filename>menuconfig</filename> to make
|
||||
as many changes an you want and save them, then compare the renamed configuration
|
||||
file against the newly created file.
|
||||
You can use the resulting differences as your base to create configuration fragments
|
||||
to permanently save in your kernel layer.
|
||||
<note>
|
||||
Be sure to make a copy of the <filename>.config</filename> and don't just
|
||||
rename it.
|
||||
The build system needs an existing <filename>.config</filename>
|
||||
from which to work.
|
||||
</note>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -1502,6 +1590,267 @@
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section id="patching-the-kernel">
|
||||
<title>Patching the Kernel</title>
|
||||
|
||||
<para>
|
||||
Patching the kernel involves changing or adding configurations to an existing kernel,
|
||||
changing or adding recipes to the kernel that are needed to support specific hardware features,
|
||||
or even altering the source code itself.
|
||||
<note>
|
||||
You can use the <filename>yocto-kernel</filename> script
|
||||
found in the <link linkend='source-directory'>Source Directory</link>
|
||||
under <filename>scripts</filename> to manage kernel patches and configuration.
|
||||
See the "<ulink url='&YOCTO_DOCS_BSP_URL;#managing-kernel-patches-and-config-items-with-yocto-kernel'>Managing kernel Patches and Config Items with yocto-kernel</ulink>"
|
||||
section in the Yocto Project Board Support Packages (BSP) Developer's Guide for
|
||||
more information.</note>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This example creates a simple patch by adding some QEMU emulator console
|
||||
output at boot time through <filename>printk</filename> statements in the kernel's
|
||||
<filename>calibrate.c</filename> source code file.
|
||||
Applying the patch and booting the modified image causes the added
|
||||
messages to appear on the emulator's console.
|
||||
</para>
|
||||
|
||||
<section id='creating-the-patch'>
|
||||
<title>Creating the Patch</title>
|
||||
|
||||
<para>
|
||||
Describe how to find the source files in the build area.
|
||||
We are not assuming they are using their own kernel tree.
|
||||
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
||||
<section id='changing-the-source-code-and-pushing-it-to-the-bare-clone'>
|
||||
<title>Changing the Source Code and Pushing it to the Bare Clone</title>
|
||||
|
||||
<para>
|
||||
The file you change in this example is named <filename>calibrate.c</filename>
|
||||
and is located in the <filename>my-linux-yocto-3.4-work</filename> Git repository
|
||||
(the copy of the bare clone) in <filename>init</filename>.
|
||||
This example simply inserts several <filename>printk</filename> statements
|
||||
at the beginning of the <filename>calibrate_delay</filename> function.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Here is the unaltered code at the start of this function:
|
||||
<literallayout class='monospaced'>
|
||||
void __cpuinit calibrate_delay(void)
|
||||
{
|
||||
unsigned long lpj;
|
||||
static bool printed;
|
||||
int this_cpu = smp_processor_id();
|
||||
|
||||
if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
|
||||
.
|
||||
.
|
||||
.
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Here is the altered code showing five new <filename>printk</filename> statements
|
||||
near the top of the function:
|
||||
<literallayout class='monospaced'>
|
||||
void __cpuinit calibrate_delay(void)
|
||||
{
|
||||
unsigned long lpj;
|
||||
static bool printed;
|
||||
int this_cpu = smp_processor_id();
|
||||
|
||||
printk("*************************************\n");
|
||||
printk("* *\n");
|
||||
printk("* HELLO YOCTO KERNEL *\n");
|
||||
printk("* *\n");
|
||||
printk("*************************************\n");
|
||||
|
||||
if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
|
||||
.
|
||||
.
|
||||
.
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
After making and saving your changes, you need to stage them for the push.
|
||||
The following Git commands are one method of staging and committing your changes:
|
||||
<literallayout class='monospaced'>
|
||||
$ git add calibrate.c
|
||||
$ git commit --signoff
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Once the source code has been modified, you need to use Git to push the changes to
|
||||
the bare clone.
|
||||
If you do not push the changes, then the OpenEmbedded build system will not pick
|
||||
up the changed source files.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The following command pushes the changes to the bare clone:
|
||||
<literallayout class='monospaced'>
|
||||
$ git push origin standard-common-pc-base:standard/default/common-pc/base
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='changing-build-parameters-for-your-build'>
|
||||
<title>Changing Build Parameters for Your Build</title>
|
||||
|
||||
<para>
|
||||
At this point, the source has been changed and pushed.
|
||||
The example now defines some variables used by the OpenEmbedded build system
|
||||
to locate your kernel source.
|
||||
You essentially need to identify where to find the kernel recipe and the changed source code.
|
||||
You also need to be sure some basic configurations are in place that identify the
|
||||
type of machine you are building and to help speed up the build should your host support
|
||||
multiple-core and thread capabilities.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Do the following to make sure the build parameters are set up for the example.
|
||||
Once you set up these build parameters, they do not have to change unless you
|
||||
change the target architecture of the machine you are building or you move
|
||||
the bare clone, copy of the clone, or the <filename>poky-extras</filename> repository:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Build for the Correct Target Architecture:</emphasis> The
|
||||
<filename>local.conf</filename> file in the build directory defines the build's
|
||||
target architecture.
|
||||
By default, <filename>MACHINE</filename> is set to
|
||||
<filename>qemux86</filename>, which specifies a 32-bit
|
||||
<trademark class='registered'>Intel</trademark> Architecture
|
||||
target machine suitable for the QEMU emulator.
|
||||
In this example, <filename>MACHINE</filename> is correctly configured.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>Optimize Build Time:</emphasis> Also in the
|
||||
<filename>local.conf</filename> file are two variables that can speed your
|
||||
build time if your host supports multi-core and multi-thread capabilities:
|
||||
<filename>BB_NUMBER_THREADS</filename> and <filename>PARALLEL_MAKE</filename>.
|
||||
If the host system has multiple cores then you can optimize build time
|
||||
by setting both these variables to twice the number of
|
||||
cores.</para></listitem>
|
||||
<listitem><para><emphasis>Identify Your <filename>meta-kernel-dev</filename>
|
||||
Layer:</emphasis> The <filename>BBLAYERS</filename> variable in the
|
||||
<filename>bblayers.conf</filename> file found in the
|
||||
<filename>poky/build/conf</filename> directory needs to have the path to your local
|
||||
<filename>meta-kernel-dev</filename> layer.
|
||||
By default, the <filename>BBLAYERS</filename> variable contains paths to
|
||||
<filename>meta</filename> and <filename>meta-yocto</filename> in the
|
||||
<filename>poky</filename> Git repository.
|
||||
Add the path to your <filename>meta-kernel-dev</filename> location.
|
||||
Be sure to substitute your user information in the statement.
|
||||
Here is an example:
|
||||
<literallayout class='monospaced'>
|
||||
BBLAYERS = " \
|
||||
/home/scottrif/poky/meta \
|
||||
/home/scottrif/poky/meta-yocto \
|
||||
/home/scottrif/poky/meta-yocto-bsp \
|
||||
/home/scottrif/poky/poky-extras/meta-kernel-dev \
|
||||
"
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Identify Your Source Files:</emphasis> In the
|
||||
<filename>linux-yocto_3.4.bbappend</filename> file located in the
|
||||
<filename>poky-extras/meta-kernel-dev/recipes-kernel/linux</filename>
|
||||
directory, you need to identify the location of the
|
||||
local source code, which in this example is the bare clone named
|
||||
<filename>linux-yocto-3.4.git</filename>.
|
||||
To do this, set the <filename>KSRC_linux_yocto</filename> variable to point to your
|
||||
local <filename>linux-yocto-3.4.git</filename> Git repository by adding the
|
||||
following statement.
|
||||
Also, be sure the <filename>SRC_URI</filename> variable is pointing to
|
||||
your kernel source files by removing the comment.
|
||||
Finally, be sure to substitute your user information in the statement:
|
||||
<literallayout class='monospaced'>
|
||||
KSRC_linux_yocto_3_4 ?= "/home/scottrif/linux-yocto-3.4.git"
|
||||
SRC_URI = "git://${KSRC_linux_yocto_3_4};protocol=file;nocheckout=1;branch=${KBRANCH},meta;name=machine,meta"
|
||||
</literallayout></para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>Before attempting to build the modified kernel, there is one more set of changes you
|
||||
need to make in the <filename>meta-kernel-dev</filename> layer.
|
||||
Because all the kernel <filename>.bbappend</filename> files are parsed during the
|
||||
build process regardless of whether you are using them or not, you should either
|
||||
comment out the <filename>COMPATIBLE_MACHINE</filename> statements in all
|
||||
unused <filename>.bbappend</filename> files, or simply remove (or rename) all the files
|
||||
except the one your are using for the build
|
||||
(i.e. <filename>linux-yocto_3.4.bbappend</filename> in this example).</para>
|
||||
<para>If you do not make one of these two adjustments, your machine will be compatible
|
||||
with all the kernel recipes in the <filename>meta-kernel-dev</filename> layer.
|
||||
When your machine is comapatible with all the kernel recipes, the build attempts
|
||||
to build all kernels in the layer.
|
||||
You could end up with build errors blocking your work.</para>
|
||||
</note>
|
||||
</section>
|
||||
|
||||
<section id='building-and-booting-the-modified-qemu-kernel-image'>
|
||||
<title>Building and Booting the Modified QEMU Kernel Image</title>
|
||||
|
||||
<para>
|
||||
Next, you need to build the modified image.
|
||||
Do the following:
|
||||
<orderedlist>
|
||||
<listitem><para>Your environment should be set up since you previously sourced
|
||||
the <filename>&OE_INIT_FILE;</filename> script.
|
||||
If it isn't, source the script again from <filename>poky</filename>.
|
||||
<literallayout class='monospaced'>
|
||||
$ cd ~/poky
|
||||
$ source &OE_INIT_FILE;
|
||||
</literallayout>
|
||||
</para></listitem>
|
||||
<listitem><para>Be sure old images are cleaned out by running the
|
||||
<filename>cleanall</filename> BitBake task as follows from your build directory:
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake -c cleanall linux-yocto
|
||||
</literallayout></para>
|
||||
<para><note>Never remove any files by hand from the <filename>tmp/deploy</filename>
|
||||
directory insided the build directory.
|
||||
Always use the BitBake <filename>cleanall</filename> task to clear
|
||||
out previous builds.</note></para></listitem>
|
||||
<listitem><para>Next, build the kernel image using this command:
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake -k core-image-minimal
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para>Finally, boot the modified image in the QEMU emulator
|
||||
using this command:
|
||||
<literallayout class='monospaced'>
|
||||
$ runqemu qemux86
|
||||
</literallayout></para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Log into the machine using <filename>root</filename> with no password and then
|
||||
use the following shell command to scroll through the console's boot output.
|
||||
<literallayout class='monospaced'>
|
||||
# dmesg | less
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You should see the results of your <filename>printk</filename> statements
|
||||
as part of the output.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id="usingpoky-changes-updatingimages">
|
||||
<title>Updating Existing Images</title>
|
||||
|
||||
@@ -1529,11 +1878,11 @@
|
||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PR'>PR</ulink></filename>
|
||||
variable needs to be increased
|
||||
(or "bumped") as part of that commit.
|
||||
This means that for new recipes you must be sure to add the <filename>PR</filename>
|
||||
variable and set its initial value equal to "r0".
|
||||
Failing to define <filename>PR</filename> makes it easy to miss when you bump a package.
|
||||
Note that you can only use integer values following the "r" in the
|
||||
<filename>PR</filename> variable.
|
||||
For new recipes you should add the <filename>PR</filename>
|
||||
variable and set its initial value equal to "r0", which is the default.
|
||||
Even though the default value is "r0", the practice of adding it to a new recipe makes
|
||||
it harder to forget to bump the variable when you make changes
|
||||
to the recipe in future.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -1644,7 +1993,7 @@
|
||||
and thus outside of the <link linkend='source-directory'>source directory</link>.
|
||||
For example, suppose you have a project that includes a new BSP with a heavily customized
|
||||
kernel, a very minimal image, and some new user-space recipes.
|
||||
And, you want to minimize the exposure to the build system to the
|
||||
And, you want to minimize exposing the build system to the
|
||||
development team so that they can focus on their project and maintain everyone's workflow
|
||||
as much as possible.
|
||||
In this case, you want a kernel source directory on the development machine where the
|
||||
@@ -1730,7 +2079,7 @@
|
||||
<literallayout class='monospaced'>
|
||||
SRCREV_pn-<PN> = "${AUTOREV}"
|
||||
</literallayout>
|
||||
where <filename>PN</filename>
|
||||
where <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>
|
||||
is the name of the recipe for which you want to enable automatic source
|
||||
revision updating.
|
||||
</para>
|
||||
@@ -1740,10 +2089,10 @@
|
||||
<title>Debugging With the GNU Project Debugger (GDB) Remotely</title>
|
||||
|
||||
<para>
|
||||
GDB allows you to examine running programs, which in turn help you to understand and fix problems.
|
||||
GDB allows you to examine running programs, which in turn helps you to understand and fix problems.
|
||||
It also allows you to perform post-mortem style analysis of program crashes.
|
||||
GDB is available as a package within the Yocto Project and by default is
|
||||
installed in sdk images.
|
||||
installed in SDK images.
|
||||
See the "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" chapter
|
||||
in the Yocto Project Reference Manual for a description of these images.
|
||||
You can find information on GDB at <ulink url="http://sourceware.org/gdb/"/>.
|
||||
@@ -1864,18 +2213,18 @@
|
||||
<title>Making the Inferior Binaries Available</title>
|
||||
|
||||
<para>
|
||||
The inferior binary (complete with all debugging symbols) as well as any
|
||||
libraries (and their debugging symbols) on which the inferior binary depends
|
||||
need to be available.
|
||||
There are a number of ways you can make these available.
|
||||
The inferior binary (complete with all debugging symbols), as well as any
|
||||
libraries (and their debugging symbols) on which the inferior binary depends,
|
||||
needs to be available.
|
||||
There are a number of ways you can make these items available.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Perhaps the easiest way is to have an 'sdk' image that corresponds to the plain
|
||||
Perhaps the easiest way is to have an SDK image that corresponds to the plain
|
||||
image installed on the device.
|
||||
In the case of <filename>core-image-sato</filename>,
|
||||
<filename>core-image-sato-sdk</filename> would contain suitable symbols.
|
||||
Because the sdk images already have the debugging symbols installed, it is just a
|
||||
Because the SDK images already have the debugging symbols installed, it is just a
|
||||
question of expanding the archive to some location and then informing GDB.
|
||||
</para>
|
||||
|
||||
@@ -2006,13 +2355,18 @@
|
||||
<filename>-fno-omit-framepointer</filename> flag.
|
||||
You can achieve this by setting the
|
||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SELECTED_OPTIMIZATION'>SELECTED_OPTIMIZATION</ulink></filename>
|
||||
variable to
|
||||
<filename>-fexpensive-optimizations -fno-omit-framepointer -frename-registers -O2</filename>.
|
||||
variable with the following options:
|
||||
<literallayout class='monospaced'>
|
||||
-fexpensive-optimizations
|
||||
-fno-omit-framepointer
|
||||
-frename-registers
|
||||
-O2
|
||||
</literallayout>
|
||||
You can also achieve it by setting the
|
||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-DEBUG_BUILD'>DEBUG_BUILD</ulink></filename>
|
||||
variable to "1" in the <filename>local.conf</filename> configuration file.
|
||||
If you use the <filename>DEBUG_BUILD</filename> variable you will also add extra debug information
|
||||
that can make the debug packages large.
|
||||
If you use the <filename>DEBUG_BUILD</filename> variable,
|
||||
you will also add extra debug information that can make the debug packages large.
|
||||
</para>
|
||||
|
||||
<section id="platdev-oprofile-target">
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The Yocto Project Development Manual, however, does provide detailed examples on how to create a
|
||||
Board Support Package (BSP), change the kernel source code, and reconfigure the kernel.
|
||||
You can find this information in the appendices of the manual.
|
||||
The Yocto Project Development Manual, however, does provide detailed examples
|
||||
on how to change the kernel source code, reconfigure the kernel, and develop
|
||||
an application using the popular <trademark class='trade'>Eclipse</trademark> IDE.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<listitem><para>Development case overviews for both system development and user-space
|
||||
applications.</para></listitem>
|
||||
<listitem><para>An overview and understanding of the emulation environment used with
|
||||
the Yocto Project (QEMU).</para></listitem>
|
||||
the Yocto Project - the Quick EMUlator (QEMU).</para></listitem>
|
||||
<listitem><para>An understanding of basic kernel architecture and concepts.</para></listitem>
|
||||
<listitem><para>Many references to other sources of related information.</para></listitem>
|
||||
</itemizedlist>
|
||||
@@ -59,9 +59,10 @@
|
||||
<itemizedlist>
|
||||
<listitem><para>Step-by-step instructions if those instructions exist in other Yocto
|
||||
Project documentation.
|
||||
For example, the Yocto Project Development Manual contains detailed
|
||||
instruction on how to obtain and configure the
|
||||
<trademark class='trade'>Eclipse</trademark> Yocto Plug-in.</para></listitem>
|
||||
For example, the Yocto Project Application Developer's Guide contains detailed
|
||||
instruction on how to run the
|
||||
<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>,
|
||||
which is used to set up a cross-development environment.</para></listitem>
|
||||
<listitem><para>Reference material.
|
||||
This type of material resides in an appropriate reference manual.
|
||||
For example, system variables are documented in the
|
||||
@@ -114,7 +115,7 @@
|
||||
<ulink url='&YOCTO_WIKI_URL;/wiki/FAQ'>FAQ</ulink>:</emphasis>
|
||||
A list of commonly asked questions and their answers.</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<ulink url='&YOCTO_HOME_URL;/download/yocto/yocto-project-1.1-release-notes-poky-&POKYVERSION;'>
|
||||
<ulink url='&YOCTO_HOME_URL;/download/yocto/yocto-project-&DISTRO;-release-notes-poky-&POKYVERSION;'>
|
||||
Release Notes</ulink>:</emphasis> Features, updates and known issues for the current
|
||||
release of the Yocto Project.</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
@@ -175,7 +176,7 @@
|
||||
<filename>bitbake/doc/manual</filename> directory of the
|
||||
<link linkend='source-directory'>Source Directory</link>.</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<ulink url='http://wiki.qemu.org/Index.html'>QEMU</ulink>:
|
||||
<ulink url='http://wiki.qemu.org/Index.html'>Quick EMUlator (QEMU)</ulink>:
|
||||
</emphasis> An open-source machine emulator and virtualizer.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
@@ -12,6 +12,13 @@
|
||||
or even altering the source code itself.
|
||||
This appendix presents simple examples that modify the kernel source code,
|
||||
change the kernel configuration, and add a kernel source recipe.
|
||||
<note>
|
||||
You can use the <filename>yocto-kernel</filename> script
|
||||
found in the <link linkend='source-directory'>Source Directory</link>
|
||||
under <filename>scripts</filename> to manage kernel patches and configuration.
|
||||
See the "<ulink url='&YOCTO_DOCS_BSP_URL;#managing-kernel-patches-and-config-items-with-yocto-kernel'>Managing kernel Patches and Config Items with yocto-kernel</ulink>"
|
||||
section in the Yocto Project Board Support Packages (BSP) Developer's Guide for
|
||||
more information.</note>
|
||||
</para>
|
||||
|
||||
<section id='modifying-the-kernel-source-code'>
|
||||
@@ -34,11 +41,11 @@
|
||||
Briefly, you need the following:
|
||||
<itemizedlist>
|
||||
<listitem><para>A local
|
||||
<link linkend='source-directory'>source directory</link> for the
|
||||
<link linkend='source-directory'>Source Directory</link> for the
|
||||
poky Git repository</para></listitem>
|
||||
<listitem><para>Local copies of the
|
||||
<link linkend='poky-extras-repo'><filename>poky-extras</filename></link>
|
||||
Git repository placed within the source directory.</para></listitem>
|
||||
Git repository placed within the Source Directory.</para></listitem>
|
||||
<listitem><para>A bare clone of the
|
||||
<link linkend='local-kernel-files'>Yocto Project Kernel</link> upstream Git
|
||||
repository to which you want to push your modifications.
|
||||
@@ -59,7 +66,7 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<imagedata fileref="figures/kernel-example-repos-denzil.png" width="7in" depth="5in"
|
||||
<imagedata fileref="figures/kernel-example-repos-generic.png" width="7in" depth="5in"
|
||||
align="center" scale="100" />
|
||||
</para>
|
||||
|
||||
@@ -69,16 +76,18 @@
|
||||
<listitem><para><emphasis>Local Source Directory:</emphasis>
|
||||
This area contains all the metadata that supports building images
|
||||
using the OpenEmbedded build system.
|
||||
In this example, the source directory also
|
||||
contains the build directory, which contains the configuration directory
|
||||
In this example, the
|
||||
<link linkend='source-directory'>Source Directory</link> also
|
||||
contains the
|
||||
<link linkend='build-directory'>Build Directory</link>,
|
||||
which contains the configuration directory
|
||||
that lets you control the build.
|
||||
Also in this example, the source directory contains local copies of the
|
||||
Also in this example, the Source Directory contains local copies of the
|
||||
<filename>poky-extras</filename> Git repository.</para>
|
||||
<para>See the bulleted item
|
||||
"<link linkend='local-yp-release'>Yocto Project Release</link>"
|
||||
for information on how to get these files on your local system.</para></listitem>
|
||||
<listitem><para><emphasis>Local copies of the<filename>poky-extras</filename>
|
||||
Git Repository:</emphasis>
|
||||
<listitem><para><emphasis>Local copies of the <filename>poky-extras</filename> Git Repository:</emphasis>
|
||||
This area contains the <filename>meta-kernel-dev</filename> layer,
|
||||
which is where you make changes that append the kernel build recipes.
|
||||
You edit <filename>.bbappend</filename> files to locate your
|
||||
@@ -125,17 +134,19 @@
|
||||
<title>Setting Up the Local Source Directory</title>
|
||||
|
||||
<para>
|
||||
You can set up the source directory through tarball extraction or by
|
||||
You can set up the
|
||||
<link linkend='source-directory'>Source Directory</link>
|
||||
through tarball extraction or by
|
||||
cloning the <filename>poky</filename> Git repository.
|
||||
This example uses <filename>poky</filename> as the root directory of the
|
||||
local source directory.
|
||||
local Source Directory.
|
||||
See the bulleted item
|
||||
"<link linkend='local-yp-release'>Yocto Project Release</link>"
|
||||
for information on how to get these files.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Once you have source directory set up,
|
||||
Once you have Source Directory set up,
|
||||
you have many development branches from which you can work.
|
||||
From inside the local repository you can see the branch names and the tag names used
|
||||
in the upstream Git repository by using either of the following commands:
|
||||
@@ -161,7 +172,7 @@
|
||||
|
||||
<para>
|
||||
This example creates a local copy of the <filename>poky-extras</filename> Git
|
||||
repository inside the <filename>poky</filename> source directory.
|
||||
repository inside the <filename>poky</filename> Source Directory.
|
||||
See the bulleted item "<link linkend='poky-extras-repo'>The
|
||||
<filename>poky-extras</filename> Git Repository</link>"
|
||||
for information on how to set up a local copy of the
|
||||
@@ -172,11 +183,12 @@
|
||||
Because this example uses the Yocto Project &DISTRO; Release code
|
||||
named "&DISTRO_NAME;", which maps to the <filename>&DISTRO_NAME;</filename>
|
||||
branch in the repository, you need to be sure you are using that
|
||||
branch for <filename>poky-extra</filename>.
|
||||
branch for <filename>poky-extras</filename>.
|
||||
The following commands create and checkout the local
|
||||
branch you are using for the <filename>&DISTRO_NAME;</filename>
|
||||
branch:
|
||||
<literallayout class='monospaced'>
|
||||
$ cd ~/poky/poky-extras
|
||||
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
|
||||
Branch &DISTRO_NAME; set up to track remote branch &DISTRO_NAME; from origin.
|
||||
Switched to a new branch '&DISTRO_NAME;'
|
||||
@@ -188,7 +200,7 @@
|
||||
<title>Setting Up the Bare Clone and its Copy</title>
|
||||
|
||||
<para>
|
||||
This example modifies the <filename>linux-yocto-3.2</filename> kernel.
|
||||
This example modifies the <filename>linux-yocto-3.4</filename> kernel.
|
||||
Thus, you need to create a bare clone of that kernel and then make a copy of the
|
||||
bare clone.
|
||||
See the bulleted item
|
||||
@@ -200,17 +212,16 @@
|
||||
The bare clone exists for the kernel build tools and simply as the receiving end
|
||||
of <filename>git push</filename>
|
||||
commands after you make edits and commits inside the copy of the clone.
|
||||
The copy (<filename>my-linux-yocto-3.2-work</filename> in this example) has to have
|
||||
The copy (<filename>my-linux-yocto-3.4-work</filename> in this example) has to have
|
||||
a local branch created and checked out for your work.
|
||||
This example uses <filename>common-pc-base</filename> as the local branch.
|
||||
The following commands create and checkout the branch:
|
||||
<literallayout class='monospaced'>
|
||||
$ cd ~/my-linux-yocto-3.2-work
|
||||
$ git checkout -b common-pc-base origin/standard/default/common-pc/base
|
||||
Checking out files: 100% (532/532), done.
|
||||
Branch common-pc-base set up to track remote branch
|
||||
standard/default/common-pc/base from origin.
|
||||
Switched to a new branch 'common-pc-base'
|
||||
$ cd ~/my-linux-yocto-3.4-work
|
||||
$ git checkout -b standard-common-pc-base origin/standard/common-pc/base
|
||||
Branch standard-common-pc-base set up to track remote branch
|
||||
standard/common-pc/base from origin.
|
||||
Switched to a new branch 'standard-common-pc-base'
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
@@ -224,7 +235,7 @@
|
||||
<note>
|
||||
Because a full build can take hours, you should check two variables in the
|
||||
<filename>build</filename> directory that is created after you source the
|
||||
<filename>oe-init-build-env</filename> script.
|
||||
<filename>&OE_INIT_FILE;</filename> script.
|
||||
You can find these variables
|
||||
<filename>BB_NUMBER_THREADS</filename> and <filename>PARALLEL_MAKE</filename>
|
||||
in the <filename>build/conf</filename> directory in the
|
||||
@@ -242,11 +253,36 @@
|
||||
If necessary, the script creates the build directory:
|
||||
<literallayout class='monospaced'>
|
||||
$ cd ~/poky
|
||||
$ source oe-init-build-env
|
||||
$ source &OE_INIT_FILE;
|
||||
You had no conf/local.conf file. This configuration file has therefore been
|
||||
created for you with some default values. You may wish to edit it to use a
|
||||
different MACHINE (target hardware) or enable parallel build options to take
|
||||
advantage of multiple cores for example. See the file for more information as
|
||||
common configuration options are commented.
|
||||
|
||||
### Shell environment set up for builds. ###
|
||||
The Yocto Project has extensive documentation about OE including a reference manual
|
||||
which can be found at:
|
||||
http://yoctoproject.org/documentation
|
||||
|
||||
You can now run 'bitbake <target>'
|
||||
For more information about OpenEmbedded see their website:
|
||||
http://www.openembedded.org/
|
||||
|
||||
You had no conf/bblayers.conf file. The configuration file has been created for
|
||||
you with some default values. To add additional metadata layers into your
|
||||
configuration please add entries to this file.
|
||||
|
||||
The Yocto Project has extensive documentation about OE including a reference manual
|
||||
which can be found at:
|
||||
http://yoctoproject.org/documentation
|
||||
|
||||
For more information about OpenEmbedded see their website:
|
||||
http://www.openembedded.org/
|
||||
|
||||
|
||||
|
||||
### Shell environment set up for builds. ###
|
||||
|
||||
You can now run 'bitbake <target>>'
|
||||
|
||||
Common targets are:
|
||||
core-image-minimal
|
||||
@@ -301,7 +337,7 @@
|
||||
|
||||
<para>
|
||||
The file you change in this example is named <filename>calibrate.c</filename>
|
||||
and is located in the <filename>my-linux-yocto-3.2-work</filename> Git repository
|
||||
and is located in the <filename>my-linux-yocto-3.4-work</filename> Git repository
|
||||
(the copy of the bare clone) in <filename>init</filename>.
|
||||
This example simply inserts several <filename>printk</filename> statements
|
||||
at the beginning of the <filename>calibrate_delay</filename> function.
|
||||
@@ -365,7 +401,7 @@
|
||||
<para>
|
||||
The following command pushes the changes to the bare clone:
|
||||
<literallayout class='monospaced'>
|
||||
$ git push origin common-pc-base:standard/default/common-pc/base
|
||||
$ git push origin standard-common-pc-base:standard/default/common-pc/base
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
@@ -420,21 +456,25 @@
|
||||
BBLAYERS = " \
|
||||
/home/scottrif/poky/meta \
|
||||
/home/scottrif/poky/meta-yocto \
|
||||
/home/scottrif/poky/meta-yocto-bsp \
|
||||
/home/scottrif/poky/poky-extras/meta-kernel-dev \
|
||||
"
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Identify Your Source Files:</emphasis> In the
|
||||
<filename>linux-yocto_3.2.bbappend</filename> file located in the
|
||||
<filename>linux-yocto_3.4.bbappend</filename> file located in the
|
||||
<filename>poky-extras/meta-kernel-dev/recipes-kernel/linux</filename>
|
||||
directory, you need to identify the location of the
|
||||
local source code, which in this example is the bare clone named
|
||||
<filename>linux-yocto-3.2.git</filename>.
|
||||
<filename>linux-yocto-3.4.git</filename>.
|
||||
To do this, set the <filename>KSRC_linux_yocto</filename> variable to point to your
|
||||
local <filename>linux-yocto-3.2.git</filename> Git repository by adding the
|
||||
local <filename>linux-yocto-3.4.git</filename> Git repository by adding the
|
||||
following statement.
|
||||
Be sure to substitute your user information in the statement:
|
||||
Also, be sure the <filename>SRC_URI</filename> variable is pointing to
|
||||
your kernel source files by removing the comment.
|
||||
Finally, be sure to substitute your user information in the statement:
|
||||
<literallayout class='monospaced'>
|
||||
KSRC_linux_yocto_3_2 ?= "/home/scottrif/linux-yocto-3.2.git"
|
||||
KSRC_linux_yocto_3_4 ?= "/home/scottrif/linux-yocto-3.4.git"
|
||||
SRC_URI = "git://${KSRC_linux_yocto_3_4};protocol=file;nocheckout=1;branch=${KBRANCH},meta;name=machine,meta"
|
||||
</literallayout></para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
@@ -447,7 +487,7 @@
|
||||
comment out the <filename>COMPATIBLE_MACHINE</filename> statements in all
|
||||
unused <filename>.bbappend</filename> files, or simply remove (or rename) all the files
|
||||
except the one your are using for the build
|
||||
(i.e. <filename>linux-yocto_3.2.bbappend</filename> in this example).</para>
|
||||
(i.e. <filename>linux-yocto_3.4.bbappend</filename> in this example).</para>
|
||||
<para>If you do not make one of these two adjustments, your machine will be compatible
|
||||
with all the kernel recipes in the <filename>meta-kernel-dev</filename> layer.
|
||||
When your machine is comapatible with all the kernel recipes, the build attempts
|
||||
@@ -464,11 +504,11 @@
|
||||
Do the following:
|
||||
<orderedlist>
|
||||
<listitem><para>Your environment should be set up since you previously sourced
|
||||
the <filename>oe-init-build-env</filename> script.
|
||||
the <filename>&OE_INIT_FILE;</filename> script.
|
||||
If it isn't, source the script again from <filename>poky</filename>.
|
||||
<literallayout class='monospaced'>
|
||||
$ cd ~/poky
|
||||
$ source oe-init-build-env
|
||||
$ source &OE_INIT_FILE;
|
||||
</literallayout>
|
||||
</para></listitem>
|
||||
<listitem><para>Be sure old images are cleaned out by running the
|
||||
@@ -506,299 +546,6 @@
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id='changing-the-kernel-configuration'>
|
||||
<title>Changing the Kernel Configuration</title>
|
||||
|
||||
<para>
|
||||
This example changes the default behavior, which is "on", of the Symmetric
|
||||
Multi-processing Support (<filename>CONFIG_SMP</filename>) to "off".
|
||||
It is a simple example that demonstrates how to reconfigure the kernel.
|
||||
</para>
|
||||
|
||||
<section id='getting-set-up-to-run-this-example'>
|
||||
<title>Getting Set Up to Run this Example</title>
|
||||
|
||||
<para>
|
||||
If you took the time to work through the example that modifies the kernel source code
|
||||
in "<link linkend='modifying-the-kernel-source-code'>Modifying the Kernel Source
|
||||
Code</link>" you should already have the source directory set up on your
|
||||
host machine.
|
||||
If this is the case, go to the next section, which is titled
|
||||
"<link linkend='examining-the-default-config-smp-behavior'>Examining the Default
|
||||
<filename>CONFIG_SMP</filename> Behavior</link>", and continue with the
|
||||
example.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you don't have the source directory established on your system,
|
||||
you can get them through tarball extraction or by
|
||||
cloning the <filename>poky</filename> Git repository.
|
||||
This example uses <filename>poky</filename> as the root directory of the
|
||||
<link linkend='source-directory'>source directory</link>.
|
||||
See the bulleted item
|
||||
"<link linkend='local-yp-release'>Yocto Project Release</link>"
|
||||
for information on how to get these files.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Once you have the local copy of the repository set up,
|
||||
you have many development branches from which you can work.
|
||||
From inside the repository you can see the branch names and the tag names used
|
||||
in the upstream Git repository using either of the following commands:
|
||||
<literallayout class='monospaced'>
|
||||
$ cd poky
|
||||
$ git branch -a
|
||||
$ git tag -l
|
||||
</literallayout>
|
||||
This example uses the Yocto Project &DISTRO; Release code named "&DISTRO_NAME;",
|
||||
which maps to the <filename>&DISTRO_NAME;</filename> branch in the repository.
|
||||
The following commands create and checkout the local <filename>&DISTRO_NAME;</filename>
|
||||
branch:
|
||||
<literallayout class='monospaced'>
|
||||
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
|
||||
Branch &DISTRO_NAME; set up to track remote branch &DISTRO_NAME; from origin.
|
||||
Switched to a new branch '&DISTRO_NAME;'
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Next, you need to build the default <filename>qemux86</filename> image that you
|
||||
can boot using QEMU.
|
||||
<note>
|
||||
Because a full build can take hours, you should check two variables in the
|
||||
<filename>build</filename> directory that is created after you source the
|
||||
<filename>oe-init-build-env</filename> script.
|
||||
You can find these variables
|
||||
<filename>BB_NUMBER_THREADS</filename> and <filename>PARALLEL_MAKE</filename>
|
||||
in the <filename>build/conf</filename> directory in the
|
||||
<filename>local.conf</filename> configuration file.
|
||||
By default, these variables are commented out.
|
||||
If your host development system supports multi-core and multi-thread capabilities,
|
||||
you can uncomment these statements and set the variables to significantly shorten
|
||||
the full build time.
|
||||
As a guideline, set both the <filename>BB_NUMBER_THREADS</filename> and the
|
||||
<filename>PARALLEL_MAKE</filename> variables to twice the number
|
||||
of cores your machine supports.
|
||||
</note>
|
||||
The following two commands <filename>source</filename> the build environment setup script
|
||||
and build the default <filename>qemux86</filename> image.
|
||||
If necessary, the script creates the build directory:
|
||||
<literallayout class='monospaced'>
|
||||
$ cd ~/poky
|
||||
$ source oe-init-build-env
|
||||
|
||||
### Shell environment set up for builds. ###
|
||||
|
||||
You can now run 'bitbake <target>'
|
||||
|
||||
Common targets are:
|
||||
core-image-minimal
|
||||
core-image-sato
|
||||
meta-toolchain
|
||||
meta-toolchain-sdk
|
||||
adt-installer
|
||||
meta-ide-support
|
||||
|
||||
You can also run generated qemu images with a command like 'runqemu qemux86'
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The following <filename>bitbake</filename> command starts the build:
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake -k core-image-minimal
|
||||
</literallayout>
|
||||
<note>Be sure to check the settings in the <filename>local.conf</filename>
|
||||
before starting the build.</note>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='examining-the-default-config-smp-behavior'>
|
||||
<title>Examining the Default <filename>CONFIG_SMP</filename> Behavior</title>
|
||||
|
||||
<para>
|
||||
By default, <filename>CONFIG_SMP</filename> supports multiple processor machines.
|
||||
To see this default setting from within the QEMU emulator, boot your image using
|
||||
the emulator as follows:
|
||||
<literallayout class='monospaced'>
|
||||
$ runqemu qemux86 qemuparams="-smp 4"
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Login to the machine using <filename>root</filename> with no password.
|
||||
After logging in, enter the following command to see how many processors are
|
||||
being supported in the emulator.
|
||||
The emulator reports support for the number of processors you specified using
|
||||
the <filename>-smp</filename> option, four in this case:
|
||||
<literallayout class='monospaced'>
|
||||
# cat /proc/cpuinfo | grep processor
|
||||
processor : 0
|
||||
processor : 1
|
||||
processor : 2
|
||||
processor : 3
|
||||
#
|
||||
</literallayout>
|
||||
To check the setting for <filename>CONFIG_SMP</filename>, you can use the
|
||||
following command:
|
||||
<literallayout class='monospaced'>
|
||||
zcat /proc/config.gz | grep CONFIG_SMP
|
||||
</literallayout>
|
||||
The console returns the following showing that multi-processor machine support
|
||||
is set:
|
||||
<literallayout class='monospaced'>
|
||||
CONFIG_SMP=y
|
||||
</literallayout>
|
||||
Logout of the emulator using the <filename>exit</filename> command and
|
||||
then close it down.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='changing-the-config-smp-configuration-using-menuconfig'>
|
||||
<title>Changing the <filename>CONFIG_SMP</filename> Configuration Using <filename>menuconfig</filename></title>
|
||||
|
||||
<para>
|
||||
The <filename>menuconfig</filename> tool provides an interactive method with which
|
||||
to set kernel configurations.
|
||||
You need to run <filename>menuconfig</filename> inside the Yocto BitBake environment.
|
||||
Thus, the environment must be set up using the <filename>oe-init-build-env</filename>
|
||||
script found in the build directory.
|
||||
If you have not sourced this script do so with the following commands:
|
||||
<literallayout class='monospaced'>
|
||||
$ cd ~/poky
|
||||
$ source oe-init-build-env
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
After setting up the environment to run <filename>menuconfig</filename>, you are ready
|
||||
to use the tool to interactively change the kernel configuration.
|
||||
In this example, we are basing our changes on the <filename>linux-yocto-3.2</filename>
|
||||
kernel.
|
||||
The OpenEmbedded build system recognizes this kernel as
|
||||
<filename>linux-yocto</filename>.
|
||||
Thus, the following commands from the shell in which you previously sourced the
|
||||
environment initialization script cleans the shared state cache and the
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>
|
||||
directory and then builds and launches <filename>menuconfig</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake linux-yocto -c menuconfig
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Once <filename>menuconfig</filename> launches, navigate through the user interface
|
||||
to find the <filename>CONFIG_SMP</filename> configuration setting.
|
||||
You can find it at <filename>Processor Type and Features</filename>.
|
||||
The configuration selection is
|
||||
<filename>Symmetric Multi-processing Support</filename>.
|
||||
After using the arrow keys to highlight this selection, press "n" to turn it off.
|
||||
Then, exit out and save your selections.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Once you save the selection, the <filename>.config</filename> configuration file
|
||||
is updated.
|
||||
This is the file that the build system uses to configure the Yocto Project kernel
|
||||
when it is built.
|
||||
You can find and examine this file in the build directory.
|
||||
This example uses the following:
|
||||
<literallayout class='monospaced'>
|
||||
~/poky/build/tmp/work/qemux86-poky-linux/linux-yocto-3.2.11+git1+84f...
|
||||
...656ed30-r1/linux-qemux86-standard-build
|
||||
</literallayout>
|
||||
<note>
|
||||
The previous example directory is artificially split and many of the characters
|
||||
in the actual filename are omitted in order to make it more readable.
|
||||
Also, depending on the kernel you are using, the exact pathname might differ
|
||||
slightly.
|
||||
</note>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Within the <filename>.config</filename> file, you can see the following setting:
|
||||
<literallayout class='monospaced'>
|
||||
# CONFIG_SMP is not set
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A good method to isolate changed configurations is to use a combination of the
|
||||
<filename>menuconfig</filename> tool and simple shell commands.
|
||||
Before changing configurations with <filename>menuconfig</filename>, copy the
|
||||
existing <filename>.config</filename> and rename it to something else,
|
||||
use <filename>menuconfig</filename> to make
|
||||
as many changes an you want and save them, then compare the renamed configuration
|
||||
file against the newly created file.
|
||||
You can use the resulting differences as your base to create configuration fragments
|
||||
to permanently save in your kernel layer.
|
||||
<note>
|
||||
Be sure to make a copy of the <filename>.config</filename> and don't just
|
||||
rename it.
|
||||
The build system needs an existing <filename>.config</filename>
|
||||
from which to work.
|
||||
</note>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='recompiling-the-kernel-and-testing-the-new-configuration'>
|
||||
<title>Recompiling the Kernel and Testing the New Configuration</title>
|
||||
|
||||
<para>
|
||||
At this point, you are ready to recompile your kernel image with
|
||||
the new setting in effect using the BitBake command below:
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake linux-yocto
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Now run the QEMU emulator and pass it the same multi-processor option as before:
|
||||
<literallayout class='monospaced'>
|
||||
$ runqemu qemux86 qemuparams="-smp 4"
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Login to the machine using <filename>root</filename> with no password
|
||||
and test for the number of processors the kernel supports:
|
||||
<literallayout class='monospaced'>
|
||||
# cat /proc/cpuinfo | grep processor
|
||||
processor : 0
|
||||
#
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
From the output, you can see that the kernel no longer supports multi-processor systems.
|
||||
The output indicates support for a single processor. You can verify the
|
||||
<filename>CONFIG_SMP</filename> setting by using this command:
|
||||
<literallayout class='monospaced'>
|
||||
zcat /proc/config.gz | grep CONFIG_SMP
|
||||
</literallayout>
|
||||
The console returns the following output:
|
||||
<literallayout class='monospaced'>
|
||||
# CONFIG_SMP is not set
|
||||
</literallayout>
|
||||
You have successfully reconfigured the kernel.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id='adding-kernel-recipes'>
|
||||
<title>Adding Kernel Recipes</title>
|
||||
|
||||
<para>
|
||||
A future release of this manual will present an example that adds kernel recipes, which provide
|
||||
new functionality to the kernel.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<imagedata fileref="figures/wip.png"
|
||||
width="2in" depth="3in" align="center" scalefit="1" />
|
||||
</para>
|
||||
</section>
|
||||
</appendix>
|
||||
|
||||
<!--
|
||||
@@ -8,23 +8,26 @@
|
||||
|
||||
<para>
|
||||
Many development models exist for which you can use the Yocto Project.
|
||||
This chapter overviews the following methods:
|
||||
This chapter overviews simple methods that use tools provided by the
|
||||
Yocto Project:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>System Development:</emphasis>
|
||||
System Development covers Board Support Package (BSP) development and kernel
|
||||
modification or configuration.
|
||||
If you want to examine specific examples of the system development models,
|
||||
see the "<link linkend='dev-manual-bsp-appendix'>BSP Development Example</link>"
|
||||
appendix and the
|
||||
"<link linkend='dev-manual-kernel-appendix'>Kernel Modification Example</link>" appendix.
|
||||
For an example on how to create a BSP, see the
|
||||
"<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
|
||||
section in the Yocto Project Board Support Package (BSP) Developer's Guide.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>User Application Development:</emphasis>
|
||||
User Application Development covers development of applications that you intend
|
||||
to run on some target hardware.
|
||||
For a user-space application development example that uses the
|
||||
<trademark class='trade'>Eclipse</trademark> IDE,
|
||||
see the
|
||||
For information on how to set up your host development system for user-space
|
||||
application development, see the
|
||||
<ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project Application Developer's Guide</ulink>.
|
||||
For a simple example of user-space application development using the
|
||||
<trademark class='trade'>Eclipse</trademark> IDE, see the
|
||||
"<link linkend='application-development-workflow'>Application
|
||||
Development Workflow</link>" section.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>Temporary Source Code Modification:</emphasis>
|
||||
Direct modification of temporary source code is a convenient development model
|
||||
@@ -51,7 +54,7 @@
|
||||
a specific hardware target.
|
||||
Usually, when you want to create an image that runs on embedded hardware, the image does
|
||||
not require the same number of features that a full-fledged Linux distribution provides.
|
||||
Thus, you can create a much smaller image that is designed to use only the hardware
|
||||
Thus, you can create a much smaller image that is designed to use only the
|
||||
features for your particular hardware.
|
||||
</para>
|
||||
|
||||
@@ -65,9 +68,9 @@
|
||||
<title>Developing a Board Support Package (BSP)</title>
|
||||
|
||||
<para>
|
||||
A BSP is a packageof recipes that, when applied, during a build results in
|
||||
A BSP is a package of recipes that, when applied during a build, results in
|
||||
an image that you can run on a particular board.
|
||||
Thus, the package, when compiled into the new image, supports the operation of the board.
|
||||
Thus, the package when compiled into the new image, supports the operation of the board.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
@@ -77,9 +80,11 @@
|
||||
|
||||
<para>
|
||||
The remainder of this section presents the basic steps used to create a BSP
|
||||
based on an existing BSP that ships with the Yocto Project.
|
||||
You can reference the "<link linkend='dev-manual-bsp-appendix'>BSP Development Example</link>"
|
||||
appendix for a detailed example that uses the Crown Bay BSP as a base BSP from which to start.
|
||||
using the Yocto Project's
|
||||
<ulink url='&YOCTO_DOCS_BSP_URL;#using-the-yocto-projects-bsp-tools'>BSP Tools</ulink>.
|
||||
For an example that shows how to create a new layer using the tools, see the
|
||||
"<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
|
||||
section in the Yocto Project Board Support Package (BSP) Developer's Guide.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -99,43 +104,30 @@
|
||||
"<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Packages</ulink>" sections both
|
||||
in the Yocto Project Quick Start for requirements.</para></listitem>
|
||||
<listitem><para><emphasis>Establish a local copy of the project files on your
|
||||
system</emphasis>: You need this <link linkend='source-directory'>source
|
||||
directory</link> available on your host system.
|
||||
system</emphasis>: You need this <link linkend='source-directory'>Source
|
||||
Directory</link> available on your host system.
|
||||
Having these files on your system gives you access to the build
|
||||
process and to the tools you need.
|
||||
For information on how to set up the source directory, see the
|
||||
For information on how to set up the
|
||||
<link linkend='source-directory'>Source Directory</link>, see the
|
||||
"<link linkend='getting-setup'>Getting Setup</link>" section.</para></listitem>
|
||||
<listitem><para><emphasis>Establish a local copy of the base BSP files</emphasis>: Having
|
||||
the BSP files on your system gives you access to the build
|
||||
<listitem><para><emphasis>Establish the <filename>meta-intel</filename>
|
||||
repository on your system</emphasis>: Having local copies of the
|
||||
supported BSP layers on your system gives you access to the build
|
||||
process and to the tools you need for creating a BSP.
|
||||
For information on how to get these files, see the
|
||||
"<link linkend='getting-setup'>Getting Setup</link>" section.</para></listitem>
|
||||
<listitem><para><emphasis>Choose a BSP that is supported by the Yocto Project
|
||||
as your base BSP</emphasis>:
|
||||
The Yocto Project ships with several BSPs that support various hardware.
|
||||
It is best to base your new BSP on an existing BSP rather than create all the
|
||||
recipes and configuration files from scratch.
|
||||
While it is possible to create everything from scratch, basing your new BSP
|
||||
on something that is close is much easier.
|
||||
Or, at a minimum, leveraging off an existing BSP
|
||||
gives you some structure with which to start.</para>
|
||||
<para>At this point you need to understand your target hardware well enough to determine which
|
||||
existing BSP it most closely matches.
|
||||
Things to consider are your hardware’s on-board features, such as CPU type and graphics support.
|
||||
You should look at the README files for supported BSPs to get an idea of which one
|
||||
you could use.
|
||||
A generic <trademark class='registered'>Intel</trademark>
|
||||
<trademark class='trade'>Atom</trademark>-based BSP to consider is the
|
||||
Crown Bay that does not support the <trademark class='registered'>Intel</trademark>
|
||||
Embedded Media Graphics Driver (EMGD).
|
||||
The remainder of this example uses that base BSP.</para>
|
||||
<para>To see the supported BSPs, go to the
|
||||
<ulink url='&YOCTO_HOME_URL;/download'>Download</ulink> page on the Yocto Project
|
||||
website and click on “BSP Downloads.”</para></listitem>
|
||||
<listitem><para><emphasis>Create your own BSP layer</emphasis>: Layers are ideal for
|
||||
<listitem><para><emphasis>Create your own BSP layer using the
|
||||
<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'><filename>yocto-bsp</filename></ulink> script</emphasis>:
|
||||
Layers are ideal for
|
||||
isolating and storing work for a given piece of hardware.
|
||||
A layer is really just a location or area in which you place the recipes for your BSP.
|
||||
In fact, a BSP is, in itself, a special type of layer.
|
||||
In fact, a BSP is, in itself, a special type of layer.
|
||||
The simplest way to create a new BSP layer that is compliant with the
|
||||
Yocto Project is to use the <filename>yocto-bsp</filename> script.
|
||||
For information about that script, see the
|
||||
"<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
|
||||
section in the Yocto Project Board Support (BSP) Developer's Guide.
|
||||
</para>
|
||||
<para>
|
||||
Another example that illustrates a layer is an application.
|
||||
@@ -156,36 +148,45 @@
|
||||
Yocto Project release: <filename>atom-pc</filename>, <filename>beagleboard</filename>,
|
||||
<filename>mpc8315e</filename>, and <filename>routerstationpro</filename>.
|
||||
The recipes and configurations for these four BSPs are located and dispersed
|
||||
within the <link linkend='source-directory'>source directory</link>.
|
||||
On the other hand, BSP layers for Crown Bay, Emenlow, Jasper Forest,
|
||||
N450, Cedar Trail, Fish River, Fish River Island II, Romley, sys940x, tlk,
|
||||
and Sugar Bay exist in their own separate layers within the larger
|
||||
<filename>meta-intel</filename> layer.</note>
|
||||
within the <link linkend='source-directory'>Source Directory</link>.
|
||||
On the other hand, BSP layers for Cedar Trail, Chief River, Crown Bay,
|
||||
Crystal Forest, Emenlow, Fish River, Fish River 2, Jasper Forest, N450,
|
||||
Romley, sys940x, Sugar Bay, and tlk exist in their own separate layers
|
||||
within the larger <filename>meta-intel</filename> layer.</note>
|
||||
<para>When you set up a layer for a new BSP, you should follow a standard layout.
|
||||
This layout is described in the section
|
||||
"<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout'>Example Filesystem Layout</ulink>"
|
||||
section of the Board Support Package (BSP) Development Guide.
|
||||
In the standard layout, you will notice a suggested structure for recipes and
|
||||
configuration information.
|
||||
You can see the standard layout for the Crown Bay BSP in this example by examining the
|
||||
directory structure of the <filename>meta-crownbay</filename> layer inside the
|
||||
source directory.</para></listitem>
|
||||
You can see the standard layout for a BSP by examining
|
||||
any supported BSP found in the <filename>meta-intel</filename> layer inside
|
||||
the Source Directory.</para></listitem>
|
||||
<listitem><para><emphasis>Make configuration changes to your new BSP
|
||||
layer</emphasis>: The standard BSP layer structure organizes the files you need
|
||||
to edit in <filename>conf</filename> and several <filename>recipes-*</filename>
|
||||
directories within the BSP layer.
|
||||
Configuration changes identify where your new layer is on the local system
|
||||
and identify which kernel you are going to use.
|
||||
When you run the <filename>yocto-bsp</filename> script you are able to interactively
|
||||
configure many things for the BSP (e.g. keyboard, touchscreen, and so forth).
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>Make recipe changes to your new BSP layer</emphasis>: Recipe
|
||||
changes include altering recipes (<filename>.bb</filename> files), removing
|
||||
recipes you don't use, and adding new recipes that you need to support your hardware.
|
||||
recipes you don't use, and adding new recipes or append files
|
||||
(<filename>.bbappend</filename>) that you need to support your hardware.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>Prepare for the build</emphasis>: Once you have made all the
|
||||
changes to your BSP layer, there remains a few things
|
||||
you need to do for the OpenEmbedded build system in order for it to create your image.
|
||||
You need to get the build environment ready by sourcing an environment setup script
|
||||
and you need to be sure two key configuration files are configured appropriately.</para>
|
||||
and you need to be sure two key configuration files are configured appropriately:
|
||||
the <filename>conf/local.conf</filename> and the
|
||||
<filename>conf/bblayers.conf</filename> file.
|
||||
You must make the OpenEmbedded build system aware of your new layer.
|
||||
See the
|
||||
"<link linkend='enabling-your-layer'>Enabling Your Layer</link>" section
|
||||
for information on how to let the build system know about your new layer.</para>
|
||||
<para>The entire process for building an image is overviewed in the section
|
||||
"<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>" section
|
||||
of the Yocto Project Quick Start.
|
||||
@@ -231,9 +232,11 @@
|
||||
kernel architecture and the steps to modify the kernel.
|
||||
For a complete discussion of the kernel, see the
|
||||
<ulink url='&YOCTO_DOCS_KERNEL_URL;'>Yocto Project Kernel Architecture and Use Manual</ulink>.
|
||||
You can reference the appendix
|
||||
"<link linkend='dev-manual-kernel-appendix'>Kernel Modification Example</link>"
|
||||
for a detailed example that changes the configuration of a kernel.
|
||||
You can reference the
|
||||
"<link linkend='patching-the-kernel'>Patching the Kernel</link>" section
|
||||
for an example that changes the source code of the kernel.
|
||||
For information on how to configure the kernel, see the
|
||||
"<link linkend='configuring-the-kernel'>Configuring the Kernel</link> section.
|
||||
</para>
|
||||
|
||||
<section id='kernel-overview'>
|
||||
@@ -267,6 +270,9 @@
|
||||
<listitem><para><emphasis><filename>linux-yocto-3.2</filename></emphasis> - The
|
||||
stable Yocto Project kernel to use with the Yocto Project Release 1.2. This kernel
|
||||
is based on the Linux 3.2 released kernel.</para></listitem>
|
||||
<listitem><para><emphasis><filename>linux-yocto-3.4</filename></emphasis> - The
|
||||
stable Yocto Project kernel to use with the Yocto Project Release 1.3. This kernel
|
||||
is based on the Linux 3.4 released kernel.</para></listitem>
|
||||
<listitem><para><emphasis><filename>linux-yocto-dev</filename></emphasis> - A development
|
||||
kernel based on the latest upstream release candidate available.</para></listitem>
|
||||
</itemizedlist>
|
||||
@@ -317,8 +323,8 @@
|
||||
</note>
|
||||
|
||||
<para>
|
||||
Storage of all the available kernel source code is one thing, while representing the
|
||||
code on your host development system is another.
|
||||
Upstream storage of all the available kernel source code is one thing, while
|
||||
representing and using the code on your host development system is another.
|
||||
Conceptually, you can think of the kernel source repositories as all the
|
||||
source files necessary for all the supported kernels.
|
||||
As a developer, you are just interested in the source files for the kernel on
|
||||
@@ -327,43 +333,19 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You make kernel source code available on your host development system by using
|
||||
Git to create a bare clone of the Yocto Project kernel Git repository
|
||||
in which you are interested.
|
||||
Then, you use Git again to clone a copy of that bare clone.
|
||||
This copy represents the directory structure on your host system that is particular
|
||||
to the kernel you want.
|
||||
These are the files you actually modify to change the kernel.
|
||||
See the <link linkend='local-kernel-files'>Yocto Project Kernel</link> item earlier
|
||||
in this manual for an example of how to set up the kernel source directory
|
||||
structure on your host system.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This next figure illustrates how the kernel source files might be arranged on
|
||||
your host system.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<imagedata fileref="figures/kernel-overview-3-denzil.png"
|
||||
width="6in" depth="4in" align="center" scale="100" />
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In the previous figure, the file structure on the left represents the bare clone
|
||||
set up to track the Yocto Project kernel Git repository.
|
||||
The structure on the right represents the copy of the bare clone.
|
||||
When you make modifcations to the kernel source code, this is the area in which
|
||||
you work.
|
||||
Once you make corrections, you must use Git to push the committed changes to the
|
||||
bare clone.
|
||||
The example in <xref linkend='modifying-the-kernel-source-code'>
|
||||
Modifying the Kernel Source Code</xref> provides a detailed example.
|
||||
Kernel source code is available on your host system a couple of different
|
||||
ways.
|
||||
If you are working in the kernel all the time, you probably would want
|
||||
to set up your own local Git repository of the kernel tree.
|
||||
If you just need to make some patches to the kernel, you can get at
|
||||
temporary kernel source files extracted and used during the OpenEmbedded
|
||||
build system.
|
||||
We will just talk about working with the temporary source code.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
What happens during the build?
|
||||
When you build the kernel on your development system all files needed for the build
|
||||
When you build the kernel on your development system, all files needed for the build
|
||||
are taken from the source repositories pointed to by the
|
||||
<filename>SRC_URI</filename> variable and gathered in a temporary work area
|
||||
where they are subsequently used to create the unique kernel.
|
||||
@@ -372,11 +354,13 @@
|
||||
</para>
|
||||
The following figure shows the temporary file structure
|
||||
created on your host system when the build occurs.
|
||||
This build directory contains all the source files used during the build.
|
||||
This
|
||||
<link linkend='build-directory'>Build Directory</link> contains all the
|
||||
source files used during the build.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<imagedata fileref="figures/kernel-overview-2.png"
|
||||
<imagedata fileref="figures/kernel-overview-2-generic.png"
|
||||
width="6in" depth="5in" align="center" scale="100" />
|
||||
</para>
|
||||
|
||||
@@ -385,7 +369,7 @@
|
||||
branching strategy, see the
|
||||
<ulink url='&YOCTO_DOCS_KERNEL_URL;'>Yocto Project Kernel Architecture and Use Manual</ulink>.
|
||||
You can also reference the
|
||||
"<link linkend='modifying-the-kernel-source-code'>Modifying the Kernel Source Code</link>"
|
||||
"<link linkend='patching-the-kernel'>Patching the Kernel</link>"
|
||||
section for a detailed example that modifies the kernel.
|
||||
</para>
|
||||
</section>
|
||||
@@ -399,7 +383,7 @@
|
||||
|
||||
<para>
|
||||
<imagedata fileref="figures/kernel-dev-flow.png"
|
||||
width="6in" depth="7.5in" align="center" scalefit="1" />
|
||||
width="6in" depth="5in" align="center" scalefit="1" />
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -416,43 +400,39 @@
|
||||
For information on how to get these files, see the bulleted item
|
||||
"<link linkend='local-yp-release'>Yocto Project Release</link>" earlier in this manual.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>Set up a local copy of the <filename>poky-extras</filename> Git
|
||||
repository</emphasis>: This local repository is the area for your configuration
|
||||
fragments, new kernel recipes, and the kernel <filename>.bbappend</filename>
|
||||
file used during the build.
|
||||
It is good practice to set this repository up inside your local
|
||||
source directory.
|
||||
For information on how to get these files, see the bulleted item
|
||||
"<link linkend='poky-extras-repo'>The <filename>poky-extras</filename> Git Repository</link>"
|
||||
earlier in this manual.
|
||||
<note>While it is certainly possible to modify the kernel without involving
|
||||
a local Git repository, the suggested workflow for kernel modification
|
||||
using the Yocto Project does use a Git repository.</note></para></listitem>
|
||||
<listitem><para><emphasis>Establish a local copy of the Yocto Project kernel files on your
|
||||
system</emphasis>: In order to make modifications to the kernel you need two things:
|
||||
a bare clone of the Yocto Project kernel you are modifying and
|
||||
a copy of that bare clone.
|
||||
The bare clone is required by the build process and is the area to which you
|
||||
push your kernel source changes (pulling does not work with bare clones).
|
||||
The copy of the bare clone is a local Git repository that contains all the kernel's
|
||||
source files.
|
||||
You make your changes to the files in this copy of the bare clone.
|
||||
For information on how to set these two items up, see the bulleted item
|
||||
"<link linkend='local-kernel-files'>Yocto Project Kernel</link>"
|
||||
earlier in this manual.</para></listitem>
|
||||
<listitem><para><emphasis>Establish the temporary kernel source files</emphasis>:
|
||||
Temporary kernel source files are kept in the Build Directory created by the
|
||||
OpenEmbedded build system when you run BitBake.
|
||||
If you have never built the kernel you are interested in, you need to run
|
||||
an initial build to establish local kernel source files.</para>
|
||||
<para>If you are building an image for the first time, you need to get the build
|
||||
environment ready by sourcing
|
||||
the environment setup script.
|
||||
You also need to be sure two key configuration files
|
||||
(<filename>local.conf</filename> and <filename>bblayers.conf</filename>)
|
||||
are configured appropriately.</para>
|
||||
<para>The entire process for building an image is overviewed in the
|
||||
"<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
|
||||
section of the Yocto Project Quick Start.
|
||||
You might want to reference this information.
|
||||
You can find more information on BitBake in the user manual, which is found in the
|
||||
<filename>bitbake/doc/manual</filename> directory of the
|
||||
<link linkend='source-directory'>Source Directory</link>.</para>
|
||||
<para>The build process supports several types of images to satisfy different needs.
|
||||
See the "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" chapter in
|
||||
the Yocto Project Reference Manual for information on supported images.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>Make changes to the kernel source code if
|
||||
applicable</emphasis>: Modifying the kernel does not always mean directly
|
||||
changing source files.
|
||||
However, if you have to do this, you make the changes in the local
|
||||
Git repository you set up to hold the source files (i.e. the copy of the
|
||||
bare clone).
|
||||
Once the changes are made, you need to use Git commands to commit the changes
|
||||
and then push them to the bare clone.</para></listitem>
|
||||
However, if you have to do this, you make the changes to the files in the
|
||||
Build directory.</para></listitem>
|
||||
<listitem><para><emphasis>Make kernel configuration changes
|
||||
if applicable</emphasis>:
|
||||
If your situation calls for changing the kernel's configuration, you can
|
||||
use <filename>menuconfig</filename>
|
||||
use the <filename>yocto-kernel</filename> script or <filename>menuconfig</filename>
|
||||
to enable and disable kernel configurations.
|
||||
Using the script lets you interactively set up kernel configurations.
|
||||
Using <filename>menuconfig</filename> allows you to interactively develop and test the
|
||||
configuration changes you are making to the kernel.
|
||||
When saved, changes using <filename>menuconfig</filename> update the kernel's
|
||||
@@ -468,52 +448,8 @@
|
||||
<filename>.config</filename> file against a saved original and gather those
|
||||
changes into a config fragment to be referenced from within the kernel's
|
||||
<filename>.bbappend</filename> file.</para></listitem>
|
||||
<listitem><para><emphasis>Add or extend kernel recipes if applicable</emphasis>:
|
||||
The standard
|
||||
layer structure organizes recipe files inside the
|
||||
<filename>meta-kernel-dev</filename> layer that is within the local
|
||||
<filename>poky-extras</filename> Git repository.
|
||||
If you need to add new kernel recipes, you add them within this layer.
|
||||
Also within this area, you will find the <filename>.bbappend</filename>
|
||||
file that appends information to the kernel's recipe file used during the
|
||||
build.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>Prepare for the build</emphasis>: Once you have made all the
|
||||
changes to your kernel (configurations, source code changes, recipe additions,
|
||||
or recipe changes), there remains a few things
|
||||
you need to do in order for the build system to create your image.
|
||||
If you have not done so, you need to get the build environment ready by sourcing
|
||||
the environment setup script described earlier.
|
||||
You also need to be sure two key configuration files
|
||||
(<filename>local.conf</filename> and <filename>bblayers.conf</filename>)
|
||||
are configured appropriately.</para>
|
||||
<para>The entire process for building an image is overviewed in the
|
||||
"<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
|
||||
section of the Yocto Project Quick Start.
|
||||
You might want to reference this information.
|
||||
Also, you should look at the detailed examples found in the appendices at
|
||||
at the end of this manual.</para></listitem>
|
||||
<listitem><para><emphasis>Build the image</emphasis>: The OpenEmbedded
|
||||
build system uses the BitBake
|
||||
tool to build images based on the type of image you want to create.
|
||||
You can find more information on BitBake in the user manual, which is found in the
|
||||
<filename>bitbake/doc/manual</filename> directory of the
|
||||
<link linkend='source-directory'>Source Directory</link>.</para>
|
||||
<para>The build process supports several types of images to satisfy different needs.
|
||||
See the "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" chapter in
|
||||
the Yocto Project Reference Manual for information on supported images.</para></listitem>
|
||||
<listitem><para><emphasis>Make your configuration changes available
|
||||
in the kernel layer</emphasis>: Up to this point, all the configuration changes to the
|
||||
kernel have been done and tested iteratively.
|
||||
Once they are tested and ready to go, you can move them into the kernel layer,
|
||||
which allows you to distribute the layer.</para></listitem>
|
||||
<listitem><para><emphasis>If applicable, share your in-tree changes</emphasis>:
|
||||
If the changes you made
|
||||
are suited for all Yocto Project kernel users, you might want to send them on
|
||||
for inclusion into the upstream kernel's Git repository.
|
||||
If the changes are accepted, the Yocto Project Maintainer pulls them into
|
||||
the master branch of the kernel tree.
|
||||
Doing so makes them available to everyone using the kernel.</para></listitem>
|
||||
<listitem><para><emphasis>Rebuild the kernel image with your changes</emphasis>:
|
||||
Rebuilding the kernel image applies your changes.</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</section>
|
||||
@@ -532,7 +468,8 @@
|
||||
facilitate quick development and integration of your application into its run-time environment.
|
||||
Using the ADT and toolchains, you can compile and link your application.
|
||||
You can then deploy your application to the actual hardware or to the QEMU emulator for testing.
|
||||
If you are familiar with the popular Eclipse IDE, you can use an Eclipse Yocto Plug-in to
|
||||
If you are familiar with the popular <trademark class='trade'>Eclipse</trademark> IDE,
|
||||
you can use an Eclipse Yocto Plug-in to
|
||||
allow you to develop, deploy, and test your application all from within Eclipse.
|
||||
</para>
|
||||
|
||||
@@ -576,10 +513,9 @@
|
||||
(QEMU or real hardware), the area from which you get the image differs.
|
||||
<itemizedlist>
|
||||
<listitem><para>Download the image from
|
||||
<ulink url='&YOCTO_MACHINES_DL_URL;'>
|
||||
<filename>machines</filename></ulink> if your target architecture is supported
|
||||
and you are going to develop and test your application on actual hardware.
|
||||
</para></listitem>
|
||||
<ulink url='&YOCTO_MACHINES_DL_URL;'><filename>machines</filename></ulink>
|
||||
if your target architecture is supported and you are going to develop
|
||||
and test your application on actual hardware.</para></listitem>
|
||||
<listitem><para>Download the image from the
|
||||
<ulink url='&YOCTO_QEMU_DL_URL;'>
|
||||
<filename>machines/qemu</filename></ulink> if your target architecture is supported
|
||||
@@ -590,9 +526,8 @@
|
||||
If your target architecture is similar to a supported architecture, you can
|
||||
modify the kernel image before you build it.
|
||||
See the
|
||||
"<link linkend='kernel-modification-workflow'>Kernel Modification Workflow</link>"
|
||||
section earlier in this manual for information on how to create a modified
|
||||
Yocto Project kernel.</para></listitem>
|
||||
"<link linkend='patching-the-kernel'>Patching the Kernel</link>"
|
||||
section for an example.</para></listitem>
|
||||
</itemizedlist></para>
|
||||
<para>For information on pre-built kernel image naming schemes for images
|
||||
that can run on the QEMU emulator, see the
|
||||
@@ -608,14 +543,27 @@
|
||||
"<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Using the ADT Installer</ulink>"
|
||||
section
|
||||
in the Yocto Project Application Developer's Guide.</para></listitem>
|
||||
<listitem><para><emphasis>If Applicable, Secure the Target Root Filesystem</emphasis>:
|
||||
<listitem><para><emphasis>If Applicable, Secure the Target Root Filesystem
|
||||
and the Cross-development Toolchain</emphasis>:
|
||||
If you choose not to install the ADT using the ADT Installer,
|
||||
you need to find and download the
|
||||
appropriate root filesystems.
|
||||
You can find these tarballs in the same areas used for the kernel images.
|
||||
you need to find and download the appropriate root filesystem and
|
||||
the cross-development toolchain.</para>
|
||||
<para>You can find the tarballs for the root filesystem in the same area used
|
||||
for the kernel image.
|
||||
Depending on the type of image you are running, the root filesystem you need differs.
|
||||
For example, if you are developing an application that runs on an image that
|
||||
supports Sato, you need to get root filesystem that supports Sato.
|
||||
supports Sato, you need to get root filesystem that supports Sato.</para>
|
||||
<para>You can find the cross-development toolchains at
|
||||
<ulink url='&YOCTO_TOOLCHAIN_DL_URL;'><filename>toolchains</filename></ulink>.
|
||||
Be sure to get the correct toolchain for your development host and your
|
||||
target architecture.
|
||||
See the "<ulink url='&YOCTO_DOCS_ADT_URL;#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>"
|
||||
section in the Yocto Project Application Developer's Guide for information
|
||||
and the
|
||||
"<ulink url='&YOCTO_DOCS_QS_URL;#installing-the-toolchain'>Installing the Toolchain</ulink>"
|
||||
in the Yocto Project Quick Start for information on finding and installing
|
||||
the correct toolchain based on your host development system and your target
|
||||
architecture.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>Create and Build your Application</emphasis>:
|
||||
At this point, you need to have source files for your application.
|
||||
@@ -626,13 +574,13 @@
|
||||
<listitem><para><emphasis>Deploy the Image with the Application</emphasis>:
|
||||
If you are using the Eclipse IDE, you can deploy your image to the hardware or to
|
||||
QEMU through the project's preferences.
|
||||
If you are not using the Eclipse IDE, then you need to deploy the application using
|
||||
other methods to the hardware.
|
||||
If you are not using the Eclipse IDE, then you need to deploy the application
|
||||
to the hardware using other methods.
|
||||
Or, if you are using QEMU, you need to use that tool and load your image in for testing.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>Test and Debug the Application</emphasis>:
|
||||
Once your application is deployed, you need to test it.
|
||||
Within the Eclipse IDE, you can use the debubbing environment along with the
|
||||
Within the Eclipse IDE, you can use the debugging environment along with the
|
||||
set of user-space tools installed along with the ADT to debug your application.
|
||||
Of course, the same user-space tools are available separately if you choose
|
||||
not to use the Eclipse IDE.</para></listitem>
|
||||
@@ -714,9 +662,9 @@
|
||||
<para>
|
||||
Once you have downloaded the tarball, extract it into a clean
|
||||
directory.
|
||||
For example, the following commands unpack and install the Eclipse IDE
|
||||
tarball found in the <filename>Downloads</filename> area
|
||||
into a clean directory using the default name <filename>eclipse</filename>:
|
||||
For example, the following commands unpack and install the
|
||||
downloaded Eclipse IDE tarball into a clean directory
|
||||
using the default name <filename>eclipse</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
$ cd ~
|
||||
$ tar -xzvf ~/Downloads/eclipse-SDK-4.2-linux-gtk-x86_64.tar.gz
|
||||
@@ -859,7 +807,7 @@
|
||||
or build and install the plug-in from the latest source code.
|
||||
If you don't want to permanently install the plug-in but just want to try it out
|
||||
within the Eclipse environment, you can import the plug-in project from the
|
||||
Yocto Project source repositories.
|
||||
Yocto Project's Source Repositories.
|
||||
</para>
|
||||
|
||||
<section id='new-software'>
|
||||
@@ -901,9 +849,9 @@
|
||||
For this example, the repository is named
|
||||
<filename>~/yocto-eclipse</filename>.</para></listitem>
|
||||
<listitem><para>Be sure you are in the right branch for your Git repository.
|
||||
For this release set the branch to <filename>1.3_beta</filename>:
|
||||
For this release set the branch to <filename>&DISTRO_NAME;</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
$ git checkout -b 1.3_beta origin/1.3_beta
|
||||
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para>Locate the <filename>build.sh</filename> script in the
|
||||
Git repository you created in the previous step.
|
||||
@@ -917,19 +865,19 @@
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para>Be sure you have the right branch in the Poky Git repository
|
||||
checked out.
|
||||
For example, the following commands checkout the <filename>1.3_beta</filename>
|
||||
For example, the following commands checkout the <filename>&DISTRO_NAME;</filename>
|
||||
branch in the local Poky Git repository:
|
||||
<literallayout class='monospaced'>
|
||||
$ cd ~/poky
|
||||
$ git checkout -b 1.3_beta origin/1.3_beta
|
||||
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para>Move back to your Yocto Eclipse directory and
|
||||
run the <filename>build.sh</filename> script.
|
||||
Provide the name of the Git branch along with the Yocto Project release you are
|
||||
using.
|
||||
Here is an example that uses the <filename>1.3_beta</filename> branches:
|
||||
Here is an example that uses the <filename>&DISTRO_NAME;</filename> branches:
|
||||
<literallayout class='monospaced'>
|
||||
$ scripts/build.sh 1.3_beta 1.3_beta
|
||||
$ scripts/build.sh &DISTRO_NAME; &DISTRO_NAME;
|
||||
</literallayout>
|
||||
After running the script, the file
|
||||
<filename>org.yocto.sdk-<release>-<date>-archive.zip</filename>
|
||||
@@ -1198,7 +1146,7 @@ directory.</para></listitem>
|
||||
Dialog allows you to override those default settings
|
||||
for a given project.</para></listitem>
|
||||
<listitem><para>Make your configurations for the project and click "OK".
|
||||
If you are runing the Juno version of Eclipse, you can skip down to the next
|
||||
If you are running the Juno version of Eclipse, you can skip down to the next
|
||||
section where you build the project.
|
||||
If you are not working with Juno, you need to reconfigure the project as
|
||||
described in the next step.</para></listitem>
|
||||
@@ -1328,7 +1276,7 @@ directory.</para></listitem>
|
||||
to the local host machine, and uses the <filename>lttng</filename> Eclipse plug-in to
|
||||
graphically display the output.
|
||||
For information on how to use <filename>lttng</filename> to trace an application, see
|
||||
<ulink url='http://lttng.org/files/ust/manual/ust.html'></ulink>.</para>
|
||||
<ulink url='http://lttng.org/documentation'></ulink>.</para>
|
||||
<para>For <filename>Application</filename>, you must supply the absolute path name of the
|
||||
application to be traced by user mode <filename>lttng</filename>.
|
||||
For example, typing <filename>/path/to/foo</filename> triggers
|
||||
@@ -1341,8 +1289,8 @@ directory.</para></listitem>
|
||||
project.
|
||||
Do the following:
|
||||
<orderedlist>
|
||||
<listitem><para>Follow these
|
||||
<ulink url='http://wiki.eclipse.org/Linux_Tools_Project/LTTng#Downloading_and_installing_the_LTTng_parser_library'>instructions</ulink>
|
||||
<listitem><para>Follow the instructions from the
|
||||
<ulink url='http://wiki.eclipse.org/Linux_Tools_Project/LTTng2/User_Guide'>Linux Tools Projec/LTTng2/User Guide</ulink>
|
||||
to download and install the <filename>lttng</filename> parser library.
|
||||
</para></listitem>
|
||||
<listitem><para>Select <filename>Window -> Open Perspective -> Other</filename>
|
||||
@@ -1435,7 +1383,7 @@ directory.</para></listitem>
|
||||
to open a new recipe wizard.</para></listitem>
|
||||
<listitem><para>Point to your source by filling in the "SRC_URL" field.
|
||||
For example, you can add a recipe to your
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>source directory</ulink>
|
||||
<link linkend='source-directory'>Source Directory</link>
|
||||
by defining "SRC_URL" as follows:
|
||||
<literallayout class='monospaced'>
|
||||
ftp://ftp.gnu.org/gnu/m4/m4-1.4.9.tar.gz
|
||||
@@ -1547,7 +1495,7 @@ directory.</para></listitem>
|
||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'>S</ulink></filename> variable.
|
||||
Below is the default value for the <filename>S</filename> variable as defined in the
|
||||
<filename>meta/conf/bitbake.conf</filename> configuration file in the
|
||||
<link linkend='source-directory'>source directory</link>:
|
||||
<link linkend='source-directory'>Source Directory</link>:
|
||||
<literallayout class='monospaced'>
|
||||
S = ${WORKDIR}/${BP}
|
||||
</literallayout>
|
||||
@@ -1555,8 +1503,9 @@ directory.</para></listitem>
|
||||
For example, recipes that fetch their source from Git usually set
|
||||
<filename>S</filename> to <filename>${WORKDIR}/git</filename>.
|
||||
<note>
|
||||
<filename>BP</filename> represents the "Base Package", which is the base package
|
||||
name and the package version:
|
||||
The
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-BP'><filename>BP</filename></ulink>
|
||||
represents the base recipe name, which consists of the name and version:
|
||||
<literallayout class='monospaced'>
|
||||
BP = ${BPN}-${PV}
|
||||
</literallayout>
|
||||
@@ -1566,26 +1515,30 @@ directory.</para></listitem>
|
||||
<para>
|
||||
The path to the work directory for the recipe
|
||||
(<ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>) depends
|
||||
on the package name and the architecture of the target device.
|
||||
For example, here is the work directory for packages whose targets are not device-dependent:
|
||||
on the recipe name and the architecture of the target device.
|
||||
For example, here is the work directory for recipes and resulting packages that are
|
||||
not device-dependent:
|
||||
<literallayout class='monospaced'>
|
||||
${TMPDIR}/work/${PACKAGE_ARCH}-poky-${TARGET_OS}/${PN}-${PV}-${PR}
|
||||
</literallayout>
|
||||
Let's look at an example without variables.
|
||||
Assuming a top-level source directory named <filename>poky</filename>
|
||||
Assuming a top-level <link linkend='source-directory'>Source Directory</link>
|
||||
named <filename>poky</filename>
|
||||
and a default build directory of <filename>poky/build</filename>,
|
||||
the following is the work directory for the <filename>acl</filename> package:
|
||||
the following is the work directory for the <filename>acl</filename> recipe that
|
||||
creates the <filename>acl</filename> package:
|
||||
<literallayout class='monospaced'>
|
||||
~/poky/build/tmp/work/i586-poky-linux/acl-2.2.51-r3
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If your package is dependent on the target device, the work directory varies slightly:
|
||||
If your resulting package is dependent on the target device,
|
||||
the work directory varies slightly:
|
||||
<literallayout class='monospaced'>
|
||||
${TMPDIR}/work/${MACHINE}-poky-${TARGET_OS}/${PN}-${PV}-${PR}
|
||||
</literallayout>
|
||||
Again, assuming top-level source directory named <filename>poky</filename>
|
||||
Again, assuming top-level Source Directory named <filename>poky</filename>
|
||||
and a default build directory of <filename>poky/build</filename>, the
|
||||
following is the work directory for the <filename>acl</filename> package that is being
|
||||
built for a MIPS-based device:
|
||||
@@ -1610,9 +1563,9 @@ directory.</para></listitem>
|
||||
</note>
|
||||
|
||||
<para>
|
||||
Now that you know where to locate the directory that has the temporary source code, you can use a
|
||||
Quilt or Git workflow to make your edits, test the changes, and preserve the
|
||||
changes in the form of patches.
|
||||
Now that you know where to locate the directory that has the temporary source code,
|
||||
you can use a Quilt or Git workflow to make your edits, test the changes,
|
||||
and preserve the changes in the form of patches.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -1698,10 +1651,10 @@ directory.</para></listitem>
|
||||
<literallayout class='monospaced'>
|
||||
SRC_URI += "file://my_changes.patch"
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Increment the Package Revision Number:</emphasis>
|
||||
<listitem><para><emphasis>Increment the Recipe Revision Number:</emphasis>
|
||||
Finally, don't forget to 'bump' the
|
||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PR'>PR</ulink></filename>
|
||||
value in the same recipe since the resulting packages have changed.</para></listitem>
|
||||
value in the recipe since the resulting packages have changed.</para></listitem>
|
||||
</orderedlist>
|
||||
</para> </section>
|
||||
|
||||
@@ -1824,10 +1777,10 @@ directory.</para></listitem>
|
||||
<literallayout class='monospaced'>
|
||||
SRC_URI += "file://my_changes.patch"
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Increment the Package Revision Number:</emphasis>
|
||||
<listitem><para><emphasis>Increment the Recipe Revision Number:</emphasis>
|
||||
Finally, don't forget to 'bump' the
|
||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PR'>PR</ulink></filename>
|
||||
value in the same recipe since the resulting packages have changed.</para></listitem>
|
||||
value in the recipe since the resulting packages have changed.</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</section>
|
||||
@@ -1911,7 +1864,7 @@ directory.</para></listitem>
|
||||
or <filename>compile</filename> commands as if they were being run by
|
||||
the OpenEmbedded build system itself.
|
||||
As noted earlier, the working directory also automatically changes to the
|
||||
source directory (<ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>).
|
||||
Source Directory (<ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
||||
@@ -75,12 +75,12 @@
|
||||
Experience shows that buildbot is a good fit for this role.
|
||||
What works well is to configure buildbot to make two types of builds:
|
||||
incremental and full (from scratch).
|
||||
See <ulink url='http://autobuilder.yoctoproject.org:8010/'>the buildbot for the
|
||||
See <ulink url='http://autobuilder.yoctoproject.org:8010/'>Welcome to the buildbot for the
|
||||
Yocto Project</ulink> for an example implementation that uses buildbot.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can tie incremental builds to a commit hook that triggers the build
|
||||
You can tie an incremental build to a commit hook that triggers the build
|
||||
each time a commit is made to the metadata.
|
||||
This practice results in useful acid tests that determine whether a given commit
|
||||
breaks the build in some serious way.
|
||||
@@ -207,10 +207,9 @@
|
||||
<filename>formfactor_0.0.bb</filename> and <filename>formfactor_0.0.bbappend</filename>).
|
||||
</para>
|
||||
<para>Information in append files overrides the information in the similarly-named recipe file.
|
||||
For examples of <filename>.bbappend</filename> file in use, see the
|
||||
"<link linkend='using-bbappend-files'>Using .bbappend Files</link>" and
|
||||
"<link linkend='changing-recipes-kernel'>Changing <filename>recipes-kernel</filename></link>"
|
||||
sections.</para></listitem>
|
||||
For an example of an append file in use, see the
|
||||
"<link linkend='using-bbappend-files'>Using .bbappend Files</link>" section.
|
||||
</para></listitem>
|
||||
<listitem><para id='bitbake-term'><emphasis>BitBake:</emphasis>
|
||||
The task executor and scheduler used by
|
||||
the OpenEmbedded build system to build images.
|
||||
@@ -291,8 +290,8 @@
|
||||
Sometimes this toolchain is referred to as the meta-toolchain.</para></listitem>
|
||||
<listitem><para><emphasis>Image:</emphasis> An image is the result produced when
|
||||
BitBake processes a given collection of recipes and related metadata.
|
||||
Images are the binary output that run on specific hardware and for specific
|
||||
use cases.
|
||||
Images are the binary output that run on specific hardware or QEMU
|
||||
and for specific use cases.
|
||||
For a list of the supported image types that the Yocto Project provides, see the
|
||||
"<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
|
||||
chapter in the Yocto Project Reference Manual.</para></listitem>
|
||||
@@ -304,13 +303,27 @@
|
||||
<listitem><para id='metadata'><emphasis>Metadata:</emphasis> The files that BitBake parses when
|
||||
building an image.
|
||||
Metadata includes recipes, classes, and configuration files.</para></listitem>
|
||||
<listitem><para><emphasis>OE-Core:</emphasis> A core set of metadata originating
|
||||
<listitem><para id='oe-core'><emphasis>OE-Core:</emphasis> A core set of metadata originating
|
||||
with OpenEmbedded (OE) that is shared between OE and the Yocto Project.
|
||||
This metadata is found in the <filename>meta</filename> directory of the source
|
||||
directory.</para></listitem>
|
||||
<listitem><para><emphasis>Package:</emphasis> The packaged output from a baked recipe.
|
||||
<listitem><para><emphasis>Package:</emphasis> In the context of the Yocto Project,
|
||||
this term refers to the packaged output from a baked recipe.
|
||||
A package is generally the compiled binaries produced from the recipe's sources.
|
||||
You ‘bake’ something by running it through BitBake.</para></listitem>
|
||||
You ‘bake’ something by running it through BitBake.</para>
|
||||
<para>It is worth noting that the term "package" can, in general, have subtle
|
||||
meanings. For example, the packages refered to in the
|
||||
"<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Packages</ulink>" section are
|
||||
compiled binaries that when installed add functionality to your Linux
|
||||
distribution.</para>
|
||||
<para>Another point worth noting is that historically within the Yocto Project,
|
||||
recipes were referred to as packages - thus, the existence of several BitBake
|
||||
variables that are seemingly mis-named,
|
||||
(e.g. <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>,
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-PRINC'><filename>PRINC</filename></ulink>,
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>, and
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-PE'><filename>PE</filename></ulink>).
|
||||
</para></listitem>
|
||||
<listitem><para id='poky'><emphasis>Poky:</emphasis> The term "poky" can mean several things.
|
||||
In its most general sence, it is an open-source project that was initially developed
|
||||
by OpenedHand. With OpenedHand, poky was developed off of the existing OpenEmbedded
|
||||
@@ -331,7 +344,8 @@
|
||||
<para id='source-directory'><emphasis>Source Directory:</emphasis>
|
||||
This term refers to the directory structure created as a result of either downloading
|
||||
and unpacking a Yocto Project release tarball or creating a local copy of
|
||||
<filename>poky</filename> Git repository <filename>git://git.yoctoproject.org/poky</filename>.
|
||||
the <filename>poky</filename> Git repository
|
||||
<filename>git://git.yoctoproject.org/poky</filename>.
|
||||
Sometimes you might here the term "poky directory" used to refer to this
|
||||
directory structure.</para>
|
||||
|
||||
@@ -367,7 +381,7 @@
|
||||
<para>Finally, if you want to track a set of local changes while starting from the same point
|
||||
as a release tarball, you can create a local Git branch that
|
||||
reflects the exact copy of the files at the time of their release.
|
||||
You do this using Git tags that are part of the repository.</para>
|
||||
You do this by using Git tags that are part of the repository.</para>
|
||||
|
||||
<para>For more information on concepts around Git repositories, branches, and tags,
|
||||
see the
|
||||
@@ -418,8 +432,8 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When you build an image using Yocto Project, the build process uses a known list of licenses to
|
||||
ensure compliance.
|
||||
When you build an image using the Yocto Project, the build process uses a
|
||||
known list of licenses to ensure compliance.
|
||||
You can find this list in the Yocto Project files directory at
|
||||
<filename>meta/files/common-licenses</filename>.
|
||||
Once the build completes, the list of all licenses found and used during that build are
|
||||
@@ -515,10 +529,9 @@
|
||||
It is important to understand that Git tracks content change and not files.
|
||||
Git uses "branches" to organize different development efforts.
|
||||
For example, the <filename>poky</filename> repository has
|
||||
<filename>laverne</filename>, <filename>bernard</filename>,
|
||||
<filename>edison</filename>, <filename>denzil</filename> and
|
||||
<filename>master</filename> branches among
|
||||
others.
|
||||
<filename>bernard</filename>,
|
||||
<filename>edison</filename>, <filename>denzil</filename>, <filename>danny</filename>
|
||||
and <filename>master</filename> branches among others.
|
||||
You can see all the branches by going to
|
||||
<ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
|
||||
clicking on the
|
||||
@@ -563,9 +576,8 @@
|
||||
at the time you created your local branch, which could be
|
||||
different than the files at the time of a similarly named release.
|
||||
In other words, creating and checking out a local branch based on the
|
||||
<filename>&DISTRO_NAME;</filename> branch name is not the same as creating and
|
||||
checking out a local branch based on the <filename>&DISTRO_NAME;-&DISTRO;</filename>
|
||||
release.
|
||||
<filename>&DISTRO_NAME;</filename> branch name is not the same as
|
||||
cloning and checking out the <filename>master</filename> branch.
|
||||
Keep reading to see how you create a local snapshot of a Yocto Project Release.
|
||||
</para>
|
||||
|
||||
@@ -581,7 +593,7 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Some key tags are <filename>laverne-4.0</filename>, <filename>bernard-5.0</filename>,
|
||||
Some key tags are <filename>bernard-5.0</filename>, <filename>denzil-7.0</filename>,
|
||||
and <filename>&DISTRO_NAME;-&POKYVERSION;</filename>.
|
||||
These tags represent Yocto Project releases.
|
||||
</para>
|
||||
@@ -663,17 +675,18 @@
|
||||
a working branch on your local machine where you can isolate work.
|
||||
It is a good idea to use local branches when adding specific features or changes.
|
||||
This way if you don’t like what you have done you can easily get rid of the work.</para></listitem>
|
||||
<listitem><para><emphasis><filename>git branch</filename>:</emphasis> Reports existing branches and
|
||||
tells you which branch in which you are currently working.</para></listitem>
|
||||
<listitem><para><emphasis><filename>git branch</filename>:</emphasis> Reports
|
||||
existing local branches and
|
||||
tells you the branch in which you are currently working.</para></listitem>
|
||||
<listitem><para><emphasis><filename>git branch -D <branch-name></filename>:</emphasis>
|
||||
Deletes an existing branch.
|
||||
You need to be in a branch other than the one you are deleting
|
||||
in order to delete <branch-name>.</para></listitem>
|
||||
Deletes an existing local branch.
|
||||
You need to be in a local branch other than the one you are deleting
|
||||
in order to delete <filename><branch-name></filename>.</para></listitem>
|
||||
<listitem><para><emphasis><filename>git pull</filename>:</emphasis> Retrieves information
|
||||
from an upstream Git
|
||||
repository and places it in your local Git repository.
|
||||
You use this command to make sure you are synchronized with the repository
|
||||
from which you are basing changes (.e.g. the master repository).</para></listitem>
|
||||
from which you are basing changes (.e.g. the master branch).</para></listitem>
|
||||
<listitem><para><emphasis><filename>git push</filename>:</emphasis> Sends all your local changes you
|
||||
have committed to an upstream Git repository (e.g. a contribution repository).
|
||||
The maintainer of the project draws from these repositories when adding your changes to the
|
||||
@@ -755,6 +768,8 @@
|
||||
A somewhat formal method exists by which developers commit changes and push them into the
|
||||
"contrib" area and subsequently request that the maintainer include them into "master"
|
||||
This process is called “submitting a patch” or “submitting a change.”
|
||||
For information on submitting patches and changes, see the
|
||||
"<link linkend='how-to-submit-a-change'>How to Submit a Change</link>" section.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -817,13 +832,18 @@
|
||||
<filename>send-pull-request</filename> that ship with the release to facilitate this
|
||||
workflow.
|
||||
You can find these scripts in the local Yocto Project files Git repository in
|
||||
the <filename>scripts</filename> directory.</para></listitem>
|
||||
the <filename>scripts</filename> directory.</para>
|
||||
<para>You can find more information on these scripts in the
|
||||
"<link linkend='pushing-a-change-upstream'>Using
|
||||
Scripts to Push a Change Upstream and Request a Pull</link>" section.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>Patch Workflow:</emphasis> This workflow allows you to notify the
|
||||
maintainer through an email that you have a change (or patch) you would like considered
|
||||
for the "master" branch of the Git repository.
|
||||
To send this type of change you format the patch and then send the email using the Git commands
|
||||
<filename>git format-patch</filename> and <filename>git send-email</filename>.
|
||||
You can find information on how to submit later in this chapter.</para></listitem>
|
||||
You can find information on how to submit changes
|
||||
later in this chapter.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
@@ -855,8 +875,9 @@
|
||||
a bug.</para></listitem>
|
||||
<listitem><para>When submitting a new bug, be sure to choose the appropriate
|
||||
Classification, Product, and Component for which the issue was found.
|
||||
Defects for Yocto Project fall into one of four classifications: Yocto Projects,
|
||||
Infrastructure, Poky, and Yocto Metadata Layers.
|
||||
Defects for Yocto Project fall into one of six classifications: Yocto Project
|
||||
Components, Infrastructure, Build System & Metadata, Documentation,
|
||||
QA/Testing, and Runtime.
|
||||
Each of these Classifications break down into multiple Products and, in some
|
||||
cases, multiple Components.</para></listitem>
|
||||
<listitem><para>Use the bug form to choose the correct Hardware and Architecture
|
||||
@@ -905,7 +926,8 @@
|
||||
<ulink url='&OE_LISTS_URL;/listinfo/bitbake-devel'>bitbake-devel</ulink> mailing list.</para></listitem>
|
||||
<listitem><para>For changes to <filename>meta-yocto</filename>, send your patch to the
|
||||
<ulink url='&YOCTO_LISTS_URL;/listinfo/poky'>poky</ulink> mailing list.</para></listitem>
|
||||
<listitem><para>For changes to other layers hosted on yoctoproject.org (unless the
|
||||
<listitem><para>For changes to other layers hosted on
|
||||
<filename>yoctoproject.org</filename> (unless the
|
||||
layer's documentation specifies otherwise), tools, and Yocto Project
|
||||
documentation, use the
|
||||
<ulink url='&YOCTO_LISTS_URL;/listinfo/yocto'>yocto</ulink> mailing list.</para></listitem>
|
||||
@@ -969,7 +991,8 @@
|
||||
should almost always provide a more detailed description of what you did (i.e.
|
||||
the body of the commit message).
|
||||
The only exceptions for not providing a detailed description would be if your
|
||||
change is a simple, self-explanatory change that needs no description.
|
||||
change is a simple, self-explanatory change that needs no further description
|
||||
beyond the summary.
|
||||
Here are the guidelines for composing a commit message:
|
||||
<itemizedlist>
|
||||
<listitem><para>Provide a single-line, short summary of the change.
|
||||
@@ -1030,8 +1053,8 @@
|
||||
pull requests to the Yocto Project.
|
||||
These scripts are <filename>create-pull-request</filename> and
|
||||
<filename>send-pull-request</filename>.
|
||||
You can find these scripts in the <filename>scripts</filename> directory of the
|
||||
Yocto Project file structure.</para>
|
||||
You can find these scripts in the <filename>scripts</filename> directory
|
||||
within the <link linkend='source-directory'>Source Directory</link>.</para>
|
||||
<para>Using these scripts correctly formats the requests without introducing any
|
||||
whitespace or HTML formatting.
|
||||
The maintainer that receives your patches needs to be able to save and apply them
|
||||
|
||||
@@ -54,7 +54,11 @@
|
||||
Linux-based host system.
|
||||
You will have the best results with a recent release of Fedora,
|
||||
OpenSUSE, Ubuntu, or CentOS as these releases are frequently tested against the Yocto Project
|
||||
and officially supported.
|
||||
and officially supported.
|
||||
For a list of the distributions under validation and their status, see the
|
||||
<ulink url='&YOCTO_WIKI_URL;/wiki/Distribution_Support'>Distribution
|
||||
Support</ulink> wiki page.</para>
|
||||
<para>
|
||||
You should also have about 100 gigabytes of free disk space for building images.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>Packages:</emphasis> The OpenEmbedded build system
|
||||
@@ -119,7 +123,7 @@
|
||||
If you are going to be making modifications to a supported Yocto Project kernel, you
|
||||
need to establish local copies of the source.
|
||||
You can find Git repositories of supported Yocto Project Kernels organized under
|
||||
"Yocto Project Linux Kernel" in the Yocto Project Source Repositories at
|
||||
"Yocto Linux Kernel" in the Yocto Project Source Repositories at
|
||||
<ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.</para>
|
||||
<para>This setup involves creating a bare clone of the Yocto Project kernel and then
|
||||
copying that cloned repository.
|
||||
@@ -127,18 +131,18 @@
|
||||
For simplicity, it is recommended that you create these structures outside of the
|
||||
source directory (usually <filename>poky</filename>).</para>
|
||||
<para>As an example, the following transcript shows how to create the bare clone
|
||||
of the <filename>linux-yocto-3.2</filename> kernel and then create a copy of
|
||||
of the <filename>linux-yocto-3.4</filename> kernel and then create a copy of
|
||||
that clone.
|
||||
<note>When you have a local Yocto Project kernel Git repository, you can
|
||||
reference that repository rather than the upstream Git repository as
|
||||
part of the <filename>clone</filename> command.
|
||||
Doing so can speed up the process.</note></para>
|
||||
<para>In the following example, the bare clone is named
|
||||
<filename>linux-yocto-3.2.git</filename>, while the
|
||||
copy is named <filename>my-linux-yocto-3.2-work</filename>:
|
||||
<filename>linux-yocto-3.4.git</filename>, while the
|
||||
copy is named <filename>my-linux-yocto-3.4-work</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
$ git clone --bare git://git.yoctoproject.org/linux-yocto-3.2 linux-yocto-3.2.git
|
||||
Initialized empty Git repository in /home/scottrif/linux-yocto-3.2.git/
|
||||
$ git clone --bare git://git.yoctoproject.org/linux-yocto-3.4 linux-yocto-3.4.git
|
||||
Initialized empty Git repository in /home/scottrif/linux-yocto-3.4.git/
|
||||
remote: Counting objects: 2468027, done.
|
||||
remote: Compressing objects: 100% (392255/392255), done.
|
||||
remote: Total 2468027 (delta 2071693), reused 2448773 (delta 2052498)
|
||||
@@ -147,9 +151,9 @@
|
||||
</literallayout></para>
|
||||
<para>Now create a clone of the bare clone just created:
|
||||
<literallayout class='monospaced'>
|
||||
$ git clone linux-yocto-3.2.git my-linux-yocto-3.2-work
|
||||
Initialized empty Git repository in /home/scottrif/my-linux-yocto-3.2-work/.git/
|
||||
Checking out files: 100% (37619/37619), done.
|
||||
$ git clone linux-yocto-3.4.git my-linux-yocto-3.4-work
|
||||
Cloning into 'my-linux-yocto-3.4-work'...
|
||||
done.
|
||||
</literallayout></para></listitem>
|
||||
<listitem id='poky-extras-repo'><para><emphasis>
|
||||
The <filename>poky-extras</filename> Git Repository</emphasis>:
|
||||
@@ -169,6 +173,7 @@
|
||||
repository inside the source directory, which is named <filename>poky</filename>
|
||||
in this case:
|
||||
<literallayout class='monospaced'>
|
||||
$ cd ~/poky
|
||||
$ git clone git://git.yoctoproject.org/poky-extras poky-extras
|
||||
Initialized empty Git repository in /home/scottrif/poky/poky-extras/.git/
|
||||
remote: Counting objects: 618, done.
|
||||
@@ -193,7 +198,7 @@
|
||||
<literallayout class='monospaced'>
|
||||
meta-<BSP_name>
|
||||
</literallayout>
|
||||
where <BSP_name> is the recognized BSP name.
|
||||
where <filename><BSP_name></filename> is the recognized BSP name.
|
||||
Here are some examples:
|
||||
<literallayout class='monospaced'>
|
||||
meta-crownbay
|
||||
@@ -224,6 +229,7 @@
|
||||
<filename>meta-intel</filename>
|
||||
Git repository inside the local <filename>poky</filename> Git repository.
|
||||
<literallayout class='monospaced'>
|
||||
$ cd ~/poky
|
||||
$ git clone git://git.yoctoproject.org/meta-intel.git
|
||||
Initialized empty Git repository in /home/scottrif/poky/meta-intel/.git/
|
||||
remote: Counting objects: 3380, done.
|
||||
|
||||
@@ -76,13 +76,9 @@
|
||||
|
||||
<xi:include href="dev-manual-newbie.xml"/>
|
||||
|
||||
<xi:include href="dev-manual-common-tasks.xml"/>
|
||||
|
||||
<xi:include href="dev-manual-model.xml"/>
|
||||
|
||||
<xi:include href="dev-manual-bsp-appendix.xml"/>
|
||||
|
||||
<xi:include href="dev-manual-kernel-appendix.xml"/>
|
||||
<xi:include href="dev-manual-common-tasks.xml"/>
|
||||
|
||||
</book>
|
||||
<!--
|
||||
|
||||
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 34 KiB |
BIN
documentation/dev-manual/figures/kernel-overview-2-generic.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 41 KiB |
@@ -55,7 +55,7 @@
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#kernel-modification-workflow'>Kernel Modification Workflow</ulink>"
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-kernel-appendix'>Kernel Modification Example</ulink>"</para></listitem>
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#patching-the-kernel'>Patching the Kernel</ulink>"</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
|
||||
@@ -784,9 +784,9 @@
|
||||
This section overviews the process of creating a BSP based on an
|
||||
existing similar BSP.
|
||||
The information is introductory in nature and does not provide step-by-step examples.
|
||||
For detailed information on how to create a BSP given an existing similar BSP, see
|
||||
the "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-bsp-appendix'>BSP Development
|
||||
Example</ulink>" appendix in the Yocto Project Development Manual, or see the
|
||||
For detailed information on how to create a new BSP, see
|
||||
the "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>" section in the
|
||||
Yocto Project Board Support Package (BSP) Developer's Guide, or see the
|
||||
<ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another'>Transcript:_creating_one_generic_Atom_BSP_from_another</ulink>
|
||||
wiki page.
|
||||
</para>
|
||||
|
||||
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 34 KiB |
BIN
documentation/mega-manual/figures/kernel-overview-2-generic.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 41 KiB |
@@ -13,14 +13,16 @@
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
The term "Poky" is sometimes used to refer to the build system that the
|
||||
Yocto Project uses.
|
||||
The build system used in the Yocto project is referred to as the
|
||||
OpenEmbedded build system because "Poky" was derived from <ulink
|
||||
url='&OE_HOME_URL;'>OpenEmbedded</ulink>.
|
||||
Poky is a stable, smaller subset focused on the mobile environment.
|
||||
Development in the Yocto Project using Poky is closely tied to OpenEmbedded with
|
||||
features being merged regularly between the two for mutual benefit.
|
||||
The term "Poky" refers to the specific reference build system that
|
||||
the Yocto Project provides.
|
||||
Poky is based on <ulink url='&YOCTO_DOCS_DEV_URL;#oe-core'>OE-Core</ulink>
|
||||
and BitBake.
|
||||
Thus, the generic term used here for the build system is
|
||||
the "OpenEmbedded build system."
|
||||
Development in the Yocto Project using Poky is closely tied to OpenEmbedded, with
|
||||
changes always being merged to OE-Core or BitBake first before being pulled back
|
||||
into Poky.
|
||||
This practice benefits both projects immediately.
|
||||
For a fuller description of the term "Poky", see the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#poky'>poky</ulink> term in the Yocto Project
|
||||
Development Manual.
|
||||
@@ -63,7 +65,7 @@
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
How can you claim Poky is stable?
|
||||
How can you claim Poky / OpenEmbedded-Core is stable?
|
||||
</para>
|
||||
</question>
|
||||
<answer>
|
||||
@@ -71,11 +73,13 @@
|
||||
There are three areas that help with stability;
|
||||
<itemizedlist>
|
||||
<listitem><para>The Yocto Project team keeps
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink> small and focused.
|
||||
It contains around 650 packages as compared to over 5000 for full
|
||||
OpenEmbedded.</para></listitem>
|
||||
<listitem><para>The Yocto Project only supports hardware that the
|
||||
team has access to for testing.</para></listitem>
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#oe-core'>OE-Core</ulink> small
|
||||
and focused, containing around 830 recipes as opposed to the thousands
|
||||
available in other OpenEmbedded community layers.
|
||||
Keeping it small makes it easy to test and maintain.</para></listitem>
|
||||
<listitem><para>The Yocto Project team runs manual and automated tests
|
||||
using a small, fixed set of reference hardware as well as emulated
|
||||
targets.</para></listitem>
|
||||
<listitem><para>The Yocto Project uses an an autobuilder,
|
||||
which provides continuous build and integration tests.</para></listitem>
|
||||
</itemizedlist>
|
||||
@@ -91,13 +95,11 @@
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
There are two main ways to get a board supported in the Yocto Project;
|
||||
<itemizedlist>
|
||||
<listitem><para>Send the Yocto Project team information on the board
|
||||
and if the team does not have it yet they will consider adding it.</para></listitem>
|
||||
<listitem><para>Send the Yocto Project team the BitBake recipes if you have them.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
Support for an additional board is added by creating a BSP layer for it.
|
||||
For more information on how to create a BSP layer, see the
|
||||
<ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
|
||||
</para>
|
||||
<para>
|
||||
Usually, if the board is not completely exotic, adding support in
|
||||
the Yocto Project is fairly straightforward.
|
||||
</para>
|
||||
@@ -107,15 +109,15 @@
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
Are there any products using the OpenEmbedded build system (poky)?
|
||||
Are there any products built using the OpenEmbedded build system?
|
||||
</para>
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
The <ulink url='http://vernier.com/labquest/'>Vernier LabQuest</ulink> is using
|
||||
the OpenEmbedded build system.
|
||||
The software running on the <ulink url='http://vernier.com/labquest/'>Vernier LabQuest</ulink>
|
||||
is built using the OpenEmbedded build system.
|
||||
See the <ulink url='http://www.vernier.com/products/interfaces/labq/'>Vernier LabQuest</ulink>
|
||||
for more information.
|
||||
website for more information.
|
||||
There are a number of pre-production devices using the OpenEmbedded build system
|
||||
and the Yocto Project team
|
||||
announces them as soon as they are released.
|
||||
@@ -307,28 +309,6 @@
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
I'm using Ubuntu Intrepid and am seeing build failures. What’s wrong?
|
||||
</para>
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
In Intrepid, Ubuntu turns on by default the normally optional compile-time security features
|
||||
and warnings.
|
||||
There are more details at
|
||||
<ulink url='https://wiki.ubuntu.com/CompilerFlags'>https://wiki.ubuntu.com/CompilerFlags</ulink>.
|
||||
You can work around this problem by disabling those options by adding
|
||||
the following to the <filename>BUILD_CPPFLAGS</filename> variable in the
|
||||
<filename>conf/bitbake.conf</filename> file.
|
||||
<literallayout class='monospaced'>
|
||||
" -Wno-format-security -U_FORTIFY_SOURCE"
|
||||
</literallayout>
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -421,7 +401,7 @@
|
||||
For example, add the following files to your layer:
|
||||
<literallayout class='monospaced'>
|
||||
meta-MACHINE/recipes-bsp/netbase/netbase/MACHINE/interfaces
|
||||
meta-MACHINE/recipes-bsp/netbase/netbase_4.44.bbappend
|
||||
meta-MACHINE/recipes-bsp/netbase/netbase_5.0.bbappend
|
||||
</literallayout>
|
||||
</para>
|
||||
</answer>
|
||||
|
||||
@@ -87,10 +87,178 @@
|
||||
<section id='intro-requirements'>
|
||||
<title>System Requirements</title>
|
||||
<para>
|
||||
For Yocto Project system requirements, see the
|
||||
For general Yocto Project system requirements, see the
|
||||
<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>
|
||||
What You Need and How You Get It</ulink> section in the Yocto Project Quick Start.
|
||||
The remainder of this section provides details on system requirements
|
||||
not covered in the Yocto Project Quick Start.
|
||||
</para>
|
||||
|
||||
<section id='detailed-supported-distros'>
|
||||
<title>Supported Linux Distributions</title>
|
||||
|
||||
<para>
|
||||
TBD - a list of very specific distros and versions.
|
||||
The list will be kept up-to-date via a script provided that can
|
||||
be run prior to a release.
|
||||
The scripts output will yield the list and it can be copied
|
||||
into this section.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='required-packages-for-the-host-development-system'>
|
||||
<title>Required Packages for the Host Development System</title>
|
||||
|
||||
<para>
|
||||
The list of packages you need on the host development system can
|
||||
be large when covering all build scenarios using the Yocto Project.
|
||||
This section provides required packages by Linux distribution and
|
||||
further categorized by function.
|
||||
</para>
|
||||
|
||||
<section id='ubuntu-packages'>
|
||||
<title>Ubuntu</title>
|
||||
|
||||
<para>
|
||||
The following list shows the required packages by function
|
||||
given a supported Ubuntu Linux distribution:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Essentials:</emphasis>
|
||||
Packages needed to build an image on a headless
|
||||
system:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL;
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Graphical Extras:</emphasis>
|
||||
Packages recommended if the host system has graphics support:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo apt-get install libsdl1.2-dev xterm
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Documentation:</emphasis>
|
||||
Packages needed if you are going to build out the
|
||||
Yocto Project documentation manuals:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo apt-get install make xsltproc docbook-utils fop
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>ADT Installer Extras:</emphasis>
|
||||
Packages needed if you are going to be using the
|
||||
<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo apt-get install autoconf automake libtool libglib2.0-dev
|
||||
</literallayout></para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='fedora-packages'>
|
||||
<title>Fedora Packages</title>
|
||||
|
||||
<para>
|
||||
The following list shows the required packages by function
|
||||
given a supported Fedora Linux distribution:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Essentials:</emphasis>
|
||||
Packages needed to build an image for a headless
|
||||
system:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo yum install &FEDORA_HOST_PACKAGES_ESSENTIAL;
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Graphical Extras:</emphasis>
|
||||
Packages recommended if the host system has graphics support:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo yum install SDL-devel xterm
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Documentation:</emphasis>
|
||||
Packages needed if you are going to build out the
|
||||
Yocto Project documentation manuals:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo yum install make docbook-style-dsssl docbook-style-xsl \
|
||||
docbook-dtds docbook-utils fop libxslt
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>ADT Installer Extras:</emphasis>
|
||||
Packages needed if you are going to be using the
|
||||
<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo yum install autoconf automake libtool glib2-devel
|
||||
</literallayout></para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='opensuse-packages'>
|
||||
<title>OpenSUSE Packages</title>
|
||||
|
||||
<para>
|
||||
The following list shows the required packages by function
|
||||
given a supported OpenSUSE Linux distribution:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Essentials:</emphasis>
|
||||
Packages needed to build an image for a headless
|
||||
system:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Graphical Extras:</emphasis>
|
||||
Packages recommended if the host system has graphics support:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo zypper install libSDL-devel xterm
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Documentation:</emphasis>
|
||||
Packages needed if you are going to build out the
|
||||
Yocto Project documentation manuals:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo zypper install make fop xsltproc
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>ADT Installer Extras:</emphasis>
|
||||
Packages needed if you are going to be using the
|
||||
<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo zypper install autoconf automake libtool glib2-devel
|
||||
</literallayout></para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='centos-packages'>
|
||||
<title>CentOS Packages</title>
|
||||
|
||||
<para>
|
||||
The following list shows the required packages by function
|
||||
given a supported CentOS Linux distribution:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Essentials:</emphasis>
|
||||
Packages needed to build an image for a headless
|
||||
system:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo yum -y install &CENTOS_HOST_PACKAGES_ESSENTIAL;
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Graphical Extras:</emphasis>
|
||||
Packages recommended if the host system has graphics support:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo yum -y install SDL-devel xterm
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Documentation:</emphasis>
|
||||
Packages needed if you are going to build out the
|
||||
Yocto Project documentation manuals:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo yum -y install make docbook-style-dsssl docbook-style-xsl \
|
||||
docbook-dtds docbook-utils fop libxslt
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>ADT Installer Extras:</emphasis>
|
||||
Packages needed if you are going to be using the
|
||||
<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo yum -y install autoconf automake libtool glib2-devel
|
||||
</literallayout></para></listitem>
|
||||
</itemizedlist>
|
||||
<note>Depending on the CentOS version you are using, other requirements
|
||||
and dependencies might exist.
|
||||
For details, you should look at the CentOS sections on the
|
||||
<ulink url='https://wiki.yoctoproject.org/wiki/Poky/GettingStarted/Dependencies'>Poky/GettingStarted/Dependencies</ulink>
|
||||
wiki page.</note>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id='intro-getit'>
|
||||
|
||||
@@ -161,6 +161,9 @@
|
||||
<listitem><para><emphasis>nfs-server:</emphasis> Installs an NFS server.</para></listitem>
|
||||
<listitem><para><emphasis>dev-pkgs:</emphasis> Installs development packages (headers and
|
||||
extra library links) for all packages installed in a given image.</para></listitem>
|
||||
<listitem><para><emphasis>staticdev-pkgs:</emphasis> Installs static development
|
||||
packages (i.e. static libraries containing <filename>*.a</filename> files) for all
|
||||
packages installed in a given image.</para></listitem>
|
||||
<listitem><para><emphasis>dbg-pkgs:</emphasis> Installs debug symbol packages for all packages
|
||||
installed in a given image.</para></listitem>
|
||||
<listitem><para><emphasis>doc-pkgs:</emphasis> Installs documentation packages for all packages
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
</para>
|
||||
|
||||
<note>
|
||||
Building an image without GNU Public License Version 3 (GPLv3) components is
|
||||
only supported for minimal and base images.
|
||||
Building an image without GNU General Public License Version 3 (GPLv3) components
|
||||
is only supported for minimal and base images.
|
||||
Furthermore, if you are going to build an image using non-GPLv3 components,
|
||||
you must make the following changes in the <filename>local.conf</filename> file
|
||||
before using the BitBake command to build the minimal or base image:
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<!-- <link linkend='var-glossary-q'>Q</link> -->
|
||||
<link linkend='var-RCONFLICTS'>R</link>
|
||||
<link linkend='var-S'>S</link>
|
||||
<link linkend='var-TARGET_ARCH'>T</link>
|
||||
<link linkend='var-T'>T</link>
|
||||
<!-- <link linkend='var-glossary-u'>U</link> -->
|
||||
<!-- <link linkend='var-glossary-v'>V</link> -->
|
||||
<link linkend='var-WORKDIR'>W</link>
|
||||
@@ -256,10 +256,11 @@
|
||||
BBLAYERS = " \
|
||||
/home/scottrif/poky/meta \
|
||||
/home/scottrif/poky/meta-yocto \
|
||||
/home/scottrif/poky/meta-yocto-bsp \
|
||||
/home/scottrif/poky/meta-mykernel \
|
||||
"
|
||||
</literallayout>
|
||||
This example enables three layers, one of which is a custom, user-defined layer
|
||||
This example enables four layers, one of which is a custom, user-defined layer
|
||||
named <filename>meta-mykernel</filename>.
|
||||
</para>
|
||||
</glossdef>
|
||||
@@ -279,7 +280,15 @@
|
||||
|
||||
<glossentry id='var-BPN'><glossterm>BPN</glossterm>
|
||||
<glossdef>
|
||||
<para>Bare name of package with any suffixes like -cross -native removed.</para>
|
||||
<para>The bare name of the recipe or package.
|
||||
This variable is a version of the <link linkend='var-PN'><filename>PN</filename></link> variable
|
||||
but has common suffixes and prefixes such as "-native", "-cross" and "multilib"
|
||||
removed.
|
||||
The exact list of suffixes removed is specified by the
|
||||
<link linkend='var-SPECIAL_PKGSUFFIX'><filename>SPECIAL_PKGSUFFIX</filename></link> variable.
|
||||
The exact list of prefixes removed is specified by the
|
||||
<link linkend='var-MLPREFIX'><filename>MLPREFIX</filename></link> variable.
|
||||
Prefixes are removed for multilib and nativesdk cases.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
@@ -797,12 +806,13 @@ FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", \
|
||||
|
||||
<glossentry id='var-IMAGE_FEATURES'><glossterm>IMAGE_FEATURES</glossterm>
|
||||
<glossdef>
|
||||
<para>The list of features present in images.
|
||||
Typically, you configure this variable in image recipes.
|
||||
Note that you can add extra features to the image by using the
|
||||
<para>The list of features to include in an image.
|
||||
Typically, you configure this variable in an image recipe.
|
||||
Note that you can also add extra features to the image by using the
|
||||
<filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</link></filename> variable.
|
||||
See the "<link linkend="ref-features-image">Images</link>" section for the
|
||||
list of features present in images built by the OpenEmbedded build system.</para>
|
||||
full list of features that can be included in images built by the
|
||||
OpenEmbedded build system.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
@@ -963,23 +973,53 @@ FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", \
|
||||
|
||||
<glossentry id='var-INC_PR'><glossterm>INC_PR</glossterm>
|
||||
<glossdef>
|
||||
<para>Defines the Package revision.
|
||||
You manually combine values for <filename>INC_PR</filename> into the
|
||||
<link linkend='var-PR'><filename>PR</filename></link> field of the parent recipe.
|
||||
When you change this variable, you change the <filename>PR</filename>
|
||||
value for every person that includes the file.</para>
|
||||
<para>Helps define the recipe revision for recipes that share
|
||||
a common <filename>include</filename> file.
|
||||
You can think of this variable as part of the recipe revision
|
||||
as set from within an include file.</para>
|
||||
<para>Suppose, for example, you have a set of recipes that
|
||||
are used across several projects.
|
||||
And, within each of those recipes the revision
|
||||
(its <filename>PR</filename> value) is set accordingly.
|
||||
In this case, when the revision of those recipes changes
|
||||
the burden is on you to find all those recipes and
|
||||
be sure that they get changed to reflect the updated
|
||||
version of the recipe.
|
||||
In this scenario, it can get complicated when recipes
|
||||
used in many places and that provide common functionality
|
||||
are upgraded to a new revision.</para>
|
||||
<para>A more efficient way of dealing with this situation is
|
||||
to set the <filename>INC_PR</filename> variable inside
|
||||
the <filename>include</filename> files that the recipes
|
||||
share and then expand the <filename>INC_PR</filename>
|
||||
variable within the recipes to help
|
||||
define the recipe revision.
|
||||
</para>
|
||||
<para>
|
||||
The following example shows how to use the <filename>INC_PR</filename> variable
|
||||
given a common <filename>.inc</filename> file that defines the variable.
|
||||
Once defined, you can use the variable to set the
|
||||
<filename>PR</filename> value:
|
||||
</para>
|
||||
<literallayout class='monospaced'>
|
||||
The following provides an example that shows how to use
|
||||
the <filename>INC_PR</filename> variable
|
||||
given a common <filename>include</filename> file that
|
||||
defines the variable.
|
||||
Once the variable is defined in the
|
||||
<filename>include</filename> file, you can use the
|
||||
variable to set the <filename>PR</filename> values in
|
||||
each recipe.
|
||||
You will notice that when you set a recipe's
|
||||
<filename>PR</filename> you can provide more granular
|
||||
revisioning by appending values to the
|
||||
<filename>INC_PR</filename> variable:
|
||||
<literallayout class='monospaced'>
|
||||
recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
|
||||
recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
|
||||
recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
|
||||
recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
|
||||
recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
|
||||
</literallayout>
|
||||
</literallayout>
|
||||
The first line of the example establishes the baseline
|
||||
revision to be used for all recipes that use the
|
||||
<filename>include</filename> file.
|
||||
The remaining lines in the example are from individual
|
||||
recipes and show how the <filename>PR</filename> value
|
||||
is set.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
@@ -1129,7 +1169,7 @@ recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
|
||||
KERNEL_FEATURES="features/netfilter"
|
||||
|
||||
# Add sound support to the qemux86 machine
|
||||
KERNEL_FEATURES_append_qemux86="cfg/sound"
|
||||
KERNEL_FEATURES_append_qemux86=" cfg/sound"
|
||||
</literallayout></para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
@@ -1483,6 +1523,21 @@ recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
|
||||
<para>The email address of the distribution maintainer.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id='var-MLPREFIX'><glossterm>MLPREFIX</glossterm>
|
||||
<glossdef>
|
||||
<para>
|
||||
Specifies a prefix has been added to
|
||||
<link linkend='var-PN'><filename>PN</filename></link> to create a special version
|
||||
of a recipe or package, such as a multilib version.
|
||||
The variable is used in places where the prefix needs to be
|
||||
added to or removed from a the name (e.g. the
|
||||
<link linkend='var-BPN'><filename>BPN</filename></link> variable).
|
||||
<filename>MLPREFIX</filename> gets set when a prefix has been
|
||||
added to <filename>PN</filename>.
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
</glossdiv>
|
||||
|
||||
<!-- <glossdiv id='var-glossary-n'><title>N</title>-->
|
||||
@@ -1612,12 +1667,12 @@ recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
|
||||
|
||||
<glossentry id='var-PRINC'><glossterm>PRINC</glossterm>
|
||||
<glossdef>
|
||||
<para>Causes the <filename>PR</filename> variable to dynamically increment.
|
||||
This incrementation increases the value of a recipe's revision
|
||||
(<filename>PR</filename>) while minimizing the impact of layer ordering.</para>
|
||||
<para>Causes the <filename>PR</filename> variable of
|
||||
<filename>.bbappend</filename> files to dynamically increment.
|
||||
This increment minimizes the impact of layer ordering.</para>
|
||||
<para>In order to ensure multiple <filename>.bbappend</filename> files can co-exist,
|
||||
<filename>PRINC</filename> should be self referencing.
|
||||
The variable defaults to 0.</para>
|
||||
This variable defaults to 0.</para>
|
||||
<para>Following is an example that increments <filename>PR</filename> by two:
|
||||
<literallayout class='monospaced'>
|
||||
PRINC := "${@int(PRINC) + 2}"
|
||||
@@ -1838,10 +1893,20 @@ recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id='var-SDKIMAGE_FEATURES'><glossterm>SDKIMAGE_FEATURES</glossterm>
|
||||
<glossdef>
|
||||
<para>Equivalent to
|
||||
<filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>.
|
||||
However, this variable applies to the SDK generated from an image using
|
||||
<filename>bitbake -c populate_sdk imagename</filename>).
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id='var-SECTION'><glossterm>SECTION</glossterm>
|
||||
<glossdef>
|
||||
<para>The section where package should be put.
|
||||
Package managers use this variable.</para>
|
||||
<para>The section in which packages should be categorized.
|
||||
Package management utilities can make use of this variable.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
@@ -1878,7 +1943,7 @@ recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
|
||||
<glossdef>
|
||||
<para>
|
||||
Specifies the endian byte order of the target system.
|
||||
The variable is either "le" for little-endian or "be" for big-endian.
|
||||
The value should be either "le" for little-endian or "be" for big-endian.
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
@@ -1887,7 +1952,18 @@ recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
|
||||
<glossdef>
|
||||
<para>
|
||||
Specifies the number of bits for the target system CPU.
|
||||
The variable is either "32" or "64".
|
||||
The value should be either "32" or "64".
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id='var-SPECIAL_PKGSUFFIX'><glossterm>SPECIAL_PKGSUFFIX</glossterm>
|
||||
<glossdef>
|
||||
<para>
|
||||
A list of prefixes for <link linkend='var-PN'><filename>PN</filename></link> used by the
|
||||
OpenEmbedded build system to create variants of recipes or packages.
|
||||
The list specifies the prefixes to strip off during certain circumstances
|
||||
such as the generation of the <link linkend='var-BPN'><filename>BPN</filename></link> variable.
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
@@ -2093,6 +2169,25 @@ recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
|
||||
|
||||
<glossdiv id='var-glossary-t'><title>T</title>
|
||||
|
||||
<glossentry id='var-T'><glossterm>T</glossterm>
|
||||
<glossdef>
|
||||
<para>This variable points to a directory were Bitbake places temporary
|
||||
files when building a particular package.
|
||||
It is typically set as follows:
|
||||
<literallayout class='monospaced'>
|
||||
T = ${WORKDIR}/temp
|
||||
</literallayout>
|
||||
The <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
|
||||
is the directory into which Bitbake unpacks and builds the package.
|
||||
The default <filename>bitbake.conf</filename> file sets this variable.</para>
|
||||
<para>The <filename>T</filename> variable is not to be confused with
|
||||
the <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link> variable,
|
||||
which points to the root of the directory tree where Bitbake
|
||||
places the output of an entire build.
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id='var-TARGET_ARCH'><glossterm>TARGET_ARCH</glossterm>
|
||||
<glossdef>
|
||||
<para>The architecture of the device being built.
|
||||
|
||||
@@ -650,6 +650,7 @@
|
||||
BBLAYERS ?= " \
|
||||
/home/nitin/prj/poky.git/meta \
|
||||
/home/nitin/prj/poky.git/meta-yocto \
|
||||
/home/nitin/prj/poky.git/meta-yocto-bsp \
|
||||
/home/nitin/prj/meta-x32.git \
|
||||
"
|
||||
</literallayout></para></listitem>
|
||||
|
||||
@@ -66,8 +66,8 @@
|
||||
</para>
|
||||
|
||||
<note>
|
||||
Building an image without GNU Public License Version 3 (GPLv3) components is
|
||||
only supported for minimal and base images.
|
||||
Building an image without GNU General Public License Version 3 (GPLv3) components
|
||||
is only supported for minimal and base images.
|
||||
See the "<link linkend='ref-images'>Images</link>" chapter for more information.
|
||||
</note>
|
||||
</section>
|
||||
@@ -78,7 +78,7 @@
|
||||
<para>
|
||||
When building an image using GPL components, you need to maintain your original
|
||||
settings and not switch back and forth applying different versions of the GNU
|
||||
Public License.
|
||||
General Public License.
|
||||
If you rebuild using different versions of GPL, dependency errors might occur
|
||||
due to some components not being rebuilt.
|
||||
</para>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!ENTITY DISTRO "1.3">
|
||||
<!ENTITY DISTRO_NAME "1.2+snapshot">
|
||||
<!ENTITY DISTRO_NAME "danny">
|
||||
<!ENTITY YOCTO_DOC_VERSION "1.3">
|
||||
<!ENTITY POKYVERSION "8.0">
|
||||
<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME;-&POKYVERSION;">
|
||||
@@ -48,3 +48,10 @@
|
||||
<!ENTITY YOCTO_POKY_TARBALL "&YOCTO_POKY;.tar.bz2">
|
||||
<!ENTITY OE_INIT_PATH "&YOCTO_POKY;/oe-init-build-env">
|
||||
<!ENTITY OE_INIT_FILE "oe-init-build-env">
|
||||
<!ENTITY UBUNTU_HOST_PACKAGES_ESSENTIAL "awk wget git-core diffstat unzip texinfo build-essential chrpath">
|
||||
<!ENTITY FEDORA_HOST_PACKAGES_ESSENTIAL "awk make wget tar bzip2 gzip python unzip perl patch diffutils diffstat git
|
||||
cpp gcc gcc-c++ eglibc-devel texinfo chrpath ccache">
|
||||
<!ENTITY OPENSUSE_HOST_PACKAGES_ESSENTIAL "python gcc gcc-c++ git chrpath make wget diffstat texinfo python-curses">
|
||||
<!ENTITY CENTOS_HOST_PACKAGES_ESSENTIAL "gawk make wget tar bzip2 gzip python unzip perl patch diffutils diffstat git
|
||||
cpp gcc gcc-c++ glibc-devel texinfo chrpath">
|
||||
|
||||
|
||||
@@ -211,94 +211,85 @@
|
||||
<title>The Packages</title>
|
||||
|
||||
<para>
|
||||
Packages and package installation vary depending on your development system.
|
||||
In general, you need to have root access and then install the required packages.
|
||||
The next few sections show you how to get set up with the right packages for
|
||||
Ubuntu, Fedora, openSUSE, and CentOS.
|
||||
Packages and package installation vary depending on your development system
|
||||
and on your intent.
|
||||
For example, if you want to build an image that can run
|
||||
on QEMU in graphical mode (a minimal, basic build
|
||||
requirement), then the number of packages is different than if you want to
|
||||
build an image on a headless system or build out the Yocto Project
|
||||
documentation set.
|
||||
Collectively, the number of required packages is large
|
||||
if you want to be able to cover all cases.
|
||||
<note>In general, you need to have root access and then install the
|
||||
required packages.
|
||||
Thus, the commands in the following section may or may not work
|
||||
depending on whether or not your Linux distribution has
|
||||
<filename>sudo</filename> installed.</note>
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
The next few sections list, by supported Linux Distributions, the required
|
||||
packages needed to build an image that runs on QEMU in graphical mode
|
||||
(e.g. essential plus graphics support).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For lists of required packages for other scenarios, see the
|
||||
"<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>"
|
||||
section in the Yocto Project Reference Manual.
|
||||
</para>
|
||||
|
||||
<section id='ubuntu'>
|
||||
<title>Ubuntu</title>
|
||||
|
||||
<para>
|
||||
The packages you need for a supported Ubuntu distribution are shown in the following command:
|
||||
</para>
|
||||
|
||||
The essential packages you need for a supported Ubuntu distribution
|
||||
are shown in the following command:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo apt-get install sed wget subversion git-core coreutils \
|
||||
unzip texi2html texinfo libsdl1.2-dev docbook-utils fop gawk \
|
||||
python-pysqlite2 diffstat make gcc build-essential xsltproc \
|
||||
g++ desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev \
|
||||
autoconf automake groff libtool xterm libxml-parser-perl dblatex
|
||||
$ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL; libsdl1.2-dev xterm
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='fedora'>
|
||||
<title>Fedora</title>
|
||||
|
||||
<para>
|
||||
The packages you need for a supported Fedora distribution are shown in the following
|
||||
commands:
|
||||
</para>
|
||||
|
||||
The essential packages you need for a supported Fedora distribution
|
||||
are shown in the following command:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo yum groupinstall "development tools"
|
||||
$ sudo yum install python m4 make wget curl ftp tar bzip2 gzip \
|
||||
unzip perl texinfo texi2html diffstat openjade \
|
||||
docbook-style-dsssl sed docbook-style-xsl docbook-dtds fop libxslt \
|
||||
docbook-utils sed bc eglibc-devel ccache pcre pcre-devel quilt \
|
||||
groff linuxdoc-tools patch cmake \
|
||||
perl-ExtUtils-MakeMaker tcl-devel gettext chrpath ncurses apr \
|
||||
SDL-devel mesa-libGL-devel mesa-libGLU-devel gnome-doc-utils \
|
||||
autoconf automake libtool xterm dblatex glib-gettextize
|
||||
$ sudo yum install &FEDORA_HOST_PACKAGES_ESSENTIAL; SDL-devel xterm
|
||||
</literallayout>
|
||||
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='opensuse'>
|
||||
<title>openSUSE</title>
|
||||
|
||||
<para>
|
||||
The packages you need for a supported openSUSE distribution are shown in the following
|
||||
command:
|
||||
</para>
|
||||
|
||||
The essential packages you need for a supported openSUSE
|
||||
distribution are shown in the following command:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo zypper install python gcc gcc-c++ libtool fop \
|
||||
subversion git chrpath automake make wget xsltproc \
|
||||
diffstat texinfo freeglut-devel libSDL-devel dblatex \
|
||||
python-curses
|
||||
$ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL; libSDL-devel xterm
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='centos'>
|
||||
<title>CentOS</title>
|
||||
|
||||
<para>
|
||||
The packages you need for a supported CentOS distribution are shown in the following
|
||||
commands:
|
||||
</para>
|
||||
|
||||
The essential packages you need for a supported CentOS
|
||||
distribution are shown in the following command:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo yum -y groupinstall "development tools"
|
||||
$ sudo yum -y install tetex gawk sqlite-devel vim-common redhat-lsb xz \
|
||||
m4 make wget curl ftp tar bzip2 gzip python-devel \
|
||||
unzip perl texinfo texi2html diffstat openjade zlib-devel \
|
||||
docbook-style-dsssl sed docbook-style-xsl docbook-dtds \
|
||||
docbook-utils bc glibc-devel pcre pcre-devel \
|
||||
groff linuxdoc-tools patch cmake \
|
||||
tcl-devel gettext ncurses apr \
|
||||
SDL-devel mesa-libGL-devel mesa-libGLU-devel gnome-doc-utils \
|
||||
autoconf automake libtool xterm dblatex
|
||||
$ sudo yum -y install &CENTOS_HOST_PACKAGES_ESSENTIAL; SDL-devel xterm
|
||||
</literallayout>
|
||||
<note><para>
|
||||
Depending on the CentOS version you are using, other requirements and dependencies
|
||||
might exist.
|
||||
For details, you should look at the CentOS sections on the
|
||||
<ulink url='&YOCTO_WIKI_URL;/wiki/Poky/GettingStarted/Dependencies'>Poky/GettingStarted/Dependencies</ulink>
|
||||
wiki page.
|
||||
</para></note>
|
||||
|
||||
<note>Depending on the CentOS version you are using, other requirements
|
||||
and dependencies might exist.
|
||||
For details, you should look at the CentOS sections on the
|
||||
<ulink url='https://wiki.yoctoproject.org/wiki/Poky/GettingStarted/Dependencies'>Poky/GettingStarted/Dependencies</ulink>
|
||||
wiki page.</note>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@@ -572,6 +563,11 @@
|
||||
<para>
|
||||
The following command shows how to run the installer given a toolchain tarball
|
||||
for a 64-bit development host system and a 32-bit target architecture.
|
||||
You must change the permissions on the toolchain
|
||||
installer script so that it is executable.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The example assumes the toolchain installer is located in <filename>~/Downloads/</filename>.
|
||||
<note>
|
||||
If you do not have write permissions for the directory into which you are installing
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
#
|
||||
# You must also provide a Linux kernel configuration. The most direct
|
||||
# method is to copy your .config to files/defconfig in your layer,
|
||||
# in the same directory as the bbappend.
|
||||
# in the same directory as the bbappend and add file://defconfig to
|
||||
# your SRC_URI.
|
||||
#
|
||||
# To use the yocto kernel tooling to generate a BSP configuration
|
||||
# using modular configuration fragments, see the yocto-bsp and
|
||||
|
||||
@@ -3,11 +3,10 @@ KBRANCH_routerstationpro = "standard/routerstationpro"
|
||||
KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
|
||||
KBRANCH_beagleboard = "standard/beagleboard"
|
||||
|
||||
SRCREV_machine_atom-pc ?= "59c3ff750831338d05ab67d5efd7fc101c451aff"
|
||||
SRCREV_machine_routerstationpro ?= "009935376be574746446f4bead6f0fb7b40d6d79"
|
||||
SRCREV_machine_mpc8315e-rdb ?= "6b18b6f483716b757c7c8642fa3792235118bb63"
|
||||
SRCREV_machine_beagleboard ?= "59c3ff750831338d05ab67d5efd7fc101c451aff"
|
||||
|
||||
SRCREV_machine_atom-pc ?= "449f7f520350700858f21a5554b81cc8ad23267d"
|
||||
SRCREV_machine_routerstationpro ?= "27e8b8dabfed786aaaafd2f7104c141597830089"
|
||||
SRCREV_machine_mpc8315e-rdb ?= "524ce8107febcfd88717f54d50d36ca7c6e6e437"
|
||||
SRCREV_machine_beagleboard ?= "449f7f520350700858f21a5554b81cc8ad23267d"
|
||||
|
||||
COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
|
||||
COMPATIBLE_MACHINE_routerstationpro = "routerstationpro"
|
||||
|
||||
16
meta-yocto/classes/poky-sanity.bbclass
Normal file
@@ -0,0 +1,16 @@
|
||||
python check_bblayers_conf_append() {
|
||||
if current_lconf != lconf_version:
|
||||
if current_lconf == 5:
|
||||
index, meta_yocto_line = find_line('meta-yocto\s*\\\\\\n', lines)
|
||||
if meta_yocto_line:
|
||||
lines.insert(index + 1, meta_yocto_line.replace('meta-yocto',
|
||||
'meta-yocto-bsp'))
|
||||
else:
|
||||
sys.exit()
|
||||
|
||||
index, line = find_line('LCONF_VERSION', lines)
|
||||
current_lconf += 1
|
||||
lines[index] = 'LCONF_VERSION = "%d"\n' % current_lconf
|
||||
with open(bblayers_fn, "w") as f:
|
||||
f.write(''.join(lines))
|
||||
}
|
||||
@@ -13,8 +13,11 @@ DISTRO_PN_ALIAS_pn-aaina = "Intel"
|
||||
DISTRO_PN_ALIAS_pn-abiword-embedded = "Fedora=abiword Ubuntu=abiword"
|
||||
DISTRO_PN_ALIAS_pn-adt-installer = "Intel"
|
||||
DISTRO_PN_ALIAS_pn-alsa-state = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-anjuta-remote-run = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-augeas = "Ubuntu=libaugeas0 Debian=libaugeas0"
|
||||
DISTRO_PN_ALIAS_pn-avahi-ui = "Ubuntu=avahi-discover Debian=avahi-discover"
|
||||
DISTRO_PN_ALIAS_pn-babeltrace = "OSPDT"
|
||||
DISTRO_PN_ALIAS_pn-bdwgc = "OSPDT"
|
||||
DISTRO_PN_ALIAS_pn-bigreqsproto = "Meego=xorg-x11-proto-bigreqsproto"
|
||||
DISTRO_PN_ALIAS_pn-blktool = "Debian=blktool Mandriva=blktool"
|
||||
DISTRO_PN_ALIAS_pn-bluez4= "Fedora=bluez Ubuntu=bluez Debian=bluez-utils Opensuse=bluez"
|
||||
@@ -22,6 +25,7 @@ DISTRO_PN_ALIAS_pn-bluez4="Meego=bluz Fedora=bluz Ubuntu=bluz OpenSuSE=bluz Mand
|
||||
DISTRO_PN_ALIAS_pn-bluez-dtl1-workaround = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-btrfs-tools = "Debian=btrfs-tools Fedora=btrfs-progs"
|
||||
DISTRO_PN_ALIAS_pn-builder = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-build-appliance-image = "OSPDT"
|
||||
DISTRO_PN_ALIAS_pn-calibrateproto = "OSPDT upstream=http://cgit.freedesktop.org/xorg/lib/libXCalibrate/"
|
||||
DISTRO_PN_ALIAS_pn-calibrateproto = "OSPDT upstream=http://cgit.freedesktop.org/xorg/proto/calibrateproto"
|
||||
DISTRO_PN_ALIAS_pn-cdrtools = "OpenSUSE=cdrtools OSPDT"
|
||||
@@ -30,8 +34,9 @@ DISTRO_PN_ALIAS_pn-claws-plugin-maildir = "Fedora=claws-mail-plugins OpenSuSE=cl
|
||||
DISTRO_PN_ALIAS_pn-claws-plugin-mailmbox = "Fedora=claws-mail-plugins OpenSuSE=claws-mail-extra-plugins Debian=claws-mail-extra-plugins"
|
||||
DISTRO_PN_ALIAS_pn-claws-plugin-rssyl = "Fedora=claws-mail-plugins OpenSuSE=claws-mail-extra-plugins Debian=claws-mail-extra-plugins"
|
||||
DISTRO_PN_ALIAS_pn-clipboard-manager = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-clutter-1.8 = "Fedora=clutter OpenSuse=clutter Ubuntu=clutter-1.0 Mandriva=clutter Debian=clutter"
|
||||
DISTRO_PN_ALIAS_pn-clutter = "Fedora=clutter OpenSuse=clutter Ubuntu=clutter-1.0 Mandriva=clutter Debian=clutter"
|
||||
DISTRO_PN_ALIAS_pn-clutter-1.8 = "Fedora=clutter OpenSuse=clutter Ubuntu=clutter-1.0 Mandriva=clutter Debian=clutter"
|
||||
DISTRO_PN_ALIAS_pn-clutter-box2d = "Meego=clutter-box2d"
|
||||
DISTRO_PN_ALIAS_pn-clutter-gst-1.8 = "Fedora=clutter-gst Debian=libclutter-gst"
|
||||
DISTRO_PN_ALIAS_pn-clutter-gtk-1.8 = "Fedora=clutter-gtk OpenSuSE=clutter-gtk Ubuntu=clutter-gtk-0.10 Mandriva=clutter-gtk Debian=clutter-gtk"
|
||||
DISTRO_PN_ALIAS_pn-cogl = "Fedora=cogl OpenSuse=cogl Ubuntu=cogl Mandriva=cogl Debian=cogl"
|
||||
@@ -64,7 +69,7 @@ DISTRO_PN_ALIAS_pn-core-image-sato-sdk-directdisk = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-core-image-sato-sdk-live = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-core-image-sato-sdk = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-core-image-sdk = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-core-x11 = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-core-image-x11 = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-cross-localedef = "OSPDT"
|
||||
DISTRO_PN_ALIAS_pn-cwautomacros= "OSPDT upstream=http://cwautomacros.berlios.de/"
|
||||
DISTRO_PN_ALIAS_pn-damageproto = "Meego=xorg-x11-proto-damageproto"
|
||||
@@ -72,9 +77,9 @@ DISTRO_PN_ALIAS_pn-db = "Debian=db5.1 Ubuntu=db5.1"
|
||||
DISTRO_PN_ALIAS_pn-dbus-wait = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-directfb-examples = "Debian=directfb Fedora=directfb"
|
||||
DISTRO_PN_ALIAS_pn-distcc = "Debian=distcc Fedora=distcc"
|
||||
DISTRO_PN_ALIAS_pn-distcc-config = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-dmxproto = "Meego=xorg-x11-proto-dmxproto Ubuntu=x11proto-dmx Debian=x11proto-dmx"
|
||||
DISTRO_PN_ALIAS_pn-docbook-dsssl-stylesheet = "Fedora=docbook-style-dsssl Ubuntu=docbook-dsssl"
|
||||
DISTRO_PN_ALIAS_pn-docbook-dsssl-stylesheet-native = "Fedora=docbook-style-dsssl Ubuntu=docbook-dsssl"
|
||||
DISTRO_PN_ALIAS_pn-docbook-dsssl-stylesheets = "Fedora=docbook-style-dsssl Ubuntu=docbook-dsssl"
|
||||
DISTRO_PN_ALIAS_pn-docbook-sgml-dtd-3.1 = "Fedora=docbook-dtds Mandriva=docbook-dtd31-sgml"
|
||||
DISTRO_PN_ALIAS_pn-docbook-sgml-dtd-4.1 = "Fedora=docbook-dtds Mandriva=docbook-dtd41-sgml"
|
||||
DISTRO_PN_ALIAS_pn-docbook-sgml-dtd-4.5 = "Fedora=docbook-dtds Mandriva=docbook-dtd42-sgml"
|
||||
@@ -84,7 +89,8 @@ DISTRO_PN_ALIAS_pn-dtc = "Fedora=dtc Ubuntu=dtc"
|
||||
DISTRO_PN_ALIAS_pn-dtc-native = "Fedora=dtc Ubuntu=dtc"
|
||||
DISTRO_PN_ALIAS_pn-eds-tools = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-eee-acpi-scripts = "Debian=eeepc-acpi-scripts Ubuntu=eeepc-acpi-scripts"
|
||||
DISTRO_PN_ALIAS_pn-eglibc-locale-nativesdk = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-eglibc = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-eglibc-initial = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-eglibc-locale = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-emgd-driver-bin = "Intel"
|
||||
DISTRO_PN_ALIAS_pn-encodings = "Ubuntu=xfonts-encodings Mandriva=x11-font-encodings Debian=xfonts-encodings"
|
||||
@@ -111,9 +117,11 @@ DISTRO_PN_ALIAS_pn-gcc-runtime = "Ubuntu=gcc Fedora=gcc"
|
||||
DISTRO_PN_ALIAS_pn-gconf-dbus = "Meego=GConf-dbus"
|
||||
DISTRO_PN_ALIAS_pn-gdk-pixbuf-csource-native = "Debian=libgdk-pixbuf2.0-0 Fedora=gdk-pixbuf2"
|
||||
DISTRO_PN_ALIAS_pn-gdk-pixbuf = "Debian=libgdk-pixbuf2.0 Fedora=gdk-pixbuf"
|
||||
DISTRO_PN_ALIAS_pn-gettext-minimal-native = "Debian=gettext Fedora=gettext"
|
||||
DISTRO_PN_ALIAS_pn-glib-2.0 = "Meego=glib2 Fedora=glib2 OpenSuSE=glib2 Ubuntu=glib2.0 Mandriva=glib2.0 Debian=glib2.0"
|
||||
DISTRO_PN_ALIAS_pn-glproto = "Meego=xorg-x11-proto-glproto"
|
||||
DISTRO_PN_ALIAS_pn-gnu-config = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-grub-efi-i586 = "Ubuntu=grub Fedora=grub"
|
||||
DISTRO_PN_ALIAS_pn-gst-ffmpeg = "Mandriva=gstreamer0.10-ffmpeg Debian=gstreamer0.10-ffmpeg"
|
||||
DISTRO_PN_ALIAS_pn-gst-fluendo-mp3 = "Debian=gstreamer0.10-fluendo-mp3 Ubuntu=gstreamer0.10-fluendo-mp3"
|
||||
DISTRO_PN_ALIAS_pn-gst-fluendo-mpegdemux = "Ubuntu=gstreamer0.10-fluendo-mpegdemux Debian=gstreamer0.10-fluendo-mpegdemux"
|
||||
@@ -124,6 +132,7 @@ DISTRO_PN_ALIAS_pn-gst-plugins-bad = "Fedora=gstreamer-plugins-bad-free OpenSuSE
|
||||
DISTRO_PN_ALIAS_pn-gst-plugins-base = "Meego=gst-plugins-base Fedora=gstreamer-plugins-base OpenSuSE=gstreamer-plugins-base Ubuntu=gst-plugins-base0.10 Mandriva=gstreamer0.10-plugins-base Debian=gst-plugins-base0.10"
|
||||
DISTRO_PN_ALIAS_pn-gst-plugins-good = "Meego=gst-plugins-good Fedora=gstreamer-plugins-good OpenSuSE=gstreamer-plugins-good Ubuntu=gst-plugins-good0.10 Mandriva=gstreamer0.10-plugins-good Debian=gst-plugins-good0.10"
|
||||
DISTRO_PN_ALIAS_pn-gst-plugins-ugly = "OpenSuSE=gstreamer-plugins-ugly Mandriva=gstreamer0.10-plugins-ugly Debian=gst-plugins-ugly0.10"
|
||||
DISTRO_PN_ALIAS_pn-gtk-doc-stub = "Fedora=gtk-doc Ubuntu=gtk-doc"
|
||||
DISTRO_PN_ALIAS_pn-gtk-engines = "Fedora=gtk2-engines OpenSuSE=gtk2-engines Ubuntu=gtk2-engines Mandriva=gtk-engines2 Debian=gtk2-engines"
|
||||
DISTRO_PN_ALIAS_pn-gtkhtml2 = "Debian=libgtkhtml2-0 Fedora=gtkhtml2"
|
||||
DISTRO_PN_ALIAS_pn-gtk+ = "Meego=gtk2 Fedora=gtk2 OpenSuSE=gtk2 Ubuntu=gtk+2.0 Mandriva=gtk+2.0 Debian=gtk+2.0"
|
||||
@@ -136,6 +145,7 @@ DISTRO_PN_ALIAS_pn-imake = "Mandriva=xutils Ubuntu=xutils"
|
||||
DISTRO_PN_ALIAS_pn-initramfs-boot = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-initramfs-live-boot = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-initramfs-live-install = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-initramfs-live-install-efi = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-inputproto = "Meego=xorg-x11-proto-inputproto"
|
||||
DISTRO_PN_ALIAS_pn-iproute2 = "OSPDT"
|
||||
DISTRO_PN_ALIAS_pn-jpeg="OpenSuSE=libjpeg Ubuntu=libjpeg62"
|
||||
@@ -197,11 +207,17 @@ DISTRO_PN_ALIAS_pn-linux-libc-headers = "Debian=linux-kernel-headers Ubuntu=linu
|
||||
DISTRO_PN_ALIAS_pn-linux-libc-headers-yocto = "Debian=linux-kernel-headers Ubuntu=linux-kernel-headers"
|
||||
DISTRO_PN_ALIAS_pn-linux-yocto = "Debian=linux-base Ubuntu=linux"
|
||||
DISTRO_PN_ALIAS_pn-linux-yocto-rt = "Debian=linux-base Ubuntu=linux"
|
||||
DISTRO_PN_ALIAS_pn-linux-yocto-tiny = "OSPDT"
|
||||
DISTRO_PN_ALIAS_pn-lsbinitscripts = "Windriver"
|
||||
DISTRO_PN_ALIAS_pn-lsbsetup = "Windriver"
|
||||
DISTRO_PN_ALIAS_pn-lsbtest = "Windriver"
|
||||
DISTRO_PN_ALIAS_pn-ltp = "Ubuntu=ltp"
|
||||
DISTRO_PN_ALIAS_pn-lttng-control = "OSPDT upstream=http://lttng.org/"
|
||||
DISTRO_PN_ALIAS_pn-lttng-modules = "OSPDT upstream=http://lttng.org/"
|
||||
DISTRO_PN_ALIAS_pn-lttng-tools = "OSPDT upstream=http://lttng.org/"
|
||||
DISTRO_PN_ALIAS_pn-lttng-ust = "OSPDT upstream=http://lttng.org/"
|
||||
DISTRO_PN_ALIAS_pn-lttng-viewer = "OSPDT upstream=http://lttng.org/"
|
||||
DISTRO_PN_ALIAS_pn-lttng2-ust = "OSPDT upstream=http://lttng.org/"
|
||||
DISTRO_PN_ALIAS_pn-makedepend = "Mandriva=makedepend Ubuntu=xutils-dev"
|
||||
DISTRO_PN_ALIAS_pn-makedevs = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-matchbox-config-gtk = "OpenedHand"
|
||||
@@ -222,14 +238,14 @@ DISTRO_PN_ALIAS_pn-matchbox-wm = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-menu-cache = "OSPDT"
|
||||
DISTRO_PN_ALIAS_pn-mesa-dri = "Fedora=mesa Ubuntu=libgl1-mesa-dri"
|
||||
DISTRO_PN_ALIAS_pn-mesa-dri-glsl-native = "Fedora=mesa Ubuntu=libgl1-mesa-dri"
|
||||
DISTRO_PN_ALIAS_pn-mesa-xlib = "Fedora=mesa Ubuntu=libgl1-mesa-swx11"
|
||||
DISTRO_PN_ALIAS_pn-meta-environment-i586 = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-meta-ide-support = 'OE-Core'
|
||||
DISTRO_PN_ALIAS_pn-meta-ide-support = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-meta-toolchain-gmae = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-meta-toolchain = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-meta-toolchain-qte = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-meta-toolchain-sdk = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-mkfontdir = "Mandriva=mkfontdir Ubuntu=xfonts-utils Fedora=xorg-x11-font-utils"
|
||||
DISTRO_PN_ALIAS_pn-meta-toolchain-sdk = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-mini-x-session = "OSPDT"
|
||||
DISTRO_PN_ALIAS_pn-mkfontscale = "Mandriva=mkfontscale Ubuntu=xfonts-utils Fedora=xorg-x11-font-utils"
|
||||
DISTRO_PN_ALIAS_pn-mktemp = "Mandriva=mktemp Fedora=mktemp"
|
||||
DISTRO_PN_ALIAS_pn-moblin-proto = "OE-Core"
|
||||
@@ -238,20 +254,53 @@ DISTRO_PN_ALIAS_pn-modutils-initscripts = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-msynctool = "OpenSuse=msynctool Mandriva=msynctool"
|
||||
DISTRO_PN_ALIAS_pn-n450-audio = "Intel"
|
||||
DISTRO_PN_ALIAS_pn-network-suspend-scripts = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-nfs-export-root = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-ocf-linux = "OSPDT"
|
||||
DISTRO_PN_ALIAS_pn-ofono = "Debian=ofono Ubuntu=ofono"
|
||||
DISTRO_PN_ALIAS_pn-oh-puzzles = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-opkg-collateral = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-opkg-config-base = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-opkg-nogpg-native = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-opkg-nogpg-nativesdk = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-opkg-nogpg = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-opkg_nogpg = "OSPDT upstream=http://svn.openmoko.org/trunk/src/tar"
|
||||
DISTRO_PN_ALIAS_pn-opkg-nogpg = "OSPDT upstream=http://svn.openmoko.org/trunk/src/tar"
|
||||
DISTRO_PN_ALIAS_pn-opkg = "OSPDT upstream=http://svn.openmoko.org/trunk/src/tar"
|
||||
DISTRO_PN_ALIAS_pn-opkg-utils = "OSPDT upstream=http://svn.openmoko.org/trunk/src/target/opkg/"
|
||||
DISTRO_PN_ALIAS_pn-oprofileui = "Fedora=oprofileui Ubuntu=oprofile-gui Debian=oprofile-gui"
|
||||
DISTRO_PN_ALIAS_pn-oprofileui-server = "Fedora=oprofileui Ubuntu=oprofile-gui Debian=oprofile-gui"
|
||||
DISTRO_PN_ALIAS_pn-orinoco-conf = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-owl-video = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-package-index = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-base = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-basic = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-boot = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-clutter = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-console = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-device-devel = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-gtk-directfb = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-lsb = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-nfs = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-qt = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-qt4e = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-sdk-gmae = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-sdk = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-ssh-dropbear = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-ssh-openssh = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-standalone-gmae-sdk-target = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-standalone-sdk-target = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-tools-debug = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-tools = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-tools-profile = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-tools-testapps = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-x11-mini = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-x11 = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-x11-base = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-x11-sato = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-x11-xserver = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-cross-canadian-i586 = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-qt4e = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-qte-toolchain-host = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-qte-toolchain-target = "Intel"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-sdk-host = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-self-hosted = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-pointercal = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-poky-feed-config-opkg = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-pong-clock = "OpenedHand"
|
||||
@@ -272,6 +321,7 @@ DISTRO_PN_ALIAS_pn-python-pygtk = "Debian=python-gtk2 Fedora=pygtk2 OpenSuSE=pyt
|
||||
DISTRO_PN_ALIAS_pn-python-pyrex = "Mandriva=python-pyrex Ubuntu=python-pyrex"
|
||||
DISTRO_PN_ALIAS_pn-python-scons = "Fedora=scons OpenSuSE=scons Ubuntu=scons Mandriva=scons Debian=scons"
|
||||
DISTRO_PN_ALIAS_pn-python-ZSI = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-qemu-helper = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-qemu-config = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-qemugl = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-qemu-helper-native = "OpenedHand"
|
||||
@@ -282,7 +332,7 @@ DISTRO_PN_ALIAS_pn-qt4-embedded = "OSPDT"
|
||||
DISTRO_PN_ALIAS_pn-qt4-graphics-system = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-qt4-native = "Fedora=qt4 Debian=qt4-dev-tools"
|
||||
DISTRO_PN_ALIAS_pn-qt4-native = "Mandriva=libqt4-devel Ubuntu=libqt4-dev"
|
||||
DISTRO_PN_ALIAS_pn-qt4-tools-nativesdk = "Mandriva=libqt4-devel Ubuntu=libqt4-dev"
|
||||
DISTRO_PN_ALIAS_pn-qt4-tools = "Mandriva=libqt4-devel Ubuntu=libqt4-dev"
|
||||
DISTRO_PN_ALIAS_pn-qt4-x11-free = "Ubuntu=qt-x11-free Debian=qt-x11-free"
|
||||
DISTRO_PN_ALIAS_pn-qt-demo-init = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-qt-mobility-embedded = "Ubuntu=qtmobility-dev Debian=qtmobility-dev"
|
||||
@@ -290,6 +340,7 @@ DISTRO_PN_ALIAS_pn-qt-mobility-x11 = "Ubuntu=qtmobility-dev Debian=qtmobility-de
|
||||
DISTRO_PN_ALIAS_pn-quicky = "OSPDT"
|
||||
DISTRO_PN_ALIAS_pn-randrproto = "Meego=xorg-x11-proto-randrproto"
|
||||
DISTRO_PN_ALIAS_pn-recordproto = "Meego=xorg-x11-proto-recordproto"
|
||||
DISTRO_PN_ALIAS_pn-remake = "Mandriva=remake Debian=remake"
|
||||
DISTRO_PN_ALIAS_pn-renderproto = "Meego=xorg-x11-proto-renderproto"
|
||||
DISTRO_PN_ALIAS_pn-resourceproto = "Meego=xorg-x11-proto-resourceproto"
|
||||
DISTRO_PN_ALIAS_pn-rgb = "Fedora=xorg-X11-server-utils Debian=x11-xserver-utils"
|
||||
@@ -305,6 +356,7 @@ DISTRO_PN_ALIAS_pn-sgmlspl = "Debian=sgmlspl Ubuntu=sgmlspl"
|
||||
DISTRO_PN_ALIAS_pn-shadow-securetty = "Ubuntu=shadow Fedora=shadow"
|
||||
DISTRO_PN_ALIAS_pn-shadow-sysroot = "Ubuntu=shadow Fedora=shadow"
|
||||
DISTRO_PN_ALIAS_pn-shasum-native = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-shutdown-desktop = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-signgp-native = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-stat = "Debian=coreutils Fedora=coreutils"
|
||||
DISTRO_PN_ALIAS_pn-swabber-native = "OE-Core"
|
||||
@@ -312,41 +364,14 @@ DISTRO_PN_ALIAS_pn-systemtap-uprobes = "Ubuntu=systemtap Debian=systemtap"
|
||||
DISTRO_PN_ALIAS_pn-sysvinit-inittab = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-table = "Intel"
|
||||
DISTRO_PN_ALIAS_pn-tar-replacement-native = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-base = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-basic = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-boot = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-clutter = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-console = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-gtk-directfb = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-lsb = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-nfs = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-qt = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-sdk-gmae = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-sdk = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-ssh-dropbear = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-ssh-openssh = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-standalone-gmae-sdk-target = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-standalone-sdk-target = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-tools-debug = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-tools = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-tools-profile = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-tools-testapps = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-x11-mini = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-x11 = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-core-x11-sato = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-cross-canadian-i586 = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-qt4e = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-qte-toolchain-host-nativesdk = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-qte-toolchain-host-natives = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-qte-toolchain-target = "Intel"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-sdk-host = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-packagegroup-self-hosted = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-tcf-agent = "Windriver upstream=http://www.eclipse.org/dsdp/tm/"
|
||||
DISTRO_PN_ALIAS_pn-telepathy-python = "Debian=telepathy-python Ubuntu=telepathy-python"
|
||||
DISTRO_PN_ALIAS_pn-tiny-init = "OSPDT"
|
||||
DISTRO_PN_ALIAS_pn-tinylogin = "Debian=busybox Ubuntu=busybox Mandriva=busybox"
|
||||
DISTRO_PN_ALIAS_pn-trace-cmd = "Mandriva=trace-cmd Ubuntu=trace-cmd"
|
||||
DISTRO_PN_ALIAS_pn-trapproto = "Meego=xorg-x11-proto-trapproto"
|
||||
DISTRO_PN_ALIAS_pn-tremor = "OSPDT upstream=http://www.xiph.org/vorbis/"
|
||||
DISTRO_PN_ALIAS_pn-tslib = "Debian=tslib Ubuntu=tslib"
|
||||
DISTRO_PN_ALIAS_pn-ttf-bitstream-vera = "Debian=ttf-bitstream-vera Ubuntu=ttf-bitstream-vera"
|
||||
DISTRO_PN_ALIAS_pn-tzcode = "OSPDT"
|
||||
DISTRO_PN_ALIAS_pn-ubootchart = "OSPDT upstream=http://code.google.com/p/ubootchart"
|
||||
@@ -362,14 +387,17 @@ DISTRO_PN_ALIAS_pn-util-macros = "Meego=xorg-x11-util-macros Fedora=xorg-x11-uti
|
||||
DISTRO_PN_ALIAS_pn-v86d = "Debian=v86d Ubuntu=v86d"
|
||||
DISTRO_PN_ALIAS_pn-videoproto = "Meego=xorg-x11-proto-videoproto"
|
||||
DISTRO_PN_ALIAS_pn-watchdog = "Debian=watchdog Ubuntu=watchdog Mandriva=watchdog"
|
||||
DISTRO_PN_ALIAS_pn-webkit-gtk = "Fedora=webkitgtk"
|
||||
DISTRO_PN_ALIAS_pn-webkit-gtk = "Fedora=webkitgtk Ubuntu=libwebkit"
|
||||
DISTRO_PN_ALIAS_pn-web = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-web-webkit = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-which = "Mandriva=which Fedora=which"
|
||||
DISTRO_PN_ALIAS_pn-wpa-supplicant = "Meego=wpa_supplicant Fedora=wpa_supplicant OpenSuSE=wpa_supplicant Ubuntu=wpasupplicant Mandriva=wpa_supplicant Debian=wpasupplicant"
|
||||
DISTRO_PN_ALIAS_pn-x11-common = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-x11perf = "Fedora=xorg-x11-apps Ubuntu=x11-apps"
|
||||
DISTRO_PN_ALIAS_pn-x11vnc = "Fedora=x11vnc Ubuntu=x11vnc"
|
||||
DISTRO_PN_ALIAS_pn-xcb-util-wm = "Debian=xcb-util Fedora=xcb-util"
|
||||
DISTRO_PN_ALIAS_pn-xcb-util-image = "Debian=xcb-util Fedora=xcb-util"
|
||||
DISTRO_PN_ALIAS_pn-xcb-util-keysyms = "Debian=xcb-util Fedora=xcb-util"
|
||||
DISTRO_PN_ALIAS_pn-xcmiscproto = "Meego=xorg-x11-proto-xcmiscproto"
|
||||
DISTRO_PN_ALIAS_pn-xcursor-transparent-theme = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-xdpyinfo = "Fedora=xorg-x11-utils Ubuntu=x11-utils"
|
||||
|
||||
@@ -448,7 +448,6 @@ RECIPE_MAINTAINER_pn-mdadm = "Laurentiu Palcu <laurentiu.palcu@intel.com>"
|
||||
RECIPE_MAINTAINER_pn-menu-cache = "Valentin Popa <valentin.popa@intel.com>"
|
||||
RECIPE_MAINTAINER_pn-mesa-dri = "Valentin Popa <valentin.popa@intel.com>"
|
||||
RECIPE_MAINTAINER_pn-mesa-dri-glsl-native = "Valentin Popa <valentin.popa@intel.com>"
|
||||
RECIPE_MAINTAINER_pn-mesa-xlib = "Valentin Popa <valentin.popa@intel.com>"
|
||||
RECIPE_MAINTAINER_pn-meta-ide-support = "Saul Wold <sgw@linux.intel.com>"
|
||||
RECIPE_MAINTAINER_pn-metacity = "Valentin Popa <valentin.popa@intel.com>"
|
||||
RECIPE_MAINTAINER_pn-mingetty = "Kai Kang <kai.kang@windriver.com>"
|
||||
|
||||
@@ -37,7 +37,7 @@ DISTRO = "poky-tiny"
|
||||
# Distro config is evaluated after the machine config, so we have to explicitly
|
||||
# set the kernel provider to override a machine config.
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-tiny"
|
||||
PREFERRED_VERSION_linux-yocto-tiny = "3.2%"
|
||||
PREFERRED_VERSION_linux-yocto-tiny = "3.4%"
|
||||
|
||||
# We can use packagegroup-core-boot, but in the future we may need a new packagegroup-core-tiny
|
||||
#POKY_DEFAULT_EXTRA_RDEPENDS += "packagegroup-core-boot"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Yocto (Built by Poky 7.0)"
|
||||
DISTRO_VERSION = "1.2+snapshot-${DATE}"
|
||||
DISTRO_NAME = "Poky 8.0 (Yocto Project 1.3 Reference Distro)"
|
||||
DISTRO_VERSION = "1.3"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
|
||||
SDK_VERSION := "${DISTRO_VERSION}"
|
||||
|
||||
MAINTAINER = "Poky <poky@yoctoproject.org>"
|
||||
|
||||
@@ -62,25 +62,33 @@ https://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n"
|
||||
# The CONNECTIVITY_CHECK_URI's are used to test whether we can succesfully
|
||||
# fetch from the network (and warn you if not). To disable the test set
|
||||
# the variable to be empty.
|
||||
CONNECTIVITY_CHECK_URIS ?= "git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=HEAD \
|
||||
https://eula-downloads.yoctoproject.org/index.php \
|
||||
http://bugzilla.yoctoproject.org/report.cgi"
|
||||
# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=HEAD
|
||||
|
||||
CONNECTIVITY_CHECK_URIS ?= " \
|
||||
https://eula-downloads.yoctoproject.org/index.php \
|
||||
http://bugzilla.yoctoproject.org/report.cgi"
|
||||
|
||||
SANITY_TESTED_DISTROS ?= " \
|
||||
Yocto (Built by Poky 7.0) 1.2 \n \
|
||||
Yocto (Built by Poky 8.0) 1.3 \n \
|
||||
Poky 7.0 (Yocto Project 1.2 Reference Distro) 1.2 \n \
|
||||
Poky 8.0 (Yocto Project 1.3 Reference Distro) 1.3 \n \
|
||||
Ubuntu 10.04.4 LTS \n \
|
||||
Ubuntu 11.10 \n \
|
||||
Ubuntu 12.04 LTS \n \
|
||||
Ubuntu 12.04.1 LTS \n \
|
||||
Fedora release 15 (Lovelock) \n \
|
||||
Ubuntu 12.10 \n \
|
||||
Fedora release 16 (Verne) \n \
|
||||
Fedora release 17 (Beefy Miracle) \n \
|
||||
Fedora release 18 (Spherical Cow) \n \
|
||||
CentOS release 5.6 (Final) \n \
|
||||
CentOS release 5.7 (Final) \n \
|
||||
CentOS release 6.2 (Final) \n \
|
||||
Debian GNU/Linux 6.0.4 (squeeze) \n \
|
||||
CentOS release 5.8 (Final) \n \
|
||||
CentOS release 6.3 (Final) \n \
|
||||
Debian GNU/Linux 6.0.6 (squeeze) \n \
|
||||
openSUSE 11.4 \n \
|
||||
openSUSE 12.1 \n \
|
||||
openSUSE 12.2 \n \
|
||||
"
|
||||
|
||||
# Default hash policy for distro
|
||||
@@ -93,6 +101,10 @@ BB_SIGNATURE_HANDLER ?= 'OEBasicHash'
|
||||
#
|
||||
OELAYOUT_ABI = "8"
|
||||
|
||||
# add poky sanity bbclass
|
||||
INHERIT += "poky-sanity"
|
||||
|
||||
#WARN_QA = "unsafe-references-in-binaries unsafe-references-in-scripts"
|
||||
WARN_QA = ""
|
||||
ERROR_QA = "dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms useless-rpaths rpaths staticdev ldflags"
|
||||
|
||||
|
||||
@@ -15,23 +15,23 @@ HOSTLDFLAGS = "${BUILD_LDFLAGS}"
|
||||
HOST_LOADLIBES = "-lncurses"
|
||||
|
||||
python do_menuconfig() {
|
||||
try:
|
||||
mtime = os.path.getmtime(".config")
|
||||
except OSError:
|
||||
mtime = 0
|
||||
|
||||
oe_terminal("${SHELL} -c \"make menuconfig; if [ $? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"", '${PN} Configuration', d)
|
||||
|
||||
# FIXME this check can be removed when the minimum bitbake version has been bumped
|
||||
if hasattr(bb.build, 'write_taint'):
|
||||
try:
|
||||
mtime = os.path.getmtime(".config")
|
||||
newmtime = os.path.getmtime(".config")
|
||||
except OSError:
|
||||
mtime = 0
|
||||
newmtime = 0
|
||||
|
||||
oe_terminal("${SHELL} -c \"make menuconfig; if [ $? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"", '${PN} Configuration', d)
|
||||
|
||||
# FIXME this check can be removed when the minimum bitbake version has been bumped
|
||||
if hasattr(bb.build, 'write_taint'):
|
||||
try:
|
||||
newmtime = os.path.getmtime(".config")
|
||||
except OSError:
|
||||
newmtime = 0
|
||||
|
||||
if newmtime > mtime:
|
||||
bb.note("Configuration changed, recompile will be forced")
|
||||
bb.build.write_taint('do_compile', d)
|
||||
if newmtime > mtime:
|
||||
bb.note("Configuration changed, recompile will be forced")
|
||||
bb.build.write_taint('do_compile', d)
|
||||
}
|
||||
do_menuconfig[depends] += "ncurses-native:do_populate_sysroot"
|
||||
do_menuconfig[nostamp] = "1"
|
||||
|
||||
@@ -54,6 +54,13 @@ LDFLAGS = "${BUILDSDK_LDFLAGS} \
|
||||
|
||||
DEPENDS_GETTEXT = "gettext-native nativesdk-gettext"
|
||||
|
||||
#
|
||||
# We need chrpath >= 0.14 to ensure we can deal with 32 and 64 bit
|
||||
# binaries
|
||||
#
|
||||
DEPENDS_append = " chrpath-replacement-native"
|
||||
EXTRANATIVEPATH += "chrpath-native"
|
||||
|
||||
# Path mangling needed by the cross packaging
|
||||
# Note that we use := here to ensure that libdir and includedir are
|
||||
# target paths.
|
||||
|
||||
@@ -33,12 +33,6 @@ python do_distrodata_np() {
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
if pn.find("nativesdk-") != -1:
|
||||
pnstripped = pn.replace("nativesdk-", "")
|
||||
bb.note("Native Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
if pn.find("-cross") != -1:
|
||||
pnstripped = pn.split("-cross")
|
||||
bb.note("cross Split: %s" % pnstripped)
|
||||
@@ -51,6 +45,13 @@ python do_distrodata_np() {
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
if pn.startswith("nativesdk-"):
|
||||
pnstripped = pn.replace("nativesdk-", "")
|
||||
bb.note("NativeSDK Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
|
||||
if pn.find("-initial") != -1:
|
||||
pnstripped = pn.split("-initial")
|
||||
bb.note("initial Split: %s" % pnstripped)
|
||||
@@ -119,12 +120,24 @@ python do_distrodata() {
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
if pn.startswith("nativesdk-"):
|
||||
pnstripped = pn.replace("nativesdk-", "")
|
||||
bb.note("NativeSDK Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
if pn.find("-cross") != -1:
|
||||
pnstripped = pn.split("-cross")
|
||||
bb.note("cross Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
if pn.find("-crosssdk") != -1:
|
||||
pnstripped = pn.split("-crosssdk")
|
||||
bb.note("cross Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
if pn.find("-initial") != -1:
|
||||
pnstripped = pn.split("-initial")
|
||||
bb.note("initial Split: %s" % pnstripped)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
DEPENDS += "${@["python-native python", ""][(d.getVar('PACKAGES', True) == '')]}"
|
||||
RDEPENDS_${PN} += "${@['', 'python-core']['${PN}' == '${BPN}']}"
|
||||
RDEPENDS_${PN} += "${@['', 'python-core']['${CLASSOVERRIDE}' == 'class-target']}"
|
||||
|
||||
inherit distutils-common-base pythonnative
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ def package_qa_get_machine_dict():
|
||||
|
||||
# Currently not being used by default "desktop"
|
||||
WARN_QA ?= "ldflags useless-rpaths rpaths unsafe-references-in-binaries unsafe-references-in-scripts staticdev libdir"
|
||||
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms"
|
||||
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms dep-cmp"
|
||||
|
||||
ALL_QA = "${WARN_QA} ${ERROR_QA}"
|
||||
|
||||
@@ -628,37 +628,61 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, d):
|
||||
|
||||
sane = True
|
||||
if not "-dbg" in pkg and not "packagegroup-" in pkg and not "-image" in pkg:
|
||||
# Copied from package_ipk.bbclass
|
||||
# boiler plate to update the data
|
||||
localdata = bb.data.createCopy(d)
|
||||
root = "%s/%s" % (pkgdest, pkg)
|
||||
|
||||
localdata.setVar('ROOT', '')
|
||||
localdata.setVar('ROOT_%s' % pkg, root)
|
||||
pkgname = localdata.getVar('PKG_%s' % pkg, True)
|
||||
if not pkgname:
|
||||
pkgname = pkg
|
||||
localdata.setVar('PKG', pkgname)
|
||||
|
||||
localdata.setVar('OVERRIDES', pkg)
|
||||
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
# Now check the RDEPENDS
|
||||
rdepends = bb.utils.explode_deps(localdata.getVar('RDEPENDS', True) or "")
|
||||
|
||||
|
||||
# Now do the sanity check!!!
|
||||
for rdepend in rdepends:
|
||||
if "-dbg" in rdepend and "debug-deps" not in skip:
|
||||
error_msg = "%s rdepends on %s" % (pkgname,rdepend)
|
||||
error_msg = "%s rdepends on %s" % (pkg,rdepend)
|
||||
sane = package_qa_handle_error("debug-deps", error_msg, d)
|
||||
if (not "-dev" in pkg and not "-staticdev" in pkg) and rdepend.endswith("-dev") and "dev-deps" not in skip:
|
||||
error_msg = "%s rdepends on %s" % (pkgname, rdepend)
|
||||
error_msg = "%s rdepends on %s" % (pkg, rdepend)
|
||||
sane = package_qa_handle_error("dev-deps", error_msg, d)
|
||||
|
||||
return sane
|
||||
|
||||
def package_qa_check_deps(pkg, pkgdest, skip, d):
|
||||
sane = True
|
||||
|
||||
localdata = bb.data.createCopy(d)
|
||||
localdata.setVar('OVERRIDES', pkg)
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
def check_valid_deps(var):
|
||||
sane = True
|
||||
try:
|
||||
rvar = bb.utils.explode_dep_versions2(localdata.getVar(var, True) or "")
|
||||
except ValueError as e:
|
||||
bb.fatal("%s_%s: %s" % (var, pkg, e))
|
||||
raise e
|
||||
for dep in rvar:
|
||||
for v in rvar[dep]:
|
||||
if v and not v.startswith(('< ', '= ', '> ', '<= ', '>=')):
|
||||
error_msg = "%s_%s is invalid: %s (%s) only comparisons <, =, >, <=, and >= are allowed" % (var, pkg, dep, v)
|
||||
sane = package_qa_handle_error("dep-cmp", error_msg, d)
|
||||
return sane
|
||||
|
||||
sane = True
|
||||
if not check_valid_deps('RDEPENDS'):
|
||||
sane = False
|
||||
if not check_valid_deps('RRECOMMENDS'):
|
||||
sane = False
|
||||
if not check_valid_deps('RSUGGESTS'):
|
||||
sane = False
|
||||
if not check_valid_deps('RPROVIDES'):
|
||||
sane = False
|
||||
if not check_valid_deps('RREPLACES'):
|
||||
sane = False
|
||||
if not check_valid_deps('RCONFLICTS'):
|
||||
sane = False
|
||||
|
||||
return sane
|
||||
|
||||
# The PACKAGE FUNC to scan each package
|
||||
python do_package_qa () {
|
||||
import subprocess
|
||||
@@ -699,6 +723,7 @@ python do_package_qa () {
|
||||
g = globals()
|
||||
walk_sane = True
|
||||
rdepends_sane = True
|
||||
deps_sane = True
|
||||
for package in packages.split():
|
||||
skip = (d.getVar('INSANE_SKIP_' + package, True) or "").split()
|
||||
if skip:
|
||||
@@ -722,12 +747,14 @@ python do_package_qa () {
|
||||
walk_sane = False
|
||||
if not package_qa_check_rdepends(package, pkgdest, skip, d):
|
||||
rdepends_sane = False
|
||||
if not package_qa_check_deps(package, pkgdest, skip, d):
|
||||
deps_sane = False
|
||||
|
||||
|
||||
if 'libdir' in d.getVar("ALL_QA", True).split():
|
||||
package_qa_check_libdir(d)
|
||||
|
||||
if not walk_sane or not rdepends_sane:
|
||||
if not walk_sane or not rdepends_sane or not deps_sane:
|
||||
bb.fatal("QA run found fatal errors. Please consider fixing them.")
|
||||
bb.note("DONE with PACKAGE QA")
|
||||
}
|
||||
|
||||
@@ -429,13 +429,11 @@ python populate_packages_prepend () {
|
||||
old_desc = d.getVar('DESCRIPTION_' + pkg, True) or ""
|
||||
d.setVar('DESCRIPTION_' + pkg, old_desc + "; " + vals["description"])
|
||||
|
||||
rdepends_str = d.getVar('RDEPENDS_' + pkg, True)
|
||||
if rdepends_str:
|
||||
rdepends = rdepends_str.split()
|
||||
else:
|
||||
rdepends = []
|
||||
rdepends.extend(get_dependencies(file, pattern, format))
|
||||
d.setVar('RDEPENDS_' + pkg, ' '.join(rdepends))
|
||||
rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or "")
|
||||
for dep in get_dependencies(file, pattern, format):
|
||||
if not dep in rdepends:
|
||||
rdepends[dep] = []
|
||||
d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
|
||||
|
||||
module_deps = parse_depmod()
|
||||
module_regex = '^(.*)\.k?o$'
|
||||
|
||||
@@ -10,71 +10,6 @@ addtask populate_lic after do_patch before do_package
|
||||
do_populate_lic[dirs] = "${LICSSTATEDIR}/${PN}"
|
||||
do_populate_lic[cleandirs] = "${LICSSTATEDIR}"
|
||||
|
||||
# Standards are great! Everyone has their own. In an effort to standardize licensing
|
||||
# names, common-licenses will use the SPDX standard license names. In order to not
|
||||
# break the non-standardized license names that we find in LICENSE, we'll set
|
||||
# up a bunch of VarFlags to accomodate non-SPDX license names.
|
||||
#
|
||||
# We should really discuss standardizing this field, but that's a longer term goal.
|
||||
# For now, we can do this and it should grab the most common LICENSE naming variations.
|
||||
#
|
||||
# We should NEVER have a GPL/LGPL without a version!!!!
|
||||
# Any mapping to MPL/LGPL/GPL should be fixed
|
||||
# see: https://wiki.yoctoproject.org/wiki/License_Audit
|
||||
|
||||
# GPL variations
|
||||
SPDXLICENSEMAP[GPL-1] = "GPL-1.0"
|
||||
SPDXLICENSEMAP[GPLv1] = "GPL-1.0"
|
||||
SPDXLICENSEMAP[GPLv1.0] = "GPL-1.0"
|
||||
SPDXLICENSEMAP[GPL-2] = "GPL-2.0"
|
||||
SPDXLICENSEMAP[GPLv2] = "GPL-2.0"
|
||||
SPDXLICENSEMAP[GPLv2.0] = "GPL-2.0"
|
||||
SPDXLICENSEMAP[GPL-3] = "GPL-3.0"
|
||||
SPDXLICENSEMAP[GPLv3] = "GPL-3.0"
|
||||
SPDXLICENSEMAP[GPLv3.0] = "GPL-3.0"
|
||||
|
||||
#LGPL variations
|
||||
SPDXLICENSEMAP[LGPLv2] = "LGPL-2.0"
|
||||
SPDXLICENSEMAP[LGPLv2.0] = "LGPL-2.0"
|
||||
SPDXLICENSEMAP[LGPL2.1] = "LGPL-2.1"
|
||||
SPDXLICENSEMAP[LGPLv2.1] = "LGPL-2.1"
|
||||
SPDXLICENSEMAP[LGPLv3] = "LGPL-3.0"
|
||||
|
||||
#MPL variations
|
||||
SPDXLICENSEMAP[MPL-1] = "MPL-1.0"
|
||||
SPDXLICENSEMAP[MPLv1] = "MPL-1.0"
|
||||
SPDXLICENSEMAP[MPLv1.1] = "MPL-1.1"
|
||||
SPDXLICENSEMAP[MPLv2] = "MPL-2.0"
|
||||
|
||||
#MIT variations
|
||||
SPDXLICENSEMAP[MIT-X] = "MIT"
|
||||
SPDXLICENSEMAP[MIT-style] = "MIT"
|
||||
|
||||
#Openssl variations
|
||||
SPDXLICENSEMAP[openssl] = "OpenSSL"
|
||||
|
||||
#Python variations
|
||||
SPDXLICENSEMAP[PSF] = "Python-2.0"
|
||||
SPDXLICENSEMAP[PSFv2] = "Python-2.0"
|
||||
SPDXLICENSEMAP[Python-2] = "Python-2.0"
|
||||
|
||||
#Apache variations
|
||||
SPDXLICENSEMAP[Apachev2] = "Apache-2.0"
|
||||
SPDXLICENSEMAP[Apache-2] = "Apache-2.0"
|
||||
|
||||
#Artistic variations
|
||||
SPDXLICENSEMAP[Artisticv1] = "Artistic-1.0"
|
||||
SPDXLICENSEMAP[Artistic-1] = "Artistic-1.0"
|
||||
|
||||
#Academic variations
|
||||
SPDXLICENSEMAP[AFL-2] = "AFL-2.0"
|
||||
SPDXLICENSEMAP[AFL-1] = "AFL-1.2"
|
||||
SPDXLICENSEMAP[AFLv2] = "AFL-2.0"
|
||||
SPDXLICENSEMAP[AFLv1] = "AFL-1.2"
|
||||
|
||||
#Other variations
|
||||
SPDXLICENSEMAP[EPLv1.0] = "EPL-1.0"
|
||||
|
||||
license_create_manifest() {
|
||||
mkdir -p ${LICENSE_DIRECTORY}/${IMAGE_NAME}
|
||||
# Get list of installed packages
|
||||
@@ -186,7 +121,7 @@ python do_populate_lic() {
|
||||
license_source_dirs = []
|
||||
license_source_dirs.append(generic_directory)
|
||||
try:
|
||||
additional_lic_dirs = d.getVar('LICENSE_DIR', True).split()
|
||||
additional_lic_dirs = d.getVar('LICENSE_PATH', True).split()
|
||||
for lic_dir in additional_lic_dirs:
|
||||
license_source_dirs.append(lic_dir)
|
||||
except:
|
||||
|
||||
@@ -7,6 +7,8 @@ python multilib_virtclass_handler () {
|
||||
if cls != "multilib" or not variant:
|
||||
return
|
||||
|
||||
e.data.setVar('STAGING_KERNEL_DIR', e.data.getVar('STAGING_KERNEL_DIR', True))
|
||||
|
||||
# There should only be one kernel in multilib configs
|
||||
if bb.data.inherits_class('kernel', e.data) or bb.data.inherits_class('module-base', e.data):
|
||||
raise bb.parse.SkipPackage("We shouldn't have multilib variants for the kernel")
|
||||
@@ -36,8 +38,6 @@ python multilib_virtclass_handler () {
|
||||
e.data.setVar("MLPREFIX", variant + "-")
|
||||
e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
|
||||
e.data.setVar("SHLIBSDIR_virtclass-multilib-" + variant ,e.data.getVar("SHLIBSDIR", False) + "/" + variant)
|
||||
if e.data.getVar("TARGET_VENDOR_virtclass-multilib-" + variant, False) is None:
|
||||
e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + variant, e.data.getVar("TARGET_VENDOR", False) + "ml" + variant)
|
||||
e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override)
|
||||
}
|
||||
|
||||
@@ -85,9 +85,9 @@ PACKAGEFUNCS_append = "do_package_qa_multilib"
|
||||
python do_package_qa_multilib() {
|
||||
|
||||
def check_mlprefix(pkg, var, mlprefix):
|
||||
values = bb.utils.explode_dep_versions(d.getVar('%s_%s' % (var, pkg), True) or d.getVar(var, True) or "")
|
||||
values = bb.utils.explode_deps(d.getVar('%s_%s' % (var, pkg), True) or d.getVar(var, True) or "")
|
||||
candidates = []
|
||||
for i in values.keys():
|
||||
for i in values:
|
||||
if i.startswith('virtual/'):
|
||||
i = i[len('virtual/'):]
|
||||
if (not i.startswith('kernel-module')) and (not i.startswith(mlprefix)):
|
||||
|
||||
@@ -2,6 +2,11 @@ python multilib_virtclass_handler_global () {
|
||||
if not e.data:
|
||||
return
|
||||
|
||||
if isinstance(e, bb.event.RecipePreFinalise):
|
||||
for v in e.data.getVar("MULTILIB_VARIANTS", True).split():
|
||||
if e.data.getVar("TARGET_VENDOR_virtclass-multilib-" + v, False) is None:
|
||||
e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + v, e.data.getVar("TARGET_VENDOR", False) + "ml" + v)
|
||||
|
||||
variant = e.data.getVar("BBEXTENDVARIANT", True)
|
||||
|
||||
if isinstance(e, bb.event.RecipeParsed) and not variant:
|
||||
|
||||
@@ -16,6 +16,13 @@ CLASSOVERRIDE = "class-nativesdk"
|
||||
PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
|
||||
PACKAGE_ARCHS = "${SDK_PACKAGE_ARCHS}"
|
||||
|
||||
#
|
||||
# We need chrpath >= 0.14 to ensure we can deal with 32 and 64 bit
|
||||
# binaries
|
||||
#
|
||||
DEPENDS_append = " chrpath-replacement-native"
|
||||
EXTRANATIVEPATH += "chrpath-native"
|
||||
|
||||
STAGING_DIR_HOST = "${STAGING_DIR}/${MULTIMACH_HOST_SYS}"
|
||||
STAGING_DIR_TARGET = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}"
|
||||
|
||||
|
||||
@@ -375,17 +375,13 @@ def get_package_mapping (pkg, d):
|
||||
def runtime_mapping_rename (varname, d):
|
||||
#bb.note("%s before: %s" % (varname, d.getVar(varname, True)))
|
||||
|
||||
new_depends = []
|
||||
deps = bb.utils.explode_dep_versions(d.getVar(varname, True) or "")
|
||||
new_depends = {}
|
||||
deps = bb.utils.explode_dep_versions2(d.getVar(varname, True) or "")
|
||||
for depend in deps:
|
||||
# Have to be careful with any version component of the depend
|
||||
new_depend = get_package_mapping(depend, d)
|
||||
if deps[depend]:
|
||||
new_depends.append("%s (%s)" % (new_depend, deps[depend]))
|
||||
else:
|
||||
new_depends.append(new_depend)
|
||||
new_depends[new_depend] = deps[depend]
|
||||
|
||||
d.setVar(varname, " ".join(new_depends) or None)
|
||||
d.setVar(varname, bb.utils.join_deps(new_depends, commasep=False))
|
||||
|
||||
#bb.note("%s after: %s" % (varname, d.getVar(varname, True)))
|
||||
|
||||
@@ -1078,7 +1074,7 @@ python populate_packages () {
|
||||
dangling_links[pkg].append(os.path.normpath(target))
|
||||
|
||||
for pkg in package_list:
|
||||
rdepends = bb.utils.explode_dep_versions(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "")
|
||||
rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "")
|
||||
|
||||
for l in dangling_links[pkg]:
|
||||
found = False
|
||||
@@ -1091,7 +1087,7 @@ python populate_packages () {
|
||||
if p == pkg:
|
||||
break
|
||||
if p not in rdepends:
|
||||
rdepends[p] = ""
|
||||
rdepends[p] = []
|
||||
break
|
||||
if found == False:
|
||||
bb.note("%s contains dangling symlink to %s" % (pkg, l))
|
||||
@@ -1637,14 +1633,19 @@ def read_libdep_files(d):
|
||||
pkglibdeps = {}
|
||||
packages = d.getVar('PACKAGES', True).split()
|
||||
for pkg in packages:
|
||||
pkglibdeps[pkg] = []
|
||||
pkglibdeps[pkg] = {}
|
||||
for extension in ".shlibdeps", ".pcdeps", ".clilibdeps":
|
||||
depsfile = d.expand("${PKGDEST}/" + pkg + extension)
|
||||
if os.access(depsfile, os.R_OK):
|
||||
fd = file(depsfile)
|
||||
lines = fd.readlines()
|
||||
fd.close()
|
||||
pkglibdeps[pkg].extend([l.rstrip() for l in lines])
|
||||
for l in lines:
|
||||
l.rstrip()
|
||||
deps = bb.utils.explode_dep_versions2(l)
|
||||
for dep in deps:
|
||||
if not dep in pkglibdeps[pkg]:
|
||||
pkglibdeps[pkg][dep] = deps[dep]
|
||||
return pkglibdeps
|
||||
|
||||
python read_shlibdeps () {
|
||||
@@ -1652,9 +1653,14 @@ python read_shlibdeps () {
|
||||
|
||||
packages = d.getVar('PACKAGES', True).split()
|
||||
for pkg in packages:
|
||||
rdepends = bb.utils.explode_dep_versions(d.getVar('RDEPENDS_' + pkg, False) or d.getVar('RDEPENDS', False) or "")
|
||||
rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, False) or d.getVar('RDEPENDS', False) or "")
|
||||
for dep in pkglibdeps[pkg]:
|
||||
rdepends[dep] = ""
|
||||
# Add the dep if it's not already there, or if no comparison is set
|
||||
if dep not in rdepends:
|
||||
rdepends[dep] = []
|
||||
for v in pkglibdeps[pkg][dep]:
|
||||
if v not in rdepends[dep]:
|
||||
rdepends[dep].append(v)
|
||||
d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
|
||||
}
|
||||
|
||||
@@ -1679,7 +1685,7 @@ python package_depchains() {
|
||||
def pkg_adddeprrecs(pkg, base, suffix, getname, depends, d):
|
||||
|
||||
#bb.note('depends for %s is %s' % (base, depends))
|
||||
rreclist = bb.utils.explode_dep_versions(d.getVar('RRECOMMENDS_' + pkg, True) or d.getVar('RRECOMMENDS', True) or "")
|
||||
rreclist = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg, True) or d.getVar('RRECOMMENDS', True) or "")
|
||||
|
||||
for depend in depends:
|
||||
if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'):
|
||||
@@ -1692,7 +1698,7 @@ python package_depchains() {
|
||||
pkgname = getname(depend, suffix)
|
||||
#bb.note("Adding %s for %s" % (pkgname, depend))
|
||||
if pkgname not in rreclist and pkgname != pkg:
|
||||
rreclist[pkgname] = ""
|
||||
rreclist[pkgname] = []
|
||||
|
||||
#bb.note('setting: RRECOMMENDS_%s=%s' % (pkg, ' '.join(rreclist)))
|
||||
d.setVar('RRECOMMENDS_%s' % pkg, bb.utils.join_deps(rreclist, commasep=False))
|
||||
@@ -1700,7 +1706,7 @@ python package_depchains() {
|
||||
def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d):
|
||||
|
||||
#bb.note('rdepends for %s is %s' % (base, rdepends))
|
||||
rreclist = bb.utils.explode_dep_versions(d.getVar('RRECOMMENDS_' + pkg, True) or d.getVar('RRECOMMENDS', True) or "")
|
||||
rreclist = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg, True) or d.getVar('RRECOMMENDS', True) or "")
|
||||
|
||||
for depend in rdepends:
|
||||
if depend.find('virtual-locale-') != -1:
|
||||
@@ -1713,13 +1719,12 @@ python package_depchains() {
|
||||
pkgname = getname(depend, suffix)
|
||||
#bb.note("Adding %s for %s" % (pkgname, depend))
|
||||
if pkgname not in rreclist and pkgname != pkg:
|
||||
rreclist[pkgname] = ""
|
||||
rreclist[pkgname] = []
|
||||
|
||||
#bb.note('setting: RRECOMMENDS_%s=%s' % (pkg, ' '.join(rreclist)))
|
||||
d.setVar('RRECOMMENDS_%s' % pkg, bb.utils.join_deps(rreclist, commasep=False))
|
||||
|
||||
def add_dep(list, dep):
|
||||
dep = dep.split(' (')[0].strip()
|
||||
if dep not in list:
|
||||
list.append(dep)
|
||||
|
||||
@@ -1760,8 +1765,8 @@ python package_depchains() {
|
||||
pkglibdeps = read_libdep_files(d)
|
||||
pkglibdeplist = []
|
||||
for pkg in pkglibdeps:
|
||||
for dep in pkglibdeps[pkg]:
|
||||
add_dep(pkglibdeplist, dep)
|
||||
for k in pkglibdeps[pkg]:
|
||||
add_dep(pkglibdeplist, k)
|
||||
# FIXME this should not look at PN once all task recipes inherit from task.bbclass
|
||||
dbgdefaultdeps = ((d.getVar('DEPCHAIN_DBGDEFAULTDEPS', True) == '1') or (d.getVar('PN', True) or '').startswith('packagegroup-'))
|
||||
|
||||
|
||||
@@ -334,18 +334,37 @@ python do_package_deb () {
|
||||
|
||||
mapping_rename_hook(localdata)
|
||||
|
||||
rdepends = bb.utils.explode_dep_versions(localdata.getVar("RDEPENDS", True) or "")
|
||||
def debian_cmp_remap(var):
|
||||
# In debian '>' and '<' do not mean what it appears they mean
|
||||
# '<' = less or equal
|
||||
# '>' = greater or equal
|
||||
# adjust these to the '<<' and '>>' equivalents
|
||||
#
|
||||
for dep in var:
|
||||
for i, v in enumerate(var[dep]):
|
||||
if (v or "").startswith("< "):
|
||||
var[dep][i] = var[dep][i].replace("< ", "<< ")
|
||||
elif (v or "").startswith("> "):
|
||||
var[dep][i] = var[dep][i].replace("> ", ">> ")
|
||||
|
||||
rdepends = bb.utils.explode_dep_versions2(localdata.getVar("RDEPENDS", True) or "")
|
||||
debian_cmp_remap(rdepends)
|
||||
for dep in rdepends:
|
||||
if '*' in dep:
|
||||
del rdepends[dep]
|
||||
rrecommends = bb.utils.explode_dep_versions(localdata.getVar("RRECOMMENDS", True) or "")
|
||||
rrecommends = bb.utils.explode_dep_versions2(localdata.getVar("RRECOMMENDS", True) or "")
|
||||
debian_cmp_remap(rrecommends)
|
||||
for dep in rrecommends:
|
||||
if '*' in dep:
|
||||
del rrecommends[dep]
|
||||
rsuggests = bb.utils.explode_dep_versions(localdata.getVar("RSUGGESTS", True) or "")
|
||||
rprovides = bb.utils.explode_dep_versions(localdata.getVar("RPROVIDES", True) or "")
|
||||
rreplaces = bb.utils.explode_dep_versions(localdata.getVar("RREPLACES", True) or "")
|
||||
rconflicts = bb.utils.explode_dep_versions(localdata.getVar("RCONFLICTS", True) or "")
|
||||
rsuggests = bb.utils.explode_dep_versions2(localdata.getVar("RSUGGESTS", True) or "")
|
||||
debian_cmp_remap(rsuggests)
|
||||
rprovides = bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES", True) or "")
|
||||
debian_cmp_remap(rprovides)
|
||||
rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES", True) or "")
|
||||
debian_cmp_remap(rreplaces)
|
||||
rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS", True) or "")
|
||||
debian_cmp_remap(rconflicts)
|
||||
if rdepends:
|
||||
ctrlfile.write("Depends: %s\n" % unicode(bb.utils.join_deps(rdepends)))
|
||||
if rsuggests:
|
||||
|
||||
@@ -139,7 +139,7 @@ package_install_internal_ipk() {
|
||||
|
||||
mkdir -p ${target_rootfs}${localstatedir}/lib/opkg/
|
||||
|
||||
local ipkg_args="-f ${conffile} -o ${target_rootfs} --force-overwrite --force_postinstall"
|
||||
local ipkg_args="-f ${conffile} -o ${target_rootfs} --force-overwrite --force_postinstall --prefer-arch-to-version"
|
||||
|
||||
opkg-cl ${ipkg_args} update
|
||||
|
||||
@@ -182,7 +182,7 @@ ipk_log_check() {
|
||||
then
|
||||
echo "log_check: There were error messages in the logfile"
|
||||
printf "log_check: Matched keyword: [$keyword_die]\n\n"
|
||||
echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die"
|
||||
echo "$lf_txt" | grep -v log_check | grep -C 5 "$keyword_die"
|
||||
echo ""
|
||||
do_exit=1
|
||||
fi
|
||||
@@ -372,12 +372,31 @@ python do_package_ipk () {
|
||||
|
||||
mapping_rename_hook(localdata)
|
||||
|
||||
rdepends = bb.utils.explode_dep_versions(localdata.getVar("RDEPENDS", True) or "")
|
||||
rrecommends = bb.utils.explode_dep_versions(localdata.getVar("RRECOMMENDS", True) or "")
|
||||
rsuggests = bb.utils.explode_dep_versions(localdata.getVar("RSUGGESTS", True) or "")
|
||||
rprovides = bb.utils.explode_dep_versions(localdata.getVar("RPROVIDES", True) or "")
|
||||
rreplaces = bb.utils.explode_dep_versions(localdata.getVar("RREPLACES", True) or "")
|
||||
rconflicts = bb.utils.explode_dep_versions(localdata.getVar("RCONFLICTS", True) or "")
|
||||
def debian_cmp_remap(var):
|
||||
# In debian '>' and '<' do not mean what it appears they mean
|
||||
# '<' = less or equal
|
||||
# '>' = greater or equal
|
||||
# adjust these to the '<<' and '>>' equivalents
|
||||
#
|
||||
for dep in var:
|
||||
for i, v in enumerate(var[dep]):
|
||||
if (v or "").startswith("< "):
|
||||
var[dep][i] = var[dep][i].replace("< ", "<< ")
|
||||
elif (v or "").startswith("> "):
|
||||
var[dep][i] = var[dep][i].replace("> ", ">> ")
|
||||
|
||||
rdepends = bb.utils.explode_dep_versions2(localdata.getVar("RDEPENDS", True) or "")
|
||||
debian_cmp_remap(rdepends)
|
||||
rrecommends = bb.utils.explode_dep_versions2(localdata.getVar("RRECOMMENDS", True) or "")
|
||||
debian_cmp_remap(rrecommends)
|
||||
rsuggests = bb.utils.explode_dep_versions2(localdata.getVar("RSUGGESTS", True) or "")
|
||||
debian_cmp_remap(rsuggests)
|
||||
rprovides = bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES", True) or "")
|
||||
debian_cmp_remap(rprovides)
|
||||
rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES", True) or "")
|
||||
debian_cmp_remap(rreplaces)
|
||||
rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS", True) or "")
|
||||
debian_cmp_remap(rconflicts)
|
||||
|
||||
if rdepends:
|
||||
ctrlfile.write("Depends: %s\n" % bb.utils.join_deps(rdepends))
|
||||
|
||||
@@ -276,8 +276,8 @@ process_pkg_list_rpm() {
|
||||
package_install_internal_rpm () {
|
||||
|
||||
local target_rootfs="${INSTALL_ROOTFS_RPM}"
|
||||
local platform="${INSTALL_PLATFORM_RPM}"
|
||||
local platform_extra="${INSTALL_PLATFORM_EXTRA_RPM}"
|
||||
local platform="`echo ${INSTALL_PLATFORM_RPM} | sed 's#-#_#g'`"
|
||||
local platform_extra="`echo ${INSTALL_PLATFORM_EXTRA_RPM} | sed 's#-#_#g'`"
|
||||
local confbase="${INSTALL_CONFBASE_RPM}"
|
||||
local package_to_install="${INSTALL_PACKAGES_RPM}"
|
||||
local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}"
|
||||
@@ -317,15 +317,22 @@ package_install_internal_rpm () {
|
||||
# we should add the previous solution manifest to the full "original" set to
|
||||
# avoid duplicate install steps.
|
||||
echo "Update original solution..."
|
||||
cat ${target_rootfs}/install/initial_solution.manifest >> ${target_rootfs}/install/original_solution.manifest
|
||||
cat ${target_rootfs}/install/total_solution.manifest >> ${target_rootfs}/install/original_solution.manifest
|
||||
rm ${target_rootfs}/install/initial_solution.manifest
|
||||
rm ${target_rootfs}/install/total_solution.manifest
|
||||
for m in ${target_rootfs}/install/initial_solution.manifest \
|
||||
${target_rootfs}/install/total_solution.manifest; do
|
||||
if [ -s $m ]; then
|
||||
cat $m >> ${target_rootfs}/install/original_solution.manifest
|
||||
rm -f $m
|
||||
fi
|
||||
done
|
||||
sort -u ${target_rootfs}/install/original_solution.manifest -o ${target_rootfs}/install/original_solution.manifest.new
|
||||
mv ${target_rootfs}/install/original_solution.manifest.new ${target_rootfs}/install/original_solution.manifest
|
||||
fi
|
||||
|
||||
# Setup manifest of packages to install...
|
||||
mkdir -p ${target_rootfs}/install
|
||||
rm -f ${target_rootfs}/install/install.manifest
|
||||
rm -f ${target_rootfs}/install/install_multilib.manifest
|
||||
rm -f ${target_rootfs}/install/install_attemptonly.manifest
|
||||
|
||||
# Uclibc builds don't provide this stuff...
|
||||
if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then
|
||||
@@ -425,7 +432,7 @@ package_install_internal_rpm () {
|
||||
fi
|
||||
|
||||
# Now that we have a solution, pull out a list of what to install...
|
||||
echo "Manifest: ${target_rootfs}/install/install.manifest"
|
||||
echo "Manifest: ${target_rootfs}/install/install_solution.manifest"
|
||||
${RPM} -D "_dbpath ${target_rootfs}/install" -qa --qf "%{packageorigin}\n" \
|
||||
--root "${target_rootfs}/install" \
|
||||
-D "__dbi_txn create nofsync private" \
|
||||
@@ -456,8 +463,8 @@ package_install_internal_rpm () {
|
||||
|
||||
fi
|
||||
|
||||
cat ${target_rootfs}/install/install_solution.manifest > ${target_rootfs}/install/total_solution.manifest
|
||||
cat ${target_rootfs}/install/install_multilib_solution.manifest >> ${target_rootfs}/install/total_solution.manifest
|
||||
cat ${target_rootfs}/install/install_solution.manifest \
|
||||
${target_rootfs}/install/install_multilib_solution.manifest | sort -u > ${target_rootfs}/install/total_solution.manifest
|
||||
|
||||
# Construct install scriptlet wrapper
|
||||
cat << EOF > ${WORKDIR}/scriptlet_wrapper
|
||||
@@ -518,8 +525,8 @@ EOF
|
||||
if [ "${INSTALL_COMPLEMENTARY_RPM}" = "1" ] ; then
|
||||
# Only install packages not already installed (dependency calculation will
|
||||
# almost certainly have added some that have been)
|
||||
sort ${target_rootfs}/install/original_solution.manifest > ${target_rootfs}/install/original_solution_sorted.manifest
|
||||
sort ${target_rootfs}/install/total_solution.manifest > ${target_rootfs}/install/total_solution_sorted.manifest
|
||||
sort -u ${target_rootfs}/install/original_solution.manifest > ${target_rootfs}/install/original_solution_sorted.manifest
|
||||
sort -u ${target_rootfs}/install/total_solution.manifest > ${target_rootfs}/install/total_solution_sorted.manifest
|
||||
comm -2 -3 ${target_rootfs}/install/total_solution_sorted.manifest \
|
||||
${target_rootfs}/install/original_solution_sorted.manifest > \
|
||||
${target_rootfs}/install/diff.manifest
|
||||
@@ -605,6 +612,13 @@ python write_specfile () {
|
||||
name = "".join(name.split(eext[1] + '-'))
|
||||
return name
|
||||
|
||||
def strip_multilib_deps(deps, d):
|
||||
depends = bb.utils.explode_dep_versions2(deps or "")
|
||||
newdeps = {}
|
||||
for dep in depends:
|
||||
newdeps[strip_multilib(dep, d)] = depends[dep]
|
||||
return bb.utils.join_deps(newdeps)
|
||||
|
||||
# ml = d.getVar("MLPREFIX", True)
|
||||
# if ml and name and len(ml) != 0 and name.find(ml) == 0:
|
||||
# return ml.join(name.split(ml, 1)[1:])
|
||||
@@ -627,18 +641,20 @@ python write_specfile () {
|
||||
def translate_vers(varname, d):
|
||||
depends = d.getVar(varname, True)
|
||||
if depends:
|
||||
depends_dict = bb.utils.explode_dep_versions(depends)
|
||||
depends_dict = bb.utils.explode_dep_versions2(depends)
|
||||
newdeps_dict = {}
|
||||
for dep in depends_dict:
|
||||
ver = depends_dict[dep]
|
||||
if dep and ver:
|
||||
verlist = []
|
||||
for ver in depends_dict[dep]:
|
||||
if '-' in ver:
|
||||
subd = oe.packagedata.read_subpkgdata_dict(dep, d)
|
||||
if 'PKGV' in subd:
|
||||
pv = subd['PKGV']
|
||||
reppv = pv.replace('-', '+')
|
||||
ver = ver.replace(pv, reppv)
|
||||
newdeps_dict[dep] = ver
|
||||
verlist.append(ver.replace(pv, reppv))
|
||||
else:
|
||||
verlist.append(ver)
|
||||
newdeps_dict[dep] = verlist
|
||||
depends = bb.utils.join_deps(newdeps_dict)
|
||||
d.setVar(varname, depends.strip())
|
||||
|
||||
@@ -647,14 +663,13 @@ python write_specfile () {
|
||||
def print_deps(variable, tag, array, d):
|
||||
depends = variable
|
||||
if depends:
|
||||
depends_dict = bb.utils.explode_dep_versions(depends)
|
||||
depends_dict = bb.utils.explode_dep_versions2(depends)
|
||||
for dep in depends_dict:
|
||||
ver = depends_dict[dep]
|
||||
if dep and ver:
|
||||
for ver in depends_dict[dep]:
|
||||
ver = ver.replace('(', '')
|
||||
ver = ver.replace(')', '')
|
||||
array.append("%s: %s %s" % (tag, dep, ver))
|
||||
else:
|
||||
if not len(depends_dict[dep]):
|
||||
array.append("%s: %s" % (tag, dep))
|
||||
|
||||
def walk_files(walkpath, target, conffiles):
|
||||
@@ -706,7 +721,7 @@ python write_specfile () {
|
||||
srchomepage = d.getVar('HOMEPAGE', True)
|
||||
srcdescription = d.getVar('DESCRIPTION', True) or "."
|
||||
|
||||
srcdepends = strip_multilib(d.getVar('DEPENDS', True), d)
|
||||
srcdepends = strip_multilib_deps(d.getVar('DEPENDS', True), d)
|
||||
srcrdepends = []
|
||||
srcrrecommends = []
|
||||
srcrsuggests = []
|
||||
@@ -769,12 +784,12 @@ python write_specfile () {
|
||||
# Map the dependencies into their final form
|
||||
mapping_rename_hook(localdata)
|
||||
|
||||
splitrdepends = strip_multilib(localdata.getVar('RDEPENDS', True), d) or ""
|
||||
splitrrecommends = strip_multilib(localdata.getVar('RRECOMMENDS', True), d) or ""
|
||||
splitrsuggests = strip_multilib(localdata.getVar('RSUGGESTS', True), d) or ""
|
||||
splitrprovides = strip_multilib(localdata.getVar('RPROVIDES', True), d) or ""
|
||||
splitrreplaces = strip_multilib(localdata.getVar('RREPLACES', True), d) or ""
|
||||
splitrconflicts = strip_multilib(localdata.getVar('RCONFLICTS', True), d) or ""
|
||||
splitrdepends = strip_multilib_deps(localdata.getVar('RDEPENDS', True), d)
|
||||
splitrrecommends = strip_multilib_deps(localdata.getVar('RRECOMMENDS', True), d)
|
||||
splitrsuggests = strip_multilib_deps(localdata.getVar('RSUGGESTS', True), d)
|
||||
splitrprovides = strip_multilib_deps(localdata.getVar('RPROVIDES', True), d)
|
||||
splitrreplaces = strip_multilib_deps(localdata.getVar('RREPLACES', True), d)
|
||||
splitrconflicts = strip_multilib_deps(localdata.getVar('RCONFLICTS', True), d)
|
||||
splitrobsoletes = []
|
||||
|
||||
# Gather special src/first package data
|
||||
@@ -823,16 +838,16 @@ python write_specfile () {
|
||||
spec_preamble_bottom.append('Group: %s' % splitsection)
|
||||
|
||||
# Replaces == Obsoletes && Provides
|
||||
if splitrreplaces and splitrreplaces.strip() != "":
|
||||
for dep in splitrreplaces.split(','):
|
||||
if splitrprovides:
|
||||
splitrprovides = splitrprovides + ", " + dep
|
||||
else:
|
||||
splitrprovides = dep
|
||||
if splitrobsoletes:
|
||||
splitrobsoletes = splitrobsoletes + ", " + dep
|
||||
else:
|
||||
splitrobsoletes = dep
|
||||
robsoletes = bb.utils.explode_dep_versions2(splitrobsoletes or "")
|
||||
rprovides = bb.utils.explode_dep_versions2(splitrprovides or "")
|
||||
rreplaces = bb.utils.explode_dep_versions2(splitrreplaces or "")
|
||||
for dep in rreplaces:
|
||||
if not dep in robsoletes:
|
||||
robsoletes[dep] = rreplaces[dep]
|
||||
if not dep in rprovides:
|
||||
rprovides[dep] = rreplaces[dep]
|
||||
splitrobsoletes = bb.utils.join_deps(robsoletes, commasep=False)
|
||||
splitrprovides = bb.utils.join_deps(rprovides, commasep=False)
|
||||
|
||||
print_deps(splitrdepends, "Requires", spec_preamble_bottom, d)
|
||||
# Suggests in RPM are like recommends in OE-core!
|
||||
@@ -844,7 +859,7 @@ python write_specfile () {
|
||||
|
||||
# conflicts can not be in a provide! We will need to filter it.
|
||||
if splitrconflicts:
|
||||
depends_dict = bb.utils.explode_dep_versions(splitrconflicts)
|
||||
depends_dict = bb.utils.explode_dep_versions2(splitrconflicts)
|
||||
newdeps_dict = {}
|
||||
for dep in depends_dict:
|
||||
if dep not in splitrprovides:
|
||||
@@ -915,16 +930,16 @@ python write_specfile () {
|
||||
tail_source(d)
|
||||
|
||||
# Replaces == Obsoletes && Provides
|
||||
if srcrreplaces and srcrreplaces.strip() != "":
|
||||
for dep in srcrreplaces.split(','):
|
||||
if srcrprovides:
|
||||
srcrprovides = srcrprovides + ", " + dep
|
||||
else:
|
||||
srcrprovides = dep
|
||||
if srcrobsoletes:
|
||||
srcrobsoletes = srcrobsoletes + ", " + dep
|
||||
else:
|
||||
srcrobsoletes = dep
|
||||
robsoletes = bb.utils.explode_dep_versions2(srcrobsoletes or "")
|
||||
rprovides = bb.utils.explode_dep_versions2(srcrprovides or "")
|
||||
rreplaces = bb.utils.explode_dep_versions2(srcrreplaces or "")
|
||||
for dep in rreplaces:
|
||||
if not dep in robsoletes:
|
||||
robsoletes[dep] = rreplaces[dep]
|
||||
if not dep in rprovides:
|
||||
rprovides[dep] = rreplaces[dep]
|
||||
srcrobsoletes = bb.utils.join_deps(robsoletes, commasep=False)
|
||||
srcrprovides = bb.utils.join_deps(rprovides, commasep=False)
|
||||
|
||||
print_deps(srcdepends, "BuildRequires", spec_preamble_top, d)
|
||||
print_deps(srcrdepends, "Requires", spec_preamble_top, d)
|
||||
@@ -937,7 +952,7 @@ python write_specfile () {
|
||||
|
||||
# conflicts can not be in a provide! We will need to filter it.
|
||||
if srcrconflicts:
|
||||
depends_dict = bb.utils.explode_dep_versions(srcrconflicts)
|
||||
depends_dict = bb.utils.explode_dep_versions2(srcrconflicts)
|
||||
newdeps_dict = {}
|
||||
for dep in depends_dict:
|
||||
if dep not in srcrprovides:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
DEPENDS_prepend = "${@["qt4-embedded ", ""][(d.getVar('PN', True)[:12] == 'qt4-embedded')]}"
|
||||
QT4EDEPENDS ?= "qt4-embedded "
|
||||
DEPENDS_prepend = "${QT4EDEPENDS}"
|
||||
|
||||
inherit qmake2
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
DEPENDS_prepend = "${@base_contains("PROVIDES", "qt4-x11", "", "qt4-x11 ", d)}"
|
||||
QT4DEPENDS ?= "qt4-x11 "
|
||||
DEPENDS_prepend = "${QT4DEPENDS}"
|
||||
|
||||
inherit qmake2
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ do_rootfs[recrdeptask] += "do_package_write_ipk"
|
||||
|
||||
do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock"
|
||||
|
||||
IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} --force-overwrite"
|
||||
IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} --force-overwrite --prefer-arch-to-version"
|
||||
# The _POST version also works when constructing the matching SDK
|
||||
IPKG_ARGS_POST = "-f ${IPKGCONF_TARGET} -o $INSTALL_ROOTFS_IPK --force-overwrite"
|
||||
IPKG_ARGS_POST = "-f ${IPKGCONF_TARGET} -o $INSTALL_ROOTFS_IPK --force-overwrite --prefer-arch-to-version"
|
||||
|
||||
OPKG_PREPROCESS_COMMANDS = "package_update_index_ipk; package_generate_ipkg_conf"
|
||||
|
||||
|
||||
@@ -4,9 +4,62 @@
|
||||
|
||||
SANITY_REQUIRED_UTILITIES ?= "patch diffstat makeinfo git bzip2 tar gzip gawk chrpath wget cpio"
|
||||
|
||||
def raise_sanity_error(msg, d):
|
||||
python check_bblayers_conf() {
|
||||
bblayers_fn = os.path.join(d.getVar('TOPDIR', True), 'conf/bblayers.conf')
|
||||
|
||||
current_lconf = int(d.getVar('LCONF_VERSION', True))
|
||||
if not current_lconf:
|
||||
sys.exit()
|
||||
lconf_version = int(d.getVar('LAYER_CONF_VERSION', True))
|
||||
lines = []
|
||||
|
||||
import re
|
||||
def find_line(pattern, lines):
|
||||
return next(((index, line)
|
||||
for index, line in enumerate(lines)
|
||||
if re.search(pattern, line)), (None, None))
|
||||
|
||||
if current_lconf < 4:
|
||||
sys.exit()
|
||||
|
||||
with open(bblayers_fn, 'r') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
if current_lconf == 4:
|
||||
topdir_var = '$' + '{TOPDIR}'
|
||||
index, bbpath_line = find_line('BBPATH', lines)
|
||||
if bbpath_line:
|
||||
start = bbpath_line.find('"')
|
||||
if start != -1 and (len(bbpath_line) != (start + 1)):
|
||||
if bbpath_line[start + 1] == '"':
|
||||
lines[index] = (bbpath_line[:start + 1] +
|
||||
topdir_var + bbpath_line[start + 1:])
|
||||
else:
|
||||
if not topdir_var in bbpath_line:
|
||||
lines[index] = (bbpath_line[:start + 1] +
|
||||
topdir_var + ':' + bbpath_line[start + 1:])
|
||||
else:
|
||||
sys.exit()
|
||||
else:
|
||||
index, bbfiles_line = find_line('BBFILES', lines)
|
||||
if bbfiles_line:
|
||||
lines.insert(index, 'BBPATH = "' + topdir_var + '"\n')
|
||||
else:
|
||||
sys.exit()
|
||||
|
||||
index, line = find_line('LCONF_VERSION', lines)
|
||||
current_lconf += 1
|
||||
lines[index] = 'LCONF_VERSION = "%d"\n' % current_lconf
|
||||
with open(bblayers_fn, "w") as f:
|
||||
f.write(''.join(lines))
|
||||
}
|
||||
|
||||
def raise_sanity_error(msg, d, network_error=False):
|
||||
if d.getVar("SANITY_USE_EVENTS", True) == "1":
|
||||
bb.event.fire(bb.event.SanityCheckFailed(msg), d)
|
||||
try:
|
||||
bb.event.fire(bb.event.SanityCheckFailed(msg, network_error), d)
|
||||
except TypeError:
|
||||
bb.event.fire(bb.event.SanityCheckFailed(msg), d)
|
||||
return
|
||||
|
||||
bb.fatal(""" OE-core's config sanity checker detected a potential misconfiguration.
|
||||
@@ -119,8 +172,9 @@ def check_sanity_tmpdir_change(tmpdir, data):
|
||||
# Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS)
|
||||
testmsg = check_create_long_filename(tmpdir, "TMPDIR")
|
||||
# Check that we can fetch from various network transports
|
||||
errmsg = check_connectivity(data)
|
||||
testmsg = testmsg + check_connectivity(data)
|
||||
return testmsg
|
||||
return testmsg, errmsg != ""
|
||||
|
||||
def check_sanity_version_change(data):
|
||||
# Sanity checks to be done when SANITY_VERSION changes
|
||||
@@ -337,7 +391,16 @@ def check_sanity(sanity_data):
|
||||
current_lconf = sanity_data.getVar('LCONF_VERSION', True)
|
||||
lconf_version = sanity_data.getVar('LAYER_CONF_VERSION', True)
|
||||
if current_lconf != lconf_version:
|
||||
messages = messages + "Your version of bblayers.conf was generated from an older version of bblayers.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/bblayers.conf ${COREBASE}/meta*/conf/bblayers.conf.sample\" is a good way to visualise the changes.\n"
|
||||
try:
|
||||
bb.build.exec_func("check_bblayers_conf", sanity_data)
|
||||
if sanity_data.getVar("SANITY_USE_EVENTS", True) == "1":
|
||||
bb.event.fire(bb.event.SanityCheckFailed("Your conf/bblayers.conf has been automatically updated. Please close and re-run."), sanity_data)
|
||||
return
|
||||
else:
|
||||
bb.note("Your conf/bblayers.conf has been automatically updated. Please re-run %s." % os.path.basename(sys.argv[0]))
|
||||
sys.exit(0)
|
||||
except Exception:
|
||||
messages = messages + "Your version of bblayers.conf was generated from an older version of bblayers.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/bblayers.conf ${COREBASE}/meta*/conf/bblayers.conf.sample\" is a good way to visualise the changes.\n"
|
||||
|
||||
# If we have a site.conf, check it's valid
|
||||
if check_conf_exists("conf/site.conf", sanity_data):
|
||||
@@ -475,16 +538,18 @@ def check_sanity(sanity_data):
|
||||
last_sstate_dir = line.split()[1]
|
||||
|
||||
sanity_version = int(sanity_data.getVar('SANITY_VERSION', True) or 1)
|
||||
network_error = False
|
||||
if last_sanity_version < sanity_version:
|
||||
messages = messages + check_sanity_version_change(sanity_data)
|
||||
messages = messages + check_sanity_tmpdir_change(tmpdir, sanity_data)
|
||||
err, network_error = check_sanity_tmpdir_change(tmpdir, sanity_data)
|
||||
messages = messages + err
|
||||
messages = messages + check_sanity_sstate_dir_change(sstate_dir, sanity_data)
|
||||
else:
|
||||
if last_tmpdir != tmpdir:
|
||||
messages = messages + check_sanity_tmpdir_change(tmpdir, sanity_data)
|
||||
err, network_error = check_sanity_tmpdir_change(tmpdir, sanity_data)
|
||||
messages = messages + err
|
||||
if last_sstate_dir != sstate_dir:
|
||||
messages = messages + check_sanity_sstate_dir_change(sstate_dir, sanity_data)
|
||||
|
||||
if os.path.exists("conf") and not messages:
|
||||
f = file(sanityverfile, 'w')
|
||||
f.write("SANITY_VERSION %s\n" % sanity_version)
|
||||
@@ -555,7 +620,7 @@ def check_sanity(sanity_data):
|
||||
messages = messages + "Error, you have a space in your COREBASE directory path. Please move the installation to a directory which doesn't include a space."
|
||||
|
||||
if messages != "":
|
||||
raise_sanity_error(sanity_data.expand(messages), sanity_data)
|
||||
raise_sanity_error(sanity_data.expand(messages), sanity_data, network_error)
|
||||
|
||||
# Create a copy of the datastore and finalise it to ensure appends and
|
||||
# overrides are set - the datastore has yet to be finalised at ConfigParsed
|
||||
|
||||
@@ -18,6 +18,7 @@ siteconfig_do_siteconfig_gencache () {
|
||||
>${WORKDIR}/site_config_${MACHINE}/configure.ac
|
||||
cd ${WORKDIR}/site_config_${MACHINE}
|
||||
autoconf
|
||||
rm -f ${PN}_cache
|
||||
CONFIG_SITE="" ${EXTRASITECONFIG} ./configure ${CONFIGUREOPTS} --cache-file ${PN}_cache
|
||||
sed -n -e "/ac_cv_c_bigendian/p" -e "/ac_cv_sizeof_/p" \
|
||||
-e "/ac_cv_type_/p" -e "/ac_cv_header_/p" -e "/ac_cv_func_/p" \
|
||||
|
||||
@@ -3,7 +3,6 @@ SSTATE_VERSION = "2"
|
||||
SSTATE_MANIFESTS ?= "${TMPDIR}/sstate-control"
|
||||
SSTATE_MANFILEBASE = "${SSTATE_MANIFESTS}/manifest-${SSTATE_MANMACH}-"
|
||||
SSTATE_MANFILEPREFIX = "${SSTATE_MANFILEBASE}${PN}"
|
||||
SSTATE_MASTERMANIFEST = "${SSTATE_MANIFESTS}/master.list"
|
||||
|
||||
def generate_sstatefn(spec, hash, d):
|
||||
if not hash:
|
||||
@@ -18,7 +17,17 @@ SSTATE_EXTRAPATH = ""
|
||||
SSTATE_EXTRAPATHWILDCARD = ""
|
||||
SSTATE_PATHSPEC = "${SSTATE_DIR}/${SSTATE_EXTRAPATHWILDCARD}*/${SSTATE_PKGSPEC}"
|
||||
|
||||
SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR_IPK}/all/ ${DEPLOY_DIR_RPM}/all ${DEPLOY_DIR_DEB}/all/"
|
||||
# In theory we should be using:
|
||||
# SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR_IPK}/all/ ${DEPLOY_DIR_RPM}/all ${DEPLOY_DIR_DEB}/all/ ${TMPDIR}/pkgdata/all${TARGET_VENDOR}-${TARGET_OS}"
|
||||
# However until do_package is not machine specific, we'll have to make do with all of deploy/pkgdata.
|
||||
SSTATE_DUPWHITELIST = "${DEPLOY_DIR}/ ${TMPDIR}/pkgdata/"
|
||||
# Also need to make cross recipes append to ${PN} and install once for any given PACAGE_ARCH so
|
||||
# can avoid multiple installs (e.g. routerstationpro+qemumips both using mips32)
|
||||
SSTATE_DUPWHITELIST += "${STAGING_LIBDIR_NATIVE}/${MULTIMACH_TARGET_SYS} ${STAGING_DIR_NATIVE}/usr/libexec/${MULTIMACH_TARGET_SYS} ${STAGING_BINDIR_NATIVE}/${MULTIMACH_TARGET_SYS} ${STAGING_DIR_NATIVE}${includedir_native}/gcc-build-internal-${MULTIMACH_TARGET_SYS}"
|
||||
# Also avoid python issues until we fix the python recipe
|
||||
SSTATE_DUPWHITELIST += "${STAGING_LIBDIR}/python2.7/config/Makefile ${STAGING_LIBDIR}/libpython2.7 ${STAGING_INCDIR}/python2.7/pyconfig.h"
|
||||
# Avoid docbook/sgml catalog warnings for now
|
||||
SSTATE_DUPWHITELIST += "${STAGING_ETCDIR_NATIVE}/sgml ${STAGING_DATADIR_NATIVE}/sgml"
|
||||
|
||||
SSTATE_SCAN_FILES ?= "*.la *-config *_config"
|
||||
SSTATE_SCAN_CMD ?= 'find ${SSTATE_BUILDDIR} \( -name "${@"\" -o -name \"".join(d.getVar("SSTATE_SCAN_FILES", True).split())}" \) -type f'
|
||||
@@ -142,17 +151,12 @@ def sstate_install(ss, d):
|
||||
dstdir = dstdir + "/"
|
||||
shareddirs.append(dstdir)
|
||||
|
||||
# Check the file list for conflicts against the master manifest
|
||||
mastermanifest = d.getVar("SSTATE_MASTERMANIFEST", True)
|
||||
whitelist = d.getVar("SSTATE_DUPWHITELIST", True)
|
||||
lock = bb.utils.lockfile(mastermanifest + ".lock")
|
||||
if not os.path.exists(mastermanifest):
|
||||
open(mastermanifest, "w").close()
|
||||
fileslist = [line.strip() for line in open(mastermanifest)]
|
||||
bb.utils.unlockfile(lock)
|
||||
# Check the file list for conflicts against files which already exist
|
||||
whitelist = (d.getVar("SSTATE_DUPWHITELIST", True) or "").split()
|
||||
match = []
|
||||
for f in sharedfiles:
|
||||
if f in fileslist:
|
||||
if os.path.exists(f):
|
||||
f = os.path.normpath(f)
|
||||
realmatch = True
|
||||
for w in whitelist:
|
||||
if f.startswith(w):
|
||||
@@ -163,14 +167,10 @@ def sstate_install(ss, d):
|
||||
if match:
|
||||
bb.warn("The recipe is trying to install files into a shared area when those files already exist. Those files are:\n %s" % "\n ".join(match))
|
||||
|
||||
# Write out the manifest and add to the task's manifest file
|
||||
lock = bb.utils.lockfile(mastermanifest + ".lock")
|
||||
mf = open(mastermanifest, "a")
|
||||
# Write out the manifest
|
||||
f = open(manifest, "w")
|
||||
for file in sharedfiles:
|
||||
mf.write(file + "\n")
|
||||
f.write(file + "\n")
|
||||
bb.utils.unlockfile(lock)
|
||||
|
||||
# We want to ensure that directories appear at the end of the manifest
|
||||
# so that when we test to see if they should be deleted any contents
|
||||
@@ -301,20 +301,6 @@ def sstate_clean_manifest(manifest, d):
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
# Remove the entries from the master manifest
|
||||
mastermanifest = d.getVar("SSTATE_MASTERMANIFEST", True)
|
||||
lock = bb.utils.lockfile(mastermanifest + ".lock")
|
||||
if not os.path.exists(mastermanifest):
|
||||
open(mastermanifest, "w").close()
|
||||
mf = open(mastermanifest + ".new", "w")
|
||||
for line in open(mastermanifest, "r"):
|
||||
if not line or line in entries:
|
||||
continue
|
||||
mf.write(line)
|
||||
mf.close()
|
||||
os.rename(mastermanifest + ".new", mastermanifest)
|
||||
bb.utils.unlockfile(lock)
|
||||
|
||||
oe.path.remove(manifest)
|
||||
|
||||
def sstate_clean(ss, d):
|
||||
|
||||
@@ -26,6 +26,7 @@ toolchain_create_sdk_env_script () {
|
||||
echo 'export OBJDUMP=${TARGET_PREFIX}objdump' >> $script
|
||||
echo 'export AR=${TARGET_PREFIX}ar' >> $script
|
||||
echo 'export NM=${TARGET_PREFIX}nm' >> $script
|
||||
echo 'export M4=m4' >> $script
|
||||
echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
|
||||
echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux --with-libtool-sysroot=${SDKTARGETSYSROOT}"' >> $script
|
||||
if [ "${TARGET_OS}" = "darwin8" ]; then
|
||||
|
||||
@@ -161,6 +161,7 @@ DATETIME = "${DATE}${TIME}"
|
||||
# its own in staging
|
||||
ASSUME_PROVIDED = "\
|
||||
bzip2-native \
|
||||
chrpath-native \
|
||||
git-native \
|
||||
grep-native \
|
||||
diffstat-native \
|
||||
@@ -170,6 +171,7 @@ ASSUME_PROVIDED = "\
|
||||
tar-native \
|
||||
virtual/libintl-native \
|
||||
"
|
||||
# gzip-native should be listed above?
|
||||
|
||||
##################################################################
|
||||
# Package default variables.
|
||||
@@ -683,6 +685,7 @@ include conf/machine-sdk/${SDKMACHINE}.conf
|
||||
include conf/distro/${DISTRO}.conf
|
||||
include conf/distro/defaultsetup.conf
|
||||
include conf/documentation.conf
|
||||
include conf/licenses.conf
|
||||
require conf/sanity.conf
|
||||
|
||||
##################################################################
|
||||
@@ -764,7 +767,7 @@ BB_CONSOLELOG ?= "${LOG_DIR}/cooker/${MACHINE}/${DATETIME}.log"
|
||||
|
||||
# Setup our default hash policy
|
||||
BB_SIGNATURE_HANDLER ?= "OEBasicHash"
|
||||
BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE"
|
||||
BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE"
|
||||
BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SESSION_MANAGER DBUS_SESSION_BUS_ADDRESS SSH_AGENT_PID XDG_SESSION_COOKIE SSH_AUTH_SOCK XAUTHORITY PSEUDO_BUILD BB_ENV_EXTRAWHITE DISABLE_SANITY_CHECKS PARALLEL_MAKE BB_NUMBER_THREADS"
|
||||
BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc defaultval _append _prepend deps depends lockfiles type vardepsexclude \
|
||||
vardeps vardepvalue file-checksums python func task export unexport noexec \
|
||||
|
||||
@@ -3,9 +3,13 @@ BBPATH .= ":${LAYERDIR}"
|
||||
# We have a packages directory, add to BBFILES
|
||||
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb"
|
||||
|
||||
BBFILE_COLLECTIONS += "normal"
|
||||
BBFILE_PATTERN_normal := "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_normal = "5"
|
||||
BBFILE_COLLECTIONS += "core"
|
||||
BBFILE_PATTERN_core := "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_core = "5"
|
||||
|
||||
# This should only be incremented on significant changes that will
|
||||
# cause compatibility issues with other layers
|
||||
LAYERVERSION_core = "1"
|
||||
|
||||
# Set a variable to get to the top of the metadata location
|
||||
COREBASE := '${@os.path.normpath("${LAYERDIR}/../")}'
|
||||
|
||||
@@ -39,6 +39,70 @@ SRC_DISTRIBUTE_LICENSES += "SPL-1.0 SugarCRM-1 SugarCRM-1.1.3 UCB VSL-1.0 W3C"
|
||||
SRC_DISTRIBUTE_LICENSES += "Watcom-1.0 WXwindows XFree86-1.1 Xnet YPL-1.1"
|
||||
SRC_DISTRIBUTE_LICENSES += "Zimbra-1.3 Zlib ZPL-1.1 ZPL-2.0 ZPL-2.1"
|
||||
|
||||
# Standards are great! Everyone has their own. In an effort to standardize licensing
|
||||
# names, common-licenses will use the SPDX standard license names. In order to not
|
||||
# break the non-standardized license names that we find in LICENSE, we'll set
|
||||
# up a bunch of VarFlags to accomodate non-SPDX license names.
|
||||
#
|
||||
# We should really discuss standardizing this field, but that's a longer term goal.
|
||||
# For now, we can do this and it should grab the most common LICENSE naming variations.
|
||||
#
|
||||
# We should NEVER have a GPL/LGPL without a version!!!!
|
||||
# Any mapping to MPL/LGPL/GPL should be fixed
|
||||
# see: https://wiki.yoctoproject.org/wiki/License_Audit
|
||||
|
||||
# GPL variations
|
||||
SPDXLICENSEMAP[GPL-1] = "GPL-1.0"
|
||||
SPDXLICENSEMAP[GPLv1] = "GPL-1.0"
|
||||
SPDXLICENSEMAP[GPLv1.0] = "GPL-1.0"
|
||||
SPDXLICENSEMAP[GPL-2] = "GPL-2.0"
|
||||
SPDXLICENSEMAP[GPLv2] = "GPL-2.0"
|
||||
SPDXLICENSEMAP[GPLv2.0] = "GPL-2.0"
|
||||
SPDXLICENSEMAP[GPL-3] = "GPL-3.0"
|
||||
SPDXLICENSEMAP[GPLv3] = "GPL-3.0"
|
||||
SPDXLICENSEMAP[GPLv3.0] = "GPL-3.0"
|
||||
|
||||
#LGPL variations
|
||||
SPDXLICENSEMAP[LGPLv2] = "LGPL-2.0"
|
||||
SPDXLICENSEMAP[LGPLv2.0] = "LGPL-2.0"
|
||||
SPDXLICENSEMAP[LGPL2.1] = "LGPL-2.1"
|
||||
SPDXLICENSEMAP[LGPLv2.1] = "LGPL-2.1"
|
||||
SPDXLICENSEMAP[LGPLv3] = "LGPL-3.0"
|
||||
|
||||
#MPL variations
|
||||
SPDXLICENSEMAP[MPL-1] = "MPL-1.0"
|
||||
SPDXLICENSEMAP[MPLv1] = "MPL-1.0"
|
||||
SPDXLICENSEMAP[MPLv1.1] = "MPL-1.1"
|
||||
SPDXLICENSEMAP[MPLv2] = "MPL-2.0"
|
||||
|
||||
#MIT variations
|
||||
SPDXLICENSEMAP[MIT-X] = "MIT"
|
||||
SPDXLICENSEMAP[MIT-style] = "MIT"
|
||||
|
||||
#Openssl variations
|
||||
SPDXLICENSEMAP[openssl] = "OpenSSL"
|
||||
|
||||
#Python variations
|
||||
SPDXLICENSEMAP[PSF] = "Python-2.0"
|
||||
SPDXLICENSEMAP[PSFv2] = "Python-2.0"
|
||||
SPDXLICENSEMAP[Python-2] = "Python-2.0"
|
||||
|
||||
#Apache variations
|
||||
SPDXLICENSEMAP[Apachev2] = "Apache-2.0"
|
||||
SPDXLICENSEMAP[Apache-2] = "Apache-2.0"
|
||||
|
||||
#Artistic variations
|
||||
SPDXLICENSEMAP[Artisticv1] = "Artistic-1.0"
|
||||
SPDXLICENSEMAP[Artistic-1] = "Artistic-1.0"
|
||||
|
||||
#Academic variations
|
||||
SPDXLICENSEMAP[AFL-2] = "AFL-2.0"
|
||||
SPDXLICENSEMAP[AFL-1] = "AFL-1.2"
|
||||
SPDXLICENSEMAP[AFLv2] = "AFL-2.0"
|
||||
SPDXLICENSEMAP[AFLv1] = "AFL-1.2"
|
||||
|
||||
#Other variations
|
||||
SPDXLICENSEMAP[EPLv1.0] = "EPL-1.0"
|
||||
|
||||
# Additional license directories. Add your custom licenses directories this path.
|
||||
# LICENSE_PATH += "${COREBASE}/custom-licenses"
|
||||
|
||||
@@ -19,6 +19,8 @@ TUNEVALID[fpu-soft] = "Use software FPU."
|
||||
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "-msoft-float", "", d)}"
|
||||
TARGET_FPU .= "${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "soft", "", d)}"
|
||||
|
||||
TUNEVALID[altivec] = "Altivec"
|
||||
|
||||
# Basic tune definitions
|
||||
AVAILTUNES += "powerpc powerpc-nf"
|
||||
TUNE_FEATURES_tune-powerpc-nf = "m32 fpu-soft"
|
||||
|
||||
21
meta/conf/machine/include/tune-ppce6500.inc
Normal file
@@ -0,0 +1,21 @@
|
||||
DEFAULTTUNE ?= "ppce6500"
|
||||
|
||||
require conf/machine/include/powerpc/arch-powerpc64.inc
|
||||
|
||||
TUNEVALID[e6500] = "Enable Freescale e6500 specific processor optimizations"
|
||||
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "e6500", "-mcpu=e6500", "", d)}"
|
||||
|
||||
AVAILTUNES += "ppce6500 ppc64e6500"
|
||||
TUNE_FEATURES_tune-ppce6500 = "m32 fpu-hard e6500 altivec"
|
||||
BASE_LIB_tune-ppce6500 = "lib"
|
||||
TUNE_PKGARCH_tune-ppce6500 = "ppce6500"
|
||||
PACKAGE_EXTRA_ARCHS_tune-ppce6500 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppce6500"
|
||||
|
||||
TUNE_FEATURES_tune-ppc64e6500 = "m64 fpu-hard e6500 altivec"
|
||||
BASE_LIB_tune-ppc64e6500 = "lib64"
|
||||
TUNE_PKGARCH_tune-ppc64e6500 = "ppc64e6500"
|
||||
PACKAGE_EXTRA_ARCHS_tune-ppc64e6500 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64e6500"
|
||||
|
||||
# glibc configure options to get e6500 specific library
|
||||
GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains("TUNE_FEATURES", "e6500", "--with-cpu=e6500", "", d)}"
|
||||
GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains("TUNE_FEATURES", "e6500", "--with-cpu=603e", "", d)}"
|
||||
@@ -6,7 +6,6 @@ MULTILIB_SAVE_VARNAME = "DEFAULTTUNE"
|
||||
|
||||
MULTILIBS ??= "multilib:lib32"
|
||||
|
||||
STAGING_KERNEL_DIR := "${STAGING_KERNEL_DIR}"
|
||||
STAGING_DIR_HOST = "${STAGING_DIR}/${MLPREFIX}${MACHINE}"
|
||||
STAGING_DIR_TARGET = "${STAGING_DIR}/${MLPREFIX}${MACHINE}"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# See sanity.bbclass
|
||||
#
|
||||
# Expert users can confirm their sanity with "touch conf/sanity.conf"
|
||||
BB_MIN_VERSION = "1.15.3"
|
||||
BB_MIN_VERSION = "1.16.0"
|
||||
|
||||
SANITY_ABIFILE = "${TMPDIR}/abi_version"
|
||||
|
||||
|
||||
41
meta/files/common-licenses/bzip2
Normal file
@@ -0,0 +1,41 @@
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
This program, "bzip2", the associated library "libbzip2", and all
|
||||
documentation, are copyright (C) 1996-2010 Julian R Seward. All
|
||||
rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product
|
||||
documentation would be appreciated but is not required.
|
||||
|
||||
3. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
|
||||
4. The name of the author may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
||||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Julian Seward, jseward@bzip.org
|
||||
bzip2/libbzip2 version 1.0.6 of 6 September 2010
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
@@ -262,8 +262,8 @@ def compare_lists(alines, blines):
|
||||
|
||||
|
||||
def compare_pkg_lists(astr, bstr):
|
||||
depvera = bb.utils.explode_dep_versions(astr)
|
||||
depverb = bb.utils.explode_dep_versions(bstr)
|
||||
depvera = bb.utils.explode_dep_versions2(astr)
|
||||
depverb = bb.utils.explode_dep_versions2(bstr)
|
||||
|
||||
# Strip out changes where the version has increased
|
||||
remove = []
|
||||
@@ -271,8 +271,23 @@ def compare_pkg_lists(astr, bstr):
|
||||
if k in depverb:
|
||||
dva = depvera[k]
|
||||
dvb = depverb[k]
|
||||
if dva and dvb and dva != dvb:
|
||||
if bb.utils.vercmp(bb.utils.split_version(dva), bb.utils.split_version(dvb)) < 0:
|
||||
if dva and dvb and len(dva) == len(dvb):
|
||||
# Since length is the same, sort so that prefixes (e.g. >=) will line up
|
||||
dva.sort()
|
||||
dvb.sort()
|
||||
removeit = True
|
||||
for dvai, dvbi in zip(dva, dvb):
|
||||
if dvai != dvbi:
|
||||
aiprefix = dvai.split(' ')[0]
|
||||
biprefix = dvbi.split(' ')[0]
|
||||
if aiprefix == biprefix and aiprefix in ['>=', '=']:
|
||||
if bb.utils.vercmp(bb.utils.split_version(dvai), bb.utils.split_version(dvbi)) > 0:
|
||||
removeit = False
|
||||
break
|
||||
else:
|
||||
removeit = False
|
||||
break
|
||||
if removeit:
|
||||
remove.append(k)
|
||||
|
||||
for k in remove:
|
||||
|
||||