Compare commits
473 Commits
1.2_M1.rc1
...
edison-6.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fbd6a1615 | ||
|
|
bda8a084f5 | ||
|
|
939ec1ca1e | ||
|
|
69b307523c | ||
|
|
6482c0e20d | ||
|
|
ac9c62c907 | ||
|
|
806c23ef2e | ||
|
|
4c496a970f | ||
|
|
fa6eb32a5a | ||
|
|
eaec7e9624 | ||
|
|
e6ea83fece | ||
|
|
613e985811 | ||
|
|
b900d54f57 | ||
|
|
83e5279d62 | ||
|
|
b36cde2308 | ||
|
|
c1a2249c96 | ||
|
|
e3afb1ebc8 | ||
|
|
686345f1d0 | ||
|
|
7b15a9372c | ||
|
|
b52792d84d | ||
|
|
a684aa1df4 | ||
|
|
69a3fba2aa | ||
|
|
c6ec5a0d9e | ||
|
|
de68393270 | ||
|
|
12e5797e51 | ||
|
|
6c65263f8d | ||
|
|
32f0a45c33 | ||
|
|
726f3bce5a | ||
|
|
75f253d7d2 | ||
|
|
a5c04850e6 | ||
|
|
cef4500611 | ||
|
|
df2da07184 | ||
|
|
77912d65c7 | ||
|
|
878425f147 | ||
|
|
fa9ad15e41 | ||
|
|
961f75d11b | ||
|
|
60c5ef3508 | ||
|
|
e5e7a913c2 | ||
|
|
165e39a0bb | ||
|
|
09d5966e46 | ||
|
|
0bd433ebf5 | ||
|
|
c2e003ecd5 | ||
|
|
9f51e226dc | ||
|
|
681499ebfe | ||
|
|
5d96094939 | ||
|
|
10d9e0805e | ||
|
|
c1c6613ddd | ||
|
|
5db4eaac2d | ||
|
|
f99f36f637 | ||
|
|
7705d9a8cc | ||
|
|
bcec98bf1c | ||
|
|
0d9809c4ec | ||
|
|
dcf64630f8 | ||
|
|
fa610f7f20 | ||
|
|
d97ad36d90 | ||
|
|
de7377a170 | ||
|
|
c471ec56b4 | ||
|
|
9d55534cc7 | ||
|
|
54f4e9b66c | ||
|
|
3e783002b3 | ||
|
|
935678cbe1 | ||
|
|
ee75b5020b | ||
|
|
5f21a24580 | ||
|
|
100002e4c6 | ||
|
|
71824019fb | ||
|
|
3400b3d2df | ||
|
|
745d83f968 | ||
|
|
340a680de2 | ||
|
|
3048bd79b3 | ||
|
|
ef37926f31 | ||
|
|
4c30bcfbfe | ||
|
|
709ad80662 | ||
|
|
08a834a08a | ||
|
|
6c3dd24e59 | ||
|
|
66d6c031b0 | ||
|
|
957882caef | ||
|
|
8781450256 | ||
|
|
9d23f215a0 | ||
|
|
2c1a0b7d32 | ||
|
|
9e52c53a5d | ||
|
|
f812a2c912 | ||
|
|
d3c848094f | ||
|
|
37d694ae80 | ||
|
|
e391e1a200 | ||
|
|
199f985754 | ||
|
|
395ffa8930 | ||
|
|
90920546e4 | ||
|
|
1d9ec42166 | ||
|
|
57481984c9 | ||
|
|
05051d864d | ||
|
|
48ee7e9b3a | ||
|
|
1278cee687 | ||
|
|
b5195d2739 | ||
|
|
7561770d43 | ||
|
|
03fbfe7cf1 | ||
|
|
9faa58ecdc | ||
|
|
cc19812fb4 | ||
|
|
110d499544 | ||
|
|
7fe64f43f4 | ||
|
|
47007075d4 | ||
|
|
9dc2193d31 | ||
|
|
403d5e0b7d | ||
|
|
5d9dfed5c4 | ||
|
|
9924a6c72d | ||
|
|
ccf6077d4e | ||
|
|
38978dc0b8 | ||
|
|
9152ef8b1d | ||
|
|
4e4521b5bf | ||
|
|
501211d4d5 | ||
|
|
155aad308c | ||
|
|
11e383d24c | ||
|
|
aff0c68b0f | ||
|
|
3b75e27536 | ||
|
|
5f3b7a7616 | ||
|
|
fb8d219960 | ||
|
|
ae88920dec | ||
|
|
57c6f14828 | ||
|
|
bd9a5e1b88 | ||
|
|
8614fcf709 | ||
|
|
2202d845ab | ||
|
|
a55d8c6aa4 | ||
|
|
b6312e2d51 | ||
|
|
5a41a612c9 | ||
|
|
aaea770f1f | ||
|
|
6e4607f23a | ||
|
|
5a192f85d9 | ||
|
|
9ce56ec4ca | ||
|
|
e47cfd447c | ||
|
|
fc2433de1d | ||
|
|
8cf7c76ce1 | ||
|
|
5d8269d28a | ||
|
|
9f542cf856 | ||
|
|
398a0159a6 | ||
|
|
8ce627f9b1 | ||
|
|
a7e5ad1268 | ||
|
|
8223a46ca0 | ||
|
|
1890a0f3b2 | ||
|
|
2dbcd4154c | ||
|
|
0524f419cf | ||
|
|
a90c197e94 | ||
|
|
21458bd419 | ||
|
|
7e96247751 | ||
|
|
07e2aa9b80 | ||
|
|
5c37b7ea47 | ||
|
|
79081f46ec | ||
|
|
4f9e333b05 | ||
|
|
dc09c258f0 | ||
|
|
5de0f305f9 | ||
|
|
52dc5edde3 | ||
|
|
9d086cd151 | ||
|
|
2edde1021f | ||
|
|
afc60481c7 | ||
|
|
eb94ba9052 | ||
|
|
6fa445d50e | ||
|
|
795843df09 | ||
|
|
8a20492e8a | ||
|
|
70ff3b6d98 | ||
|
|
ba79e6f631 | ||
|
|
071d5de3f3 | ||
|
|
1fa324c533 | ||
|
|
958c7f773f | ||
|
|
141240c409 | ||
|
|
89e945be6a | ||
|
|
7d30c2df87 | ||
|
|
90a4f95d3d | ||
|
|
53db004d24 | ||
|
|
f7d5b31d6c | ||
|
|
35d3782099 | ||
|
|
1080ef1105 | ||
|
|
7bd151a4f3 | ||
|
|
e1f53370ed | ||
|
|
e708d0ab68 | ||
|
|
e6e867558b | ||
|
|
ab81049f37 | ||
|
|
0b2f036a81 | ||
|
|
6ed9f0763b | ||
|
|
1e225af16e | ||
|
|
385365f689 | ||
|
|
dec4fb1bee | ||
|
|
ef1a8f21e0 | ||
|
|
0c1b16db4c | ||
|
|
02c530f442 | ||
|
|
df2fddf9cb | ||
|
|
6f0c0167c6 | ||
|
|
47c5f1c3bc | ||
|
|
29a5cc693c | ||
|
|
c3a1b97511 | ||
|
|
f1369ae9fe | ||
|
|
8620d997d4 | ||
|
|
7d06a71c02 | ||
|
|
7c5028614b | ||
|
|
6844fac9d5 | ||
|
|
41b5ca8582 | ||
|
|
7a1504dfe8 | ||
|
|
062623f6ef | ||
|
|
62ad5b81cb | ||
|
|
ada8ebb116 | ||
|
|
f1f2cbbc0d | ||
|
|
c434795edf | ||
|
|
25330d9f38 | ||
|
|
c1c5eb6866 | ||
|
|
51e089403a | ||
|
|
058ef489a0 | ||
|
|
3eb7e626d0 | ||
|
|
386e75b7f0 | ||
|
|
f72a801d51 | ||
|
|
4ffc32566a | ||
|
|
3f692305dc | ||
|
|
4ff17dc89d | ||
|
|
1a506c5dfd | ||
|
|
84865e45ea | ||
|
|
ae97dbe1db | ||
|
|
edb2641243 | ||
|
|
c8635bab0b | ||
|
|
cd50451812 | ||
|
|
877979c8b5 | ||
|
|
f69eca96d1 | ||
|
|
c0a8c9b985 | ||
|
|
09ab224a2f | ||
|
|
0e9001afd5 | ||
|
|
d63678cdfa | ||
|
|
1af2581f0b | ||
|
|
9dcb176dc8 | ||
|
|
64ba74deff | ||
|
|
ff047d3a77 | ||
|
|
b137421cfc | ||
|
|
3a8590f105 | ||
|
|
3571525ab8 | ||
|
|
204762c531 | ||
|
|
394d340ab1 | ||
|
|
4bf5435d95 | ||
|
|
05dba88379 | ||
|
|
1ab5a6851d | ||
|
|
781866f64e | ||
|
|
702c428804 | ||
|
|
5882121a94 | ||
|
|
6c2f754a0a | ||
|
|
acd0bedbce | ||
|
|
90f8d53800 | ||
|
|
23c6b49566 | ||
|
|
f204d16012 | ||
|
|
3796541746 | ||
|
|
0e676f74c5 | ||
|
|
26666187e3 | ||
|
|
c270f92b08 | ||
|
|
1670051a79 | ||
|
|
c61f04c34e | ||
|
|
2b26745c70 | ||
|
|
28ca6cc34b | ||
|
|
ada59bde67 | ||
|
|
9a68fb1364 | ||
|
|
f87c92143e | ||
|
|
f38e44bbb2 | ||
|
|
4d7f50382e | ||
|
|
6803d97bdb | ||
|
|
81ed10442b | ||
|
|
1a46002fad | ||
|
|
2747b2003e | ||
|
|
375297ea28 | ||
|
|
c2662a5095 | ||
|
|
da56e3df88 | ||
|
|
388dbe4928 | ||
|
|
dbcce81f66 | ||
|
|
46ac868403 | ||
|
|
6e1105e1e8 | ||
|
|
4494f59a26 | ||
|
|
13590b23c6 | ||
|
|
2c3861ee68 | ||
|
|
9cf7aabecf | ||
|
|
81d1a4aadf | ||
|
|
6578845f69 | ||
|
|
b5a4e78df5 | ||
|
|
68b55c1e85 | ||
|
|
4234beb034 | ||
|
|
ddb5143d9d | ||
|
|
25dcd673f5 | ||
|
|
1ad7977742 | ||
|
|
fe40f117c1 | ||
|
|
0550d8c73e | ||
|
|
bc821a2ab5 | ||
|
|
aa72ed0b23 | ||
|
|
e0a2bbd2a4 | ||
|
|
1a2454fcba | ||
|
|
92675a93ba | ||
|
|
1bafc89431 | ||
|
|
dc785b64c1 | ||
|
|
257dbe8d39 | ||
|
|
c81c4cb0c7 | ||
|
|
da3edbd85b | ||
|
|
44aa4f320a | ||
|
|
38dbccd997 | ||
|
|
6c27a7b50e | ||
|
|
7ef3bc97b7 | ||
|
|
807b96f882 | ||
|
|
2add98ffc8 | ||
|
|
ed7fe93178 | ||
|
|
397081ef41 | ||
|
|
570eeea297 | ||
|
|
b9232eb2b4 | ||
|
|
405578286d | ||
|
|
1c937b6359 | ||
|
|
567200dcf2 | ||
|
|
b4f5708c05 | ||
|
|
b8cb28fc2f | ||
|
|
495d37ab0b | ||
|
|
9d60cb9450 | ||
|
|
5592e80877 | ||
|
|
979ecf3eea | ||
|
|
770f5bb229 | ||
|
|
44211ed500 | ||
|
|
ac715efc14 | ||
|
|
b256ae8f80 | ||
|
|
fa969ffb59 | ||
|
|
e67311606e | ||
|
|
b17aecd70a | ||
|
|
1cb265f575 | ||
|
|
31b7cac818 | ||
|
|
05738313c3 | ||
|
|
25cf1a65ec | ||
|
|
442730168e | ||
|
|
2ca5c8c03e | ||
|
|
fa056279ea | ||
|
|
7ec098bedc | ||
|
|
68d048abfd | ||
|
|
d5848aa719 | ||
|
|
9edf601d2d | ||
|
|
155d0deae8 | ||
|
|
85408dfd36 | ||
|
|
43fb63af31 | ||
|
|
8add7fccde | ||
|
|
01f5e6778c | ||
|
|
1ff81200ac | ||
|
|
d2f1ca8cba | ||
|
|
caab52f6cc | ||
|
|
b4eb195b34 | ||
|
|
3dbabb693d | ||
|
|
5dd34a717e | ||
|
|
e7cfb3b469 | ||
|
|
c2494d3014 | ||
|
|
9d87cd9952 | ||
|
|
1851a96b47 | ||
|
|
efd2d7ee05 | ||
|
|
b16bc3d277 | ||
|
|
adcf8bf7b5 | ||
|
|
fda17235fd | ||
|
|
c5bdef5617 | ||
|
|
77640e96dd | ||
|
|
98d9b82759 | ||
|
|
1aac5c310f | ||
|
|
1924f52cc8 | ||
|
|
6535ba6077 | ||
|
|
eae4945a9d | ||
|
|
5ec43fdbb8 | ||
|
|
5ed59ae0f2 | ||
|
|
e02d553b45 | ||
|
|
720446629b | ||
|
|
db9d36f196 | ||
|
|
4cca048ab8 | ||
|
|
51b3d9dd53 | ||
|
|
bc885cd8d3 | ||
|
|
c657668a07 | ||
|
|
02e3d4dc70 | ||
|
|
57746012d0 | ||
|
|
8a48ec4297 | ||
|
|
61637a5241 | ||
|
|
8a475908b5 | ||
|
|
b7d2cf0525 | ||
|
|
4d7fbeda35 | ||
|
|
baf536c62c | ||
|
|
0c48a6805e | ||
|
|
1ea2c63bf5 | ||
|
|
f33f49a348 | ||
|
|
cc6819ede7 | ||
|
|
2a68be025b | ||
|
|
f05471dcf8 | ||
|
|
5fe2c53493 | ||
|
|
6b2ae5fd17 | ||
|
|
4eeeded4a7 | ||
|
|
931db10bd0 | ||
|
|
522268be49 | ||
|
|
8e17bffa42 | ||
|
|
cc004358f1 | ||
|
|
0e623482d5 | ||
|
|
ec31ee62d5 | ||
|
|
a59ca8316b | ||
|
|
4423b5b024 | ||
|
|
b47f39dbc3 | ||
|
|
9d72b706fa | ||
|
|
5d4888723b | ||
|
|
49e3171850 | ||
|
|
66ddb69916 | ||
|
|
de1dcde413 | ||
|
|
9f36b1fe16 | ||
|
|
38c7a8a069 | ||
|
|
23bac7cb0e | ||
|
|
0021456aad | ||
|
|
a568995f40 | ||
|
|
f82ac840aa | ||
|
|
cd2c80dedc | ||
|
|
ed93525e65 | ||
|
|
4025831e90 | ||
|
|
94c381f71b | ||
|
|
588e21b339 | ||
|
|
3429095e86 | ||
|
|
feb11f1079 | ||
|
|
fbec475275 | ||
|
|
317fc4fbd0 | ||
|
|
909dd5b306 | ||
|
|
24623d149d | ||
|
|
5687f68f3e | ||
|
|
f282b7a027 | ||
|
|
32b1c9150f | ||
|
|
7a541d69dd | ||
|
|
aa1cb68ce2 | ||
|
|
dc1f3a3bd0 | ||
|
|
5fbb040355 | ||
|
|
9886c510f9 | ||
|
|
49de6096b1 | ||
|
|
7eb193fc49 | ||
|
|
4aa6a8e9a6 | ||
|
|
a1f3aff110 | ||
|
|
bb351c2f41 | ||
|
|
bed552f8d0 | ||
|
|
41c564fe60 | ||
|
|
cae817e833 | ||
|
|
7bb8b8f438 | ||
|
|
c32652716d | ||
|
|
748fd4543b | ||
|
|
56f7ed979c | ||
|
|
3a15c9f8d0 | ||
|
|
fc7ceaead0 | ||
|
|
a626a5c208 | ||
|
|
cb333ad6f3 | ||
|
|
5b58674c6b | ||
|
|
1017d2aec8 | ||
|
|
9786db045f | ||
|
|
158b84844e | ||
|
|
421c22d32c | ||
|
|
90ccadecc3 | ||
|
|
07638448b0 | ||
|
|
f343aa4cc6 | ||
|
|
5cd07954ea | ||
|
|
e0338b844f | ||
|
|
cde57ddf84 | ||
|
|
bee5046908 | ||
|
|
4e6b4c09a5 | ||
|
|
89496194ba | ||
|
|
19f9b25947 | ||
|
|
f97e445fc6 | ||
|
|
2766a88a3b | ||
|
|
b57c529115 | ||
|
|
319f4ee481 | ||
|
|
2cf26ef150 | ||
|
|
2c1b5b1054 | ||
|
|
b8be92c34d | ||
|
|
6b4133b08f | ||
|
|
96d43c2410 | ||
|
|
cde2aa61cf | ||
|
|
1d18aeafa6 | ||
|
|
b8a67d3000 | ||
|
|
c3c8084855 | ||
|
|
cd0ef4d7c1 | ||
|
|
c9e35a126a | ||
|
|
4456226e45 | ||
|
|
bf8f071c5b | ||
|
|
3b1e8a214e | ||
|
|
1015dfce8d | ||
|
|
a0b1c14587 | ||
|
|
66934fc311 | ||
|
|
80de0f946b | ||
|
|
5e65389335 | ||
|
|
d513e5f92c | ||
|
|
e9f8b99215 |
@@ -40,7 +40,7 @@ from bb import cooker
|
|||||||
from bb import ui
|
from bb import ui
|
||||||
from bb import server
|
from bb import server
|
||||||
|
|
||||||
__version__ = "1.15.0"
|
__version__ = "1.13.3"
|
||||||
logger = logging.getLogger("BitBake")
|
logger = logging.getLogger("BitBake")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ def register_idle_function(self, function, data):
|
|||||||
cooker = bb.cooker.BBCooker(config, register_idle_function, initialenv)
|
cooker = bb.cooker.BBCooker(config, register_idle_function, initialenv)
|
||||||
config_data = cooker.configuration.data
|
config_data = cooker.configuration.data
|
||||||
cooker.status = config_data
|
cooker.status = config_data
|
||||||
cooker.handleCollections(config_data.getVar("BBFILE_COLLECTIONS", 1))
|
cooker.handleCollections(bb.data.getVar("BBFILE_COLLECTIONS", config_data, 1))
|
||||||
|
|
||||||
fn, cls = bb.cache.Cache.virtualfn2realfn(buildfile)
|
fn, cls = bb.cache.Cache.virtualfn2realfn(buildfile)
|
||||||
buildfile = cooker.matchFile(fn)
|
buildfile = cooker.matchFile(fn)
|
||||||
@@ -108,9 +108,9 @@ if taskname.endswith("_setscene"):
|
|||||||
if hashdata:
|
if hashdata:
|
||||||
bb.parse.siggen.set_taskdata(hashdata["hashes"], hashdata["deps"])
|
bb.parse.siggen.set_taskdata(hashdata["hashes"], hashdata["deps"])
|
||||||
for h in hashdata["hashes"]:
|
for h in hashdata["hashes"]:
|
||||||
the_data.setVar("BBHASH_%s" % h, hashdata["hashes"][h])
|
bb.data.setVar("BBHASH_%s" % h, hashdata["hashes"][h], the_data)
|
||||||
for h in hashdata["deps"]:
|
for h in hashdata["deps"]:
|
||||||
the_data.setVar("BBHASHDEPS_%s" % h, hashdata["deps"][h])
|
bb.data.setVar("BBHASHDEPS_%s" % h, hashdata["deps"][h], the_data)
|
||||||
|
|
||||||
ret = 0
|
ret = 0
|
||||||
if dryrun != "True":
|
if dryrun != "True":
|
||||||
|
|||||||
@@ -462,7 +462,7 @@ def main():
|
|||||||
state_group = 2
|
state_group = 2
|
||||||
|
|
||||||
for key in bb.data.keys(documentation):
|
for key in bb.data.keys(documentation):
|
||||||
data = documentation.getVarFlag(key, "doc")
|
data = bb.data.getVarFlag(key, "doc", documentation)
|
||||||
if not data:
|
if not data:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ include</literal> directive.</para>
|
|||||||
<title>Defining Python functions into the global Python namespace</title>
|
<title>Defining Python functions into the global Python namespace</title>
|
||||||
<para><emphasis>NOTE:</emphasis> This is only supported in .bb and .bbclass files.</para>
|
<para><emphasis>NOTE:</emphasis> This is only supported in .bb and .bbclass files.</para>
|
||||||
<para><screen>def get_depends(bb, d):
|
<para><screen>def get_depends(bb, d):
|
||||||
if d.getVar('SOMECONDITION', True):
|
if bb.data.getVar('SOMECONDITION', d, True):
|
||||||
return "dependencywithcond"
|
return "dependencywithcond"
|
||||||
else:
|
else:
|
||||||
return "dependency"
|
return "dependency"
|
||||||
@@ -388,7 +388,7 @@ ftp://.*/.* http://somemirror.org/sources/ \n \
|
|||||||
http://.*/.* http://somemirror.org/sources/ \n \
|
http://.*/.* http://somemirror.org/sources/ \n \
|
||||||
https://.*/.* http://somemirror.org/sources/ \n"</screen></para>
|
https://.*/.* http://somemirror.org/sources/ \n"</screen></para>
|
||||||
|
|
||||||
<para>Non-local downloaded output is placed into the directory specified by the <varname>DL_DIR</varname>. For non local archive downloads the code can verify sha256 and md5 checksums for the download to ensure the file has been downloaded correctly. These may be specified either in the form <varname>SRC_URI[md5sum]</varname> for the md5 checksum and <varname>SRC_URI[sha256sum]</varname> for the sha256 checksum or as parameters on the SRC_URI such as SRC_URI="http://example.com/foobar.tar.bz2;md5sum=4a8e0f237e961fd7785d19d07fdb994d". If <varname>BB_STRICT_CHECKSUM</varname> is set, any download without a checksum will trigger an error message. In cases where multiple files are listed in SRC_URI, the name parameter is used assign names to the urls and these are then specified in the checksums in the form SRC_URI[name.sha256sum].</para>
|
<para>Non-local downloaded output is placed into the directory specified by the <varname>DL_DIR</varname>. For non local downloads the code can check checksums for the download to ensure the file has been downloaded correctly. These are specified in the form <varname>SRC_URI[md5sum]</varname> for the md5 checksum and <varname>SRC_URI[sha256sum]</varname> for the sha256 checksum. If <varname>BB_STRICT_CHECKSUM</varname> is set, any download without a checksum will trigger an error message. In cases where multiple files are listed in SRC_URI, the name parameter is used assign names to the urls and these are then specified in the checksums in the form SRC_URI[name.sha256sum].</para>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
__version__ = "1.15.0"
|
__version__ = "1.13.3"
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
if sys.version_info < (2, 6, 0):
|
if sys.version_info < (2, 6, 0):
|
||||||
@@ -67,7 +67,7 @@ if "BBDEBUG" in os.environ:
|
|||||||
if level:
|
if level:
|
||||||
bb.msg.set_debug_level(level)
|
bb.msg.set_debug_level(level)
|
||||||
|
|
||||||
if os.environ.get("BBFETCH2"):
|
if True or os.environ.get("BBFETCH2"):
|
||||||
from bb import fetch2 as fetch
|
from bb import fetch2 as fetch
|
||||||
sys.modules['bb.fetch'] = sys.modules['bb.fetch2']
|
sys.modules['bb.fetch'] = sys.modules['bb.fetch2']
|
||||||
|
|
||||||
|
|||||||
@@ -70,9 +70,9 @@ class TaskBase(event.Event):
|
|||||||
|
|
||||||
def __init__(self, t, d ):
|
def __init__(self, t, d ):
|
||||||
self._task = t
|
self._task = t
|
||||||
self._package = d.getVar("PF", 1)
|
self._package = bb.data.getVar("PF", d, 1)
|
||||||
event.Event.__init__(self)
|
event.Event.__init__(self)
|
||||||
self._message = "package %s: task %s: %s" % (d.getVar("PF", 1), t, bb.event.getName(self)[4:])
|
self._message = "package %s: task %s: %s" % (bb.data.getVar("PF", d, 1), t, bb.event.getName(self)[4:])
|
||||||
|
|
||||||
def getTask(self):
|
def getTask(self):
|
||||||
return self._task
|
return self._task
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
import bb.data
|
||||||
import bb.utils
|
import bb.utils
|
||||||
|
|
||||||
logger = logging.getLogger("BitBake.Cache")
|
logger = logging.getLogger("BitBake.Cache")
|
||||||
@@ -142,7 +143,6 @@ class CoreRecipeInfo(RecipeInfoCommon):
|
|||||||
self.section = self.getvar('SECTION', metadata)
|
self.section = self.getvar('SECTION', metadata)
|
||||||
self.fakerootenv = self.getvar('FAKEROOTENV', metadata)
|
self.fakerootenv = self.getvar('FAKEROOTENV', metadata)
|
||||||
self.fakerootdirs = self.getvar('FAKEROOTDIRS', metadata)
|
self.fakerootdirs = self.getvar('FAKEROOTDIRS', metadata)
|
||||||
self.fakerootnoenv = self.getvar('FAKEROOTNOENV', metadata)
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def init_cacheData(cls, cachedata):
|
def init_cacheData(cls, cachedata):
|
||||||
@@ -178,7 +178,6 @@ class CoreRecipeInfo(RecipeInfoCommon):
|
|||||||
cachedata.license = {}
|
cachedata.license = {}
|
||||||
cachedata.section = {}
|
cachedata.section = {}
|
||||||
cachedata.fakerootenv = {}
|
cachedata.fakerootenv = {}
|
||||||
cachedata.fakerootnoenv = {}
|
|
||||||
cachedata.fakerootdirs = {}
|
cachedata.fakerootdirs = {}
|
||||||
|
|
||||||
def add_cacheData(self, cachedata, fn):
|
def add_cacheData(self, cachedata, fn):
|
||||||
@@ -244,7 +243,6 @@ class CoreRecipeInfo(RecipeInfoCommon):
|
|||||||
cachedata.license[fn] = self.license
|
cachedata.license[fn] = self.license
|
||||||
cachedata.section[fn] = self.section
|
cachedata.section[fn] = self.section
|
||||||
cachedata.fakerootenv[fn] = self.fakerootenv
|
cachedata.fakerootenv[fn] = self.fakerootenv
|
||||||
cachedata.fakerootnoenv[fn] = self.fakerootnoenv
|
|
||||||
cachedata.fakerootdirs[fn] = self.fakerootdirs
|
cachedata.fakerootdirs[fn] = self.fakerootdirs
|
||||||
|
|
||||||
|
|
||||||
@@ -259,7 +257,7 @@ class Cache(object):
|
|||||||
# It will be used in later for deciding whether we
|
# It will be used in later for deciding whether we
|
||||||
# need extra cache file dump/load support
|
# need extra cache file dump/load support
|
||||||
self.caches_array = caches_array
|
self.caches_array = caches_array
|
||||||
self.cachedir = data.getVar("CACHE", True)
|
self.cachedir = bb.data.getVar("CACHE", data, True)
|
||||||
self.clean = set()
|
self.clean = set()
|
||||||
self.checked = set()
|
self.checked = set()
|
||||||
self.depends_cache = {}
|
self.depends_cache = {}
|
||||||
@@ -282,7 +280,7 @@ class Cache(object):
|
|||||||
# If any of configuration.data's dependencies are newer than the
|
# If any of configuration.data's dependencies are newer than the
|
||||||
# cache there isn't even any point in loading it...
|
# cache there isn't even any point in loading it...
|
||||||
newest_mtime = 0
|
newest_mtime = 0
|
||||||
deps = data.getVar("__base_depends")
|
deps = bb.data.getVar("__base_depends", data)
|
||||||
|
|
||||||
old_mtimes = [old_mtime for _, old_mtime in deps]
|
old_mtimes = [old_mtime for _, old_mtime in deps]
|
||||||
old_mtimes.append(newest_mtime)
|
old_mtimes.append(newest_mtime)
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ pythonparsecache = {}
|
|||||||
shellparsecache = {}
|
shellparsecache = {}
|
||||||
|
|
||||||
def parser_cachefile(d):
|
def parser_cachefile(d):
|
||||||
cachedir = (d.getVar("PERSISTENT_DIR", True) or
|
cachedir = (bb.data.getVar("PERSISTENT_DIR", d, True) or
|
||||||
d.getVar("CACHE", True))
|
bb.data.getVar("CACHE", d, True))
|
||||||
if cachedir in [None, '']:
|
if cachedir in [None, '']:
|
||||||
return None
|
return None
|
||||||
bb.utils.mkdirhier(cachedir)
|
bb.utils.mkdirhier(cachedir)
|
||||||
|
|||||||
@@ -30,6 +30,11 @@ Commands are queued in a CommandQueue
|
|||||||
|
|
||||||
import bb.event
|
import bb.event
|
||||||
import bb.cooker
|
import bb.cooker
|
||||||
|
import bb.data
|
||||||
|
|
||||||
|
async_cmds = {}
|
||||||
|
sync_cmds = {}
|
||||||
|
|
||||||
|
|
||||||
class CommandCompleted(bb.event.Event):
|
class CommandCompleted(bb.event.Event):
|
||||||
pass
|
pass
|
||||||
@@ -56,6 +61,16 @@ class Command:
|
|||||||
# FIXME Add lock for this
|
# FIXME Add lock for this
|
||||||
self.currentAsyncCommand = None
|
self.currentAsyncCommand = None
|
||||||
|
|
||||||
|
for attr in CommandsSync.__dict__:
|
||||||
|
command = attr[:].lower()
|
||||||
|
method = getattr(CommandsSync, attr)
|
||||||
|
sync_cmds[command] = (method)
|
||||||
|
|
||||||
|
for attr in CommandsAsync.__dict__:
|
||||||
|
command = attr[:].lower()
|
||||||
|
method = getattr(CommandsAsync, attr)
|
||||||
|
async_cmds[command] = (method)
|
||||||
|
|
||||||
def runCommand(self, commandline):
|
def runCommand(self, commandline):
|
||||||
try:
|
try:
|
||||||
command = commandline.pop(0)
|
command = commandline.pop(0)
|
||||||
@@ -147,7 +162,7 @@ class CommandsSync:
|
|||||||
if len(params) > 1:
|
if len(params) > 1:
|
||||||
expand = params[1]
|
expand = params[1]
|
||||||
|
|
||||||
return command.cooker.configuration.data.getVar(varname, expand)
|
return bb.data.getVar(varname, command.cooker.configuration.data, expand)
|
||||||
|
|
||||||
def setVariable(self, command, params):
|
def setVariable(self, command, params):
|
||||||
"""
|
"""
|
||||||
@@ -155,7 +170,7 @@ class CommandsSync:
|
|||||||
"""
|
"""
|
||||||
varname = params[0]
|
varname = params[0]
|
||||||
value = params[1]
|
value = params[1]
|
||||||
command.cooker.configuration.data.setVar(varname, value)
|
bb.data.setVar(varname, value, command.cooker.configuration.data)
|
||||||
|
|
||||||
def resetCooker(self, command, params):
|
def resetCooker(self, command, params):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -135,14 +135,10 @@ class BBCooker:
|
|||||||
self.configuration.data = None
|
self.configuration.data = None
|
||||||
self.loadConfigurationData()
|
self.loadConfigurationData()
|
||||||
|
|
||||||
# Take a lock so only one copy of bitbake can run against a given build
|
if not self.configuration.cmd:
|
||||||
# directory at a time
|
self.configuration.cmd = bb.data.getVar("BB_DEFAULT_TASK", self.configuration.data, True) or "build"
|
||||||
lockfile = self.configuration.data.expand("${TOPDIR}/bitbake.lock")
|
|
||||||
self.lock = bb.utils.lockfile(lockfile, False, False)
|
|
||||||
if not self.lock:
|
|
||||||
bb.fatal("Only one copy of bitbake should be run against a build directory")
|
|
||||||
|
|
||||||
bbpkgs = self.configuration.data.getVar('BBPKGS', True)
|
bbpkgs = bb.data.getVar('BBPKGS', self.configuration.data, True)
|
||||||
if bbpkgs and len(self.configuration.pkgs_to_build) == 0:
|
if bbpkgs and len(self.configuration.pkgs_to_build) == 0:
|
||||||
self.configuration.pkgs_to_build.extend(bbpkgs.split())
|
self.configuration.pkgs_to_build.extend(bbpkgs.split())
|
||||||
|
|
||||||
@@ -171,7 +167,7 @@ class BBCooker:
|
|||||||
self.configuration.data = bb.data.init()
|
self.configuration.data = bb.data.init()
|
||||||
|
|
||||||
if not self.server_registration_cb:
|
if not self.server_registration_cb:
|
||||||
self.configuration.data.setVar("BB_WORKERCONTEXT", "1")
|
bb.data.setVar("BB_WORKERCONTEXT", "1", self.configuration.data)
|
||||||
|
|
||||||
filtered_keys = bb.utils.approved_variables()
|
filtered_keys = bb.utils.approved_variables()
|
||||||
bb.data.inheritFromOS(self.configuration.data, self.savedenv, filtered_keys)
|
bb.data.inheritFromOS(self.configuration.data, self.savedenv, filtered_keys)
|
||||||
@@ -186,13 +182,13 @@ class BBCooker:
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if not self.configuration.cmd:
|
if not self.configuration.cmd:
|
||||||
self.configuration.cmd = self.configuration.data.getVar("BB_DEFAULT_TASK", True) or "build"
|
self.configuration.cmd = bb.data.getVar("BB_DEFAULT_TASK", self.configuration.data, True) or "build"
|
||||||
|
|
||||||
def parseConfiguration(self):
|
def parseConfiguration(self):
|
||||||
|
|
||||||
|
|
||||||
# Change nice level if we're asked to
|
# Change nice level if we're asked to
|
||||||
nice = self.configuration.data.getVar("BB_NICE_LEVEL", True)
|
nice = bb.data.getVar("BB_NICE_LEVEL", self.configuration.data, True)
|
||||||
if nice:
|
if nice:
|
||||||
curnice = os.nice(0)
|
curnice = os.nice(0)
|
||||||
nice = int(nice) - curnice
|
nice = int(nice) - curnice
|
||||||
@@ -290,7 +286,7 @@ class BBCooker:
|
|||||||
# this showEnvironment() code path doesn't use the cache
|
# this showEnvironment() code path doesn't use the cache
|
||||||
self.parseConfiguration()
|
self.parseConfiguration()
|
||||||
self.status = bb.cache.CacheData(self.caches_array)
|
self.status = bb.cache.CacheData(self.caches_array)
|
||||||
self.handleCollections( self.configuration.data.getVar("BBFILE_COLLECTIONS", 1) )
|
self.handleCollections( bb.data.getVar("BBFILE_COLLECTIONS", self.configuration.data, 1) )
|
||||||
|
|
||||||
fn, cls = bb.cache.Cache.virtualfn2realfn(buildfile)
|
fn, cls = bb.cache.Cache.virtualfn2realfn(buildfile)
|
||||||
fn = self.matchFile(fn)
|
fn = self.matchFile(fn)
|
||||||
@@ -596,7 +592,7 @@ class BBCooker:
|
|||||||
bb.data.expandKeys(localdata)
|
bb.data.expandKeys(localdata)
|
||||||
|
|
||||||
# Handle PREFERRED_PROVIDERS
|
# Handle PREFERRED_PROVIDERS
|
||||||
for p in (localdata.getVar('PREFERRED_PROVIDERS', True) or "").split():
|
for p in (bb.data.getVar('PREFERRED_PROVIDERS', localdata, True) or "").split():
|
||||||
try:
|
try:
|
||||||
(providee, provider) = p.split(':')
|
(providee, provider) = p.split(':')
|
||||||
except:
|
except:
|
||||||
@@ -644,8 +640,8 @@ class BBCooker:
|
|||||||
# Generate a list of parsed configuration files by searching the files
|
# Generate a list of parsed configuration files by searching the files
|
||||||
# listed in the __depends and __base_depends variables with a .conf suffix.
|
# listed in the __depends and __base_depends variables with a .conf suffix.
|
||||||
conffiles = []
|
conffiles = []
|
||||||
dep_files = self.configuration.data.getVar('__depends') or set()
|
dep_files = bb.data.getVar('__depends', self.configuration.data) or set()
|
||||||
dep_files.union(self.configuration.data.getVar('__base_depends') or set())
|
dep_files.union(bb.data.getVar('__base_depends', self.configuration.data) or set())
|
||||||
|
|
||||||
for f in dep_files:
|
for f in dep_files:
|
||||||
if f[0].endswith(".conf"):
|
if f[0].endswith(".conf"):
|
||||||
@@ -673,7 +669,7 @@ class BBCooker:
|
|||||||
|
|
||||||
matches = []
|
matches = []
|
||||||
p = re.compile(re.escape(filepattern))
|
p = re.compile(re.escape(filepattern))
|
||||||
bbpaths = self.configuration.data.getVar('BBPATH', True).split(':')
|
bbpaths = bb.data.getVar('BBPATH', self.configuration.data, True).split(':')
|
||||||
for path in bbpaths:
|
for path in bbpaths:
|
||||||
dirpath = os.path.join(path, directory)
|
dirpath = os.path.join(path, directory)
|
||||||
if os.path.exists(dirpath):
|
if os.path.exists(dirpath):
|
||||||
@@ -695,7 +691,7 @@ class BBCooker:
|
|||||||
|
|
||||||
data = self.configuration.data
|
data = self.configuration.data
|
||||||
# iterate configs
|
# iterate configs
|
||||||
bbpaths = data.getVar('BBPATH', True).split(':')
|
bbpaths = bb.data.getVar('BBPATH', data, True).split(':')
|
||||||
for path in bbpaths:
|
for path in bbpaths:
|
||||||
confpath = os.path.join(path, "conf", var)
|
confpath = os.path.join(path, "conf", var)
|
||||||
if os.path.exists(confpath):
|
if os.path.exists(confpath):
|
||||||
@@ -800,16 +796,16 @@ class BBCooker:
|
|||||||
parselog.debug(2, "Found bblayers.conf (%s)", layerconf)
|
parselog.debug(2, "Found bblayers.conf (%s)", layerconf)
|
||||||
data = _parse(layerconf, data)
|
data = _parse(layerconf, data)
|
||||||
|
|
||||||
layers = (data.getVar('BBLAYERS', True) or "").split()
|
layers = (bb.data.getVar('BBLAYERS', data, True) or "").split()
|
||||||
|
|
||||||
data = bb.data.createCopy(data)
|
data = bb.data.createCopy(data)
|
||||||
for layer in layers:
|
for layer in layers:
|
||||||
parselog.debug(2, "Adding layer %s", layer)
|
parselog.debug(2, "Adding layer %s", layer)
|
||||||
data.setVar('LAYERDIR', layer)
|
bb.data.setVar('LAYERDIR', layer, data)
|
||||||
data = _parse(os.path.join(layer, "conf", "layer.conf"), data)
|
data = _parse(os.path.join(layer, "conf", "layer.conf"), data)
|
||||||
data.expandVarref('LAYERDIR')
|
data.expandVarref('LAYERDIR')
|
||||||
|
|
||||||
data.delVar('LAYERDIR')
|
bb.data.delVar('LAYERDIR', data)
|
||||||
|
|
||||||
if not data.getVar("BBPATH", True):
|
if not data.getVar("BBPATH", True):
|
||||||
raise SystemExit("The BBPATH variable is not set")
|
raise SystemExit("The BBPATH variable is not set")
|
||||||
@@ -827,8 +823,8 @@ class BBCooker:
|
|||||||
|
|
||||||
# Nomally we only register event handlers at the end of parsing .bb files
|
# Nomally we only register event handlers at the end of parsing .bb files
|
||||||
# We register any handlers we've found so far here...
|
# We register any handlers we've found so far here...
|
||||||
for var in data.getVar('__BBHANDLERS') or []:
|
for var in bb.data.getVar('__BBHANDLERS', data) or []:
|
||||||
bb.event.register(var, data.getVar(var))
|
bb.event.register(var, bb.data.getVar(var, data))
|
||||||
|
|
||||||
if data.getVar("BB_WORKERCONTEXT", False) is None:
|
if data.getVar("BB_WORKERCONTEXT", False) is None:
|
||||||
bb.fetch.fetcher_init(data)
|
bb.fetch.fetcher_init(data)
|
||||||
@@ -847,7 +843,7 @@ class BBCooker:
|
|||||||
min_prio = 0
|
min_prio = 0
|
||||||
for c in collection_list:
|
for c in collection_list:
|
||||||
# Get collection priority if defined explicitly
|
# Get collection priority if defined explicitly
|
||||||
priority = self.configuration.data.getVar("BBFILE_PRIORITY_%s" % c, 1)
|
priority = bb.data.getVar("BBFILE_PRIORITY_%s" % c, self.configuration.data, 1)
|
||||||
if priority:
|
if priority:
|
||||||
try:
|
try:
|
||||||
prio = int(priority)
|
prio = int(priority)
|
||||||
@@ -860,7 +856,7 @@ class BBCooker:
|
|||||||
collection_priorities[c] = None
|
collection_priorities[c] = None
|
||||||
|
|
||||||
# Check dependencies and store information for priority calculation
|
# Check dependencies and store information for priority calculation
|
||||||
deps = self.configuration.data.getVar("LAYERDEPENDS_%s" % c, 1)
|
deps = bb.data.getVar("LAYERDEPENDS_%s" % c, self.configuration.data, 1)
|
||||||
if deps:
|
if deps:
|
||||||
depnamelist = []
|
depnamelist = []
|
||||||
deplist = deps.split()
|
deplist = deps.split()
|
||||||
@@ -879,7 +875,7 @@ class BBCooker:
|
|||||||
|
|
||||||
if dep in collection_list:
|
if dep in collection_list:
|
||||||
if depver:
|
if depver:
|
||||||
layerver = self.configuration.data.getVar("LAYERVERSION_%s" % dep, 1)
|
layerver = bb.data.getVar("LAYERVERSION_%s" % dep, self.configuration.data, 1)
|
||||||
if layerver:
|
if layerver:
|
||||||
try:
|
try:
|
||||||
lver = int(layerver)
|
lver = int(layerver)
|
||||||
@@ -912,7 +908,7 @@ class BBCooker:
|
|||||||
# Calculate all layer priorities using calc_layer_priority and store in bbfile_config_priorities
|
# Calculate all layer priorities using calc_layer_priority and store in bbfile_config_priorities
|
||||||
for c in collection_list:
|
for c in collection_list:
|
||||||
calc_layer_priority(c)
|
calc_layer_priority(c)
|
||||||
regex = self.configuration.data.getVar("BBFILE_PATTERN_%s" % c, 1)
|
regex = bb.data.getVar("BBFILE_PATTERN_%s" % c, self.configuration.data, 1)
|
||||||
if regex == None:
|
if regex == None:
|
||||||
parselog.error("BBFILE_PATTERN_%s not defined" % c)
|
parselog.error("BBFILE_PATTERN_%s not defined" % c)
|
||||||
continue
|
continue
|
||||||
@@ -927,9 +923,9 @@ class BBCooker:
|
|||||||
"""
|
"""
|
||||||
Setup any variables needed before starting a build
|
Setup any variables needed before starting a build
|
||||||
"""
|
"""
|
||||||
if not self.configuration.data.getVar("BUILDNAME"):
|
if not bb.data.getVar("BUILDNAME", self.configuration.data):
|
||||||
self.configuration.data.setVar("BUILDNAME", time.strftime('%Y%m%d%H%M'))
|
bb.data.setVar("BUILDNAME", time.strftime('%Y%m%d%H%M'), self.configuration.data)
|
||||||
self.configuration.data.setVar("BUILDSTART", time.strftime('%m/%d/%Y %H:%M:%S', time.gmtime()))
|
bb.data.setVar("BUILDSTART", time.strftime('%m/%d/%Y %H:%M:%S', time.gmtime()), self.configuration.data)
|
||||||
|
|
||||||
def matchFiles(self, bf):
|
def matchFiles(self, bf):
|
||||||
"""
|
"""
|
||||||
@@ -976,7 +972,7 @@ class BBCooker:
|
|||||||
# buildFile() doesn't use the cache
|
# buildFile() doesn't use the cache
|
||||||
self.parseConfiguration()
|
self.parseConfiguration()
|
||||||
self.status = bb.cache.CacheData(self.caches_array)
|
self.status = bb.cache.CacheData(self.caches_array)
|
||||||
self.handleCollections( self.configuration.data.getVar("BBFILE_COLLECTIONS", 1) )
|
self.handleCollections( bb.data.getVar("BBFILE_COLLECTIONS", self.configuration.data, 1) )
|
||||||
|
|
||||||
# If we are told to do the None task then query the default task
|
# If we are told to do the None task then query the default task
|
||||||
if (task == None):
|
if (task == None):
|
||||||
@@ -1020,7 +1016,7 @@ class BBCooker:
|
|||||||
taskdata = bb.taskdata.TaskData(self.configuration.abort)
|
taskdata = bb.taskdata.TaskData(self.configuration.abort)
|
||||||
taskdata.add_provider(self.configuration.data, self.status, item)
|
taskdata.add_provider(self.configuration.data, self.status, item)
|
||||||
|
|
||||||
buildname = self.configuration.data.getVar("BUILDNAME")
|
buildname = bb.data.getVar("BUILDNAME", self.configuration.data)
|
||||||
bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.configuration.event_data)
|
bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.configuration.event_data)
|
||||||
|
|
||||||
# Execute the runqueue
|
# Execute the runqueue
|
||||||
@@ -1097,7 +1093,7 @@ class BBCooker:
|
|||||||
|
|
||||||
self.buildSetVars()
|
self.buildSetVars()
|
||||||
|
|
||||||
buildname = self.configuration.data.getVar("BUILDNAME")
|
buildname = bb.data.getVar("BUILDNAME", self.configuration.data)
|
||||||
bb.event.fire(bb.event.BuildStarted(buildname, targets), self.configuration.event_data)
|
bb.event.fire(bb.event.BuildStarted(buildname, targets), self.configuration.event_data)
|
||||||
|
|
||||||
localdata = data.createCopy(self.configuration.data)
|
localdata = data.createCopy(self.configuration.data)
|
||||||
@@ -1131,16 +1127,16 @@ class BBCooker:
|
|||||||
del self.status
|
del self.status
|
||||||
self.status = bb.cache.CacheData(self.caches_array)
|
self.status = bb.cache.CacheData(self.caches_array)
|
||||||
|
|
||||||
ignore = self.configuration.data.getVar("ASSUME_PROVIDED", 1) or ""
|
ignore = bb.data.getVar("ASSUME_PROVIDED", self.configuration.data, 1) or ""
|
||||||
self.status.ignored_dependencies = set(ignore.split())
|
self.status.ignored_dependencies = set(ignore.split())
|
||||||
|
|
||||||
for dep in self.configuration.extra_assume_provided:
|
for dep in self.configuration.extra_assume_provided:
|
||||||
self.status.ignored_dependencies.add(dep)
|
self.status.ignored_dependencies.add(dep)
|
||||||
|
|
||||||
self.handleCollections( self.configuration.data.getVar("BBFILE_COLLECTIONS", 1) )
|
self.handleCollections( bb.data.getVar("BBFILE_COLLECTIONS", self.configuration.data, 1) )
|
||||||
|
|
||||||
(filelist, masked) = self.collect_bbfiles()
|
(filelist, masked) = self.collect_bbfiles()
|
||||||
self.configuration.data.renameVar("__depends", "__base_depends")
|
bb.data.renameVar("__depends", "__base_depends", self.configuration.data)
|
||||||
|
|
||||||
self.parser = CookerParser(self, filelist, masked)
|
self.parser = CookerParser(self, filelist, masked)
|
||||||
self.state = state.parsing
|
self.state = state.parsing
|
||||||
@@ -1231,7 +1227,7 @@ class BBCooker:
|
|||||||
if g not in newfiles:
|
if g not in newfiles:
|
||||||
newfiles.append(g)
|
newfiles.append(g)
|
||||||
|
|
||||||
bbmask = self.configuration.data.getVar('BBMASK', 1)
|
bbmask = bb.data.getVar('BBMASK', self.configuration.data, 1)
|
||||||
|
|
||||||
if bbmask:
|
if bbmask:
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ def emit_func(func, o=sys.__stdout__, d = init()):
|
|||||||
seen |= deps
|
seen |= deps
|
||||||
newdeps = set()
|
newdeps = set()
|
||||||
for dep in deps:
|
for dep in deps:
|
||||||
if d.getVarFlag(dep, "func"):
|
if bb.data.getVarFlag(dep, "func", d):
|
||||||
emit_var(dep, o, d, False) and o.write('\n')
|
emit_var(dep, o, d, False) and o.write('\n')
|
||||||
newdeps |= bb.codeparser.ShellParser(dep, logger).parse_shell(d.getVar(dep, True))
|
newdeps |= bb.codeparser.ShellParser(dep, logger).parse_shell(d.getVar(dep, True))
|
||||||
newdeps -= seen
|
newdeps -= seen
|
||||||
@@ -319,7 +319,7 @@ def generate_dependencies(d):
|
|||||||
deps = {}
|
deps = {}
|
||||||
values = {}
|
values = {}
|
||||||
|
|
||||||
tasklist = d.getVar('__BBTASKS') or []
|
tasklist = bb.data.getVar('__BBTASKS', d) or []
|
||||||
for task in tasklist:
|
for task in tasklist:
|
||||||
deps[task], values[task] = build_dependencies(task, keys, shelldeps, vardepvals, d)
|
deps[task], values[task] = build_dependencies(task, keys, shelldeps, vardepvals, d)
|
||||||
newdeps = deps[task]
|
newdeps = deps[task]
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ class DataSmart(MutableMapping):
|
|||||||
|
|
||||||
return varparse
|
return varparse
|
||||||
|
|
||||||
def expand(self, s, varname = None):
|
def expand(self, s, varname):
|
||||||
return self.expandWithRefs(s, varname).value
|
return self.expandWithRefs(s, varname).value
|
||||||
|
|
||||||
|
|
||||||
@@ -304,14 +304,6 @@ class DataSmart(MutableMapping):
|
|||||||
|
|
||||||
self.delVar(key)
|
self.delVar(key)
|
||||||
|
|
||||||
def appendVar(self, key, value):
|
|
||||||
value = (self.getVar(key, False) or "") + value
|
|
||||||
self.setVar(key, value)
|
|
||||||
|
|
||||||
def prependVar(self, key, value):
|
|
||||||
value = value + (self.getVar(key, False) or "")
|
|
||||||
self.setVar(key, value)
|
|
||||||
|
|
||||||
def delVar(self, var):
|
def delVar(self, var):
|
||||||
self.expand_cache = {}
|
self.expand_cache = {}
|
||||||
self.dict[var] = {}
|
self.dict[var] = {}
|
||||||
@@ -347,14 +339,6 @@ class DataSmart(MutableMapping):
|
|||||||
if var in self.dict and flag in self.dict[var]:
|
if var in self.dict and flag in self.dict[var]:
|
||||||
del self.dict[var][flag]
|
del self.dict[var][flag]
|
||||||
|
|
||||||
def appendVarFlag(self, key, flag, value):
|
|
||||||
value = (self.getVarFlag(key, flag, False) or "") + value
|
|
||||||
self.setVarFlag(key, flag, value)
|
|
||||||
|
|
||||||
def prependVarFlag(self, key, flag, value):
|
|
||||||
value = value + (self.getVarFlag(key, flag, False) or "")
|
|
||||||
self.setVarFlag(key, flag, value)
|
|
||||||
|
|
||||||
def setVarFlags(self, var, flags):
|
def setVarFlags(self, var, flags):
|
||||||
if not var in self.dict:
|
if not var in self.dict:
|
||||||
self._makeShadowCopy(var)
|
self._makeShadowCopy(var)
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ def fetcher_init(d):
|
|||||||
Calls before this must not hit the cache.
|
Calls before this must not hit the cache.
|
||||||
"""
|
"""
|
||||||
# When to drop SCM head revisions controlled by user policy
|
# When to drop SCM head revisions controlled by user policy
|
||||||
srcrev_policy = d.getVar('BB_SRCREV_POLICY', 1) or "clear"
|
srcrev_policy = bb.data.getVar('BB_SRCREV_POLICY', d, 1) or "clear"
|
||||||
if srcrev_policy == "cache":
|
if srcrev_policy == "cache":
|
||||||
logger.debug(1, "Keeping SRCREV cache due to cache policy of: %s", srcrev_policy)
|
logger.debug(1, "Keeping SRCREV cache due to cache policy of: %s", srcrev_policy)
|
||||||
elif srcrev_policy == "clear":
|
elif srcrev_policy == "clear":
|
||||||
@@ -200,7 +200,7 @@ def fetcher_compare_revisions(d):
|
|||||||
def init(urls, d, setup = True):
|
def init(urls, d, setup = True):
|
||||||
urldata = {}
|
urldata = {}
|
||||||
|
|
||||||
fn = d.getVar('FILE', 1)
|
fn = bb.data.getVar('FILE', d, 1)
|
||||||
if fn in urldata_cache:
|
if fn in urldata_cache:
|
||||||
urldata = urldata_cache[fn]
|
urldata = urldata_cache[fn]
|
||||||
|
|
||||||
@@ -243,7 +243,7 @@ def verify_checksum(u, ud, d):
|
|||||||
'SRC_URI[%s] = "%s"\nSRC_URI[%s] = "%s"',
|
'SRC_URI[%s] = "%s"\nSRC_URI[%s] = "%s"',
|
||||||
ud.localpath, ud.md5_name, md5data,
|
ud.localpath, ud.md5_name, md5data,
|
||||||
ud.sha256_name, sha256data)
|
ud.sha256_name, sha256data)
|
||||||
if d.getVar("BB_STRICT_CHECKSUM", True) == "1":
|
if bb.data.getVar("BB_STRICT_CHECKSUM", d, True) == "1":
|
||||||
raise FetchError("No checksum specified for %s." % u)
|
raise FetchError("No checksum specified for %s." % u)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -276,7 +276,7 @@ def go(d, urls = None):
|
|||||||
|
|
||||||
if m.try_premirror(u, ud, d):
|
if m.try_premirror(u, ud, d):
|
||||||
# First try fetching uri, u, from PREMIRRORS
|
# First try fetching uri, u, from PREMIRRORS
|
||||||
mirrors = mirror_from_string(d.getVar('PREMIRRORS', True))
|
mirrors = mirror_from_string(bb.data.getVar('PREMIRRORS', d, True))
|
||||||
localpath = try_mirrors(d, u, mirrors, False, m.forcefetch(u, ud, d))
|
localpath = try_mirrors(d, u, mirrors, False, m.forcefetch(u, ud, d))
|
||||||
elif os.path.exists(ud.localfile):
|
elif os.path.exists(ud.localfile):
|
||||||
localpath = ud.localfile
|
localpath = ud.localfile
|
||||||
@@ -291,7 +291,7 @@ def go(d, urls = None):
|
|||||||
# Remove any incomplete file
|
# Remove any incomplete file
|
||||||
bb.utils.remove(ud.localpath)
|
bb.utils.remove(ud.localpath)
|
||||||
# Finally, try fetching uri, u, from MIRRORS
|
# Finally, try fetching uri, u, from MIRRORS
|
||||||
mirrors = mirror_from_string(d.getVar('MIRRORS', True))
|
mirrors = mirror_from_string(bb.data.getVar('MIRRORS', d, True))
|
||||||
localpath = try_mirrors (d, u, mirrors)
|
localpath = try_mirrors (d, u, mirrors)
|
||||||
if not localpath or not os.path.exists(localpath):
|
if not localpath or not os.path.exists(localpath):
|
||||||
raise FetchError("Unable to fetch URL %s from any source." % u)
|
raise FetchError("Unable to fetch URL %s from any source." % u)
|
||||||
@@ -327,7 +327,7 @@ def checkstatus(d, urls = None):
|
|||||||
m = ud.method
|
m = ud.method
|
||||||
logger.debug(1, "Testing URL %s", u)
|
logger.debug(1, "Testing URL %s", u)
|
||||||
# First try checking uri, u, from PREMIRRORS
|
# First try checking uri, u, from PREMIRRORS
|
||||||
mirrors = mirror_from_string(d.getVar('PREMIRRORS', True))
|
mirrors = mirror_from_string(bb.data.getVar('PREMIRRORS', d, True))
|
||||||
ret = try_mirrors(d, u, mirrors, True)
|
ret = try_mirrors(d, u, mirrors, True)
|
||||||
if not ret:
|
if not ret:
|
||||||
# Next try checking from the original uri, u
|
# Next try checking from the original uri, u
|
||||||
@@ -335,7 +335,7 @@ def checkstatus(d, urls = None):
|
|||||||
ret = m.checkstatus(u, ud, d)
|
ret = m.checkstatus(u, ud, d)
|
||||||
except:
|
except:
|
||||||
# Finally, try checking uri, u, from MIRRORS
|
# Finally, try checking uri, u, from MIRRORS
|
||||||
mirrors = mirror_from_string(d.getVar('MIRRORS', True))
|
mirrors = mirror_from_string(bb.data.getVar('MIRRORS', d, True))
|
||||||
ret = try_mirrors (d, u, mirrors, True)
|
ret = try_mirrors (d, u, mirrors, True)
|
||||||
|
|
||||||
if not ret:
|
if not ret:
|
||||||
@@ -383,7 +383,7 @@ def get_srcrev(d):
|
|||||||
scms = []
|
scms = []
|
||||||
|
|
||||||
# Only call setup_localpath on URIs which supports_srcrev()
|
# Only call setup_localpath on URIs which supports_srcrev()
|
||||||
urldata = init(d.getVar('SRC_URI', 1).split(), d, False)
|
urldata = init(bb.data.getVar('SRC_URI', d, 1).split(), d, False)
|
||||||
for u in urldata:
|
for u in urldata:
|
||||||
ud = urldata[u]
|
ud = urldata[u]
|
||||||
if ud.method.supports_srcrev():
|
if ud.method.supports_srcrev():
|
||||||
@@ -395,8 +395,8 @@ def get_srcrev(d):
|
|||||||
logger.error("SRCREV was used yet no valid SCM was found in SRC_URI")
|
logger.error("SRCREV was used yet no valid SCM was found in SRC_URI")
|
||||||
raise ParameterError
|
raise ParameterError
|
||||||
|
|
||||||
if d.getVar('BB_SRCREV_POLICY', True) != "cache":
|
if bb.data.getVar('BB_SRCREV_POLICY', d, True) != "cache":
|
||||||
d.setVar('__BB_DONT_CACHE', '1')
|
bb.data.setVar('__BB_DONT_CACHE', '1', d)
|
||||||
|
|
||||||
if len(scms) == 1:
|
if len(scms) == 1:
|
||||||
return urldata[scms[0]].method.sortable_revision(scms[0], urldata[scms[0]], d)
|
return urldata[scms[0]].method.sortable_revision(scms[0], urldata[scms[0]], d)
|
||||||
@@ -404,7 +404,7 @@ def get_srcrev(d):
|
|||||||
#
|
#
|
||||||
# Mutiple SCMs are in SRC_URI so we resort to SRCREV_FORMAT
|
# Mutiple SCMs are in SRC_URI so we resort to SRCREV_FORMAT
|
||||||
#
|
#
|
||||||
format = d.getVar('SRCREV_FORMAT', 1)
|
format = bb.data.getVar('SRCREV_FORMAT', d, 1)
|
||||||
if not format:
|
if not format:
|
||||||
logger.error("The SRCREV_FORMAT variable must be set when multiple SCMs are used.")
|
logger.error("The SRCREV_FORMAT variable must be set when multiple SCMs are used.")
|
||||||
raise ParameterError
|
raise ParameterError
|
||||||
@@ -539,8 +539,8 @@ class FetchData(object):
|
|||||||
else:
|
else:
|
||||||
self.md5_name = "md5sum"
|
self.md5_name = "md5sum"
|
||||||
self.sha256_name = "sha256sum"
|
self.sha256_name = "sha256sum"
|
||||||
self.md5_expected = d.getVarFlag("SRC_URI", self.md5_name)
|
self.md5_expected = bb.data.getVarFlag("SRC_URI", self.md5_name, d)
|
||||||
self.sha256_expected = d.getVarFlag("SRC_URI", self.sha256_name)
|
self.sha256_expected = bb.data.getVarFlag("SRC_URI", self.sha256_name, d)
|
||||||
|
|
||||||
for m in methods:
|
for m in methods:
|
||||||
if m.supports(url, self, d):
|
if m.supports(url, self, d):
|
||||||
@@ -555,7 +555,7 @@ class FetchData(object):
|
|||||||
self.localpath = self.parm["localpath"]
|
self.localpath = self.parm["localpath"]
|
||||||
self.basename = os.path.basename(self.localpath)
|
self.basename = os.path.basename(self.localpath)
|
||||||
else:
|
else:
|
||||||
premirrors = d.getVar('PREMIRRORS', True)
|
premirrors = bb.data.getVar('PREMIRRORS', d, True)
|
||||||
local = ""
|
local = ""
|
||||||
if premirrors and self.url:
|
if premirrors and self.url:
|
||||||
aurl = self.url.split(";")[0]
|
aurl = self.url.split(";")[0]
|
||||||
@@ -775,7 +775,7 @@ class Fetch(object):
|
|||||||
|
|
||||||
latest_rev = self._build_revision(url, ud, d)
|
latest_rev = self._build_revision(url, ud, d)
|
||||||
last_rev = localcounts.get(key + '_rev')
|
last_rev = localcounts.get(key + '_rev')
|
||||||
uselocalcount = d.getVar("BB_LOCALCOUNT_OVERRIDE", True) or False
|
uselocalcount = bb.data.getVar("BB_LOCALCOUNT_OVERRIDE", d, True) or False
|
||||||
count = None
|
count = None
|
||||||
if uselocalcount:
|
if uselocalcount:
|
||||||
count = Fetch.localcount_internal_helper(ud, d)
|
count = Fetch.localcount_internal_helper(ud, d)
|
||||||
@@ -803,7 +803,7 @@ class Fetch(object):
|
|||||||
|
|
||||||
def generate_revision_key(self, url, ud, d):
|
def generate_revision_key(self, url, ud, d):
|
||||||
key = self._revision_key(url, ud, d)
|
key = self._revision_key(url, ud, d)
|
||||||
return "%s-%s" % (key, d.getVar("PN", True) or "")
|
return "%s-%s" % (key, bb.data.getVar("PN", d, True) or "")
|
||||||
|
|
||||||
from . import cvs
|
from . import cvs
|
||||||
from . import git
|
from . import git
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class Git(Fetch):
|
|||||||
#
|
#
|
||||||
# Only enable _sortable revision if the key is set
|
# Only enable _sortable revision if the key is set
|
||||||
#
|
#
|
||||||
if d.getVar("BB_GIT_CLONE_FOR_SRCREV", True):
|
if bb.data.getVar("BB_GIT_CLONE_FOR_SRCREV", d, True):
|
||||||
self._sortable_buildindex = self._sortable_buildindex_disabled
|
self._sortable_buildindex = self._sortable_buildindex_disabled
|
||||||
def supports(self, url, ud, d):
|
def supports(self, url, ud, d):
|
||||||
"""
|
"""
|
||||||
@@ -220,7 +220,7 @@ class Git(Fetch):
|
|||||||
|
|
||||||
def generate_revision_key(self, url, ud, d, branch=False):
|
def generate_revision_key(self, url, ud, d, branch=False):
|
||||||
key = self._revision_key(url, ud, d, branch)
|
key = self._revision_key(url, ud, d, branch)
|
||||||
return "%s-%s" % (key, d.getVar("PN", True) or "")
|
return "%s-%s" % (key, bb.data.getVar("PN", d, True) or "")
|
||||||
|
|
||||||
def _latest_revision(self, url, ud, d):
|
def _latest_revision(self, url, ud, d):
|
||||||
"""
|
"""
|
||||||
@@ -276,7 +276,7 @@ class Git(Fetch):
|
|||||||
del localcounts[oldkey + '_rev']
|
del localcounts[oldkey + '_rev']
|
||||||
localcounts[key + '_rev'] = last_rev
|
localcounts[key + '_rev'] = last_rev
|
||||||
|
|
||||||
uselocalcount = d.getVar("BB_LOCALCOUNT_OVERRIDE", True) or False
|
uselocalcount = bb.data.getVar("BB_LOCALCOUNT_OVERRIDE", d, True) or False
|
||||||
count = None
|
count = None
|
||||||
if uselocalcount:
|
if uselocalcount:
|
||||||
count = Fetch.localcount_internal_helper(ud, d)
|
count = Fetch.localcount_internal_helper(ud, d)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ from __future__ import absolute_import
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import os, re
|
import os, re
|
||||||
import logging
|
import logging
|
||||||
import bb.persist_data, bb.utils
|
import bb.data, bb.persist_data, bb.utils
|
||||||
from bb import data
|
from bb import data
|
||||||
|
|
||||||
__version__ = "2"
|
__version__ = "2"
|
||||||
@@ -93,6 +93,28 @@ class ParameterError(BBFetchException):
|
|||||||
BBFetchException.__init__(self, msg)
|
BBFetchException.__init__(self, msg)
|
||||||
self.args = (message, url)
|
self.args = (message, url)
|
||||||
|
|
||||||
|
class MD5SumError(BBFetchException):
|
||||||
|
"""Exception raised when a MD5 checksum of a file does not match for a downloaded file"""
|
||||||
|
def __init__(self, path, wanted, got, url):
|
||||||
|
msg = "File: '%s' has md5 checksum %s when %s was expected (from URL: '%s')" % (path, got, wanted, url)
|
||||||
|
self.url = url
|
||||||
|
self.path = path
|
||||||
|
self.wanted = wanted
|
||||||
|
self.got = got
|
||||||
|
BBFetchException.__init__(self, msg)
|
||||||
|
self.args = (path, wanted, got, url)
|
||||||
|
|
||||||
|
class SHA256SumError(MD5SumError):
|
||||||
|
"""Exception raised when a SHA256 checksum of a file does not match for a downloaded file"""
|
||||||
|
def __init__(self, path, wanted, got, url):
|
||||||
|
msg = "File: '%s' has sha256 checksum %s when %s was expected (from URL: '%s')" % (path, got, wanted, url)
|
||||||
|
self.url = url
|
||||||
|
self.path = path
|
||||||
|
self.wanted = wanted
|
||||||
|
self.got = got
|
||||||
|
BBFetchException.__init__(self, msg)
|
||||||
|
self.args = (path, wanted, got, url)
|
||||||
|
|
||||||
class NetworkAccess(BBFetchException):
|
class NetworkAccess(BBFetchException):
|
||||||
"""Exception raised when network access is disabled but it is required."""
|
"""Exception raised when network access is disabled but it is required."""
|
||||||
def __init__(self, url, cmd):
|
def __init__(self, url, cmd):
|
||||||
@@ -211,7 +233,7 @@ def fetcher_init(d):
|
|||||||
Calls before this must not hit the cache.
|
Calls before this must not hit the cache.
|
||||||
"""
|
"""
|
||||||
# When to drop SCM head revisions controlled by user policy
|
# When to drop SCM head revisions controlled by user policy
|
||||||
srcrev_policy = d.getVar('BB_SRCREV_POLICY', True) or "clear"
|
srcrev_policy = bb.data.getVar('BB_SRCREV_POLICY', d, True) or "clear"
|
||||||
if srcrev_policy == "cache":
|
if srcrev_policy == "cache":
|
||||||
logger.debug(1, "Keeping SRCREV cache due to cache policy of: %s", srcrev_policy)
|
logger.debug(1, "Keeping SRCREV cache due to cache policy of: %s", srcrev_policy)
|
||||||
elif srcrev_policy == "clear":
|
elif srcrev_policy == "clear":
|
||||||
@@ -256,8 +278,8 @@ def verify_checksum(u, ud, d):
|
|||||||
verify the MD5 and SHA256 checksum for downloaded src
|
verify the MD5 and SHA256 checksum for downloaded src
|
||||||
|
|
||||||
return value:
|
return value:
|
||||||
- True: a checksum matched
|
- True: checksum matched
|
||||||
- False: neither checksum matched
|
- False: checksum unmatched
|
||||||
|
|
||||||
if checksum is missing in recipes file, "BB_STRICT_CHECKSUM" decide the return value.
|
if checksum is missing in recipes file, "BB_STRICT_CHECKSUM" decide the return value.
|
||||||
if BB_STRICT_CHECKSUM = "1" then return false as unmatched, otherwise return true as
|
if BB_STRICT_CHECKSUM = "1" then return false as unmatched, otherwise return true as
|
||||||
@@ -270,46 +292,20 @@ def verify_checksum(u, ud, d):
|
|||||||
md5data = bb.utils.md5_file(ud.localpath)
|
md5data = bb.utils.md5_file(ud.localpath)
|
||||||
sha256data = bb.utils.sha256_file(ud.localpath)
|
sha256data = bb.utils.sha256_file(ud.localpath)
|
||||||
|
|
||||||
# If strict checking enabled and neither sum defined, raise error
|
if (ud.md5_expected == None or ud.sha256_expected == None):
|
||||||
strict = d.getVar("BB_STRICT_CHECKSUM", True) or None
|
logger.warn('Missing SRC_URI checksum for %s, consider adding to the recipe:\n'
|
||||||
if (strict and ud.md5_expected == None and ud.sha256_expected == None):
|
'SRC_URI[%s] = "%s"\nSRC_URI[%s] = "%s"',
|
||||||
raise FetchError('No checksum specified for %s, please add at least one to the recipe:\n'
|
ud.localpath, ud.md5_name, md5data,
|
||||||
'SRC_URI[%s] = "%s"\nSRC_URI[%s] = "%s"' %
|
ud.sha256_name, sha256data)
|
||||||
(ud.localpath, ud.md5_name, md5data,
|
if bb.data.getVar("BB_STRICT_CHECKSUM", d, True) == "1":
|
||||||
ud.sha256_name, sha256data), u)
|
raise FetchError("No checksum specified for %s." % u, u)
|
||||||
|
return
|
||||||
# Log missing sums so user can more easily add them
|
|
||||||
if ud.md5_expected == None:
|
|
||||||
logger.warn('Missing md5 SRC_URI checksum for %s, consider adding to the recipe:\n'
|
|
||||||
'SRC_URI[%s] = "%s"',
|
|
||||||
ud.localpath, ud.md5_name, md5data)
|
|
||||||
|
|
||||||
if ud.sha256_expected == None:
|
|
||||||
logger.warn('Missing sha256 SRC_URI checksum for %s, consider adding to the recipe:\n'
|
|
||||||
'SRC_URI[%s] = "%s"',
|
|
||||||
ud.localpath, ud.sha256_name, sha256data)
|
|
||||||
|
|
||||||
md5mismatch = False
|
|
||||||
sha256mismatch = False
|
|
||||||
|
|
||||||
if ud.md5_expected != md5data:
|
if ud.md5_expected != md5data:
|
||||||
md5mismatch = True
|
raise MD5SumError(ud.localpath, ud.md5_expected, md5data, u)
|
||||||
|
|
||||||
if ud.sha256_expected != sha256data:
|
if ud.sha256_expected != sha256data:
|
||||||
sha256mismatch = True
|
raise SHA256SumError(ud.localpath, ud.sha256_expected, sha256data, u)
|
||||||
|
|
||||||
# We want to alert the user if a checksum is defined in the recipe but
|
|
||||||
# it does not match.
|
|
||||||
msg = ""
|
|
||||||
if md5mismatch and ud.md5_expected:
|
|
||||||
msg = msg + "\nFile: '%s' has %s checksum %s when %s was expected (from URL: '%s')" % (ud.localpath, 'md5', md5data, ud.md5_expected, u)
|
|
||||||
|
|
||||||
if sha256mismatch and ud.sha256_expected:
|
|
||||||
msg = msg + "\nFile: '%s' has %s checksum %s when %s was expected (from URL: '%s')" % (ud.localpath, 'sha256', sha256data, ud.sha256_expected, u)
|
|
||||||
|
|
||||||
if len(msg):
|
|
||||||
raise FetchError('Checksum mismatch!%s' % msg, u)
|
|
||||||
|
|
||||||
|
|
||||||
def update_stamp(u, ud, d):
|
def update_stamp(u, ud, d):
|
||||||
"""
|
"""
|
||||||
@@ -336,8 +332,8 @@ def subprocess_setup():
|
|||||||
|
|
||||||
def get_autorev(d):
|
def get_autorev(d):
|
||||||
# only not cache src rev in autorev case
|
# only not cache src rev in autorev case
|
||||||
if d.getVar('BB_SRCREV_POLICY', True) != "cache":
|
if bb.data.getVar('BB_SRCREV_POLICY', d, True) != "cache":
|
||||||
d.setVar('__BB_DONT_CACHE', '1')
|
bb.data.setVar('__BB_DONT_CACHE', '1', d)
|
||||||
return "AUTOINC"
|
return "AUTOINC"
|
||||||
|
|
||||||
def get_srcrev(d):
|
def get_srcrev(d):
|
||||||
@@ -350,7 +346,7 @@ def get_srcrev(d):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
scms = []
|
scms = []
|
||||||
fetcher = Fetch(d.getVar('SRC_URI', True).split(), d)
|
fetcher = Fetch(bb.data.getVar('SRC_URI', d, True).split(), d)
|
||||||
urldata = fetcher.ud
|
urldata = fetcher.ud
|
||||||
for u in urldata:
|
for u in urldata:
|
||||||
if urldata[u].method.supports_srcrev():
|
if urldata[u].method.supports_srcrev():
|
||||||
@@ -365,7 +361,7 @@ def get_srcrev(d):
|
|||||||
#
|
#
|
||||||
# Mutiple SCMs are in SRC_URI so we resort to SRCREV_FORMAT
|
# Mutiple SCMs are in SRC_URI so we resort to SRCREV_FORMAT
|
||||||
#
|
#
|
||||||
format = d.getVar('SRCREV_FORMAT', True)
|
format = bb.data.getVar('SRCREV_FORMAT', d, True)
|
||||||
if not format:
|
if not format:
|
||||||
raise FetchError("The SRCREV_FORMAT variable must be set when multiple SCMs are used.")
|
raise FetchError("The SRCREV_FORMAT variable must be set when multiple SCMs are used.")
|
||||||
|
|
||||||
@@ -400,7 +396,7 @@ def runfetchcmd(cmd, d, quiet = False, cleanup = []):
|
|||||||
'GIT_PROXY_IGNORE', 'SOCKS5_USER', 'SOCKS5_PASSWD']
|
'GIT_PROXY_IGNORE', 'SOCKS5_USER', 'SOCKS5_PASSWD']
|
||||||
|
|
||||||
for var in exportvars:
|
for var in exportvars:
|
||||||
val = d.getVar(var, True)
|
val = bb.data.getVar(var, d, True)
|
||||||
if val:
|
if val:
|
||||||
cmd = 'export ' + var + '=\"%s\"; %s' % (val, cmd)
|
cmd = 'export ' + var + '=\"%s\"; %s' % (val, cmd)
|
||||||
|
|
||||||
@@ -440,7 +436,7 @@ def check_network_access(d, info = "", url = None):
|
|||||||
"""
|
"""
|
||||||
log remote network access, and error if BB_NO_NETWORK is set
|
log remote network access, and error if BB_NO_NETWORK is set
|
||||||
"""
|
"""
|
||||||
if d.getVar("BB_NO_NETWORK", True) == "1":
|
if bb.data.getVar("BB_NO_NETWORK", d, True) == "1":
|
||||||
raise NetworkAccess(url, info)
|
raise NetworkAccess(url, info)
|
||||||
else:
|
else:
|
||||||
logger.debug(1, "Fetcher accessed the network with the command %s" % info)
|
logger.debug(1, "Fetcher accessed the network with the command %s" % info)
|
||||||
@@ -526,15 +522,15 @@ def srcrev_internal_helper(ud, d, name):
|
|||||||
return ud.parm['tag']
|
return ud.parm['tag']
|
||||||
|
|
||||||
rev = None
|
rev = None
|
||||||
pn = d.getVar("PN", True)
|
pn = bb.data.getVar("PN", d, True)
|
||||||
if name != '':
|
if name != '':
|
||||||
rev = d.getVar("SRCREV_%s_pn-%s" % (name, pn), True)
|
rev = bb.data.getVar("SRCREV_%s_pn-%s" % (name, pn), d, True)
|
||||||
if not rev:
|
if not rev:
|
||||||
rev = d.getVar("SRCREV_%s" % name, True)
|
rev = bb.data.getVar("SRCREV_%s" % name, d, True)
|
||||||
if not rev:
|
if not rev:
|
||||||
rev = d.getVar("SRCREV_pn-%s" % pn, True)
|
rev = bb.data.getVar("SRCREV_pn-%s" % pn, d, True)
|
||||||
if not rev:
|
if not rev:
|
||||||
rev = d.getVar("SRCREV", True)
|
rev = bb.data.getVar("SRCREV", d, True)
|
||||||
if rev == "INVALID":
|
if rev == "INVALID":
|
||||||
raise FetchError("Please set SRCREV to a valid value", ud.url)
|
raise FetchError("Please set SRCREV to a valid value", ud.url)
|
||||||
if rev == "AUTOINC":
|
if rev == "AUTOINC":
|
||||||
@@ -569,14 +565,8 @@ class FetchData(object):
|
|||||||
else:
|
else:
|
||||||
self.md5_name = "md5sum"
|
self.md5_name = "md5sum"
|
||||||
self.sha256_name = "sha256sum"
|
self.sha256_name = "sha256sum"
|
||||||
if self.md5_name in self.parm:
|
self.md5_expected = bb.data.getVarFlag("SRC_URI", self.md5_name, d)
|
||||||
self.md5_expected = self.parm[self.md5_name]
|
self.sha256_expected = bb.data.getVarFlag("SRC_URI", self.sha256_name, d)
|
||||||
else:
|
|
||||||
self.md5_expected = d.getVarFlag("SRC_URI", self.md5_name)
|
|
||||||
if self.sha256_name in self.parm:
|
|
||||||
self.sha256_expected = self.parm[self.sha256_name]
|
|
||||||
else:
|
|
||||||
self.sha256_expected = d.getVarFlag("SRC_URI", self.sha256_name)
|
|
||||||
|
|
||||||
self.names = self.parm.get("name",'default').split(',')
|
self.names = self.parm.get("name",'default').split(',')
|
||||||
|
|
||||||
@@ -600,7 +590,7 @@ class FetchData(object):
|
|||||||
self.localpath = self.method.localpath(self.url, self, d)
|
self.localpath = self.method.localpath(self.url, self, d)
|
||||||
|
|
||||||
# Note: These files should always be in DL_DIR whereas localpath may not be.
|
# Note: These files should always be in DL_DIR whereas localpath may not be.
|
||||||
basepath = d.expand("${DL_DIR}/%s" % os.path.basename(self.localpath or self.basename))
|
basepath = bb.data.expand("${DL_DIR}/%s" % os.path.basename(self.localpath or self.basename), d)
|
||||||
self.donestamp = basepath + '.done'
|
self.donestamp = basepath + '.done'
|
||||||
self.lockfile = basepath + '.lock'
|
self.lockfile = basepath + '.lock'
|
||||||
|
|
||||||
@@ -626,12 +616,12 @@ class FetchData(object):
|
|||||||
if "srcdate" in self.parm:
|
if "srcdate" in self.parm:
|
||||||
return self.parm['srcdate']
|
return self.parm['srcdate']
|
||||||
|
|
||||||
pn = d.getVar("PN", True)
|
pn = bb.data.getVar("PN", d, True)
|
||||||
|
|
||||||
if pn:
|
if pn:
|
||||||
return d.getVar("SRCDATE_%s" % pn, True) or d.getVar("SRCDATE", True) or d.getVar("DATE", True)
|
return bb.data.getVar("SRCDATE_%s" % pn, d, True) or bb.data.getVar("SRCDATE", d, True) or bb.data.getVar("DATE", d, True)
|
||||||
|
|
||||||
return d.getVar("SRCDATE", True) or d.getVar("DATE", True)
|
return bb.data.getVar("SRCDATE", d, True) or bb.data.getVar("DATE", d, True)
|
||||||
|
|
||||||
class FetchMethod(object):
|
class FetchMethod(object):
|
||||||
"""Base class for 'fetch'ing data"""
|
"""Base class for 'fetch'ing data"""
|
||||||
@@ -703,7 +693,7 @@ class FetchMethod(object):
|
|||||||
|
|
||||||
dots = file.split(".")
|
dots = file.split(".")
|
||||||
if dots[-1] in ['gz', 'bz2', 'Z']:
|
if dots[-1] in ['gz', 'bz2', 'Z']:
|
||||||
efile = os.path.join(data.getVar('WORKDIR', True),os.path.basename('.'.join(dots[0:-1])))
|
efile = os.path.join(bb.data.getVar('WORKDIR', data, True),os.path.basename('.'.join(dots[0:-1])))
|
||||||
else:
|
else:
|
||||||
efile = file
|
efile = file
|
||||||
cmd = None
|
cmd = None
|
||||||
@@ -747,7 +737,7 @@ class FetchMethod(object):
|
|||||||
dest = os.path.join(rootdir, os.path.basename(file))
|
dest = os.path.join(rootdir, os.path.basename(file))
|
||||||
if (file != dest) and not (os.path.exists(dest) and os.path.samefile(file, dest)):
|
if (file != dest) and not (os.path.exists(dest) and os.path.samefile(file, dest)):
|
||||||
if os.path.isdir(file):
|
if os.path.isdir(file):
|
||||||
filesdir = os.path.realpath(data.getVar("FILESDIR", True))
|
filesdir = os.path.realpath(bb.data.getVar("FILESDIR", data, True))
|
||||||
destdir = "."
|
destdir = "."
|
||||||
if file[0:len(filesdir)] == filesdir:
|
if file[0:len(filesdir)] == filesdir:
|
||||||
destdir = file[len(filesdir):file.rfind('/')]
|
destdir = file[len(filesdir):file.rfind('/')]
|
||||||
@@ -779,7 +769,7 @@ class FetchMethod(object):
|
|||||||
bb.utils.mkdirhier(newdir)
|
bb.utils.mkdirhier(newdir)
|
||||||
os.chdir(newdir)
|
os.chdir(newdir)
|
||||||
|
|
||||||
cmd = "PATH=\"%s\" %s" % (data.getVar('PATH', True), cmd)
|
cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', data, True), cmd)
|
||||||
bb.note("Unpacking %s to %s/" % (file, os.getcwd()))
|
bb.note("Unpacking %s to %s/" % (file, os.getcwd()))
|
||||||
ret = subprocess.call(cmd, preexec_fn=subprocess_setup, shell=True)
|
ret = subprocess.call(cmd, preexec_fn=subprocess_setup, shell=True)
|
||||||
|
|
||||||
@@ -824,10 +814,10 @@ class FetchMethod(object):
|
|||||||
|
|
||||||
localcount = None
|
localcount = None
|
||||||
if name != '':
|
if name != '':
|
||||||
pn = d.getVar("PN", True)
|
pn = bb.data.getVar("PN", d, True)
|
||||||
localcount = d.getVar("LOCALCOUNT_" + name, True)
|
localcount = bb.data.getVar("LOCALCOUNT_" + name, d, True)
|
||||||
if not localcount:
|
if not localcount:
|
||||||
localcount = d.getVar("LOCALCOUNT", True)
|
localcount = bb.data.getVar("LOCALCOUNT", d, True)
|
||||||
return localcount
|
return localcount
|
||||||
|
|
||||||
localcount_internal_helper = staticmethod(localcount_internal_helper)
|
localcount_internal_helper = staticmethod(localcount_internal_helper)
|
||||||
@@ -859,7 +849,7 @@ class FetchMethod(object):
|
|||||||
|
|
||||||
latest_rev = self._build_revision(url, ud, d, name)
|
latest_rev = self._build_revision(url, ud, d, name)
|
||||||
last_rev = localcounts.get(key + '_rev')
|
last_rev = localcounts.get(key + '_rev')
|
||||||
uselocalcount = d.getVar("BB_LOCALCOUNT_OVERRIDE", True) or False
|
uselocalcount = bb.data.getVar("BB_LOCALCOUNT_OVERRIDE", d, True) or False
|
||||||
count = None
|
count = None
|
||||||
if uselocalcount:
|
if uselocalcount:
|
||||||
count = FetchMethod.localcount_internal_helper(ud, d, name)
|
count = FetchMethod.localcount_internal_helper(ud, d, name)
|
||||||
@@ -887,7 +877,7 @@ class FetchMethod(object):
|
|||||||
|
|
||||||
def generate_revision_key(self, url, ud, d, name):
|
def generate_revision_key(self, url, ud, d, name):
|
||||||
key = self._revision_key(url, ud, d, name)
|
key = self._revision_key(url, ud, d, name)
|
||||||
return "%s-%s" % (key, d.getVar("PN", True) or "")
|
return "%s-%s" % (key, bb.data.getVar("PN", d, True) or "")
|
||||||
|
|
||||||
class Fetch(object):
|
class Fetch(object):
|
||||||
def __init__(self, urls, d, cache = True):
|
def __init__(self, urls, d, cache = True):
|
||||||
@@ -897,7 +887,7 @@ class Fetch(object):
|
|||||||
self.d = d
|
self.d = d
|
||||||
self.ud = {}
|
self.ud = {}
|
||||||
|
|
||||||
fn = d.getVar('FILE', True)
|
fn = bb.data.getVar('FILE', d, True)
|
||||||
if cache and fn in urldata_cache:
|
if cache and fn in urldata_cache:
|
||||||
self.ud = urldata_cache[fn]
|
self.ud = urldata_cache[fn]
|
||||||
|
|
||||||
@@ -913,7 +903,7 @@ class Fetch(object):
|
|||||||
self.ud[url] = FetchData(url, self.d)
|
self.ud[url] = FetchData(url, self.d)
|
||||||
|
|
||||||
self.ud[url].setup_localpath(self.d)
|
self.ud[url].setup_localpath(self.d)
|
||||||
return self.d.expand(self.ud[url].localpath)
|
return bb.data.expand(self.ud[url].localpath, self.d)
|
||||||
|
|
||||||
def localpaths(self):
|
def localpaths(self):
|
||||||
"""
|
"""
|
||||||
@@ -935,8 +925,8 @@ class Fetch(object):
|
|||||||
if len(urls) == 0:
|
if len(urls) == 0:
|
||||||
urls = self.urls
|
urls = self.urls
|
||||||
|
|
||||||
network = self.d.getVar("BB_NO_NETWORK", True)
|
network = bb.data.getVar("BB_NO_NETWORK", self.d, True)
|
||||||
premirroronly = (self.d.getVar("BB_FETCH_PREMIRRORONLY", True) == "1")
|
premirroronly = (bb.data.getVar("BB_FETCH_PREMIRRORONLY", self.d, True) == "1")
|
||||||
|
|
||||||
for u in urls:
|
for u in urls:
|
||||||
ud = self.ud[u]
|
ud = self.ud[u]
|
||||||
@@ -947,17 +937,17 @@ class Fetch(object):
|
|||||||
lf = bb.utils.lockfile(ud.lockfile)
|
lf = bb.utils.lockfile(ud.lockfile)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.d.setVar("BB_NO_NETWORK", network)
|
bb.data.setVar("BB_NO_NETWORK", network, self.d)
|
||||||
|
|
||||||
if not m.need_update(u, ud, self.d):
|
if not m.need_update(u, ud, self.d):
|
||||||
localpath = ud.localpath
|
localpath = ud.localpath
|
||||||
elif m.try_premirror(u, ud, self.d):
|
elif m.try_premirror(u, ud, self.d):
|
||||||
logger.debug(1, "Trying PREMIRRORS")
|
logger.debug(1, "Trying PREMIRRORS")
|
||||||
mirrors = mirror_from_string(self.d.getVar('PREMIRRORS', True))
|
mirrors = mirror_from_string(bb.data.getVar('PREMIRRORS', self.d, True))
|
||||||
localpath = try_mirrors(self.d, ud, mirrors, False)
|
localpath = try_mirrors(self.d, ud, mirrors, False)
|
||||||
|
|
||||||
if premirroronly:
|
if premirroronly:
|
||||||
self.d.setVar("BB_NO_NETWORK", "1")
|
bb.data.setVar("BB_NO_NETWORK", "1", self.d)
|
||||||
|
|
||||||
if not localpath and m.need_update(u, ud, self.d):
|
if not localpath and m.need_update(u, ud, self.d):
|
||||||
try:
|
try:
|
||||||
@@ -979,7 +969,7 @@ class Fetch(object):
|
|||||||
if os.path.isfile(ud.localpath):
|
if os.path.isfile(ud.localpath):
|
||||||
bb.utils.remove(ud.localpath)
|
bb.utils.remove(ud.localpath)
|
||||||
logger.debug(1, "Trying MIRRORS")
|
logger.debug(1, "Trying MIRRORS")
|
||||||
mirrors = mirror_from_string(self.d.getVar('MIRRORS', True))
|
mirrors = mirror_from_string(bb.data.getVar('MIRRORS', self.d, True))
|
||||||
localpath = try_mirrors (self.d, ud, mirrors)
|
localpath = try_mirrors (self.d, ud, mirrors)
|
||||||
|
|
||||||
if not localpath or ((not os.path.exists(localpath)) and localpath.find("*") == -1):
|
if not localpath or ((not os.path.exists(localpath)) and localpath.find("*") == -1):
|
||||||
@@ -1004,7 +994,7 @@ class Fetch(object):
|
|||||||
m = ud.method
|
m = ud.method
|
||||||
logger.debug(1, "Testing URL %s", u)
|
logger.debug(1, "Testing URL %s", u)
|
||||||
# First try checking uri, u, from PREMIRRORS
|
# First try checking uri, u, from PREMIRRORS
|
||||||
mirrors = mirror_from_string(self.d.getVar('PREMIRRORS', True))
|
mirrors = mirror_from_string(bb.data.getVar('PREMIRRORS', self.d, True))
|
||||||
ret = try_mirrors(self.d, ud, mirrors, True)
|
ret = try_mirrors(self.d, ud, mirrors, True)
|
||||||
if not ret:
|
if not ret:
|
||||||
# Next try checking from the original uri, u
|
# Next try checking from the original uri, u
|
||||||
@@ -1012,7 +1002,7 @@ class Fetch(object):
|
|||||||
ret = m.checkstatus(u, ud, self.d)
|
ret = m.checkstatus(u, ud, self.d)
|
||||||
except:
|
except:
|
||||||
# Finally, try checking uri, u, from MIRRORS
|
# Finally, try checking uri, u, from MIRRORS
|
||||||
mirrors = mirror_from_string(self.d.getVar('MIRRORS', True))
|
mirrors = mirror_from_string(bb.data.getVar('MIRRORS', self.d, True))
|
||||||
ret = try_mirrors (self.d, ud, mirrors, True)
|
ret = try_mirrors (self.d, ud, mirrors, True)
|
||||||
|
|
||||||
if not ret:
|
if not ret:
|
||||||
@@ -1030,7 +1020,7 @@ class Fetch(object):
|
|||||||
ud = self.ud[u]
|
ud = self.ud[u]
|
||||||
ud.setup_localpath(self.d)
|
ud.setup_localpath(self.d)
|
||||||
|
|
||||||
if self.d.expand(self.localpath) is None:
|
if bb.data.expand(self.localpath, self.d) is None:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if ud.lockfile:
|
if ud.lockfile:
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ class Git(FetchMethod):
|
|||||||
#
|
#
|
||||||
# Only enable _sortable revision if the key is set
|
# Only enable _sortable revision if the key is set
|
||||||
#
|
#
|
||||||
if d.getVar("BB_GIT_CLONE_FOR_SRCREV", True):
|
if bb.data.getVar("BB_GIT_CLONE_FOR_SRCREV", d, True):
|
||||||
self._sortable_buildindex = self._sortable_buildindex_disabled
|
self._sortable_buildindex = self._sortable_buildindex_disabled
|
||||||
def supports(self, url, ud, d):
|
def supports(self, url, ud, d):
|
||||||
"""
|
"""
|
||||||
@@ -146,7 +146,7 @@ class Git(FetchMethod):
|
|||||||
def try_premirror(self, u, ud, d):
|
def try_premirror(self, u, ud, d):
|
||||||
# If we don't do this, updating an existing checkout with only premirrors
|
# If we don't do this, updating an existing checkout with only premirrors
|
||||||
# is not possible
|
# is not possible
|
||||||
if d.getVar("BB_FETCH_PREMIRRORONLY", True) is not None:
|
if bb.data.getVar("BB_FETCH_PREMIRRORONLY", d, True) is not None:
|
||||||
return True
|
return True
|
||||||
if os.path.exists(ud.clonedir):
|
if os.path.exists(ud.clonedir):
|
||||||
return False
|
return False
|
||||||
@@ -220,7 +220,7 @@ class Git(FetchMethod):
|
|||||||
if os.path.exists(destdir):
|
if os.path.exists(destdir):
|
||||||
bb.utils.prunedir(destdir)
|
bb.utils.prunedir(destdir)
|
||||||
|
|
||||||
runfetchcmd("git clone -s -n %s %s" % (ud.clonedir, destdir), d)
|
runfetchcmd("git clone -s -n %s/ %s" % (ud.clonedir, destdir), d)
|
||||||
if not ud.nocheckout:
|
if not ud.nocheckout:
|
||||||
os.chdir(destdir)
|
os.chdir(destdir)
|
||||||
if subdir != "":
|
if subdir != "":
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ def update_mtime(f):
|
|||||||
def mark_dependency(d, f):
|
def mark_dependency(d, f):
|
||||||
if f.startswith('./'):
|
if f.startswith('./'):
|
||||||
f = "%s/%s" % (os.getcwd(), f[2:])
|
f = "%s/%s" % (os.getcwd(), f[2:])
|
||||||
deps = d.getVar('__depends') or set()
|
deps = bb.data.getVar('__depends', d) or set()
|
||||||
deps.update([(f, cached_mtime(f))])
|
deps.update([(f, cached_mtime(f))])
|
||||||
d.setVar('__depends', deps)
|
bb.data.setVar('__depends', deps, d)
|
||||||
|
|
||||||
def supports(fn, data):
|
def supports(fn, data):
|
||||||
"""Returns true if we have a handler for this file, false otherwise"""
|
"""Returns true if we have a handler for this file, false otherwise"""
|
||||||
@@ -90,7 +90,7 @@ def init_parser(d):
|
|||||||
|
|
||||||
def resolve_file(fn, d):
|
def resolve_file(fn, d):
|
||||||
if not os.path.isabs(fn):
|
if not os.path.isabs(fn):
|
||||||
bbpath = d.getVar("BBPATH", True)
|
bbpath = bb.data.getVar("BBPATH", d, True)
|
||||||
newfn = bb.utils.which(bbpath, fn)
|
newfn = bb.utils.which(bbpath, fn)
|
||||||
if not newfn:
|
if not newfn:
|
||||||
raise IOError("file %s not found in %s" % (fn, bbpath))
|
raise IOError("file %s not found in %s" % (fn, bbpath))
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class IncludeNode(AstNode):
|
|||||||
"""
|
"""
|
||||||
Include the file and evaluate the statements
|
Include the file and evaluate the statements
|
||||||
"""
|
"""
|
||||||
s = data.expand(self.what_file)
|
s = bb.data.expand(self.what_file, data)
|
||||||
logger.debug(2, "CONF %s:%s: including %s", self.filename, self.lineno, s)
|
logger.debug(2, "CONF %s:%s: including %s", self.filename, self.lineno, s)
|
||||||
|
|
||||||
# TODO: Cache those includes... maybe not here though
|
# TODO: Cache those includes... maybe not here though
|
||||||
@@ -69,7 +69,7 @@ class ExportNode(AstNode):
|
|||||||
self.var = var
|
self.var = var
|
||||||
|
|
||||||
def eval(self, data):
|
def eval(self, data):
|
||||||
data.setVarFlag(self.var, "export", 1)
|
bb.data.setVarFlag(self.var, "export", 1, data)
|
||||||
|
|
||||||
class DataNode(AstNode):
|
class DataNode(AstNode):
|
||||||
"""
|
"""
|
||||||
@@ -92,7 +92,7 @@ class DataNode(AstNode):
|
|||||||
groupd = self.groupd
|
groupd = self.groupd
|
||||||
key = groupd["var"]
|
key = groupd["var"]
|
||||||
if "exp" in groupd and groupd["exp"] != None:
|
if "exp" in groupd and groupd["exp"] != None:
|
||||||
data.setVarFlag(key, "export", 1)
|
bb.data.setVarFlag(key, "export", 1, data)
|
||||||
if "ques" in groupd and groupd["ques"] != None:
|
if "ques" in groupd and groupd["ques"] != None:
|
||||||
val = self.getFunc(key, data)
|
val = self.getFunc(key, data)
|
||||||
if val == None:
|
if val == None:
|
||||||
@@ -100,7 +100,7 @@ class DataNode(AstNode):
|
|||||||
elif "colon" in groupd and groupd["colon"] != None:
|
elif "colon" in groupd and groupd["colon"] != None:
|
||||||
e = data.createCopy()
|
e = data.createCopy()
|
||||||
bb.data.update_data(e)
|
bb.data.update_data(e)
|
||||||
val = e.expand(groupd["value"], key + "[:=]")
|
val = bb.data.expand(groupd["value"], e, key + "[:=]")
|
||||||
elif "append" in groupd and groupd["append"] != None:
|
elif "append" in groupd and groupd["append"] != None:
|
||||||
val = "%s %s" % ((self.getFunc(key, data) or ""), groupd["value"])
|
val = "%s %s" % ((self.getFunc(key, data) or ""), groupd["value"])
|
||||||
elif "prepend" in groupd and groupd["prepend"] != None:
|
elif "prepend" in groupd and groupd["prepend"] != None:
|
||||||
@@ -113,11 +113,11 @@ class DataNode(AstNode):
|
|||||||
val = groupd["value"]
|
val = groupd["value"]
|
||||||
|
|
||||||
if 'flag' in groupd and groupd['flag'] != None:
|
if 'flag' in groupd and groupd['flag'] != None:
|
||||||
data.setVarFlag(key, groupd['flag'], val)
|
bb.data.setVarFlag(key, groupd['flag'], val, data)
|
||||||
elif groupd["lazyques"]:
|
elif groupd["lazyques"]:
|
||||||
data.setVarFlag(key, "defaultval", val)
|
bb.data.setVarFlag(key, "defaultval", val, data)
|
||||||
else:
|
else:
|
||||||
data.setVar(key, val)
|
bb.data.setVar(key, val, data)
|
||||||
|
|
||||||
class MethodNode(AstNode):
|
class MethodNode(AstNode):
|
||||||
def __init__(self, filename, lineno, func_name, body):
|
def __init__(self, filename, lineno, func_name, body):
|
||||||
@@ -131,12 +131,12 @@ class MethodNode(AstNode):
|
|||||||
if not funcname in bb.methodpool._parsed_fns:
|
if not funcname in bb.methodpool._parsed_fns:
|
||||||
text = "def %s(d):\n" % (funcname) + '\n'.join(self.body)
|
text = "def %s(d):\n" % (funcname) + '\n'.join(self.body)
|
||||||
bb.methodpool.insert_method(funcname, text, self.filename)
|
bb.methodpool.insert_method(funcname, text, self.filename)
|
||||||
anonfuncs = data.getVar('__BBANONFUNCS') or []
|
anonfuncs = bb.data.getVar('__BBANONFUNCS', data) or []
|
||||||
anonfuncs.append(funcname)
|
anonfuncs.append(funcname)
|
||||||
data.setVar('__BBANONFUNCS', anonfuncs)
|
bb.data.setVar('__BBANONFUNCS', anonfuncs, data)
|
||||||
else:
|
else:
|
||||||
data.setVarFlag(self.func_name, "func", 1)
|
bb.data.setVarFlag(self.func_name, "func", 1, data)
|
||||||
data.setVar(self.func_name, '\n'.join(self.body))
|
bb.data.setVar(self.func_name, '\n'.join(self.body), data)
|
||||||
|
|
||||||
class PythonMethodNode(AstNode):
|
class PythonMethodNode(AstNode):
|
||||||
def __init__(self, filename, lineno, function, define, body):
|
def __init__(self, filename, lineno, function, define, body):
|
||||||
@@ -152,9 +152,9 @@ class PythonMethodNode(AstNode):
|
|||||||
text = '\n'.join(self.body)
|
text = '\n'.join(self.body)
|
||||||
if not bb.methodpool.parsed_module(self.define):
|
if not bb.methodpool.parsed_module(self.define):
|
||||||
bb.methodpool.insert_method(self.define, text, self.filename)
|
bb.methodpool.insert_method(self.define, text, self.filename)
|
||||||
data.setVarFlag(self.function, "func", 1)
|
bb.data.setVarFlag(self.function, "func", 1, data)
|
||||||
data.setVarFlag(self.function, "python", 1)
|
bb.data.setVarFlag(self.function, "python", 1, data)
|
||||||
data.setVar(self.function, text)
|
bb.data.setVar(self.function, text, data)
|
||||||
|
|
||||||
class MethodFlagsNode(AstNode):
|
class MethodFlagsNode(AstNode):
|
||||||
def __init__(self, filename, lineno, key, m):
|
def __init__(self, filename, lineno, key, m):
|
||||||
@@ -163,19 +163,19 @@ class MethodFlagsNode(AstNode):
|
|||||||
self.m = m
|
self.m = m
|
||||||
|
|
||||||
def eval(self, data):
|
def eval(self, data):
|
||||||
if data.getVar(self.key):
|
if bb.data.getVar(self.key, data):
|
||||||
# clean up old version of this piece of metadata, as its
|
# clean up old version of this piece of metadata, as its
|
||||||
# flags could cause problems
|
# flags could cause problems
|
||||||
data.setVarFlag(self.key, 'python', None)
|
bb.data.setVarFlag(self.key, 'python', None, data)
|
||||||
data.setVarFlag(self.key, 'fakeroot', None)
|
bb.data.setVarFlag(self.key, 'fakeroot', None, data)
|
||||||
if self.m.group("py") is not None:
|
if self.m.group("py") is not None:
|
||||||
data.setVarFlag(self.key, "python", "1")
|
bb.data.setVarFlag(self.key, "python", "1", data)
|
||||||
else:
|
else:
|
||||||
data.delVarFlag(self.key, "python")
|
bb.data.delVarFlag(self.key, "python", data)
|
||||||
if self.m.group("fr") is not None:
|
if self.m.group("fr") is not None:
|
||||||
data.setVarFlag(self.key, "fakeroot", "1")
|
bb.data.setVarFlag(self.key, "fakeroot", "1", data)
|
||||||
else:
|
else:
|
||||||
data.delVarFlag(self.key, "fakeroot")
|
bb.data.delVarFlag(self.key, "fakeroot", data)
|
||||||
|
|
||||||
class ExportFuncsNode(AstNode):
|
class ExportFuncsNode(AstNode):
|
||||||
def __init__(self, filename, lineno, fns, classes):
|
def __init__(self, filename, lineno, fns, classes):
|
||||||
@@ -197,25 +197,25 @@ class ExportFuncsNode(AstNode):
|
|||||||
vars.append([allvars[0], allvars[2]])
|
vars.append([allvars[0], allvars[2]])
|
||||||
|
|
||||||
for (var, calledvar) in vars:
|
for (var, calledvar) in vars:
|
||||||
if data.getVar(var) and not data.getVarFlag(var, 'export_func'):
|
if bb.data.getVar(var, data) and not bb.data.getVarFlag(var, 'export_func', data):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if data.getVar(var):
|
if bb.data.getVar(var, data):
|
||||||
data.setVarFlag(var, 'python', None)
|
bb.data.setVarFlag(var, 'python', None, data)
|
||||||
data.setVarFlag(var, 'func', None)
|
bb.data.setVarFlag(var, 'func', None, data)
|
||||||
|
|
||||||
for flag in [ "func", "python" ]:
|
for flag in [ "func", "python" ]:
|
||||||
if data.getVarFlag(calledvar, flag):
|
if bb.data.getVarFlag(calledvar, flag, data):
|
||||||
data.setVarFlag(var, flag, data.getVarFlag(calledvar, flag))
|
bb.data.setVarFlag(var, flag, bb.data.getVarFlag(calledvar, flag, data), data)
|
||||||
for flag in [ "dirs" ]:
|
for flag in [ "dirs" ]:
|
||||||
if data.getVarFlag(var, flag):
|
if bb.data.getVarFlag(var, flag, data):
|
||||||
data.setVarFlag(calledvar, flag, data.getVarFlag(var, flag))
|
bb.data.setVarFlag(calledvar, flag, bb.data.getVarFlag(var, flag, data), data)
|
||||||
|
|
||||||
if data.getVarFlag(calledvar, "python"):
|
if bb.data.getVarFlag(calledvar, "python", data):
|
||||||
data.setVar(var, "\tbb.build.exec_func('" + calledvar + "', d)\n")
|
bb.data.setVar(var, "\tbb.build.exec_func('" + calledvar + "', d)\n", data)
|
||||||
else:
|
else:
|
||||||
data.setVar(var, "\t" + calledvar + "\n")
|
bb.data.setVar(var, "\t" + calledvar + "\n", data)
|
||||||
data.setVarFlag(var, 'export_func', '1')
|
bb.data.setVarFlag(var, 'export_func', '1', data)
|
||||||
|
|
||||||
class AddTaskNode(AstNode):
|
class AddTaskNode(AstNode):
|
||||||
def __init__(self, filename, lineno, func, before, after):
|
def __init__(self, filename, lineno, func, before, after):
|
||||||
@@ -229,25 +229,25 @@ class AddTaskNode(AstNode):
|
|||||||
if self.func[:3] != "do_":
|
if self.func[:3] != "do_":
|
||||||
var = "do_" + self.func
|
var = "do_" + self.func
|
||||||
|
|
||||||
data.setVarFlag(var, "task", 1)
|
bb.data.setVarFlag(var, "task", 1, data)
|
||||||
bbtasks = data.getVar('__BBTASKS') or []
|
bbtasks = bb.data.getVar('__BBTASKS', data) or []
|
||||||
if not var in bbtasks:
|
if not var in bbtasks:
|
||||||
bbtasks.append(var)
|
bbtasks.append(var)
|
||||||
data.setVar('__BBTASKS', bbtasks)
|
bb.data.setVar('__BBTASKS', bbtasks, data)
|
||||||
|
|
||||||
existing = data.getVarFlag(var, "deps") or []
|
existing = bb.data.getVarFlag(var, "deps", data) or []
|
||||||
if self.after is not None:
|
if self.after is not None:
|
||||||
# set up deps for function
|
# set up deps for function
|
||||||
for entry in self.after.split():
|
for entry in self.after.split():
|
||||||
if entry not in existing:
|
if entry not in existing:
|
||||||
existing.append(entry)
|
existing.append(entry)
|
||||||
data.setVarFlag(var, "deps", existing)
|
bb.data.setVarFlag(var, "deps", existing, data)
|
||||||
if self.before is not None:
|
if self.before is not None:
|
||||||
# set up things that depend on this func
|
# set up things that depend on this func
|
||||||
for entry in self.before.split():
|
for entry in self.before.split():
|
||||||
existing = data.getVarFlag(entry, "deps") or []
|
existing = bb.data.getVarFlag(entry, "deps", data) or []
|
||||||
if var not in existing:
|
if var not in existing:
|
||||||
data.setVarFlag(entry, "deps", [var] + existing)
|
bb.data.setVarFlag(entry, "deps", [var] + existing, data)
|
||||||
|
|
||||||
class BBHandlerNode(AstNode):
|
class BBHandlerNode(AstNode):
|
||||||
def __init__(self, filename, lineno, fns):
|
def __init__(self, filename, lineno, fns):
|
||||||
@@ -255,11 +255,11 @@ class BBHandlerNode(AstNode):
|
|||||||
self.hs = fns.split()
|
self.hs = fns.split()
|
||||||
|
|
||||||
def eval(self, data):
|
def eval(self, data):
|
||||||
bbhands = data.getVar('__BBHANDLERS') or []
|
bbhands = bb.data.getVar('__BBHANDLERS', data) or []
|
||||||
for h in self.hs:
|
for h in self.hs:
|
||||||
bbhands.append(h)
|
bbhands.append(h)
|
||||||
data.setVarFlag(h, "handler", 1)
|
bb.data.setVarFlag(h, "handler", 1, data)
|
||||||
data.setVar('__BBHANDLERS', bbhands)
|
bb.data.setVar('__BBHANDLERS', bbhands, data)
|
||||||
|
|
||||||
class InheritNode(AstNode):
|
class InheritNode(AstNode):
|
||||||
def __init__(self, filename, lineno, classes):
|
def __init__(self, filename, lineno, classes):
|
||||||
@@ -308,9 +308,9 @@ def handleInherit(statements, filename, lineno, m):
|
|||||||
|
|
||||||
def finalize(fn, d, variant = None):
|
def finalize(fn, d, variant = None):
|
||||||
all_handlers = {}
|
all_handlers = {}
|
||||||
for var in d.getVar('__BBHANDLERS') or []:
|
for var in bb.data.getVar('__BBHANDLERS', d) or []:
|
||||||
# try to add the handler
|
# try to add the handler
|
||||||
handler = d.getVar(var)
|
handler = bb.data.getVar(var, d)
|
||||||
bb.event.register(var, handler)
|
bb.event.register(var, handler)
|
||||||
|
|
||||||
bb.event.fire(bb.event.RecipePreFinalise(fn), d)
|
bb.event.fire(bb.event.RecipePreFinalise(fn), d)
|
||||||
@@ -318,12 +318,12 @@ def finalize(fn, d, variant = None):
|
|||||||
bb.data.expandKeys(d)
|
bb.data.expandKeys(d)
|
||||||
bb.data.update_data(d)
|
bb.data.update_data(d)
|
||||||
code = []
|
code = []
|
||||||
for funcname in d.getVar("__BBANONFUNCS") or []:
|
for funcname in bb.data.getVar("__BBANONFUNCS", d) or []:
|
||||||
code.append("%s(d)" % funcname)
|
code.append("%s(d)" % funcname)
|
||||||
bb.utils.simple_exec("\n".join(code), {"d": d})
|
bb.utils.simple_exec("\n".join(code), {"d": d})
|
||||||
bb.data.update_data(d)
|
bb.data.update_data(d)
|
||||||
|
|
||||||
tasklist = d.getVar('__BBTASKS') or []
|
tasklist = bb.data.getVar('__BBTASKS', d) or []
|
||||||
bb.build.add_tasks(tasklist, d)
|
bb.build.add_tasks(tasklist, d)
|
||||||
|
|
||||||
bb.parse.siggen.finalise(fn, d, variant)
|
bb.parse.siggen.finalise(fn, d, variant)
|
||||||
@@ -378,7 +378,7 @@ def multi_finalize(fn, d):
|
|||||||
try:
|
try:
|
||||||
finalize(fn, d)
|
finalize(fn, d)
|
||||||
except bb.parse.SkipPackage as e:
|
except bb.parse.SkipPackage as e:
|
||||||
d.setVar("__SKIPPED", e.args[0])
|
bb.data.setVar("__SKIPPED", e.args[0], d)
|
||||||
datastores = {"": safe_d}
|
datastores = {"": safe_d}
|
||||||
|
|
||||||
versions = (d.getVar("BBVERSIONS", True) or "").split()
|
versions = (d.getVar("BBVERSIONS", True) or "").split()
|
||||||
@@ -421,7 +421,7 @@ def multi_finalize(fn, d):
|
|||||||
try:
|
try:
|
||||||
finalize(fn, d)
|
finalize(fn, d)
|
||||||
except bb.parse.SkipPackage as e:
|
except bb.parse.SkipPackage as e:
|
||||||
d.setVar("__SKIPPED", e.args[0])
|
bb.data.setVar("__SKIPPED", e.args[0], d)
|
||||||
|
|
||||||
_create_variants(datastores, versions, verfunc)
|
_create_variants(datastores, versions, verfunc)
|
||||||
|
|
||||||
@@ -461,7 +461,7 @@ def multi_finalize(fn, d):
|
|||||||
if not onlyfinalise or variant in onlyfinalise:
|
if not onlyfinalise or variant in onlyfinalise:
|
||||||
finalize(fn, variant_d, variant)
|
finalize(fn, variant_d, variant)
|
||||||
except bb.parse.SkipPackage as e:
|
except bb.parse.SkipPackage as e:
|
||||||
variant_d.setVar("__SKIPPED", e.args[0])
|
bb.data.setVar("__SKIPPED", e.args[0], variant_d)
|
||||||
|
|
||||||
if len(datastores) > 1:
|
if len(datastores) > 1:
|
||||||
variants = filter(None, datastores.iterkeys())
|
variants = filter(None, datastores.iterkeys())
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ def handle(fn, d, include):
|
|||||||
return ast.multi_finalize(fn, d)
|
return ast.multi_finalize(fn, d)
|
||||||
|
|
||||||
if oldfile:
|
if oldfile:
|
||||||
d.setVar("FILE", oldfile)
|
bb.data.setVar("FILE", oldfile, d)
|
||||||
|
|
||||||
# we have parsed the bb class now
|
# we have parsed the bb class now
|
||||||
if ext == ".bbclass" or ext == ".inc":
|
if ext == ".bbclass" or ext == ".inc":
|
||||||
@@ -193,6 +193,7 @@ def feeder(lineno, s, fn, root, statements):
|
|||||||
if lineno == IN_PYTHON_EOF:
|
if lineno == IN_PYTHON_EOF:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
if s and s[0] == '#':
|
if s and s[0] == '#':
|
||||||
if len(__residue__) != 0 and __residue__[0][0] != "#":
|
if len(__residue__) != 0 and __residue__[0][0] != "#":
|
||||||
bb.error("There is a comment on line %s of file %s (%s) which is in the middle of a multiline expression.\nBitbake used to ignore these but no longer does so, please fix your metadata as errors are likely as a result of this change." % (lineno, fn, s))
|
bb.error("There is a comment on line %s of file %s (%s) which is in the middle of a multiline expression.\nBitbake used to ignore these but no longer does so, please fix your metadata as errors are likely as a result of this change." % (lineno, fn, s))
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
import re, os
|
import re, bb.data, os
|
||||||
import logging
|
import logging
|
||||||
import bb.utils
|
import bb.utils
|
||||||
from bb.parse import ParseError, resolve_file, ast, logger
|
from bb.parse import ParseError, resolve_file, ast, logger
|
||||||
@@ -36,9 +36,9 @@ __require_regexp__ = re.compile( r"require\s+(.+)" )
|
|||||||
__export_regexp__ = re.compile( r"export\s+(.+)" )
|
__export_regexp__ = re.compile( r"export\s+(.+)" )
|
||||||
|
|
||||||
def init(data):
|
def init(data):
|
||||||
topdir = data.getVar('TOPDIR')
|
topdir = bb.data.getVar('TOPDIR', data)
|
||||||
if not topdir:
|
if not topdir:
|
||||||
data.setVar('TOPDIR', os.getcwd())
|
bb.data.setVar('TOPDIR', os.getcwd(), data)
|
||||||
|
|
||||||
|
|
||||||
def supports(fn, d):
|
def supports(fn, d):
|
||||||
@@ -53,12 +53,12 @@ def include(oldfn, fn, data, error_out):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
import bb
|
import bb
|
||||||
fn = data.expand(fn)
|
fn = bb.data.expand(fn, data)
|
||||||
oldfn = data.expand(oldfn)
|
oldfn = bb.data.expand(oldfn, data)
|
||||||
|
|
||||||
if not os.path.isabs(fn):
|
if not os.path.isabs(fn):
|
||||||
dname = os.path.dirname(oldfn)
|
dname = os.path.dirname(oldfn)
|
||||||
bbpath = "%s:%s" % (dname, data.getVar("BBPATH", 1))
|
bbpath = "%s:%s" % (dname, bb.data.getVar("BBPATH", data, 1))
|
||||||
abs_fn = bb.utils.which(bbpath, fn)
|
abs_fn = bb.utils.which(bbpath, fn)
|
||||||
if abs_fn:
|
if abs_fn:
|
||||||
fn = abs_fn
|
fn = abs_fn
|
||||||
@@ -77,7 +77,7 @@ def handle(fn, data, include):
|
|||||||
if include == 0:
|
if include == 0:
|
||||||
oldfile = None
|
oldfile = None
|
||||||
else:
|
else:
|
||||||
oldfile = data.getVar('FILE')
|
oldfile = bb.data.getVar('FILE', data)
|
||||||
|
|
||||||
abs_fn = resolve_file(fn, data)
|
abs_fn = resolve_file(fn, data)
|
||||||
f = open(abs_fn, 'r')
|
f = open(abs_fn, 'r')
|
||||||
@@ -102,10 +102,10 @@ def handle(fn, data, include):
|
|||||||
feeder(lineno, s, fn, statements)
|
feeder(lineno, s, fn, statements)
|
||||||
|
|
||||||
# DONE WITH PARSING... time to evaluate
|
# DONE WITH PARSING... time to evaluate
|
||||||
data.setVar('FILE', abs_fn)
|
bb.data.setVar('FILE', abs_fn, data)
|
||||||
statements.eval(data)
|
statements.eval(data)
|
||||||
if oldfile:
|
if oldfile:
|
||||||
data.setVar('FILE', oldfile)
|
bb.data.setVar('FILE', oldfile, data)
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|||||||
@@ -192,9 +192,9 @@ def connect(database):
|
|||||||
|
|
||||||
def persist(domain, d):
|
def persist(domain, d):
|
||||||
"""Convenience factory for SQLTable objects based upon metadata"""
|
"""Convenience factory for SQLTable objects based upon metadata"""
|
||||||
import bb.utils
|
import bb.data, bb.utils
|
||||||
cachedir = (d.getVar("PERSISTENT_DIR", True) or
|
cachedir = (bb.data.getVar("PERSISTENT_DIR", d, True) or
|
||||||
d.getVar("CACHE", True))
|
bb.data.getVar("CACHE", d, True))
|
||||||
if not cachedir:
|
if not cachedir:
|
||||||
logger.critical("Please set the 'PERSISTENT_DIR' or 'CACHE' variable")
|
logger.critical("Please set the 'PERSISTENT_DIR' or 'CACHE' variable")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|||||||
@@ -84,10 +84,10 @@ def findPreferredProvider(pn, cfgData, dataCache, pkg_pn = None, item = None):
|
|||||||
preferred_ver = None
|
preferred_ver = None
|
||||||
|
|
||||||
localdata = data.createCopy(cfgData)
|
localdata = data.createCopy(cfgData)
|
||||||
localdata.setVar('OVERRIDES', "%s:pn-%s:%s" % (data.getVar('OVERRIDES', localdata), pn, pn))
|
bb.data.setVar('OVERRIDES', "%s:pn-%s:%s" % (data.getVar('OVERRIDES', localdata), pn, pn), localdata)
|
||||||
bb.data.update_data(localdata)
|
bb.data.update_data(localdata)
|
||||||
|
|
||||||
preferred_v = localdata.getVar('PREFERRED_VERSION', True)
|
preferred_v = bb.data.getVar('PREFERRED_VERSION', localdata, True)
|
||||||
if preferred_v:
|
if preferred_v:
|
||||||
m = re.match('(\d+:)*(.*)(_.*)*', preferred_v)
|
m = re.match('(\d+:)*(.*)(_.*)*', preferred_v)
|
||||||
if m:
|
if m:
|
||||||
@@ -248,7 +248,7 @@ def filterProviders(providers, item, cfgData, dataCache):
|
|||||||
|
|
||||||
eligible = _filterProviders(providers, item, cfgData, dataCache)
|
eligible = _filterProviders(providers, item, cfgData, dataCache)
|
||||||
|
|
||||||
prefervar = cfgData.getVar('PREFERRED_PROVIDER_%s' % item, 1)
|
prefervar = bb.data.getVar('PREFERRED_PROVIDER_%s' % item, cfgData, 1)
|
||||||
if prefervar:
|
if prefervar:
|
||||||
dataCache.preferred[item] = prefervar
|
dataCache.preferred[item] = prefervar
|
||||||
|
|
||||||
@@ -286,7 +286,7 @@ def filterProvidersRunTime(providers, item, cfgData, dataCache):
|
|||||||
pn = dataCache.pkg_fn[p]
|
pn = dataCache.pkg_fn[p]
|
||||||
provides = dataCache.pn_provides[pn]
|
provides = dataCache.pn_provides[pn]
|
||||||
for provide in provides:
|
for provide in provides:
|
||||||
prefervar = cfgData.getVar('PREFERRED_PROVIDER_%s' % provide, 1)
|
prefervar = bb.data.getVar('PREFERRED_PROVIDER_%s' % provide, cfgData, 1)
|
||||||
logger.debug(1, "checking PREFERRED_PROVIDER_%s (value %s) against %s", provide, prefervar, pns.keys())
|
logger.debug(1, "checking PREFERRED_PROVIDER_%s (value %s) against %s", provide, prefervar, pns.keys())
|
||||||
if prefervar in pns and pns[prefervar] not in preferred:
|
if prefervar in pns and pns[prefervar] not in preferred:
|
||||||
var = "PREFERRED_PROVIDER_%s = %s" % (provide, prefervar)
|
var = "PREFERRED_PROVIDER_%s = %s" % (provide, prefervar)
|
||||||
|
|||||||
@@ -188,8 +188,8 @@ class RunQueueData:
|
|||||||
self.targets = targets
|
self.targets = targets
|
||||||
self.rq = rq
|
self.rq = rq
|
||||||
|
|
||||||
self.stampwhitelist = cfgData.getVar("BB_STAMP_WHITELIST", 1) or ""
|
self.stampwhitelist = bb.data.getVar("BB_STAMP_WHITELIST", cfgData, 1) or ""
|
||||||
self.multi_provider_whitelist = (cfgData.getVar("MULTI_PROVIDER_WHITELIST", 1) or "").split()
|
self.multi_provider_whitelist = (bb.data.getVar("MULTI_PROVIDER_WHITELIST", cfgData, 1) or "").split()
|
||||||
|
|
||||||
self.reset()
|
self.reset()
|
||||||
|
|
||||||
@@ -765,9 +765,8 @@ class RunQueue:
|
|||||||
self.cfgData = cfgData
|
self.cfgData = cfgData
|
||||||
self.rqdata = RunQueueData(self, cooker, cfgData, dataCache, taskData, targets)
|
self.rqdata = RunQueueData(self, cooker, cfgData, dataCache, taskData, targets)
|
||||||
|
|
||||||
self.stamppolicy = cfgData.getVar("BB_STAMP_POLICY", True) or "perfile"
|
self.stamppolicy = bb.data.getVar("BB_STAMP_POLICY", cfgData, True) or "perfile"
|
||||||
self.hashvalidate = cfgData.getVar("BB_HASHCHECK_FUNCTION", True) or None
|
self.hashvalidate = bb.data.getVar("BB_HASHCHECK_FUNCTION", cfgData, True) or None
|
||||||
self.setsceneverify = cfgData.getVar("BB_SETSCENE_VERIFY_FUNCTION", True) or None
|
|
||||||
|
|
||||||
self.state = runQueuePrepare
|
self.state = runQueuePrepare
|
||||||
|
|
||||||
@@ -1007,8 +1006,8 @@ class RunQueueExecute:
|
|||||||
self.cfgData = rq.cfgData
|
self.cfgData = rq.cfgData
|
||||||
self.rqdata = rq.rqdata
|
self.rqdata = rq.rqdata
|
||||||
|
|
||||||
self.number_tasks = int(self.cfgData.getVar("BB_NUMBER_THREADS", 1) or 1)
|
self.number_tasks = int(bb.data.getVar("BB_NUMBER_THREADS", self.cfgData, 1) or 1)
|
||||||
self.scheduler = self.cfgData.getVar("BB_SCHEDULER", 1) or "speed"
|
self.scheduler = bb.data.getVar("BB_SCHEDULER", self.cfgData, 1) or "speed"
|
||||||
|
|
||||||
self.runq_buildable = []
|
self.runq_buildable = []
|
||||||
self.runq_running = []
|
self.runq_running = []
|
||||||
@@ -1097,12 +1096,6 @@ class RunQueueExecute:
|
|||||||
|
|
||||||
logger.debug(2, 'Running %s:%s under fakeroot, fakedirs: %s' %
|
logger.debug(2, 'Running %s:%s under fakeroot, fakedirs: %s' %
|
||||||
(fn, taskname, ', '.join(fakedirs)))
|
(fn, taskname, ', '.join(fakedirs)))
|
||||||
else:
|
|
||||||
envvars = (self.rqdata.dataCache.fakerootnoenv[fn] or "").split()
|
|
||||||
for key, value in (var.split('=') for var in envvars):
|
|
||||||
envbackup[key] = os.environ.get(key)
|
|
||||||
os.environ[key] = value
|
|
||||||
fakeenv[key] = value
|
|
||||||
|
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
sys.stderr.flush()
|
sys.stderr.flush()
|
||||||
@@ -1132,9 +1125,9 @@ class RunQueueExecute:
|
|||||||
if umask:
|
if umask:
|
||||||
os.umask(umask)
|
os.umask(umask)
|
||||||
|
|
||||||
self.cooker.configuration.data.setVar("BB_WORKERCONTEXT", "1")
|
bb.data.setVar("BB_WORKERCONTEXT", "1", self.cooker.configuration.data)
|
||||||
self.cooker.configuration.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY", self)
|
bb.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY", self, self.cooker.configuration.data)
|
||||||
self.cooker.configuration.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY2", fn)
|
bb.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY2", fn, self.cooker.configuration.data)
|
||||||
bb.parse.siggen.set_taskdata(self.rqdata.hashes, self.rqdata.hash_deps)
|
bb.parse.siggen.set_taskdata(self.rqdata.hashes, self.rqdata.hash_deps)
|
||||||
ret = 0
|
ret = 0
|
||||||
try:
|
try:
|
||||||
@@ -1219,20 +1212,23 @@ class RunQueueExecuteTasks(RunQueueExecute):
|
|||||||
found = True
|
found = True
|
||||||
self.rq.scenequeue_covered.add(task)
|
self.rq.scenequeue_covered.add(task)
|
||||||
|
|
||||||
logger.debug(1, 'Skip list (pre setsceneverify) %s', sorted(self.rq.scenequeue_covered))
|
# Detect when the real task needs to be run anyway by looking to see
|
||||||
|
# if any of its dependencies within the same package are scheduled
|
||||||
# Allow the metadata to elect for setscene tasks to run anyway
|
# to be run.
|
||||||
covered_remove = set()
|
covered_remove = set()
|
||||||
if self.rq.setsceneverify:
|
for task in self.rq.scenequeue_covered:
|
||||||
call = self.rq.setsceneverify + "(covered, tasknames, fnids, fns, d)"
|
task_fnid = self.rqdata.runq_fnid[task]
|
||||||
locs = { "covered" : self.rq.scenequeue_covered, "tasknames" : self.rqdata.runq_task, "fnids" : self.rqdata.runq_fnid, "fns" : self.rqdata.taskData.fn_index, "d" : self.cooker.configuration.data }
|
for dep in self.rqdata.runq_depends[task]:
|
||||||
covered_remove = bb.utils.better_eval(call, locs)
|
if self.rqdata.runq_fnid[dep] == task_fnid:
|
||||||
|
if dep not in self.rq.scenequeue_covered:
|
||||||
|
covered_remove.add(task)
|
||||||
|
break
|
||||||
|
|
||||||
for task in covered_remove:
|
for task in covered_remove:
|
||||||
fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]]
|
fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]]
|
||||||
taskname = self.rqdata.runq_task[task] + '_setscene'
|
taskname = self.rqdata.runq_task[task] + '_setscene'
|
||||||
bb.build.del_stamp(taskname, self.rqdata.dataCache, fn)
|
bb.build.del_stamp(taskname, self.rqdata.dataCache, fn)
|
||||||
logger.debug(1, 'Not skipping task %s due to setsceneverify', task)
|
logger.debug(1, 'Not skipping task %s because it will have to be run anyway', task)
|
||||||
self.rq.scenequeue_covered.remove(task)
|
self.rq.scenequeue_covered.remove(task)
|
||||||
|
|
||||||
logger.debug(1, 'Full skip list %s', self.rq.scenequeue_covered)
|
logger.debug(1, 'Full skip list %s', self.rq.scenequeue_covered)
|
||||||
@@ -1255,7 +1251,7 @@ class RunQueueExecuteTasks(RunQueueExecute):
|
|||||||
if type(obj) is type and
|
if type(obj) is type and
|
||||||
issubclass(obj, RunQueueScheduler))
|
issubclass(obj, RunQueueScheduler))
|
||||||
|
|
||||||
user_schedulers = self.cfgData.getVar("BB_SCHEDULERS", True)
|
user_schedulers = bb.data.getVar("BB_SCHEDULERS", self.cfgData, True)
|
||||||
if user_schedulers:
|
if user_schedulers:
|
||||||
for sched in user_schedulers.split():
|
for sched in user_schedulers.split():
|
||||||
if not "." in sched:
|
if not "." in sched:
|
||||||
@@ -1702,8 +1698,8 @@ class runQueueTaskCompleted(runQueueEvent):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def check_stamp_fn(fn, taskname, d):
|
def check_stamp_fn(fn, taskname, d):
|
||||||
rqexe = d.getVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY")
|
rqexe = bb.data.getVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY", d)
|
||||||
fn = d.getVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY2")
|
fn = bb.data.getVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY2", d)
|
||||||
fnid = rqexe.rqdata.taskData.getfn_id(fn)
|
fnid = rqexe.rqdata.taskData.getfn_id(fn)
|
||||||
taskid = rqexe.rqdata.get_task_id(fnid, taskname)
|
taskid = rqexe.rqdata.get_task_id(fnid, taskname)
|
||||||
if taskid is not None:
|
if taskid is not None:
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ def init(d):
|
|||||||
siggens = [obj for obj in globals().itervalues()
|
siggens = [obj for obj in globals().itervalues()
|
||||||
if type(obj) is type and issubclass(obj, SignatureGenerator)]
|
if type(obj) is type and issubclass(obj, SignatureGenerator)]
|
||||||
|
|
||||||
desired = d.getVar("BB_SIGNATURE_HANDLER", True) or "noop"
|
desired = bb.data.getVar("BB_SIGNATURE_HANDLER", d, True) or "noop"
|
||||||
for sg in siggens:
|
for sg in siggens:
|
||||||
if desired == sg.name:
|
if desired == sg.name:
|
||||||
return sg(d)
|
return sg(d)
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class Configurator(gobject.GObject):
|
|||||||
|
|
||||||
def _loadConf(self, path):
|
def _loadConf(self, path):
|
||||||
def getString(var):
|
def getString(var):
|
||||||
return data.getVar(var, True) or ""
|
return bb.data.getVar(var, data, True) or ""
|
||||||
|
|
||||||
if self.orig_config:
|
if self.orig_config:
|
||||||
del self.orig_config
|
del self.orig_config
|
||||||
@@ -125,7 +125,7 @@ class Configurator(gobject.GObject):
|
|||||||
self.loaded_layers = {}
|
self.loaded_layers = {}
|
||||||
data = bb.data.init()
|
data = bb.data.init()
|
||||||
data = self._parse(self.bblayers, data)
|
data = self._parse(self.bblayers, data)
|
||||||
layers = (data.getVar('BBLAYERS', True) or "").split()
|
layers = (bb.data.getVar('BBLAYERS', data, True) or "").split()
|
||||||
for layer in layers:
|
for layer in layers:
|
||||||
# TODO: we may be better off calling the layer by its
|
# TODO: we may be better off calling the layer by its
|
||||||
# BBFILE_COLLECTIONS value?
|
# BBFILE_COLLECTIONS value?
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ class HobPrefs(gtk.Dialog):
|
|||||||
self.selected_image_types = handler.remove_image_output_type(ot)
|
self.selected_image_types = handler.remove_image_output_type(ot)
|
||||||
|
|
||||||
self.configurator.setConfVar('IMAGE_FSTYPES', "%s" % " ".join(self.selected_image_types).lstrip(" "))
|
self.configurator.setConfVar('IMAGE_FSTYPES', "%s" % " ".join(self.selected_image_types).lstrip(" "))
|
||||||
|
self.reload_required = True
|
||||||
|
|
||||||
def sdk_machine_combo_changed_cb(self, combo, handler):
|
def sdk_machine_combo_changed_cb(self, combo, handler):
|
||||||
sdk_mach = combo.get_active_text()
|
sdk_mach = combo.get_active_text()
|
||||||
|
|||||||
@@ -179,6 +179,10 @@ class RunningBuild (gobject.GObject):
|
|||||||
# that we need to attach to a task.
|
# that we need to attach to a task.
|
||||||
self.tasks_to_iter[(package, task)] = i
|
self.tasks_to_iter[(package, task)] = i
|
||||||
|
|
||||||
|
# If we don't handle these the GUI does not proceed
|
||||||
|
elif isinstance(event, bb.build.TaskInvalid):
|
||||||
|
return
|
||||||
|
|
||||||
elif isinstance(event, bb.build.TaskBase):
|
elif isinstance(event, bb.build.TaskBase):
|
||||||
current = self.tasks_to_iter[(package, task)]
|
current = self.tasks_to_iter[(package, task)]
|
||||||
parent = self.tasks_to_iter[(package, None)]
|
parent = self.tasks_to_iter[(package, None)]
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ def main(server, eventHandler):
|
|||||||
# Get values of variables which control our output
|
# Get values of variables which control our output
|
||||||
includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"])
|
includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"])
|
||||||
loglines = server.runCommand(["getVariable", "BBINCLUDELOGS_LINES"])
|
loglines = server.runCommand(["getVariable", "BBINCLUDELOGS_LINES"])
|
||||||
consolelogfile = server.runCommand(["getVariable", "BB_CONSOLELOG"])
|
|
||||||
|
|
||||||
helper = uihelper.BBUIHelper()
|
helper = uihelper.BBUIHelper()
|
||||||
|
|
||||||
@@ -78,11 +77,6 @@ def main(server, eventHandler):
|
|||||||
bb.msg.addDefaultlogFilter(console)
|
bb.msg.addDefaultlogFilter(console)
|
||||||
console.setFormatter(format)
|
console.setFormatter(format)
|
||||||
logger.addHandler(console)
|
logger.addHandler(console)
|
||||||
if consolelogfile:
|
|
||||||
consolelog = logging.FileHandler(consolelogfile)
|
|
||||||
bb.msg.addDefaultlogFilter(consolelog)
|
|
||||||
consolelog.setFormatter(format)
|
|
||||||
logger.addHandler(consolelog)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cmdline = server.runCommand(["getCmdLineAction"])
|
cmdline = server.runCommand(["getCmdLineAction"])
|
||||||
|
|||||||
@@ -562,7 +562,7 @@ def filter_environment(good_vars):
|
|||||||
|
|
||||||
def create_interactive_env(d):
|
def create_interactive_env(d):
|
||||||
for k in preserved_envvars_exported_interactive():
|
for k in preserved_envvars_exported_interactive():
|
||||||
os.setenv(k, d.getVar(k, True))
|
os.setenv(k, bb.data.getVar(k, d, True))
|
||||||
|
|
||||||
def approved_variables():
|
def approved_variables():
|
||||||
"""
|
"""
|
||||||
@@ -601,9 +601,9 @@ def build_environment(d):
|
|||||||
"""
|
"""
|
||||||
import bb.data
|
import bb.data
|
||||||
for var in bb.data.keys(d):
|
for var in bb.data.keys(d):
|
||||||
export = d.getVarFlag(var, "export")
|
export = bb.data.getVarFlag(var, "export", d)
|
||||||
if export:
|
if export:
|
||||||
os.environ[var] = d.getVar(var, True) or ""
|
os.environ[var] = bb.data.getVar(var, d, True) or ""
|
||||||
|
|
||||||
def remove(path, recurse=False):
|
def remove(path, recurse=False):
|
||||||
"""Equivalent to rm -f or rm -rf"""
|
"""Equivalent to rm -f or rm -rf"""
|
||||||
|
|||||||
@@ -1,48 +1,61 @@
|
|||||||
# This is a single Makefile to handle all generated Yocto Project documents.
|
# This is a single Makefile to handle all generated Yocto Project documents.
|
||||||
# The Makefile needs to live in the documents directory and all figures used
|
# The Makefile needs to live in the documents directory and all figures used
|
||||||
# in any manuals must be PNG files and live in the individual book's figures
|
# in any manuals must be .PNG files and live in the individual book's figures
|
||||||
# directory.
|
# directory. Note that the figures for the Yocto Project Development Manual
|
||||||
|
# differ between the 'master' and 'edison' branches.
|
||||||
#
|
#
|
||||||
# The Makefile has these targets:
|
# The Makefile has these targets:
|
||||||
#
|
#
|
||||||
# pdf: generates a PDF version of a manual. Not valid for the Quick Start
|
# pdf: generates a PDF version of a manual. Not valid for the Quick Start
|
||||||
# html: generates an HTML version of a manual.
|
# html: generates an HTML version of a manual.
|
||||||
# tarball: creates a tarball for the doc files.
|
# tarball: creates a tarball for the doc files.
|
||||||
# validate: validates
|
# validate: validates
|
||||||
# publish: pushes generated files to the Yocto Project website
|
# publish: pushes generated files to the Yocto Project website
|
||||||
# clean: removes files
|
# clean: removes files
|
||||||
#
|
#
|
||||||
# The Makefile generates an HTML and PDF version of every document except the
|
# The Makefile generates an HTML and PDF version of every document except the
|
||||||
# Yocto Project Quick Start. The Quick Start is in HTML form only. The variable
|
# Yocto Project Quick Start. The Quick Start is in HTML form only. The variable
|
||||||
# The command-line argument DOC represents the folder name in which a particular
|
# DOC is used to indicate the folder name for a given manual. The variable
|
||||||
# document is stored. The command-line argument VER represents the distro
|
# VER represents the distro version of the Yocto Release for which the manuals
|
||||||
# version of the Yocto Release for which the manuals are being generated.
|
# are being generated. The variable BRANCH is used to indicate the 'edison'
|
||||||
|
# branch and is used only when DOC=dev-manual (making the YP Development
|
||||||
|
# Manual).
|
||||||
|
#
|
||||||
# To build the HTML and PDF versions of the manual you must invoke the Makefile
|
# To build the HTML and PDF versions of the manual you must invoke the Makefile
|
||||||
# with the DOC argument. If you are going to publish the manual then you
|
# with the DOC argument. If you are going to publish the manual then you
|
||||||
# you must invoke the Makefile with both the DOC and the VER argument.
|
# you must invoke the Makefile with both the DOC and the VER argument.
|
||||||
|
# If you are building the 'edison' version of the YP DEvelopment Manual then
|
||||||
|
# you must use the DOC and BRANCH arguments.
|
||||||
#
|
#
|
||||||
# Examples:
|
# Examples:
|
||||||
#
|
#
|
||||||
# make DOC=bsp-guide
|
# make DOC=bsp-guide
|
||||||
# make DOC=yocto-project-qs
|
# make DOC=yocto-project-qs
|
||||||
# make pdf DOC=poky-ref-manual
|
# make pdf DOC=poky-ref-manual
|
||||||
|
# make DOC=dev-manual BRANCH=edison
|
||||||
#
|
#
|
||||||
# The first example generates the HTML and PDF versions of the BSP Guide.
|
# The first example generates the HTML and PDF versions of the BSP Guide.
|
||||||
# The second example generates the HTML version only of the Quick Start. Note that
|
# The second example generates the HTML version only of the Quick Start. Note that
|
||||||
# the Quick Start only has an HTML version available. The third example generates
|
# the Quick Start only has an HTML version available. The third example generates
|
||||||
# both the PDF and HTML versions of the Yocto Project Reference Manual.
|
# both the PDF and HTML versions of the Yocto Project Reference Manual. The
|
||||||
|
# last example generates both the PDF and HTML 'edison' versions of the YP
|
||||||
|
# Development Manual.
|
||||||
#
|
#
|
||||||
# Use the publish target to push the generated manuals to the Yocto Project
|
# 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
|
# website. All files needed for the manual's HTML form are pushed as well as the
|
||||||
# PDF version (if applicable).
|
# PDF version (if applicable).
|
||||||
# Examples:
|
# Examples:
|
||||||
#
|
#
|
||||||
# make publish DOC=bsp-guide VER=1.1
|
# make publish DOC=bsp-guide VER=1.2
|
||||||
# make publish DOC=adt-manual VER=1.1
|
# make publish DOC=adt-manual VER=1.2
|
||||||
|
# make publish DOC=dev-manual VER=1.1.1 BRANCH=edison
|
||||||
|
# make publish DOC=dev-manual VER=1.2
|
||||||
#
|
#
|
||||||
# The first example publishes the 1.1 version of both the PDF and HTML versions of
|
# 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.1 version of both the PDF and
|
# the BSP Guide. The second example publishes the 1.2 version of both the PDF and
|
||||||
# HTML versions of the ADT Manual.
|
# HTML versions of the ADT Manual. The third example publishes the PDF and HTML
|
||||||
|
# 'edison' versions of the YP Development Manual. Finally, the last example publishes
|
||||||
|
# the PDF and HTML 'master' versions of the YP Development Manual.
|
||||||
#
|
#
|
||||||
|
|
||||||
ifeq ($(DOC),bsp-guide)
|
ifeq ($(DOC),bsp-guide)
|
||||||
@@ -66,11 +79,32 @@ XSLTOPTS = --stringparam html.stylesheet style.css \
|
|||||||
--stringparam section.label.includes.component.label 1 \
|
--stringparam section.label.includes.component.label 1 \
|
||||||
--xinclude
|
--xinclude
|
||||||
ALLPREQ = html pdf tarball
|
ALLPREQ = html pdf tarball
|
||||||
TARFILES = style.css dev-manual.html dev-manual.pdf figures/bsp-dev-flow.png figures/dev-title.png \
|
#
|
||||||
|
# Note that the tarfile might produce the "Cannot stat: No such file or directory" error
|
||||||
|
# message for .PNG files that are not present when building a particular branch. The
|
||||||
|
# list of files is all-inclusive for all branches.
|
||||||
|
#
|
||||||
|
|
||||||
|
ifeq ($(BRANCH),edison)
|
||||||
|
TARFILES = 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/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
|
||||||
figures/kernel-example-repos.png figures/kernel-overview-1.png figures/kernel-overview-2.png \
|
figures/kernel-example-repos-edison.png \
|
||||||
figures/kernel-overview-3.png figures/source-repos.png figures/yp-download.png \
|
figures/kernel-overview-1.png figures/kernel-overview-2.png \
|
||||||
|
figures/kernel-overview-3-edison.png \
|
||||||
|
figures/source-repos.png figures/yp-download.png \
|
||||||
figures/wip.png
|
figures/wip.png
|
||||||
|
else
|
||||||
|
TARFILES = 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.png \
|
||||||
|
figures/kernel-overview-1.png figures/kernel-overview-2.png \
|
||||||
|
figures/kernel-overview-3.png \
|
||||||
|
figures/source-repos.png figures/yp-download.png \
|
||||||
|
figures/wip.png
|
||||||
|
endif
|
||||||
|
|
||||||
MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
|
MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
|
||||||
FIGURES = figures
|
FIGURES = figures
|
||||||
STYLESHEET = $(DOC)/*.css
|
STYLESHEET = $(DOC)/*.css
|
||||||
|
|||||||
@@ -12,9 +12,9 @@
|
|||||||
Toolchain Tarball)</link>".
|
Toolchain Tarball)</link>".
|
||||||
And, that sourcing your architecture-specific environment setup script
|
And, that sourcing your architecture-specific environment setup script
|
||||||
initializes a suitable cross-toolchain development environment.
|
initializes a suitable cross-toolchain development environment.
|
||||||
This setup occurs by adding the compiler, QEMU scripts, QEMU binary,
|
During the setup, locations for the compiler, QEMU scripts, QEMU binary,
|
||||||
a special version of <filename>pkgconfig</filename> and other useful
|
a special version of <filename>pkgconfig</filename> and other useful
|
||||||
utilities to the <filename>PATH</filename> variable.
|
utilities are added to the <filename>PATH</filename> variable.
|
||||||
Variables to assist <filename>pkgconfig</filename> and <filename>autotools</filename>
|
Variables to assist <filename>pkgconfig</filename> and <filename>autotools</filename>
|
||||||
are also defined so that,
|
are also defined so that,
|
||||||
for example, <filename>configure.sh</filename> can find pre-generated
|
for example, <filename>configure.sh</filename> can find pre-generated
|
||||||
|
|||||||
@@ -53,10 +53,12 @@
|
|||||||
<para>
|
<para>
|
||||||
Once you have downloaded the tarball, extract it into a clean
|
Once you have downloaded the tarball, extract it into a clean
|
||||||
directory.
|
directory.
|
||||||
For example, the following command unpacks and installs the Eclipse IDE
|
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>:
|
into a clean directory using the default name <filename>eclipse</filename>:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ tar -xzvf ~/Downloads/Eclipse-SDK-3.7-linux-gtk-x86_64.tar.gz
|
$ cd ~
|
||||||
|
$ tar -xzvf ~/Downloads/eclipse-SDK-3.7.1-linux-gtk-x86_64.tar.gz
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -138,30 +140,36 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='installing-the-eclipse-yocto-plug-in'>
|
<section id='installing-the-eclipse-yocto-plug-in'>
|
||||||
<title>Installing the Eclipse Yocto Plug-in</title>
|
<title>Installing or Accessing the Eclipse Yocto Plug-in</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can install the Eclipse Yocto Plug-in one of three methods: as new software
|
You can install the Eclipse Yocto Plug-in into the Eclipse application
|
||||||
from within the Eclipse IDE, from the Yocto Project source repositories, or as a built zip file.
|
one of two ways: using the Eclipse IDE and installing the plug-in as new software, or
|
||||||
|
using a built zip file.
|
||||||
|
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.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='new-software'>
|
<section id='new-software'>
|
||||||
<title>New Software</title>
|
<title>Installing the Plug-in as New Software</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To install the Eclipse Yocto Plug-in directly into the Eclipse IDE,
|
To install the Eclipse Yocto Plug-in as new software directly into the Eclipse IDE,
|
||||||
follow these steps:
|
follow these steps:
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para>Start up the Eclipse IDE.</para></listitem>
|
<listitem><para>Start up the Eclipse IDE.</para></listitem>
|
||||||
<listitem><para>In Eclipse, select "Install New Software" from the "Help" menu.</para></listitem>
|
<listitem><para>In Eclipse, select "Install New Software" from the "Help" menu.</para></listitem>
|
||||||
<listitem><para>Click "Add..." in the "Work with:" area.</para></listitem>
|
<listitem><para>Click "Add..." in the "Work with:" area.</para></listitem>
|
||||||
<listitem><para>Enter
|
<listitem><para>Enter
|
||||||
<filename>http://www.yoctoproject.org/downloads/eclipse-plugin/1.1</filename>
|
<filename>http://downloads.yoctoproject.org/releases/eclipse-plugin/1.1.1</filename>
|
||||||
in the URL field and provide a meaningful name in the "Name" field.</para></listitem>
|
in the URL field and provide a meaningful name in the "Name" field.</para></listitem>
|
||||||
<listitem><para>Click "OK" to have the entry added to the "Work with:"
|
<listitem><para>Click "OK" to have the entry added to the "Work with:"
|
||||||
drop-down list.</para></listitem>
|
drop-down list.</para></listitem>
|
||||||
<listitem><para>Select the entry for the plug-in from the "Work with:" drop-down
|
<listitem><para>Select the entry for the plug-in from the "Work with:" drop-down
|
||||||
list.</para></listitem>
|
list.</para></listitem>
|
||||||
|
<listitem><para>Check the box next to <filename>Development tools and SDKs for Yocto Linux</filename>.
|
||||||
|
</para></listitem>
|
||||||
<listitem><para>Complete the remaining software installation steps and
|
<listitem><para>Complete the remaining software installation steps and
|
||||||
then restart the Eclipse IDE to finish the installation of the plug-in.
|
then restart the Eclipse IDE to finish the installation of the plug-in.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
@@ -169,46 +177,8 @@
|
|||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
<section id='yocto-project-source'>
|
|
||||||
<title>Yocto Project Source</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
To install the Eclipse Yocto Plug-in from the Yocto Project source repositories,
|
|
||||||
follow these steps:
|
|
||||||
<orderedlist>
|
|
||||||
<listitem><para>Open a shell and create a Git repository with:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
$ git clone git://git.yoctoproject.org/eclipse-poky yocto-eclipse
|
|
||||||
</literallayout>
|
|
||||||
For this example, the repository is named
|
|
||||||
<filename>~/yocto-eclipse</filename>.</para></listitem>
|
|
||||||
<listitem><para>In Eclipse, select "Import" from the "File" menu.</para></listitem>
|
|
||||||
<listitem><para>Expand the "General" box and pick "existing projects into workspace".
|
|
||||||
</para></listitem>
|
|
||||||
<listitem><para>Select the root directory and browse to "~/yocto-eclipse/plugins".
|
|
||||||
</para></listitem>
|
|
||||||
<listitem><para>There will be three things there.
|
|
||||||
Select each one and install one at a time.
|
|
||||||
Do all three.</para></listitem>
|
|
||||||
<listitem><para>Restart everything.</para></listitem>
|
|
||||||
</orderedlist>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
At this point you should be able to invoke Eclipse from the shell using the following:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
$ cd ~/eclipse
|
|
||||||
$ ./eclipse -vmargs -XX:PermSize=256M
|
|
||||||
</literallayout>
|
|
||||||
The left navigation pane shows the default projects.
|
|
||||||
Right-click on one of these projects and run it as an Eclipse application.
|
|
||||||
This brings up a second instance of Eclipse IDE that has the Yocto Plug-in.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='zip-file-method'>
|
<section id='zip-file-method'>
|
||||||
<title>Zip File Method</title>
|
<title>Installing the Plug-in from a Zip File</title>
|
||||||
<para>
|
<para>
|
||||||
To install the Eclipse Yocto Plug-in by building and installing a plug-in
|
To install the Eclipse Yocto Plug-in by building and installing a plug-in
|
||||||
zip file, follow these steps:
|
zip file, follow these steps:
|
||||||
@@ -234,9 +204,9 @@
|
|||||||
name of the Git branch along with the Yocto Project release you are
|
name of the Git branch along with the Yocto Project release you are
|
||||||
using.
|
using.
|
||||||
Here is an example that uses the <filename>master</filename> Git repository
|
Here is an example that uses the <filename>master</filename> Git repository
|
||||||
and the <filename>1.1M4</filename> release:
|
and the <filename>1.1.1</filename> release:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ scripts/build.sh master 1.1M4
|
$ scripts/build.sh master 1.1.1
|
||||||
</literallayout>
|
</literallayout>
|
||||||
After running the script, the file
|
After running the script, the file
|
||||||
<filename>org.yocto.sdk-<release>-<date>-archive.zip</filename>
|
<filename>org.yocto.sdk-<release>-<date>-archive.zip</filename>
|
||||||
@@ -247,22 +217,57 @@
|
|||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>Click "Add".</para></listitem>
|
<listitem><para>Click "Add".</para></listitem>
|
||||||
<listitem><para>Provide anything you want in the "Name" field.</para></listitem>
|
<listitem><para>Provide anything you want in the "Name" field.</para></listitem>
|
||||||
<listitem><para>For the "Archive" field, select the ZIP file you built in step
|
<listitem><para>Click "Archive" and browse to the ZIP file you built
|
||||||
4.
|
in step four.
|
||||||
This ZIP file should not be "unzipped", and must be the
|
This ZIP file should not be "unzipped", and must be the
|
||||||
<filename>*archive.zip</filename> file created by running the
|
<filename>*archive.zip</filename> file created by running the
|
||||||
<filename>build.sh</filename> script.</para></listitem>
|
<filename>build.sh</filename> script.</para></listitem>
|
||||||
<listitem><para>Select the new entry in the installation window and complete
|
<listitem><para>Check the box next to the new entry in the installation window and complete
|
||||||
the installation.</para></listitem>
|
the installation.</para></listitem>
|
||||||
<listitem><para>Restart the Eclipse IDE if necessary.</para></listitem>
|
<listitem><para>Restart the Eclipse IDE if necessary.</para></listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
At this point you should be able to configure the Eclipse Yocto Plug-in as described in
|
At this point you should be able to configure the Eclipse Yocto Plug-in as described in the
|
||||||
the next section.
|
"<link linkend='configuring-the-eclipse-yocto-plug-in'>Configuring the Eclipse Yocto Plug-in</link>"
|
||||||
|
section.</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='yocto-project-source'>
|
||||||
|
<title>Importing the Plug-in Project into the Eclipse Environment</title>
|
||||||
|
<para>
|
||||||
|
Importing the Eclipse Yocto Plug-in project from the Yocto Project source repositories
|
||||||
|
is useful when you want to try out the latest plug-in from the tip of plug-in's
|
||||||
|
development tree.
|
||||||
|
It is important to understand when you import the plug-in you are not installing
|
||||||
|
it into the Eclipse application.
|
||||||
|
Rather, you are importing the project and just using it.
|
||||||
|
To import the plug-in project, follow these steps:
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para>Open a shell and create a Git repository with:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ git clone git://git.yoctoproject.org/eclipse-poky yocto-eclipse
|
||||||
|
</literallayout>
|
||||||
|
For this example, the repository is named
|
||||||
|
<filename>~/yocto-eclipse</filename>.</para></listitem>
|
||||||
|
<listitem><para>In Eclipse, select "Import" from the "File" menu.</para></listitem>
|
||||||
|
<listitem><para>Expand the "General" box and select "existing projects into workspace"
|
||||||
|
and then click "Next".</para></listitem>
|
||||||
|
<listitem><para>Select the root directory and browse to "~/yocto-eclipse/plugins".
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>There will be three things there.
|
||||||
|
Select each one and install one at a time.
|
||||||
|
Do all three.</para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The left navigation pane in the Eclipse application shows the default projects.
|
||||||
|
Right-click on one of these projects and run it as an Eclipse application.
|
||||||
|
This brings up a second instance of Eclipse IDE that has the Yocto Plug-in.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='configuring-the-eclipse-yocto-plug-in'>
|
<section id='configuring-the-eclipse-yocto-plug-in'>
|
||||||
@@ -317,7 +322,7 @@
|
|||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para><emphasis>Point to the Toolchain:</emphasis>
|
<listitem><para><emphasis>Point to the Toolchain:</emphasis>
|
||||||
If you are using a stand-alone pre-built toolchain, you should be pointing to the
|
If you are using a stand-alone pre-built toolchain, you should be pointing to the
|
||||||
<filename>/opt/poky/1.1</filename> directory.
|
<filename>/opt/poky/1.1.1</filename> directory.
|
||||||
This is the location for toolchains installed by the ADT Installer or by hand.
|
This is the location for toolchains installed by the ADT Installer or by hand.
|
||||||
Sections "<link linkend='configuring-and-running-the-adt-installer-script'>Configuring
|
Sections "<link linkend='configuring-and-running-the-adt-installer-script'>Configuring
|
||||||
and Running the ADT Installer Script</link>" and
|
and Running the ADT Installer Script</link>" and
|
||||||
@@ -349,9 +354,8 @@
|
|||||||
The pull-down menu should have the supported architectures.
|
The pull-down menu should have the supported architectures.
|
||||||
If the architecture you need is not listed in the menu, you
|
If the architecture you need is not listed in the menu, you
|
||||||
will need to build the image.
|
will need to build the image.
|
||||||
See the "<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#building-image'>Building an Image</ulink>" section of the
|
See the "<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#building-image'>Building an Image</ulink>" section
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html'>
|
of The Yocto Project Quick Start for more information.</para></listitem>
|
||||||
The Yocto Project Quick Start</ulink> for more information.</para></listitem>
|
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -467,7 +471,9 @@
|
|||||||
The script also runs <filename>libtoolize</filename>, <filename>aclocal</filename>,
|
The script also runs <filename>libtoolize</filename>, <filename>aclocal</filename>,
|
||||||
<filename>autoconf</filename>, <filename>autoheader</filename>,
|
<filename>autoconf</filename>, <filename>autoheader</filename>,
|
||||||
<filename>automake --a</filename>, and
|
<filename>automake --a</filename>, and
|
||||||
<filename>./configure</filename>.</para></listitem>
|
<filename>./configure</filename>.
|
||||||
|
Click on the <filename>Console</filename> tab beneath your source code to
|
||||||
|
see the results of reconfiguring your project.</para></listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -490,7 +496,7 @@
|
|||||||
<listitem><para>Expose the <filename>Run -> External Tools</filename> menu.
|
<listitem><para>Expose the <filename>Run -> External Tools</filename> menu.
|
||||||
Your image should appear as a selectable menu item.
|
Your image should appear as a selectable menu item.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>Select your image in the navigation pane to launch the
|
<listitem><para>Select your image from the menu to launch the
|
||||||
emulator in a new window.</para></listitem>
|
emulator in a new window.</para></listitem>
|
||||||
<listitem><para>If needed, enter your host root password in the shell window at the prompt.
|
<listitem><para>If needed, enter your host root password in the shell window at the prompt.
|
||||||
This sets up a <filename>Tap 0</filename> connection needed for running in user-space
|
This sets up a <filename>Tap 0</filename> connection needed for running in user-space
|
||||||
@@ -509,8 +515,8 @@
|
|||||||
<title>Deploying and Debugging the Application</title>
|
<title>Deploying and Debugging the Application</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Once the QEMU emulator is running the image, you can deploy your application and use the emulator
|
Once the QEMU emulator is running the image, using the Eclipse IDE
|
||||||
to perform debugging.
|
you can deploy your application and use the emulator to perform debugging.
|
||||||
Follow these steps to deploy the application.
|
Follow these steps to deploy the application.
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para>Select <filename>Run -> Debug Configurations...</filename></para></listitem>
|
<listitem><para>Select <filename>Run -> Debug Configurations...</filename></para></listitem>
|
||||||
@@ -550,7 +556,7 @@
|
|||||||
your development experience.
|
your development experience.
|
||||||
These tools are aids in developing and debugging applications and images.
|
These tools are aids in developing and debugging applications and images.
|
||||||
You can run these user-space tools from within the Eclipse IDE through the
|
You can run these user-space tools from within the Eclipse IDE through the
|
||||||
<filename>Window -> YoctoTools</filename> menu.
|
<filename>YoctoTools</filename> menu.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
|||||||
@@ -114,7 +114,7 @@
|
|||||||
<listitem><para><emphasis>Perf:</emphasis> Performance counters for Linux used
|
<listitem><para><emphasis>Perf:</emphasis> Performance counters for Linux used
|
||||||
to keep track of certain types of hardware and software events.
|
to keep track of certain types of hardware and software events.
|
||||||
For more information on these types of counters see
|
For more information on these types of counters see
|
||||||
<ulink url='https://perf.wiki.kernel.org/index.php'></ulink> and click
|
<ulink url='https://perf.wiki.kernel.org/'></ulink> and click
|
||||||
on “Perf tools.”</para></listitem>
|
on “Perf tools.”</para></listitem>
|
||||||
<listitem><para><emphasis>SystemTap:</emphasis> A free software infrastructure
|
<listitem><para><emphasis>SystemTap:</emphasis> A free software infrastructure
|
||||||
that simplifies information gathering about a running Linux system.
|
that simplifies information gathering about a running Linux system.
|
||||||
|
|||||||
@@ -43,10 +43,15 @@
|
|||||||
<date>6 October 2011</date>
|
<date>6 October 2011</date>
|
||||||
<revremark>Released with the Yocto Project 1.1 Release.</revremark>
|
<revremark>Released with the Yocto Project 1.1 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.1.1</revnumber>
|
||||||
|
<date>15 March 2012</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.1.1 Release.</revremark>
|
||||||
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>2010-2011</year>
|
<year>2010-2012</year>
|
||||||
<holder>Linux Foundation</holder>
|
<holder>Linux Foundation</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
|
|
||||||
@@ -58,7 +63,7 @@
|
|||||||
<note>
|
<note>
|
||||||
Due to production processes, there could be differences between the Yocto Project
|
Due to production processes, there could be differences between the Yocto Project
|
||||||
documentation bundled in the release tarball and the
|
documentation bundled in the release tarball and the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/adt-manual/adt-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/adt-manual/adt-manual.html'>
|
||||||
Application Developer's Toolkit (ADT) User's Guide</ulink> on
|
Application Developer's Toolkit (ADT) User's Guide</ulink> on
|
||||||
the <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink> website.
|
the <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink> website.
|
||||||
For the latest version of this manual, see the manual on the website.
|
For the latest version of this manual, see the manual on the website.
|
||||||
|
|||||||
@@ -54,9 +54,7 @@
|
|||||||
|
|
||||||
<note>
|
<note>
|
||||||
For build performance information related to the PMS, see
|
For build performance information related to the PMS, see
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#ref-classes-package'>Packaging - <filename>package*.bbclass</filename></ulink>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html#ref-classes-package'>Packaging - <filename>package*.bbclass</filename></ulink> in The Yocto Project Reference Manual.
|
||||||
in <ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html'>
|
|
||||||
The Yocto Project Reference Manual</ulink>.
|
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
|||||||
@@ -55,8 +55,10 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The ADT Installer is contained in the ADT Installer tarball.
|
The ADT Installer is contained in the ADT Installer tarball.
|
||||||
You can download the tarball into any directory from
|
You can download the tarball into any directory from the
|
||||||
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1/adt_installer'></ulink>.
|
<ulink url='http://downloads.yoctoproject.org/releases'>Index of Releases</ulink>, specifically
|
||||||
|
at
|
||||||
|
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/adt_installer'></ulink>.
|
||||||
Or, you can use BitBake to generate the tarball inside the existing Yocto Project
|
Or, you can use BitBake to generate the tarball inside the existing Yocto Project
|
||||||
build tree.
|
build tree.
|
||||||
</para>
|
</para>
|
||||||
@@ -79,9 +81,9 @@
|
|||||||
$ cd ~
|
$ cd ~
|
||||||
$ mkdir yocto-project
|
$ mkdir yocto-project
|
||||||
$ cd yocto-project
|
$ cd yocto-project
|
||||||
$ wget http://downloads.yoctoproject.org/releases/yocto/yocto-1.1/poky-edison-6.0.tar.bz2
|
$ wget http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/poky-edison-6.0.1.tar.bz2
|
||||||
$ tar xjf poky-edison-6.0.tar.bz2
|
$ tar xjf poky-edison-6.0.1.tar.bz2
|
||||||
$ source poky-edison-6.0/oe-init-build-env
|
$ source poky-edison-6.0.1/oe-init-build-env
|
||||||
$ bitbake adt-installer
|
$ bitbake adt-installer
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
@@ -93,6 +95,14 @@
|
|||||||
<para>
|
<para>
|
||||||
Before running the ADT Installer script, you need to unpack the tarball.
|
Before running the ADT Installer script, you need to unpack the tarball.
|
||||||
You can unpack the tarball in any directory you wish.
|
You can unpack the tarball in any directory you wish.
|
||||||
|
For example, this command copies the ADT Installer tarball from where
|
||||||
|
it was built into the home directory and then unpacks the tarball into
|
||||||
|
a top-level directory named <filename>adt-installer</filename>:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ cd ~
|
||||||
|
$ cp ~/yocto-project/build/tmp/deploy/sdk/adt_installer.tar.bz2 $HOME
|
||||||
|
$ tar -xjf adt_installer.tar.bz2
|
||||||
|
</literallayout>
|
||||||
Unpacking it creates the directory <filename>adt-installer</filename>,
|
Unpacking it creates the directory <filename>adt-installer</filename>,
|
||||||
which contains the ADT Installer script (<filename>adt_installer</filename>)
|
which contains the ADT Installer script (<filename>adt_installer</filename>)
|
||||||
and its configuration file (<filename>adt_installer.conf</filename>).
|
and its configuration file (<filename>adt_installer.conf</filename>).
|
||||||
@@ -155,18 +165,19 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
After you have configured the <filename>adt_installer.conf</filename> file,
|
After you have configured the <filename>adt_installer.conf</filename> file,
|
||||||
run the installer using the following command:
|
run the installer for this example using the following commands:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ adt_installer
|
$ cd ~/adt-installer
|
||||||
|
$ ./adt_installer
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
The ADT Installer requires the <filename>libtool</filename> package to complete.
|
The ADT Installer requires the <filename>libtool</filename> package to complete.
|
||||||
If you install the recommended packages as described in the
|
If you install the recommended packages as described in the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#packages'>Packages</ulink>"
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#packages'>Packages</ulink>"
|
||||||
section of
|
section of
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||||
The Yocto Project Quick Start</ulink>, then you will have libtool installed.
|
The Yocto Project Quick Start</ulink>, then you will have libtool installed.
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
@@ -181,7 +192,7 @@
|
|||||||
<para>
|
<para>
|
||||||
Once the installation completes, the ADT, which includes the cross-toolchain, is installed.
|
Once the installation completes, the ADT, which includes the cross-toolchain, is installed.
|
||||||
You will notice environment setup files for the cross-toolchain in
|
You will notice environment setup files for the cross-toolchain in
|
||||||
<filename>/opt/poky/1.1</filename>,
|
<filename>/opt/poky/1.1.1</filename>,
|
||||||
and image tarballs in the <filename>adt-installer</filename>
|
and image tarballs in the <filename>adt-installer</filename>
|
||||||
directory according to your installer configurations, and the target sysroot located
|
directory according to your installer configurations, and the target sysroot located
|
||||||
according to the <filename>YOCTOADT_TARGET_SYSROOT_LOC_<arch></filename> variable
|
according to the <filename>YOCTOADT_TARGET_SYSROOT_LOC_<arch></filename> variable
|
||||||
@@ -204,7 +215,7 @@
|
|||||||
Follow these steps:
|
Follow these steps:
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para>Go to
|
<listitem><para>Go to
|
||||||
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1/toolchain'></ulink>
|
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/toolchain'></ulink>
|
||||||
and find the folder that matches your host development system
|
and find the folder that matches your host development system
|
||||||
(i.e. <filename>i686</filename> for 32-bit machines or
|
(i.e. <filename>i686</filename> for 32-bit machines or
|
||||||
<filename>x86_64</filename> for 64-bit machines).</para></listitem>
|
<filename>x86_64</filename> for 64-bit machines).</para></listitem>
|
||||||
@@ -214,7 +225,7 @@
|
|||||||
you are going to use your cross-toolchain for an Intel-based 32-bit target, go into the
|
you are going to use your cross-toolchain for an Intel-based 32-bit target, go into the
|
||||||
<filename>x86_64</filename> folder and download the following tarball:
|
<filename>x86_64</filename> folder and download the following tarball:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
poky-eglibc-x86_64-i586-toolchain-gmae-1.1.tar.bz2
|
poky-eglibc-x86_64-i586-toolchain-1.1.1.tar.bz2
|
||||||
</literallayout>
|
</literallayout>
|
||||||
<note><para>As an alternative to steps one and two, you can build the toolchain tarball
|
<note><para>As an alternative to steps one and two, you can build the toolchain tarball
|
||||||
if you have a Yocto Project build tree.
|
if you have a Yocto Project build tree.
|
||||||
@@ -231,9 +242,15 @@
|
|||||||
</para></note></para></listitem>
|
</para></note></para></listitem>
|
||||||
<listitem><para>Make sure you are in the root directory with root privileges and then expand
|
<listitem><para>Make sure you are in the root directory with root privileges and then expand
|
||||||
the tarball.
|
the tarball.
|
||||||
The tarball expands into <filename>/opt/poky/1.1</filename>.
|
The tarball expands into <filename>/opt/poky/1.1.1</filename>.
|
||||||
Once the tarball is expanded, the cross-toolchain is installed.
|
Once the tarball is expanded, the cross-toolchain is installed.
|
||||||
You will notice environment setup files for the cross-toolchain in the directory.
|
You will notice environment setup files for the cross-toolchain in the directory.
|
||||||
|
Here is an example where the tarball exists in the user's <filename>Downloads</filename>
|
||||||
|
directory:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
# cd /
|
||||||
|
# tar -xjf /home/scottrif/Downloads/poky-eglibc-x86_64-i586-toolchain-gmae-1.1.tar.bz2
|
||||||
|
</literallayout>
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</para>
|
</para>
|
||||||
@@ -270,7 +287,7 @@
|
|||||||
command.</note></para></listitem>
|
command.</note></para></listitem>
|
||||||
<listitem><para>Run <filename>bitbake meta-ide-support</filename> to complete the
|
<listitem><para>Run <filename>bitbake meta-ide-support</filename> to complete the
|
||||||
cross-toolchain installation.
|
cross-toolchain installation.
|
||||||
<note>If change out of your working directory after you
|
<note>If you change out of your working directory after you
|
||||||
<filename>source</filename> the environment setup script and before you run
|
<filename>source</filename> the environment setup script and before you run
|
||||||
the <filename>bitbake</filename> command, the command might not work.
|
the <filename>bitbake</filename> command, the command might not work.
|
||||||
Be sure to run the <filename>bitbake</filename> command immediately
|
Be sure to run the <filename>bitbake</filename> command immediately
|
||||||
@@ -294,21 +311,21 @@
|
|||||||
Before you can develop using the cross-toolchain, you need to set up the
|
Before you can develop using the cross-toolchain, you need to set up the
|
||||||
cross-development environment by sourcing the toolchain's environment setup script.
|
cross-development environment by sourcing the toolchain's environment setup script.
|
||||||
If you used the ADT Installer or used an existing ADT tarball to install the ADT,
|
If you used the ADT Installer or used an existing ADT tarball to install the ADT,
|
||||||
then you can find this script in the <filename>/opt/poky/1.1</filename>
|
then you can find this script in the <filename>/opt/poky/1.1.1</filename>
|
||||||
directory.
|
directory.
|
||||||
If you installed the toolchain in the build tree, you can find the environment setup
|
If you installed the toolchain in the build tree, you can find the environment setup
|
||||||
script for the toolchain in the Yocto Project build tree's <filename>tmp</filename> directory.
|
script for the toolchain in the Yocto Project build tree's <filename>tmp</filename> directory.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Be sure to run the environment setup script that matches the architecture for
|
Be sure to source the environment setup script that matches the architecture for
|
||||||
which you are developing.
|
which you are developing.
|
||||||
Environment setup scripts begin with the string “<filename>environment-setup</filename>”
|
Environment setup scripts begin with the string “<filename>environment-setup</filename>”
|
||||||
and include as part of their name the architecture.
|
and include as part of their name the architecture.
|
||||||
For example, the toolchain environment setup script for a 64-bit IA-based architecture would
|
For example, the command to source the toolchain environment setup script
|
||||||
be the following:
|
for a 64-bit IA-based machine would be the following:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
/opt/poky/1.1/environment-setup-x86_64-poky-linux
|
$ source /opt/poky/1.1.1/environment-setup-x86_64-poky-linux
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -330,10 +347,8 @@
|
|||||||
To get the kernel and filesystem images, you either have to build them or download
|
To get the kernel and filesystem images, you either have to build them or download
|
||||||
pre-built versions.
|
pre-built versions.
|
||||||
You can find examples for both these situations in the
|
You can find examples for both these situations in the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#test-run'>A
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#test-run'>A
|
||||||
Quick Test Run</ulink>" section of
|
Quick Test Run</ulink>" section of The Yocto Project Quick Start.
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html'>
|
|
||||||
The Yocto Project Quick Start</ulink>.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -342,12 +357,10 @@
|
|||||||
<filename>mips</filename>, <filename>powerpc</filename>, and <filename>arm</filename>)
|
<filename>mips</filename>, <filename>powerpc</filename>, and <filename>arm</filename>)
|
||||||
that you can use unaltered in the QEMU emulator.
|
that you can use unaltered in the QEMU emulator.
|
||||||
These kernel images reside in the Yocto Project release
|
These kernel images reside in the Yocto Project release
|
||||||
area - <ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1/machines/'></ulink>
|
area - <ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/machines/'></ulink>
|
||||||
and are ideal for experimentation within Yocto Project.
|
and are ideal for experimentation within Yocto Project.
|
||||||
For information on the image types you can build using the Yocto Project, see the
|
For information on the image types you can build using the Yocto Project, see the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#ref-images'>Reference: Images</ulink>" appendix in
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html#ref-images'>Reference: Images</ulink>" appendix in The Yocto Project Reference Manual.
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html'>
|
|
||||||
The Yocto Project Reference Manual</ulink>.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -363,7 +376,7 @@
|
|||||||
If you want to use a different image type that contains the <filename>tcf-agent</filename>,
|
If you want to use a different image type that contains the <filename>tcf-agent</filename>,
|
||||||
you can do so one of two ways:
|
you can do so one of two ways:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>Modify the <filename>conf/local.conf</filename> configuration in
|
<listitem><para>Modify the <filename>conf/local.conf</filename> configuration file in
|
||||||
the Yocto Project build directory and then rebuild the image.
|
the Yocto Project build directory and then rebuild the image.
|
||||||
With this method, you need to modify the <filename>EXTRA_IMAGE_FEATURES</filename>
|
With this method, you need to modify the <filename>EXTRA_IMAGE_FEATURES</filename>
|
||||||
variable to have the value of "tools-debug" before rebuilding the image.
|
variable to have the value of "tools-debug" before rebuilding the image.
|
||||||
@@ -419,16 +432,17 @@
|
|||||||
To extract the root filesystem, first <filename>source</filename>
|
To extract the root filesystem, first <filename>source</filename>
|
||||||
the cross-development environment setup script and then
|
the cross-development environment setup script and then
|
||||||
use the <filename>runqemu-extract-sdk</filename> command on the
|
use the <filename>runqemu-extract-sdk</filename> command on the
|
||||||
filesystem image.
|
filesystem image tarball.
|
||||||
For example, the following commands set up the environment and then extract
|
For example, the following commands set up the environment by sourcing
|
||||||
|
the setup script from within the build directory and then extracting
|
||||||
the root filesystem from a previously built filesystem image tarball named
|
the root filesystem from a previously built filesystem image tarball named
|
||||||
<filename>core-image-sato-sdk-qemux86-2011091411831.rootfs.tar.bz2</filename>.
|
<filename>core-image-sato-sdk-qemux86.tar.bz2</filename>.
|
||||||
The example extracts the root filesystem into the <filename>$HOME/qemux86-sato</filename>
|
The example extracts the root filesystem into the <filename>$HOME/qemux86-sato</filename>
|
||||||
directory:
|
directory:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ source $HOME/poky/build/tmp/environment-setup-i586-poky-linux
|
$ source $HOME/poky/build/tmp/environment-setup-i586-poky-linux
|
||||||
$ runqemu-extract-sdk \
|
$ runqemu-extract-sdk \
|
||||||
tmp/deploy/images/core-image-sato-sdk-qemux86-2011091411831.rootfs.tar.bz2 \
|
tmp/deploy/images/core-image-sato-sdk-qemux86.tar.bz2 \
|
||||||
$HOME/qemux86-sato
|
$HOME/qemux86-sato
|
||||||
</literallayout>
|
</literallayout>
|
||||||
In this case, you could now point to the target sysroot at
|
In this case, you could now point to the target sysroot at
|
||||||
|
|||||||
@@ -966,9 +966,3 @@ table {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footnote {
|
|
||||||
font-size: small;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -55,10 +55,15 @@
|
|||||||
<date>6 October 2011</date>
|
<date>6 October 2011</date>
|
||||||
<revremark>Released with the Yocto Project 1.1 Release.</revremark>
|
<revremark>Released with the Yocto Project 1.1 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.1.1</revnumber>
|
||||||
|
<date>15 March 2012</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.1.1 Release.</revremark>
|
||||||
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>2010-2011</year>
|
<year>2010-2012</year>
|
||||||
<holder>Linux Foundation</holder>
|
<holder>Linux Foundation</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
|
|
||||||
@@ -70,7 +75,7 @@
|
|||||||
<note>
|
<note>
|
||||||
Due to production processes, there could be differences between the Yocto Project
|
Due to production processes, there could be differences between the Yocto Project
|
||||||
documentation bundled in the release tarball and the
|
documentation bundled in the release tarball and the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/bsp-guide/bsp-guide.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/bsp-guide/bsp-guide.html'>
|
||||||
Board Support Package (BSP) Developer's Guide</ulink> on
|
Board Support Package (BSP) Developer's Guide</ulink> on
|
||||||
the <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink> website.
|
the <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink> website.
|
||||||
For the latest version of this manual, see the manual on the website.
|
For the latest version of this manual, see the manual on the website.
|
||||||
|
|||||||
@@ -30,9 +30,9 @@
|
|||||||
<note>
|
<note>
|
||||||
The information here does not provide an example of how to create a BSP.
|
The information here does not provide an example of how to create a BSP.
|
||||||
For examples on how to create a BSP, see the
|
For examples on how to create a BSP, see the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#dev-manual-bsp-appendix'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#dev-manual-bsp-appendix'>
|
||||||
BSP Development Example</ulink> in
|
BSP Development Example</ulink> in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>
|
||||||
The Yocto Project Development Manual</ulink>.
|
The Yocto Project Development Manual</ulink>.
|
||||||
You can also see the
|
You can also see the
|
||||||
<ulink url='https://wiki.yoctoproject.org/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another'>
|
<ulink url='https://wiki.yoctoproject.org/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another'>
|
||||||
@@ -100,9 +100,9 @@
|
|||||||
"
|
"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
For more detailed information on layers, see the
|
For more detailed information on layers, see the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#usingpoky-changes-layers'>BitBake Layers</ulink>" section of the Yocto Project Reference Manual.
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html#usingpoky-changes-layers'>BitBake Layers</ulink>" section of the Yocto Project Reference Manual.
|
||||||
You can also see the detailed examples in the appendices of
|
You can also see the detailed examples in the appendices of
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>
|
||||||
The Yocto Project Development Manual</ulink>.
|
The Yocto Project Development Manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -149,10 +149,7 @@
|
|||||||
meta-crownbay/recipes-core/tasks/task-core-tools.bbappend
|
meta-crownbay/recipes-core/tasks/task-core-tools.bbappend
|
||||||
meta-crownbay/recipes-graphics/
|
meta-crownbay/recipes-graphics/
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/
|
meta-crownbay/recipes-graphics/xorg-xserver/
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin_1.6.bb
|
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
|
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin-1.6/
|
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin-1.6/.gitignore
|
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/
|
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/
|
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/xorg.conf
|
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/xorg.conf
|
||||||
@@ -407,7 +404,6 @@
|
|||||||
For example, the Crown Bay BSP contains the following files that support
|
For example, the Crown Bay BSP contains the following files that support
|
||||||
building a BSP that supports and does not support the Intel EMGD:
|
building a BSP that supports and does not support the Intel EMGD:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin_1.6.bb
|
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
|
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/xorg.conf
|
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/xorg.conf
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay-noemgd/xorg.conf
|
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay-noemgd/xorg.conf
|
||||||
@@ -465,11 +461,11 @@
|
|||||||
KMACHINE_crownbay-noemgd = "yocto/standard/crownbay"
|
KMACHINE_crownbay-noemgd = "yocto/standard/crownbay"
|
||||||
KERNEL_FEATURES_append_crownbay-noemgd += " cfg/smp.scc"
|
KERNEL_FEATURES_append_crownbay-noemgd += " cfg/smp.scc"
|
||||||
|
|
||||||
SRCREV_machine_pn-linux-yocto_crownbay ?= "6b4b9acde5fb0ff66ae58fa98274bfe631501499"
|
SRCREV_machine_pn-linux-yocto_crownbay ?= "2247da9131ea7e46ed4766a69bb1353dba22f873"
|
||||||
SRCREV_meta_pn-linux-yocto_crownbay ?= "5b535279e61197cb194bb2dfceb8b7a04128387c"
|
SRCREV_meta_pn-linux-yocto_crownbay ?= "d05450e4aef02c1b7137398ab3a9f8f96da74f52"
|
||||||
|
|
||||||
SRCREV_machine_pn-linux-yocto_crownbay-noemgd ?= "6b4b9acde5fb0ff66ae58fa98274bfe631501499"
|
SRCREV_machine_pn-linux-yocto_crownbay-noemgd ?= "2247da9131ea7e46ed4766a69bb1353dba22f873"
|
||||||
SRCREV_meta_pn-linux-yocto_crownbay-noemgd ?= "5b535279e61197cb194bb2dfceb8b7a04128387c"
|
SRCREV_meta_pn-linux-yocto_crownbay-noemgd ?= "d05450e4aef02c1b7137398ab3a9f8f96da74f52"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
This append file contains statements used to support the Crown Bay BSP for both
|
This append file contains statements used to support the Crown Bay BSP for both
|
||||||
Intel EMGD and non-EMGD.
|
Intel EMGD and non-EMGD.
|
||||||
@@ -484,8 +480,8 @@
|
|||||||
KMACHINE_crownbay = "yocto/standard/crownbay"
|
KMACHINE_crownbay = "yocto/standard/crownbay"
|
||||||
KERNEL_FEATURES_append_crownbay += " cfg/smp.scc"
|
KERNEL_FEATURES_append_crownbay += " cfg/smp.scc"
|
||||||
|
|
||||||
SRCREV_machine_pn-linux-yocto_crownbay ?= "6b4b9acde5fb0ff66ae58fa98274bfe631501499"
|
SRCREV_machine_pn-linux-yocto_crownbay ?= "2247da9131ea7e46ed4766a69bb1353dba22f873"
|
||||||
SRCREV_meta_pn-linux-yocto_crownbay ?= "5b535279e61197cb194bb2dfceb8b7a04128387c"
|
SRCREV_meta_pn-linux-yocto_crownbay ?= "d05450e4aef02c1b7137398ab3a9f8f96da74f52"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
The append file defines <filename>crownbay</filename> as the compatible machine,
|
The append file defines <filename>crownbay</filename> as the compatible machine,
|
||||||
defines the <filename>KMACHINE</filename>, points to some configuration fragments
|
defines the <filename>KMACHINE</filename>, points to some configuration fragments
|
||||||
@@ -542,7 +538,7 @@
|
|||||||
The configuration options will likely end up in that location anyway if the BSP gets
|
The configuration options will likely end up in that location anyway if the BSP gets
|
||||||
added to the Yocto Project.
|
added to the Yocto Project.
|
||||||
For information on how to add these configurations directly, see
|
For information on how to add these configurations directly, see
|
||||||
<ulink url='http://yoctoproject.org/docs/latest/kernel-manual/kernel-manual.html'>
|
<ulink url='http://yoctoproject.org/docs/1.1.1/kernel-manual/kernel-manual.html'>
|
||||||
The Yocto Project Kernel Architecture and Use Manual</ulink>.</para>
|
The Yocto Project Kernel Architecture and Use Manual</ulink>.</para>
|
||||||
<para>
|
<para>
|
||||||
In general, however, the Yocto Project maintainers take care of moving the
|
In general, however, the Yocto Project maintainers take care of moving the
|
||||||
@@ -672,9 +668,9 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Get a full-featured BSP recipe rather than a key.
|
Get a full-featured BSP recipe rather than a key.
|
||||||
You can do this by visiting the Yocto Project website's
|
You can do this by visiting the applicable BSP download page from the Yocto
|
||||||
<ulink url='http://www.yoctoproject.org/download'>Download</ulink> page and
|
Project website at
|
||||||
clicking on "BSP Downloads".
|
<ulink url='http://yoctoproject.org/download/board-support-package-bsp-downloads'></ulink>.
|
||||||
BSP tarballs that have proprietary information can be downloaded after agreeing
|
BSP tarballs that have proprietary information can be downloaded after agreeing
|
||||||
to licensing requirements as part of the download process.
|
to licensing requirements as part of the download process.
|
||||||
Obtaining the code this way allows you to build an encumbered image with
|
Obtaining the code this way allows you to build an encumbered image with
|
||||||
|
|||||||
@@ -956,9 +956,3 @@ table {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footnote {
|
|
||||||
font-size: small;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<title>BSP Development Example</title>
|
<title>BSP Development Example</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This appendix provides a complete BSP development example.
|
This appendix provides a complete BSP example.
|
||||||
The example assumes the following:
|
The example assumes the following:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>No previous preparation or use of the Yocto Project.</para></listitem>
|
<listitem><para>No previous preparation or use of the Yocto Project.</para></listitem>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
</literallayout>
|
</literallayout>
|
||||||
Alternatively, you can start with the downloaded Poky "edison" tarball:
|
Alternatively, you can start with the downloaded Poky "edison" tarball:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ tar xfj poky-edison-6.0.tar.bz2
|
$ tar xfj poky-edison-6.0.1.tar.bz2
|
||||||
$ cd poky
|
$ cd poky
|
||||||
</literallayout>
|
</literallayout>
|
||||||
<note>If you're using the tarball method, you can ignore all the following steps that
|
<note>If you're using the tarball method, you can ignore all the following steps that
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
$ git branch -a
|
$ git branch -a
|
||||||
$ git tag -l
|
$ git tag -l
|
||||||
</literallayout>
|
</literallayout>
|
||||||
For this example we are going to use the Yocto Project 1.1 Release, which is code
|
For this example we are going to use the Yocto Project 1.1.1 Release, which is code
|
||||||
named "edison".
|
named "edison".
|
||||||
These commands create a local branch named <filename>edison</filename>
|
These commands create a local branch named <filename>edison</filename>
|
||||||
that tracks the remote branch of the same name.
|
that tracks the remote branch of the same name.
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
<para>
|
<para>
|
||||||
You need to have the base BSP layer on your development system.
|
You need to have the base BSP layer on your development system.
|
||||||
Similar to the local Yocto Project files, you can get the BSP
|
Similar to the local Yocto Project files, you can get the BSP
|
||||||
layer in a couple of different ways:
|
layer a couple of different ways:
|
||||||
download the BSP tarball and extract it, or set up a local Git repository that
|
download the BSP tarball and extract it, or set up a local Git repository that
|
||||||
has the Yocto Project BSP layers.
|
has the Yocto Project BSP layers.
|
||||||
You should use the same method that you used to get the local Yocto Project files earlier.
|
You should use the same method that you used to get the local Yocto Project files earlier.
|
||||||
@@ -113,8 +113,8 @@
|
|||||||
<filename>meta-intel</filename> contained within the <filename>poky</filename>
|
<filename>meta-intel</filename> contained within the <filename>poky</filename>
|
||||||
parent directory.
|
parent directory.
|
||||||
The following steps will automatically create the
|
The following steps will automatically create the
|
||||||
<filename>meta-intel</filename> directory and the contained
|
<filename>meta-intel</filename> directory and the contained meta-crownbay
|
||||||
<filename>meta-crownbay</filename> starting point in both the Git and the tarball cases.
|
starting point in both the Git and the tarball cases.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -125,16 +125,12 @@
|
|||||||
$ git clone git://git.yoctoproject.org/meta-intel.git
|
$ git clone git://git.yoctoproject.org/meta-intel.git
|
||||||
$ cd meta-intel
|
$ cd meta-intel
|
||||||
</literallayout>
|
</literallayout>
|
||||||
Alternatively, you can start with the downloaded Crown Bay tarball.
|
Alternatively, you can start with the downloaded <filename>meta-intel</filename>
|
||||||
You can download the edison version of the BSP tarball from the
|
edison tarball.
|
||||||
<ulink url='http://www.yoctoproject.org/download'>Download</ulink> page of the
|
|
||||||
Yocto Project website.
|
|
||||||
Here is the specific link for the tarball needed for this example:
|
|
||||||
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1/machines/crownbay-noemgd/crownbay-noemgd-edison-6.0.0.tar.bz2'></ulink>.
|
|
||||||
Again, be sure that you are already in the <filename>poky</filename> directory
|
Again, be sure that you are already in the <filename>poky</filename> directory
|
||||||
as described previously before installing the tarball:
|
as described previously:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ tar xfj crownbay-noemgd-edison-6.0.0.tar.bz2
|
$ tar xfj crownbay-noemgd-edison-6.0.1.tar.bz2
|
||||||
$ cd meta-intel
|
$ cd meta-intel
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
@@ -238,8 +234,8 @@
|
|||||||
<filename>meta-mymachine/conf/layer.conf</filename>.
|
<filename>meta-mymachine/conf/layer.conf</filename>.
|
||||||
This file identifies build information needed for the new layer.
|
This file identifies build information needed for the new layer.
|
||||||
You can see the
|
You can see the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/bsp-guide/bsp-guide.html#bsp-filelayout-layer'>Layer Configuration File</ulink>" section in
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/bsp-guide/bsp-guide.html#bsp-filelayout-layer'>Layer Configuration File</ulink>" section in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/bsp-guide/bsp-guide.html'>The Board
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/bsp-guide/bsp-guide.html'>The Board
|
||||||
Support Packages (BSP) Development Guide</ulink>
|
Support Packages (BSP) Development Guide</ulink>
|
||||||
for more information on this configuration file.
|
for more information on this configuration file.
|
||||||
Basically, we are changing the existing statements to work with our BSP.
|
Basically, we are changing the existing statements to work with our BSP.
|
||||||
@@ -282,7 +278,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='changing-recipes-bsp'>
|
<section id='changing-recipes-bsp'>
|
||||||
<title>Changing <filename>recipes-bsp</filename></title>
|
<title>Changing <filename>recipes-bsp</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
First, let's look at <filename>recipes-bsp</filename>.
|
First, let's look at <filename>recipes-bsp</filename>.
|
||||||
@@ -299,7 +295,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='changing-recipes-graphics'>
|
<section id='changing-recipes-graphics'>
|
||||||
<title>Changing <filename>recipes-graphics</filename></title>
|
<title>Changing <filename>recipes-graphics</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Now let's look at <filename>recipes-graphics</filename>.
|
Now let's look at <filename>recipes-graphics</filename>.
|
||||||
@@ -320,7 +316,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='changing-recipes-core'>
|
<section id='changing-recipes-core'>
|
||||||
<title>Changing <filename>recipes-core</filename></title>
|
<title>Changing <filename>recipes-core</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Now let's look at changes in <filename>recipes-core</filename>.
|
Now let's look at changes in <filename>recipes-core</filename>.
|
||||||
@@ -349,7 +345,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='changing-recipes-kernel'>
|
<section id='changing-recipes-kernel'>
|
||||||
<title>Changing <filename>recipes-kernel</filename></title>
|
<title>Changing <filename>recipes-kernel</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Finally, let's look at <filename>recipes-kernel</filename> changes.
|
Finally, let's look at <filename>recipes-kernel</filename> changes.
|
||||||
@@ -513,7 +509,7 @@
|
|||||||
statements that do not support your targeted hardware in addition to the inclusion
|
statements that do not support your targeted hardware in addition to the inclusion
|
||||||
of any new recipes you might need.
|
of any new recipes you might need.
|
||||||
In this example, it was simply a matter of ridding the new layer
|
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
|
<filename>meta-machine</filename> of any code that supported the EMGD features
|
||||||
and making sure we were identifying the kernel that supports our example, which
|
and making sure we were identifying the kernel that supports our example, which
|
||||||
is the <filename>atom-pc-standard</filename> kernel.
|
is the <filename>atom-pc-standard</filename> kernel.
|
||||||
We did not introduce any new recipes to the layer.
|
We did not introduce any new recipes to the layer.
|
||||||
@@ -548,7 +544,7 @@
|
|||||||
Thus, entering the previous command created the <filename>yocto-build</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
|
If you do not provide a name for the build directory it defaults to
|
||||||
<filename>build</filename>.
|
<filename>build</filename>.
|
||||||
The <filename>yocto-build</filename> directory contains a
|
The <filename>yocot-build</filename> directory contains a
|
||||||
<filename>conf</filename> directory that has
|
<filename>conf</filename> directory that has
|
||||||
two configuration files you will need to check: <filename>bblayers.conf</filename>
|
two configuration files you will need to check: <filename>bblayers.conf</filename>
|
||||||
and <filename>local.conf</filename>.</para></listitem>
|
and <filename>local.conf</filename>.</para></listitem>
|
||||||
@@ -562,10 +558,9 @@
|
|||||||
You should also be sure any other variables in which you are interested are set.
|
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>
|
Some variables to consider are <filename>BB_NUMBER_THREADS</filename>
|
||||||
and <filename>PARALLEL_MAKE</filename>, both of which can greatly reduce your build time
|
and <filename>PARALLEL_MAKE</filename>, both of which can greatly reduce your build time
|
||||||
if your development system supports multiple cores.
|
if you are using a multi-threaded development system (e.g. values of
|
||||||
For development systems that support multiple cores, a good rule of thumb is to set
|
<filename>8</filename> and <filename>j 6</filename>, respectively are optimal
|
||||||
both the <filename>BB_NUMBER_THREADS</filename> and <filename>PARALLEL_MAKE</filename>
|
for a development machine that has four available cores).</para></listitem>
|
||||||
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
|
<listitem><para>Update the <filename>bblayers.conf</filename> file so that it includes
|
||||||
the path to your new BSP layer.
|
the path to your new BSP layer.
|
||||||
In this example you need to include the pathname to <filename>meta-mymachine</filename>.
|
In this example you need to include the pathname to <filename>meta-mymachine</filename>.
|
||||||
@@ -579,7 +574,7 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The appendix
|
The appendix
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#ref-variables-glos'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html#ref-variables-glos'>
|
||||||
Reference: Variables Glossary</ulink> in the Yocto Project Reference Manual has more information
|
Reference: Variables Glossary</ulink> in the Yocto Project Reference Manual has more information
|
||||||
on configuration variables.
|
on configuration variables.
|
||||||
</para>
|
</para>
|
||||||
@@ -612,16 +607,16 @@
|
|||||||
Finally, once you have an image, you can try booting it from a device
|
Finally, once you have an image, you can try booting it from a device
|
||||||
(e.g. a USB device).
|
(e.g. a USB device).
|
||||||
To prepare a bootable USB device, insert a USB flash drive into your build system and
|
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
|
copy the <filename>.hddimage</filename>, located in the
|
||||||
<filename>poky/build/tmp/deploy/images</filename>
|
<filename>poky/build/tmp/deploy/images</filename>
|
||||||
directory after a successful build to the flash drive.
|
directory after a successful build to the flash drive.
|
||||||
Assuming the USB flash drive takes device <filename>/dev/sdf</filename>,
|
Assuming the USB flash drive takes device <filename>/dev/sdc</filename>,
|
||||||
use <filename>dd</filename> to copy the live image to it.
|
use <filename>dd</filename> to copy the live image to it.
|
||||||
For example:
|
For example:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
# dd if=core-image-sato-mymachine-20111101223904.hddimg of=/dev/sdf
|
# dd if=core-image-sato-mymachine-20120111232235.hddimg of=/dev/sdc
|
||||||
# sync
|
# sync
|
||||||
# eject /dev/sdf
|
# eject /dev/sdc
|
||||||
</literallayout>
|
</literallayout>
|
||||||
You should now have a bootable USB flash device.
|
You should now have a bootable USB flash device.
|
||||||
</para>
|
</para>
|
||||||
@@ -630,22 +625,6 @@
|
|||||||
Insert the device
|
Insert the device
|
||||||
into a bootable USB socket on the target, and power it on.
|
into a bootable USB socket on the target, and power it on.
|
||||||
The system should boot to the Sato graphical desktop.
|
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>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -654,7 +633,7 @@
|
|||||||
If your sato image is much different from this,
|
If your sato image is much different from this,
|
||||||
you probably made a mistake in one of the above steps:
|
you probably made a mistake in one of the above steps:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
358715392 2011-11-01 19:11 core-image-sato-mymachine-20111101223904.hddimg
|
358709248 2012-01-11 20:43 core-image-sato-mymachine-20120111232235.hddimg
|
||||||
</literallayout>
|
</literallayout>
|
||||||
<note>The previous instructions are also present in the README that was copied
|
<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
|
from meta-crownbay, which should also be updated to reflect the specifics of your
|
||||||
@@ -664,6 +643,24 @@
|
|||||||
also provides some suggestions for things to try if booting fails and produces
|
also provides some suggestions for things to try if booting fails and produces
|
||||||
strange error messages.</note>
|
strange error messages.</note>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<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 should
|
||||||
|
probably give you a buildable and bootable image.
|
||||||
|
Getting things working like you want
|
||||||
|
them to for your hardware will normally require some amount of experimentation with
|
||||||
|
configuration settings.
|
||||||
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</appendix>
|
</appendix>
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
using the Yocto Project.
|
using the Yocto Project.
|
||||||
Because much of the information in this manual is general, it contains many references to other
|
Because much of the information in this manual is general, it contains many references to other
|
||||||
sources where you can find more detail.
|
sources where you can find more detail.
|
||||||
For example, detailed information on Git, repositories and open source in general
|
For example, detailed information on Git, repositories and open-source in general
|
||||||
can be found in many places.
|
can be found in many places.
|
||||||
Another example is how to get set up to use the Yocto Project, which our Yocto Project Quick Start covers.
|
Another example is how to get set up to use the Yocto Project, which our Yocto Project Quick Start covers.
|
||||||
</para>
|
</para>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>Information that lets you get set
|
<listitem><para>Information that lets you get set
|
||||||
up to develop using the Yocto Project.</para></listitem>
|
up to develop using the Yocto Project.</para></listitem>
|
||||||
<listitem><para>Information to help developers who are new to the open source environment
|
<listitem><para>Information to help developers that are new to the open source environment
|
||||||
and to the distributed revision control system Git, which the Yocto Project
|
and to the distributed revision control system Git, which the Yocto Project
|
||||||
uses.</para></listitem>
|
uses.</para></listitem>
|
||||||
<listitem><para>An understanding of common end-to-end development models.</para></listitem>
|
<listitem><para>An understanding of common end-to-end development models.</para></listitem>
|
||||||
@@ -63,13 +63,13 @@
|
|||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>Step-by-step instructions if those instructions exist in other Yocto
|
<listitem><para>Step-by-step instructions if those instructions exist in other Yocto
|
||||||
Project documentation.
|
Project documentation.
|
||||||
For example, the Application Development Toolkit (ADT) User’s Guide contains detailed
|
For example, The Application Development Toolkit (ADT) User’s Guide contains detailed
|
||||||
instruction on how to obtain and configure the
|
instruction on how to obtain and configure the
|
||||||
<trademark class='trade'>Eclipse</trademark> Yocto Plug-in.</para></listitem>
|
<trademark class='trade'>Eclipse</trademark> Yocto Plug-in.</para></listitem>
|
||||||
<listitem><para>Reference material.
|
<listitem><para>Reference material.
|
||||||
This type of material resides in an appropriate reference manual.
|
This type of material resides in an appropriate reference manual.
|
||||||
For example, system variables are documented in the
|
For example, system variables are documented in the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||||
Yocto Project Reference Manual</ulink>.</para></listitem>
|
Yocto Project Reference Manual</ulink>.</para></listitem>
|
||||||
<listitem><para>Detailed public information that is not specific to the Yocto Project.
|
<listitem><para>Detailed public information that is not specific to the Yocto Project.
|
||||||
For example, exhaustive information on how to use Git is covered better through the
|
For example, exhaustive information on how to use Git is covered better through the
|
||||||
@@ -90,27 +90,27 @@
|
|||||||
</emphasis> The home page for the Yocto Project provides lots of information on the project
|
</emphasis> The home page for the Yocto Project provides lots of information on the project
|
||||||
as well as links to software and documentation.</para></listitem>
|
as well as links to software and documentation.</para></listitem>
|
||||||
<listitem><para><emphasis>
|
<listitem><para><emphasis>
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||||
The Yocto Project Quick Start</ulink>:</emphasis> This short document lets you get started
|
The Yocto Project Quick Start</ulink>:</emphasis> This short document lets you get started
|
||||||
with the Yocto Project quickly and start building an image.</para></listitem>
|
with the Yocto Project quickly and start building an image.</para></listitem>
|
||||||
<listitem><para><emphasis>
|
<listitem><para><emphasis>
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||||
The Yocto Project Reference Manual</ulink>:</emphasis> This manual is a reference
|
The Yocto Project Reference Manual</ulink>:</emphasis> This manual is a reference
|
||||||
guide to the Yocto Project build component known as "Poky."
|
guide to the Yocto Project build component known as "Poky."
|
||||||
The manual also contains a reference chapter on Board Support Package (BSP)
|
The manual also contains a reference chapter on Board Support Package (BSP)
|
||||||
layout.</para></listitem>
|
layout.</para></listitem>
|
||||||
<listitem><para><emphasis>
|
<listitem><para><emphasis>
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/adt-manual/adt-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/adt-manual/adt-manual.html'>
|
||||||
The Yocto Project Application Development Toolkit (ADT) User's Guide</ulink>:</emphasis>
|
The Yocto Project Application Development Toolkit (ADT) User's Guide</ulink>:</emphasis>
|
||||||
This guide provides information that lets you get going with the ADT to
|
This guide provides information that lets you get going with the ADT to
|
||||||
develop projects using the Yocto Project.</para></listitem>
|
develop projects using the Yocto Project.</para></listitem>
|
||||||
<listitem><para><emphasis>
|
<listitem><para><emphasis>
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/bsp-guide/bsp-guide.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/bsp-guide/bsp-guide.html'>
|
||||||
The Yocto Project Board Support Package (BSP) Developer's Guide</ulink>:</emphasis>
|
The Yocto Project Board Support Package (BSP) Developer's Guide</ulink>:</emphasis>
|
||||||
This guide defines the structure for BSP components.
|
This guide defines the structure for BSP components.
|
||||||
Having a commonly understood structure encourages standardization.</para></listitem>
|
Having a commonly understood structure encourages standardization.</para></listitem>
|
||||||
<listitem><para><emphasis>
|
<listitem><para><emphasis>
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/kernel-manual/kernel-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/kernel-manual/kernel-manual.html'>
|
||||||
The Yocto Project Kernel Architecture and Use Manual</ulink>:</emphasis>
|
The Yocto Project Kernel Architecture and Use Manual</ulink>:</emphasis>
|
||||||
This manual describes the architecture of the Yocto Project kernel and provides
|
This manual describes the architecture of the Yocto Project kernel and provides
|
||||||
some work flow examples.</para></listitem>
|
some work flow examples.</para></listitem>
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
<ulink url='http://wiki.yoctoproject.org/wiki/FAQ'>FAQ</ulink>:</emphasis>
|
<ulink url='http://wiki.yoctoproject.org/wiki/FAQ'>FAQ</ulink>:</emphasis>
|
||||||
A list of commonly asked questions and their answers.</para></listitem>
|
A list of commonly asked questions and their answers.</para></listitem>
|
||||||
<listitem><para><emphasis>
|
<listitem><para><emphasis>
|
||||||
<ulink url='http://www.yoctoproject.org/download/yocto/yocto-project-1.1-release-notes-poky-6.0'>
|
<ulink url='http://www.yoctoproject.org/download/yocto/yocto-project-1.0-release-notes-poky-5.0'>
|
||||||
Release Notes</ulink>:</emphasis> Features, updates and known issues for the current
|
Release Notes</ulink>:</emphasis> Features, updates and known issues for the current
|
||||||
release of the Yocto Project.</para></listitem>
|
release of the Yocto Project.</para></listitem>
|
||||||
<listitem><para><emphasis>
|
<listitem><para><emphasis>
|
||||||
@@ -153,7 +153,7 @@
|
|||||||
OpenedHand has since been acquired by Intel Corporation.</para></listitem>
|
OpenedHand has since been acquired by Intel Corporation.</para></listitem>
|
||||||
<listitem><para><emphasis>
|
<listitem><para><emphasis>
|
||||||
<ulink url='http://www.intel.com/'>Intel Corporation</ulink>:</emphasis>
|
<ulink url='http://www.intel.com/'>Intel Corporation</ulink>:</emphasis>
|
||||||
The company that acquired OpenedHand in 2008 and continues development on the
|
The company who acquired OpenedHand in 2008 and continues development on the
|
||||||
Yocto Project.</para></listitem>
|
Yocto Project.</para></listitem>
|
||||||
<listitem><para><emphasis>
|
<listitem><para><emphasis>
|
||||||
<ulink url='http://www.openembedded.org/'>OpenEmbedded</ulink>:</emphasis>
|
<ulink url='http://www.openembedded.org/'>OpenEmbedded</ulink>:</emphasis>
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
from and to which it contributes.</para></listitem>
|
from and to which it contributes.</para></listitem>
|
||||||
<listitem><para><emphasis>
|
<listitem><para><emphasis>
|
||||||
<ulink url='http://developer.berlios.de/projects/bitbake/'>
|
<ulink url='http://developer.berlios.de/projects/bitbake/'>
|
||||||
BitBake</ulink>:</emphasis> The tool used to process Yocto Project metadata.</para></listitem>
|
Bitbake</ulink>:</emphasis> The tool used to process Yocto Project metadata.</para></listitem>
|
||||||
<listitem><para><emphasis>
|
<listitem><para><emphasis>
|
||||||
<ulink url='http://bitbake.berlios.de/manual/'>
|
<ulink url='http://bitbake.berlios.de/manual/'>
|
||||||
BitBake User Manual</ulink>:</emphasis> A comprehensive guide to the BitBake tool.
|
BitBake User Manual</ulink>:</emphasis> A comprehensive guide to the BitBake tool.
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<imagedata fileref="figures/kernel-example-repos.png" width="7in" depth="5in"
|
<imagedata fileref="figures/kernel-example-repos-edison.png" width="7in" depth="5in"
|
||||||
align="center" scale="100" />
|
align="center" scale="100" />
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -75,9 +75,10 @@
|
|||||||
<listitem><para><emphasis>Local Yocto Project Files Git Repository:</emphasis>
|
<listitem><para><emphasis>Local Yocto Project Files Git Repository:</emphasis>
|
||||||
This area contains all the metadata that supports building images in the
|
This area contains all the metadata that supports building images in the
|
||||||
Yocto Project build environment - the local Yocto Project files.
|
Yocto Project build environment - the local Yocto Project files.
|
||||||
The local Yocto Project files Git repository also contains the build directory
|
In this example, the local Yocto Project files Git repository also
|
||||||
and a configuration directory that let you control the build.
|
contains the build directory, which contains the configuration directory
|
||||||
Note also that in this example, the repository also contains the
|
that lets you control the build.
|
||||||
|
In this example, the repository also contains the
|
||||||
<filename>poky-extras</filename> Git repository.</para>
|
<filename>poky-extras</filename> Git repository.</para>
|
||||||
<para>See the bulleted item
|
<para>See the bulleted item
|
||||||
"<link linkend='local-yp-release'>Yocto Project Release</link>"
|
"<link linkend='local-yp-release'>Yocto Project Release</link>"
|
||||||
@@ -148,7 +149,7 @@
|
|||||||
$ git branch -a
|
$ git branch -a
|
||||||
$ git tag -l
|
$ git tag -l
|
||||||
</literallayout>
|
</literallayout>
|
||||||
This example uses the Yocto Project 1.1 Release code named "edison",
|
This example uses the Yocto Project 1.1.1 Release code named "edison",
|
||||||
which maps to the <filename>edison</filename> branch in the repository.
|
which maps to the <filename>edison</filename> branch in the repository.
|
||||||
The following commands create and checkout the local <filename>edison</filename>
|
The following commands create and checkout the local <filename>edison</filename>
|
||||||
branch:
|
branch:
|
||||||
@@ -171,13 +172,34 @@
|
|||||||
<filename>poky-extras</filename> Git Repository</link>"
|
<filename>poky-extras</filename> Git Repository</link>"
|
||||||
for information on how to get the <filename>poky-extras</filename> repository.
|
for information on how to get the <filename>poky-extras</filename> repository.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Once you have 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 Git repository using either of the following two commands:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ cd poky
|
||||||
|
$ git branch -a
|
||||||
|
$ git tag -l
|
||||||
|
</literallayout>
|
||||||
|
This example uses the Yocto Project 1.1.1 Release code named "edison",
|
||||||
|
which maps to the <filename>edison</filename> branch in the repository.
|
||||||
|
The following commands create and checkout the local <filename>edison</filename>
|
||||||
|
branch:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ git checkout -b edison origin/edison
|
||||||
|
Branch edison set up to track remote branch edison from origin.
|
||||||
|
Switched to a new branch 'edison'
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='setting-up-the-bare-clone-and-its-copy'>
|
<section id='setting-up-the-bare-clone-and-its-copy'>
|
||||||
<title>Setting Up the Bare Clone and its Copy</title>
|
<title>Setting Up the Bare Clone and its Copy</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This example modifies the <filename>linux-yocto-3.0</filename> kernel.
|
This example modifies the <filename>linux-yocto-3.0-1.1.x</filename> kernel.
|
||||||
Thus, you need to create a bare clone of that kernel and then make a copy of the
|
Thus, you need to create a bare clone of that kernel and then make a copy of the
|
||||||
bare clone.
|
bare clone.
|
||||||
See the bulleted item
|
See the bulleted item
|
||||||
@@ -189,13 +211,14 @@
|
|||||||
The bare clone exists for the kernel build tools and simply as the receiving end
|
The bare clone exists for the kernel build tools and simply as the receiving end
|
||||||
of <filename>git push</filename>
|
of <filename>git push</filename>
|
||||||
commands after you make edits and commits inside the copy of the clone.
|
commands after you make edits and commits inside the copy of the clone.
|
||||||
The copy (<filename>linux-yocto-3.0</filename> in this example) has to have
|
The copy (<filename>my-linux-yocto-3.0-1.1.x-work</filename> in this example) has to have
|
||||||
a local branch created and checked out for your work.
|
a local branch created and checked out for your work.
|
||||||
This example uses <filename>common-pc-base</filename> as the local branch.
|
This example uses <filename>common-pc-base</filename> as the local branch.
|
||||||
The following commands create and checkout the branch:
|
The following commands create and checkout the branch:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ cd ~/linux-yocto-3.0
|
$ cd ~/my-linux-yocto-3.0-1.1.x-work
|
||||||
$ git checkout -b common-pc-base origin/yocto/standard/common-pc/base
|
$ git checkout -b common-pc-base origin/yocto/standard/common-pc/base
|
||||||
|
Checking out files: 100% (7289/7289), done.
|
||||||
Branch common-pc-base set up to track remote branch
|
Branch common-pc-base set up to track remote branch
|
||||||
yocto/standard/common-pc/base from origin.
|
yocto/standard/common-pc/base from origin.
|
||||||
Switched to a new branch 'common-pc-base'
|
Switched to a new branch 'common-pc-base'
|
||||||
@@ -221,14 +244,12 @@
|
|||||||
If your host development system supports multi-core and multi-thread capabilities,
|
If your host development system supports multi-core and multi-thread capabilities,
|
||||||
you can uncomment these statements and set the variables to significantly shorten
|
you can uncomment these statements and set the variables to significantly shorten
|
||||||
the full build time.
|
the full build time.
|
||||||
As a guideline, set both <filename>BB_NUMBER_THREADS</filename> and
|
As a guideline, set <filename>BB_NUMBER_THREADS</filename> to twice the number
|
||||||
<filename>PARALLEL_MAKE</filename> to twice the number
|
of cores your machine supports and set <filename>PARALLEL_MAKE</filename> to one and
|
||||||
of cores your machine supports.
|
a half times the number of cores your machine supports.
|
||||||
</note>
|
</note>
|
||||||
</para>
|
The following two commands <filename>source</filename> the build environment setup script
|
||||||
<para>
|
and build the default <filename>qemux86</filename> image.
|
||||||
The following two commands build the default <filename>qemux86</filename> image and
|
|
||||||
<filename>source</filename> build environment setup script.
|
|
||||||
If necessary, the script creates the build directory:
|
If necessary, the script creates the build directory:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ cd ~/poky
|
$ cd ~/poky
|
||||||
@@ -291,7 +312,7 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The file you change in this example is named <filename>calibrate.c</filename>
|
The file you change in this example is named <filename>calibrate.c</filename>
|
||||||
and is located in the <filename>linux-yocto-3.0</filename> Git repository
|
and is located in the <filename>my-linux-yocto-3.0-1.1.x-work</filename> Git repository
|
||||||
(the copy of the bare clone) in <filename>init</filename>.
|
(the copy of the bare clone) in <filename>init</filename>.
|
||||||
This example simply inserts several <filename>printk</filename> statements
|
This example simply inserts several <filename>printk</filename> statements
|
||||||
at the beginning of the <filename>calibrate_delay</filename> function.
|
at the beginning of the <filename>calibrate_delay</filename> function.
|
||||||
@@ -390,8 +411,9 @@
|
|||||||
build time if your host supports multi-core and multi-thread capabilities:
|
build time if your host supports multi-core and multi-thread capabilities:
|
||||||
<filename>BB_NUMBER_THREADS</filename> and <filename>PARALLEL_MAKE</filename>.
|
<filename>BB_NUMBER_THREADS</filename> and <filename>PARALLEL_MAKE</filename>.
|
||||||
If the host system has multiple cores then you can optimize build time
|
If the host system has multiple cores then you can optimize build time
|
||||||
by setting both these variables to twice the number of
|
by setting <filename>BB_NUMBER_THREADS</filename> to twice the number of
|
||||||
cores.</para></listitem>
|
cores and setting <filename>PARALLEL_MAKE</filename> to one and a half times the
|
||||||
|
number of cores.</para></listitem>
|
||||||
<listitem><para><emphasis>Identify Your <filename>meta-kernel-dev</filename>
|
<listitem><para><emphasis>Identify Your <filename>meta-kernel-dev</filename>
|
||||||
Layer:</emphasis> The <filename>BBLAYERS</filename> variable in the
|
Layer:</emphasis> The <filename>BBLAYERS</filename> variable in the
|
||||||
<filename>bblayers.conf</filename> file found in the
|
<filename>bblayers.conf</filename> file found in the
|
||||||
@@ -415,13 +437,13 @@
|
|||||||
<filename>poky-extras/meta-kernel-dev/recipes-kernel/linux</filename>
|
<filename>poky-extras/meta-kernel-dev/recipes-kernel/linux</filename>
|
||||||
directory, you need to identify the location of the
|
directory, you need to identify the location of the
|
||||||
local source code, which in this example is the bare clone named
|
local source code, which in this example is the bare clone named
|
||||||
<filename>linux-yocto-3.0.git</filename>.
|
<filename>linux-yocto-3.0-1.1.x.git</filename>.
|
||||||
To do this, set the <filename>KSRC_linux_yocto</filename> variable to point to your
|
To do this, set the <filename>KSRC_linux_yocto</filename> variable to point to your
|
||||||
local <filename>linux-yocto-3.0.git</filename> Git repository by adding the
|
local <filename>linux-yocto-3.0-1.1.x.git</filename> Git repository by adding the
|
||||||
following statement.
|
following statement.
|
||||||
Be sure to substitute your user information in the statement:
|
Be sure to substitute your user information in the statement:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
KSRC_linux_yocto ?= /home/scottrif/linux-yocto-3.0.git
|
KSRC_linux_yocto ?= /home/scottrif/linux-yocto-3.0-1.1.x.git
|
||||||
</literallayout></para></listitem>
|
</literallayout></para></listitem>
|
||||||
<listitem><para><emphasis>Specify the Kernel Machine:</emphasis> Also in the
|
<listitem><para><emphasis>Specify the Kernel Machine:</emphasis> Also in the
|
||||||
<filename>linux-yocto_3.0.bbappend</filename> file, you need to specify
|
<filename>linux-yocto_3.0.bbappend</filename> file, you need to specify
|
||||||
@@ -438,7 +460,8 @@
|
|||||||
Because all the kernel <filename>.bbappend</filename> files are parsed during the
|
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
|
build process regardless of whether you are using them or not, you should either
|
||||||
comment out the <filename>COMPATIBLE_MACHINE</filename> statements in all
|
comment out the <filename>COMPATIBLE_MACHINE</filename> statements in all
|
||||||
<filename>.bbappend</filename> files, or you should simply remove all the files
|
unused <filename>.bbappend</filename> files.
|
||||||
|
Alternatively, you can simply remove all the files
|
||||||
except the one your are using for the build
|
except the one your are using for the build
|
||||||
(i.e. <filename>linux-yocto_3.0.bbappend</filename> in this example).
|
(i.e. <filename>linux-yocto_3.0.bbappend</filename> in this example).
|
||||||
</note>
|
</note>
|
||||||
@@ -509,50 +532,98 @@
|
|||||||
in "<link linkend='modifying-the-kernel-source-code'>Modifying the Kernel Source
|
in "<link linkend='modifying-the-kernel-source-code'>Modifying the Kernel Source
|
||||||
Code</link>" you should already have the Yocto Project files set up on your
|
Code</link>" you should already have the Yocto Project files set up on your
|
||||||
host machine.
|
host machine.
|
||||||
|
If this is the case, go to then next section 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>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you don't have the Yocto Project files established on your system,
|
If you don't have the Yocto Project files established on your system,
|
||||||
See "<link linkend='setting-up-the-local-yocto-project-files-git-repository'>Setting
|
you can get them through tarball extraction or by
|
||||||
Up the Local Yocto Project Files Git Repository</link>" for
|
cloning the <filename>poky</filename> Git repository.
|
||||||
information.
|
This example uses <filename>poky</filename> as the root directory of the
|
||||||
To reconfigure the kernel, this is the only Git repository you need to have set up.
|
local Yocto Project files Git repository.
|
||||||
|
See the bulleted item
|
||||||
|
"<link linkend='local-yp-release'>Yocto Project Release</link>"
|
||||||
|
for information on how to get these files.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<!--
|
<para>
|
||||||
|
Once you have 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 Git repository using either of the following two commands:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ cd poky
|
||||||
|
$ git branch -a
|
||||||
|
$ git tag -l
|
||||||
|
</literallayout>
|
||||||
|
This example uses the Yocto Project 1.1.1 Release code named "edison",
|
||||||
|
which maps to the <filename>edison</filename> branch in the repository.
|
||||||
|
The following commands create and checkout the local <filename>edison</filename>
|
||||||
|
branch:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ git checkout -b edison origin/edison
|
||||||
|
Branch edison set up to track remote branch edison from origin.
|
||||||
|
Switched to a new branch 'edison'
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you took the time to work through the example that modifies the kernel source code
|
Next, you need to build the default <filename>qemux86</filename> image that you
|
||||||
in "<link linkend='modifying-the-kernel-source-code'>Modifying the Kernel Source
|
can boot using QEMU.
|
||||||
Code</link>" you are already set up to quickly work through this example.
|
<note>
|
||||||
If not, then work through the following list to prepare:
|
Because a full build can take hours, you should check two variables in the
|
||||||
<itemizedlist>
|
<filename>build</filename> directory that is created after you source the
|
||||||
<listitem><para><emphasis>Understand the development environment:</emphasis>
|
<filename>oe-init-build-env</filename> script.
|
||||||
See "<link linkend='understanding-the-files-you-need'>Understanding
|
You can find these variables
|
||||||
the Files You Need</link>" for information.</para></listitem>
|
<filename>BB_NUMBER_THREADS</filename> and <filename>PARALLEL_MAKE</filename>
|
||||||
<listitem><para><emphasis>Set up the local Yocto Project files Git
|
in the <filename>build/conf</filename> directory in the
|
||||||
repository:</emphasis>
|
<filename>local.conf</filename> configuration file.
|
||||||
See "<link linkend='setting-up-the-local-yocto-project-files-git-repository'>Setting
|
By default, these variables are commented out.
|
||||||
Up the Local Yocto Project Files Git Repository</link>" for
|
If your host development system supports multi-core and multi-thread capabilities,
|
||||||
information.</para></listitem>
|
you can uncomment these statements and set the variables to significantly shorten
|
||||||
<listitem><para><emphasis>Set up the <filename>poky-extras</filename> Git
|
the full build time.
|
||||||
repository:</emphasis>
|
As a guideline, set <filename>BB_NUMBER_THREADS</filename> to twice the number
|
||||||
See "<link linkend='setting-up-the-poky-extras-git-repository'>Setting
|
of cores your machine supports and set <filename>PARALLEL_MAKE</filename> to one and
|
||||||
Up <filename>poky-extras</filename> Git repository</link>" for
|
a half times the number of cores your machine supports.
|
||||||
information.</para></listitem>
|
</note>
|
||||||
<listitem><para><emphasis>Set up the the bare clone and its copy:</emphasis>
|
The following two commands <filename>source</filename> the build environment setup script
|
||||||
See "<link linkend='setting-up-the-bare-clone-and-its-copy'>Setting Up the
|
and build the default <filename>qemux86</filename> image.
|
||||||
Bare Clone and its Copy</link>" for information.</para></listitem>
|
If necessary, the script creates the build directory:
|
||||||
<listitem><para><emphasis>Build the default QEMU kernel image:</emphasis>
|
<literallayout class='monospaced'>
|
||||||
See "<link linkend='building-and-booting-the-default-qemu-kernel-image'>Building
|
$ cd ~/poky
|
||||||
and Booting the Default QEMU Kernel image</link>" for information.
|
$ source oe-init-build-env
|
||||||
Do not boot the image in the QEMU emulator at this point.</para></listitem>
|
|
||||||
</itemizedlist>
|
### Shell environment set up for builds. ###
|
||||||
</para> -->
|
|
||||||
|
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>
|
||||||
|
|
||||||
<section id='examining-the-default-config-smp-behavior'>
|
<section id='examining-the-default-config-smp-behavior'>
|
||||||
<title>Examining the Default <filename>CONFIG_SMP</filename> Behavior</title>
|
<title>Examining the Default <filename>CONFIG_SMP</filename> Behavior</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
By default, <filename>CONFIG_SMP</filename> supports single processor machines.
|
By default, <filename>CONFIG_SMP</filename> supports single processor machines.
|
||||||
@@ -579,7 +650,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='changing-the-config-smp-configuration-using-menuconfig'>
|
<section id='changing-the-config-smp-configuration-using-menuconfig'>
|
||||||
<title>Changing the <filename>CONFIG_SMP</filename> Configuration Using <filename>menuconfig</filename></title>
|
<title>Changing the <filename>CONFIG_SMP</filename> Configuration Using <filename>menuconfig</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The <filename>menuconfig</filename> tool provides an interactive method with which
|
The <filename>menuconfig</filename> tool provides an interactive method with which
|
||||||
@@ -597,7 +668,7 @@
|
|||||||
<para>
|
<para>
|
||||||
After setting up the environment to run <filename>menuconfig</filename>, you are ready
|
After setting up the environment to run <filename>menuconfig</filename>, you are ready
|
||||||
to use the tool to interactively change the kernel configuration.
|
to use the tool to interactively change the kernel configuration.
|
||||||
In this example, we are basing our changes on the <filename>linux-yocto-3.0</filename>
|
In this example, we are basing our changes on the <filename>linux-yocto-3.0-1.1.x</filename>
|
||||||
kernel.
|
kernel.
|
||||||
The Yocto Project build environment recognizes this kernel as
|
The Yocto Project build environment recognizes this kernel as
|
||||||
<filename>linux-yocto</filename>.
|
<filename>linux-yocto</filename>.
|
||||||
@@ -630,8 +701,8 @@
|
|||||||
in the actually filename are omitted in order to make it more
|
in the actually filename are omitted in order to make it more
|
||||||
readable:
|
readable:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
~/poky/build/tmp/work/qemux86-poky-linux/linux-yocto-2.6.37+git1+84f...
|
~/poky/build/tmp/work/qemux86-poky-linux/linux-yocto-3.0.10+git1+d38...
|
||||||
...r20/linux-qemux86-standard-build
|
...3a9ac596f7a-r3/linux-qemux86-standard-build
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
For a user-space application development example that uses the
|
For a user-space application development example that uses the
|
||||||
<trademark class='trade'>Eclipse</trademark> IDE,
|
<trademark class='trade'>Eclipse</trademark> IDE,
|
||||||
see the
|
see the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/adt-manual/adt-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/adt-manual/adt-manual.html'>
|
||||||
The Yocto Project Application Development Toolkit (ADT) User's Guide</ulink>.
|
The Yocto Project Application Development Toolkit (ADT) User's Guide</ulink>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -35,8 +35,8 @@
|
|||||||
System development involves modification or creation of an image that you want to run on
|
System development involves modification or creation of an image that you want to run on
|
||||||
a specific hardware target.
|
a specific hardware target.
|
||||||
Usually, when you want to create an image that runs on embedded hardware, the image does
|
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.
|
not require the same amount 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 just use the hardware
|
||||||
features for your particular hardware.
|
features for your particular hardware.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
A BSP is a package of 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.
|
an image 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>
|
</para>
|
||||||
|
|
||||||
@@ -61,8 +61,8 @@
|
|||||||
</note>
|
</note>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The remainder of this section presents the basic steps used to create a BSP
|
The remainder of this section presents the basic steps to create a BSP basing it on an
|
||||||
based on an existing BSP that ships with the Yocto Project.
|
existing BSP that ships with the Yocto Project.
|
||||||
You can reference the "<link linkend='dev-manual-bsp-appendix'>BSP Development Example</link>"
|
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.
|
appendix for a detailed example that uses the Crown Bay BSP as a base BSP from which to start.
|
||||||
</para>
|
</para>
|
||||||
@@ -79,18 +79,18 @@
|
|||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para><emphasis>Set up your host development system to support
|
<listitem><para><emphasis>Set up your host development system to support
|
||||||
development using the Yocto Project</emphasis>: See the
|
development using the Yocto Project</emphasis>: See the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#the-linux-distro'>The Linux Distributions</ulink>" and the
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#the-linux-distro'>The Linux Distributions</ulink>" and the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#packages'>The Packages</ulink>" sections both
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#packages'>The Packages</ulink>" sections both
|
||||||
in the Yocto Project Quick Start for requirements.</para></listitem>
|
in the Yocto Project Quick Start for requirements.</para></listitem>
|
||||||
<listitem><para><emphasis>Establish a local copy of the Yocto Project files on your
|
<listitem><para><emphasis>Establish a local copy of the Yocto Project files on your
|
||||||
system</emphasis>: You need to have the Yocto Project files available on your host system.
|
system</emphasis>: You need to have the Yocto Project files available on your host system.
|
||||||
Having the Yocto Project files on your system gives you access to the build
|
Having the Yocto Project files on your system gives you access to the build
|
||||||
process and to the tools you need.
|
process and tools you need.
|
||||||
For information on how to get these files, see the
|
For information on how to get these files, see the
|
||||||
"<link linkend='getting-setup'>Getting Setup</link>" section.</para></listitem>
|
"<link linkend='getting-setup'>Getting Setup</link>" section.</para></listitem>
|
||||||
<listitem><para><emphasis>Establish a local copy of the base BSP files</emphasis>: Having
|
<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
|
the BSP files on your system gives you access to the build
|
||||||
process and to the tools you need for creating a BSP.
|
process and tools you need for creating a BSP.
|
||||||
For information on how to get these files, see the
|
For information on how to get these files, see the
|
||||||
"<link linkend='getting-setup'>Getting Setup</link>" section.</para></listitem>
|
"<link linkend='getting-setup'>Getting Setup</link>" section.</para></listitem>
|
||||||
<listitem><para><emphasis>Choose a Yocto Project-supported BSP as your base BSP</emphasis>:
|
<listitem><para><emphasis>Choose a Yocto Project-supported BSP as your base BSP</emphasis>:
|
||||||
@@ -137,7 +137,7 @@
|
|||||||
N450, and Sugar Bay are isolated.</note>
|
N450, and Sugar Bay are isolated.</note>
|
||||||
<para>When you set up a layer for a new BSP, you should follow a standard layout.
|
<para>When you set up a layer for a new BSP, you should follow a standard layout.
|
||||||
This layout is described in the section
|
This layout is described in the section
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/bsp-guide/bsp-guide.html#bsp-filelayout'>Example Filesystem Layout</ulink>" section of the Board Support Package (BSP) Development Guide.
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/bsp-guide/bsp-guide.html#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
|
In the standard layout, you will notice a suggested structure for recipes and
|
||||||
configuration information.
|
configuration information.
|
||||||
You can see the standard layout for the Crown Bay BSP in this example by examining the
|
You can see the standard layout for the Crown Bay BSP in this example by examining the
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
You need to get the build environment ready by sourcing an environment setup script
|
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.</para>
|
||||||
<para>The entire process for building an image is overviewed in the section
|
<para>The entire process for building an image is overviewed in the section
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#building-image'>Building an Image</ulink>" section of the Yocto Project Quick Start.
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#building-image'>Building an Image</ulink>" section of the Yocto Project Quick Start.
|
||||||
You might want to reference this information.</para></listitem>
|
You might want to reference this information.</para></listitem>
|
||||||
<listitem><para><emphasis>Build the image</emphasis>: The Yocto Project uses the BitBake
|
<listitem><para><emphasis>Build the image</emphasis>: The Yocto Project uses the BitBake
|
||||||
tool to build images based on the type of image you want to create.
|
tool to build images based on the type of image you want to create.
|
||||||
@@ -168,9 +168,9 @@
|
|||||||
<ulink url='http://bitbake.berlios.de/manual/'>here</ulink>.</para>
|
<ulink url='http://bitbake.berlios.de/manual/'>here</ulink>.</para>
|
||||||
<para>The build process supports several types of images to satisfy different needs.
|
<para>The build process supports several types of images to satisfy different needs.
|
||||||
See the
|
See the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#ref-images'>Reference: Images</ulink>" appendix in the
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html#ref-images'>Reference: Images</ulink>"
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html'>
|
appendix in The Yocto Project Reference Manual for information on
|
||||||
Yocto Project Reference Manual</ulink>for information on supported images.</para></listitem>
|
supported images.</para></listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -178,7 +178,7 @@
|
|||||||
You can view a video presentation on "Building Custom Embedded Images with Yocto"
|
You can view a video presentation on "Building Custom Embedded Images with Yocto"
|
||||||
at <ulink url='http://free-electrons.com/blog/elc-2011-videos'>Free Electrons</ulink>.
|
at <ulink url='http://free-electrons.com/blog/elc-2011-videos'>Free Electrons</ulink>.
|
||||||
You can also find supplemental information in
|
You can also find supplemental information in
|
||||||
<ulink url='http://yoctoproject.org/docs/latest/bsp-guide/bsp-guide.html'>
|
<ulink url='http://yoctoproject.org/docs/1.1.1/bsp-guide/bsp-guide.html'>
|
||||||
The Board Support Package (BSP) Development Guide</ulink>.
|
The Board Support Package (BSP) Development Guide</ulink>.
|
||||||
Finally, there is wiki page write up of the example also located
|
Finally, there is wiki page write up of the example also located
|
||||||
<ulink url='https://wiki.yoctoproject.org/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another'>
|
<ulink url='https://wiki.yoctoproject.org/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another'>
|
||||||
@@ -191,7 +191,7 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Kernel modification involves changing the Linux Yocto kernel, which could involve changing
|
Kernel modification involves changing the Linux Yocto kernel, which could involve changing
|
||||||
configuration options as well as adding new kernel recipes.
|
configuration variables as well as adding new kernel recipes.
|
||||||
Configuration changes can be added in the form of configuration fragments, while recipe
|
Configuration changes can be added in the form of configuration fragments, while recipe
|
||||||
modification comes through the kernel's <filename>recipes-kernel</filename> area
|
modification comes through the kernel's <filename>recipes-kernel</filename> area
|
||||||
in a kernel layer you create.
|
in a kernel layer you create.
|
||||||
@@ -201,7 +201,7 @@
|
|||||||
The remainder of this section presents a high-level overview of the Linux Yocto
|
The remainder of this section presents a high-level overview of the Linux Yocto
|
||||||
kernel architecture and the steps to modify the Linux Yocto kernel.
|
kernel architecture and the steps to modify the Linux Yocto kernel.
|
||||||
For a complete discussion of the kernel, see
|
For a complete discussion of the kernel, see
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/kernel-manual/kernel-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/kernel-manual/kernel-manual.html'>
|
||||||
The Yocto Project Kernel Architecture and Use Manual</ulink>.
|
The Yocto Project Kernel Architecture and Use Manual</ulink>.
|
||||||
You can reference the appendix
|
You can reference the appendix
|
||||||
"<link linkend='dev-manual-kernel-appendix'>Kernel Modification Example</link>"
|
"<link linkend='dev-manual-kernel-appendix'>Kernel Modification Example</link>"
|
||||||
@@ -212,9 +212,9 @@
|
|||||||
<title>Kernel Overview</title>
|
<title>Kernel Overview</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Traditionally, when one thinks of a patched kernel, they think of a base kernel
|
When one thinks of the source files for a kernel they usually think of a fixed structure
|
||||||
source tree and a fixed structure that contains kernel patches.
|
of files that contain kernel patches.
|
||||||
The Yocto Project, however, employs mechanisms, that in a sense, result in a kernel source
|
The Yocto Project, however, employs mechanisims, that in a sense, result in a kernel source
|
||||||
generator.
|
generator.
|
||||||
By the end of this section, this analogy will become clearer.
|
By the end of this section, this analogy will become clearer.
|
||||||
</para>
|
</para>
|
||||||
@@ -231,16 +231,20 @@
|
|||||||
stable Linux Yocto kernel that is based on the Linux 2.6.34 release.</para></listitem>
|
stable Linux Yocto kernel that is based on the Linux 2.6.34 release.</para></listitem>
|
||||||
<listitem><para><emphasis><filename>linux-yocto-2.6.37</filename></emphasis> - The
|
<listitem><para><emphasis><filename>linux-yocto-2.6.37</filename></emphasis> - The
|
||||||
stable Linux Yocto kernel that is based on the Linux 2.6.37 release.</para></listitem>
|
stable Linux Yocto kernel that is based on the Linux 2.6.37 release.</para></listitem>
|
||||||
<listitem><para><emphasis><filename>linux-yocto-3.0</filename></emphasis> - The current
|
<listitem><para><emphasis><filename>linux-yocto-3.0</filename></emphasis> - The
|
||||||
Linux Yocto kernel that is based on the Linux 3.0 release.</para></listitem>
|
stable Linux Yocto kernel to use with the Yocto Project current (master) development.
|
||||||
|
This kernel is based on the Linux 3.0 release.</para></listitem>
|
||||||
|
<listitem><para><emphasis><filename>linux-yocto-3.0-1.1.x</filename></emphasis> - The
|
||||||
|
stable Linux Yocto kernel to use with the Yocto Project Release 1.1.x.
|
||||||
|
This kernel is based on the Linux 3.0 release.</para></listitem>
|
||||||
<listitem><para><emphasis><filename>linux-yocto-dev</filename></emphasis> - A development
|
<listitem><para><emphasis><filename>linux-yocto-dev</filename></emphasis> - A development
|
||||||
kernel based on the latest upstream release candidate available.</para></listitem>
|
kernel based on the latest upstream release candidate available.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The kernels are maintained using the Git revision control system
|
The kernels are maintained using the Git application that, in a sense, structures
|
||||||
that structures them using the familiar "tree", "branch", and "leaf" scheme.
|
them in a "tree" complete with branches and leaves.
|
||||||
Branches represent diversions from general code to more specific code, while leaves
|
Branches represent diversions from general code to more specific code, while leaves
|
||||||
represent the end-points for a complete and unique kernel whose source files
|
represent the end-points for a complete and unique kernel whose source files
|
||||||
when gathered from the root of the tree to the leaf accumulate to create the files
|
when gathered from the root of the tree to the leaf accumulate to create the files
|
||||||
@@ -253,7 +257,7 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Within the figure, the "Kernel.org Branch Point" represents the point in the tree
|
Within the figure, the "Kernel.org Branch Point" represents the point in the tree
|
||||||
where a supported base kernel is modified from the Linux kernel.
|
where a supported base kernel diverges from the Linux kernel.
|
||||||
For example, this could be the branch point for the <filename>linux-yocto-3.0</filename>
|
For example, this could be the branch point for the <filename>linux-yocto-3.0</filename>
|
||||||
kernel.
|
kernel.
|
||||||
Thus, everything further to the right in the structure is based on the
|
Thus, everything further to the right in the structure is based on the
|
||||||
@@ -267,7 +271,7 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The overall result is a Git-maintained repository from which all the supported
|
The overall result is a Git-maintained repository from which all the supported
|
||||||
Yocto Project kernel types can be derived for all the supported Yocto Project devices.
|
Yocto Project kernels can be derived for all the supported Yocto Project devices.
|
||||||
A big advantage to this scheme is the sharing of common features by keeping them in
|
A big advantage to this scheme is the sharing of common features by keeping them in
|
||||||
"larger" branches within the tree.
|
"larger" branches within the tree.
|
||||||
This practice eliminates redundant storage of similar features shared among kernels.
|
This practice eliminates redundant storage of similar features shared among kernels.
|
||||||
@@ -311,7 +315,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<imagedata fileref="figures/kernel-overview-3.png"
|
<imagedata fileref="figures/kernel-overview-3-edison.png"
|
||||||
width="6in" depth="4in" align="center" scale="100" />
|
width="6in" depth="4in" align="center" scale="100" />
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -349,7 +353,7 @@
|
|||||||
<para>
|
<para>
|
||||||
Again, for a complete discussion of the Yocto Project kernel's architcture and its
|
Again, for a complete discussion of the Yocto Project kernel's architcture and its
|
||||||
branching strategy,
|
branching strategy,
|
||||||
see the <ulink url='http://www.yoctoproject.org/docs/latest/kernel-manual/kernel-manual.html'>
|
see the <ulink url='http://www.yoctoproject.org/docs/1.1.1/kernel-manual/kernel-manual.html'>
|
||||||
The Yocto Project Kernel Architecture and Use Manual</ulink>.
|
The Yocto Project Kernel Architecture and Use Manual</ulink>.
|
||||||
Also, you can reference
|
Also, you can reference
|
||||||
<xref linkend='modifying-the-kernel-source-code'>Modifying the Kernel Source Code</xref>
|
<xref linkend='modifying-the-kernel-source-code'>Modifying the Kernel Source Code</xref>
|
||||||
@@ -373,8 +377,8 @@
|
|||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para><emphasis>Set up your host development system to support
|
<listitem><para><emphasis>Set up your host development system to support
|
||||||
development using the Yocto Project</emphasis>: See
|
development using the Yocto Project</emphasis>: See
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#the-linux-distro'>The Linux Distributions</ulink>" and
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#the-linux-distro'>The Linux Distributions</ulink>" and
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#packages'>The Packages</ulink>" sections both
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#packages'>The Packages</ulink>" sections both
|
||||||
in the Yocto Project Quick Start for requirements.</para></listitem>
|
in the Yocto Project Quick Start for requirements.</para></listitem>
|
||||||
<listitem><para><emphasis>Establish a local copy of the Yocto Project files on your
|
<listitem><para><emphasis>Establish a local copy of the Yocto Project files on your
|
||||||
system</emphasis>: Having the Yocto Project files on your system gives you access to
|
system</emphasis>: Having the Yocto Project files on your system gives you access to
|
||||||
@@ -390,10 +394,7 @@
|
|||||||
Project files Git repository.
|
Project files Git repository.
|
||||||
For information on how to get these files, see the bulleted item
|
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>"
|
"<link linkend='poky-extras-repo'>The <filename>poky-extras</filename> Git Repository</link>"
|
||||||
earlier in this manual.
|
earlier in this manual.</para></listitem>
|
||||||
<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 Linux Yocto kernel files on your
|
<listitem><para><emphasis>Establish a local copy of the Linux Yocto kernel files on your
|
||||||
system</emphasis>: In order to make modifications to the kernel you need two things:
|
system</emphasis>: In order to make modifications to the kernel you need two things:
|
||||||
a bare clone of the Linux Yocto kernel you are modifying and
|
a bare clone of the Linux Yocto kernel you are modifying and
|
||||||
@@ -415,7 +416,7 @@
|
|||||||
Once the changes are made, you need to use Git commands to commit the changes
|
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>
|
and then push them to the bare clone.</para></listitem>
|
||||||
<listitem><para><emphasis>Make kernel configuration changes
|
<listitem><para><emphasis>Make kernel configuration changes
|
||||||
if applicable</emphasis>:
|
to your local kernel layer if applicable</emphasis>:
|
||||||
If your situation calls for changing the kernel's configuration, you can
|
If your situation calls for changing the kernel's configuration, you can
|
||||||
use <filename>menuconfig</filename>
|
use <filename>menuconfig</filename>
|
||||||
to enable and disable kernel configurations.
|
to enable and disable kernel configurations.
|
||||||
@@ -423,18 +424,11 @@
|
|||||||
configuration changes you are making to the kernel.
|
configuration changes you are making to the kernel.
|
||||||
When saved, changes using <filename>menuconfig</filename> update the kernel's
|
When saved, changes using <filename>menuconfig</filename> update the kernel's
|
||||||
<filename>.config</filename>.
|
<filename>.config</filename>.
|
||||||
Try to resist the temptation of directly editing the <filename>.config</filename>
|
As an alternative method to changing the kernel's configuration, you can simply
|
||||||
file found in the Yocto Project build directory at
|
edit the <filename>.config</filename> found in the Yocto Project build
|
||||||
<filename>tmp/sysroots/<machine-name>/kernel</filename>.
|
directory at <filename>tmp/sysroots/<machine-name>/kernel</filename>
|
||||||
Doing so, can produce unexpected results when the Yocto Project build system
|
directly.</para></listitem>
|
||||||
regenerates the configuration file.</para>
|
<listitem><para><emphasis>Add new kernel recipes if applicable</emphasis>: The standard
|
||||||
<para>Once you are satisfied with the configuration changes made using
|
|
||||||
<filename>menuconfig</filename>, you can directly examine the
|
|
||||||
<filename>.config</filename> file against a saved original and gather those
|
|
||||||
changes into a config fragment to be placed inside a
|
|
||||||
<filename>.bbappend</filename></para></listitem>
|
|
||||||
<listitem><para><emphasis>Add or extend kernel recipes if applicable</emphasis>:
|
|
||||||
The standard
|
|
||||||
layer structure organizes recipe files inside the
|
layer structure organizes recipe files inside the
|
||||||
<filename>meta-kernel-dev</filename> layer that is within the
|
<filename>meta-kernel-dev</filename> layer that is within the
|
||||||
<filename>poky-extras</filename> Git repository.
|
<filename>poky-extras</filename> Git repository.
|
||||||
@@ -453,7 +447,7 @@
|
|||||||
(<filename>local.conf</filename> and <filename>bblayers.conf</filename>)
|
(<filename>local.conf</filename> and <filename>bblayers.conf</filename>)
|
||||||
are configured appropriately.</para>
|
are configured appropriately.</para>
|
||||||
<para>The entire process for building an image is overviewed in the
|
<para>The entire process for building an image is overviewed in the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#building-image'>Building an Image</ulink>" section of the Yocto Project Quick Start.
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#building-image'>Building an Image</ulink>" section of the Yocto Project Quick Start.
|
||||||
You might want to reference this information.
|
You might want to reference this information.
|
||||||
Also, you should look at the detailed examples found in the appendices at
|
Also, you should look at the detailed examples found in the appendices at
|
||||||
at the end of this manual.</para></listitem>
|
at the end of this manual.</para></listitem>
|
||||||
@@ -464,10 +458,8 @@
|
|||||||
<ulink url='http://bitbake.berlios.de/manual/'>here</ulink>.</para>
|
<ulink url='http://bitbake.berlios.de/manual/'>here</ulink>.</para>
|
||||||
<para>The build process supports several types of images to satisfy different needs.
|
<para>The build process supports several types of images to satisfy different needs.
|
||||||
See the appendix
|
See the appendix
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#ref-images'>Reference: Images</ulink>" in the
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html#ref-images'>Reference: Images</ulink>"
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html'>
|
in The Yocto Project Reference Manual for information on supported images.</para></listitem>
|
||||||
Yocto Project Reference Manual</ulink> for information on supported
|
|
||||||
images.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Make your configuration changes available
|
<listitem><para><emphasis>Make your configuration changes available
|
||||||
in the kernel layer</emphasis>: Up to this point, all the configuration changes to the
|
in the kernel layer</emphasis>: Up to this point, all the configuration changes to the
|
||||||
kernel have been done and tested iteratively.
|
kernel have been done and tested iteratively.
|
||||||
@@ -475,10 +467,10 @@
|
|||||||
which allows you to distribute the layer.</para></listitem>
|
which allows you to distribute the layer.</para></listitem>
|
||||||
<listitem><para><emphasis>If applicable, share your in-tree changes</emphasis>:
|
<listitem><para><emphasis>If applicable, share your in-tree changes</emphasis>:
|
||||||
If the changes you made
|
If the changes you made
|
||||||
are suited for all Linux Yocto users, you might want to send them on for inclusion
|
are suited for all Linux Yocto users, you might want to push the changes to a
|
||||||
into the Linux Yocto Git repository.
|
contribution area for the Linux Yocto Git repository.
|
||||||
If the changes are accepted, the Yocto Project Maintainer pulls them into
|
Once the changes are pushed, you can request that they
|
||||||
the master branch of the kernel tree.
|
be pulled into the master branch of the kernel tree.
|
||||||
Doing so makes them available to everyone using the kernel.</para></listitem>
|
Doing so makes them available to everyone using the kernel.</para></listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</para>
|
</para>
|
||||||
@@ -517,7 +509,7 @@
|
|||||||
provides an overview of the general development process.
|
provides an overview of the general development process.
|
||||||
If you want to see a detailed example of the process as it is used from within the Eclipse
|
If you want to see a detailed example of the process as it is used from within the Eclipse
|
||||||
IDE, see
|
IDE, see
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/adt-manual/adt-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/adt-manual/adt-manual.html'>
|
||||||
The Application Development Toolkit (ADT) User's Manual</ulink>.
|
The Application Development Toolkit (ADT) User's Manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -534,8 +526,8 @@
|
|||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para><emphasis>Prepare the Host System for the Yocto Project</emphasis>:
|
<listitem><para><emphasis>Prepare the Host System for the Yocto Project</emphasis>:
|
||||||
See
|
See
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#the-linux-distro'>The Linux Distributions</ulink>" and
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#the-linux-distro'>The Linux Distributions</ulink>" and
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#packages'>The Packages</ulink>" sections both
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#packages'>The Packages</ulink>" sections both
|
||||||
in the Yocto Project Quick Start for requirements.</para></listitem>
|
in the Yocto Project Quick Start for requirements.</para></listitem>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
@@ -563,12 +555,12 @@ WRITER NOTE: The areas to get the kernel and root filesystem are located in the
|
|||||||
(QEMU or real hardware), the area you get the image from differs.
|
(QEMU or real hardware), the area you get the image from differs.
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>Download the image from
|
<listitem><para>Download the image from
|
||||||
<ulink url='http://www.yoctoproject.org/downloads/yocto-1.1/machines/'>
|
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/machines/'>
|
||||||
<filename>machines</filename></ulink> if your target architecture is supported
|
<filename>machines</filename></ulink> if your target architecture is supported
|
||||||
and you are going to develop and test your application on actual hardware.
|
and you are going to develop and test your application on actual hardware.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>Download the image from the
|
<listitem><para>Download the image from the
|
||||||
<ulink url='http://www.yoctoproject.org/downloads/yocto-1.1/machines/qemu/'>
|
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/machines/qemu/'>
|
||||||
<filename>machines/qemu</filename></ulink> if your target architecture is supported
|
<filename>machines/qemu</filename></ulink> if your target architecture is supported
|
||||||
and you are going to develop and test your application using the QEMU
|
and you are going to develop and test your application using the QEMU
|
||||||
emulator.</para></listitem>
|
emulator.</para></listitem>
|
||||||
@@ -583,9 +575,9 @@ WRITER NOTE: The areas to get the kernel and root filesystem are located in the
|
|||||||
</itemizedlist></para>
|
</itemizedlist></para>
|
||||||
<para>For information on pre-built kernel image naming schemes for images
|
<para>For information on pre-built kernel image naming schemes for images
|
||||||
that can run on the QEMU emulator, see the
|
that can run on the QEMU emulator, see the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#using-pre-built'>Using Pre-Built Binaries and QEMU</ulink>"
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#using-pre-built'>Using Pre-Built Binaries and QEMU</ulink>"
|
||||||
section in
|
section in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||||
The Yocto Project Quick Start</ulink>.</para></listitem>
|
The Yocto Project Quick Start</ulink>.</para></listitem>
|
||||||
<listitem><para><emphasis>Install the ADT</emphasis>:
|
<listitem><para><emphasis>Install the ADT</emphasis>:
|
||||||
The ADT provides a target-specific cross-development toolchain, the root filesystem,
|
The ADT provides a target-specific cross-development toolchain, the root filesystem,
|
||||||
@@ -594,8 +586,8 @@ WRITER NOTE: The areas to get the kernel and root filesystem are located in the
|
|||||||
easy method.
|
easy method.
|
||||||
You can get these pieces by running an ADT installer script, which is configurable.
|
You can get these pieces by running an ADT installer script, which is configurable.
|
||||||
For information on how to install the ADT, see the
|
For information on how to install the ADT, see the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/adt-manual/adt-manual.html#using-the-adt-installer'>Using the ADT Installer</ulink>" section in
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/adt-manual/adt-manual.html#using-the-adt-installer'>Using the ADT Installer</ulink>" section in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/adt-manual/adt-manual.html'>The Yocto Project
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/adt-manual/adt-manual.html'>The Yocto Project
|
||||||
Application Development (ADT) User's Manual</ulink>.</para></listitem>
|
Application Development (ADT) User's Manual</ulink>.</para></listitem>
|
||||||
<listitem><para><emphasis>If Applicable, Secure the Target Root Filesystem</emphasis>:
|
<listitem><para><emphasis>If Applicable, Secure the Target Root Filesystem</emphasis>:
|
||||||
If you choose not to install the ADT using the ADT Installer,
|
If you choose not to install the ADT using the ADT Installer,
|
||||||
@@ -640,14 +632,14 @@ WRITER NOTE: The areas to get the kernel and root filesystem are located in the
|
|||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para><emphasis>Install the cross-development toolchain for your target hardware:</emphasis>
|
<listitem><para><emphasis>Install the cross-development toolchain for your target hardware:</emphasis>
|
||||||
For information on how to install the toolchain, see the
|
For information on how to install the toolchain, see the
|
||||||
"<ulink url='http://www.yoctoproject/docs/1.1/adt-manual/adt-manual.html#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>" section in
|
"<ulink url='http://www.yoctoproject/docs/1.1.1/adt-manual/adt-manual.html#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>" section in
|
||||||
<ulink url='http://www.yoctoproject/docs/1.1/adt-manual/adt-manual.html'>The Yocto Project
|
<ulink url='http://www.yoctoproject/docs/1.1.1/adt-manual/adt-manual.html'>The Yocto Project
|
||||||
Application Development (ADT) User's Manual</ulink>.</para></listitem>
|
Application Development (ADT) User's Manual</ulink>.</para></listitem>
|
||||||
<listitem><para><emphasis>Download the Target Image:</emphasis> The Yocto Project supports
|
<listitem><para><emphasis>Download the Target Image:</emphasis> The Yocto Project supports
|
||||||
several target architectures and has many pre-built kernel images and root filesystem
|
several target architectures and has many pre-built kernel images and root filesystem
|
||||||
images.</para>
|
images.</para>
|
||||||
<para>If you are going to develop your application on hardware, go to the
|
<para>If you are going to develop your application on hardware, go to the
|
||||||
<ulink url='http://www.yoctoproject.org/downloads/yocto-1.1/machines/'>
|
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/machines/'>
|
||||||
<filename>machines</filename></ulink> download area and choose a target machine area
|
<filename>machines</filename></ulink> download area and choose a target machine area
|
||||||
from which to download the kernel image and root filesystem.
|
from which to download the kernel image and root filesystem.
|
||||||
This download area could have several files in it that support development using
|
This download area could have several files in it that support development using
|
||||||
@@ -657,7 +649,7 @@ WRITER NOTE: The areas to get the kernel and root filesystem are located in the
|
|||||||
Be sure to get the files you need for your particular development process.</para>
|
Be sure to get the files you need for your particular development process.</para>
|
||||||
<para>If you are going to develop your application and then run and test it using the QEMU
|
<para>If you are going to develop your application and then run and test it using the QEMU
|
||||||
emulator, go to the
|
emulator, go to the
|
||||||
<ulink url='http://www.yoctoproject.org/downloads/yocto-1.1/machines/qemu/'>
|
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/machines/qemu/'>
|
||||||
<filename>machines/qemu</filename></ulink> download area.
|
<filename>machines/qemu</filename></ulink> download area.
|
||||||
From this area, go down into the directory for your target architecture
|
From this area, go down into the directory for your target architecture
|
||||||
(e.g. <filename>qemux86_64</filename> for an
|
(e.g. <filename>qemux86_64</filename> for an
|
||||||
@@ -665,7 +657,7 @@ WRITER NOTE: The areas to get the kernel and root filesystem are located in the
|
|||||||
Download kernel, root filesystem, and any other files you need for your process.
|
Download kernel, root filesystem, and any other files you need for your process.
|
||||||
<note>In order to use the root filesystem in QEMU, you need to extract it.
|
<note>In order to use the root filesystem in QEMU, you need to extract it.
|
||||||
See the
|
See the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/adt-manual/adt-manual.html#extracting-the-root-filesystem'>Extracting the Root Filesystem</ulink>" section for information on how to extract the
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/adt-manual/adt-manual.html#extracting-the-root-filesystem'>Extracting the Root Filesystem</ulink>" section for information on how to extract the
|
||||||
root filesystem.</note></para></listitem>
|
root filesystem.</note></para></listitem>
|
||||||
<listitem><para><emphasis>Develop and Test your Application:</emphasis> At this point,
|
<listitem><para><emphasis>Develop and Test your Application:</emphasis> At this point,
|
||||||
you have the tools to develop your application.
|
you have the tools to develop your application.
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
This chapter helps you understand the Yocto Project as an open source development project.
|
This chapter helps you understand the Yocto Project as an open source development project.
|
||||||
In general, working in an open source environment is very different from working in a
|
In general, working in an open source environment is very different as compared to working in a
|
||||||
closed, proprietary environment.
|
proprietary environment.
|
||||||
Additionally, the Yocto Project uses specific tools and constructs as part of its development
|
Additionally, the Yocto Project uses specific tools and constructs as part of its development
|
||||||
environment.
|
environment.
|
||||||
This chapter specifically addresses open source philosophy, licensing issues, code repositories,
|
The chapter specifically addresses open source philosophy, licensing issues, code repositories,
|
||||||
the open source distributed version control system Git, and best practices using the Yocto Project.
|
the open source distributed version control system Git, and best practices using the Yocto Project.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -20,10 +20,10 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Open source philosophy is characterized by software development directed by peer production
|
Open source philosophy is characterized by software development directed by peer production
|
||||||
and collaboration through an active community of developers.
|
and collaboration through a concerned community of developers.
|
||||||
Contrast this to the more standard centralized development models used by commercial software
|
Contrast this to the more standard centralized development models used by commercial software
|
||||||
companies where a finite set of developers produce a product for sale using a defined set
|
companies where a finite set of developers produce a product for sale using a defined set
|
||||||
of procedures that ultimately result in an end product whose architecture and source material
|
of procedures that ultimately result in an end-product whose architecture and source material
|
||||||
are closed to the public.
|
are closed to the public.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
stake in the software project.
|
stake in the software project.
|
||||||
The open source environment contains new copyright, licensing, domain, and consumer issues
|
The open source environment contains new copyright, licensing, domain, and consumer issues
|
||||||
that differ from the more traditional development environment.
|
that differ from the more traditional development environment.
|
||||||
In an open source environment, the end product, source material, and documentation are
|
In an open source environment, the end-product, source material, and documentation are
|
||||||
all available to the public at no cost.
|
all available to the public at no cost.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
Conversely, if you are a developer that is not interested in contributing back to the
|
Conversely, if you are a developer that is not interested in contributing back to the
|
||||||
Yocto Project, you have the ability to simply download and extract release tarballs
|
Yocto Project, you have the ability to simply download and extract release tarballs
|
||||||
and use them within the Yocto Project environment.
|
and use them within the Yocto Project environment.
|
||||||
All that is required is a particular release of the Yocto Project and
|
All that is required is a particular release of Yocto Project, a kernel, and
|
||||||
your application source code.
|
your application source code.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
<imagedata fileref="figures/source-repos.png" align="center" width="6in" depth="4in" />
|
<imagedata fileref="figures/source-repos.png" align="center" width="6in" depth="4in" />
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para><anchor id='index-downloads' /><emphasis><ulink url='http://downloads.yoctoproject.org/releases/'>Index of /releases:</ulink></emphasis>
|
<listitem><para><anchor id='index-downloads' /><emphasis><ulink url='http://downloads.yoctoproject.org/releases/'>Index of /releases:</ulink></emphasis>
|
||||||
This area contains an index of downloads such as
|
This area contains an index releases such as
|
||||||
the <trademark class='trade'>Eclipse</trademark>
|
the <trademark class='trade'>Eclipse</trademark>
|
||||||
Yocto Plug-in, miscellaneous support, Poky, pseudo, cross-development toolchains,
|
Yocto Plug-in, miscellaneous support, Poky, pseudo, cross-development toolchains,
|
||||||
and all released versions of Yocto Project in the form of images or tarballs.
|
and all released versions of Yocto Project in the form of images or tarballs.
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><emphasis>Append Files:</emphasis> Files that append build information to
|
<listitem><para><emphasis>Append Files:</emphasis> Files that append build information to
|
||||||
a recipe file.
|
a recipe file.
|
||||||
Information in append files overrides the information in the similarly-named recipe file.
|
Information in append files override the information in the similarly-named recipe file.
|
||||||
Append files use the <filename>.bbappend</filename> filename suffix.</para></listitem>
|
Append files use the <filename>.bbappend</filename> filename suffix.</para></listitem>
|
||||||
<listitem><para><emphasis>BitBake:</emphasis> The task executor and scheduler used by
|
<listitem><para><emphasis>BitBake:</emphasis> The task executor and scheduler used by
|
||||||
the Yocto Project to build images.
|
the Yocto Project to build images.
|
||||||
@@ -143,12 +143,12 @@
|
|||||||
and inheritance allowing commonly used patterns to be defined once and easily used
|
and inheritance allowing commonly used patterns to be defined once and easily used
|
||||||
in multiple recipes.
|
in multiple recipes.
|
||||||
Class files end with the <filename>.bbclass</filename> filename extension.</para></listitem>
|
Class files end with the <filename>.bbclass</filename> filename extension.</para></listitem>
|
||||||
<listitem><para><emphasis>Configuration File:</emphasis> Configuration information in various
|
<listitem><para><emphasis>Configuration File:</emphasis> Configuration information in the
|
||||||
<filename>.conf</filename> files provides global definitions of variables.
|
<filename>.conf</filename> files provides global definitions of variables.
|
||||||
The <filename>conf/local.conf</filename> configuration file in the Yocto Project
|
The <filename>conf/local.conf</filename> configuration file in the Yocto Project
|
||||||
build directory contains user-defined variables that affect each build.
|
build directory defines user-defined variables that affect each build.
|
||||||
The <filename>meta-yocto/conf/distro/poky.conf</filename> configuration file
|
The <filename>distro/poky.conf</filename> configuration file also in the
|
||||||
defines Yocto ‘distro’ configuration
|
build directory defines Yocto ‘distro’ configuration
|
||||||
variables used only when building with this policy.
|
variables used only when building with this policy.
|
||||||
Machine configuration files, which
|
Machine configuration files, which
|
||||||
are located throughout the Yocto Project file structure, define
|
are located throughout the Yocto Project file structure, define
|
||||||
@@ -159,7 +159,7 @@
|
|||||||
<listitem><para><emphasis>Cross-Development Toolchain:</emphasis> A collection of software development
|
<listitem><para><emphasis>Cross-Development Toolchain:</emphasis> A collection of software development
|
||||||
tools and utilities that allow you to develop software for targeted architectures.
|
tools and utilities that allow you to develop software for targeted architectures.
|
||||||
This toolchain contains cross-compilers, linkers, and debuggers that are specific to
|
This toolchain contains cross-compilers, linkers, and debuggers that are specific to
|
||||||
an architecture.
|
an architecure.
|
||||||
You can use the Yocto Project to build cross-development toolchains in tarball form that when
|
You can use the Yocto Project to build cross-development toolchains in tarball form that when
|
||||||
unpacked contain the development tools you need to cross-compile and test your software.
|
unpacked contain the development tools you need to cross-compile and test your software.
|
||||||
The Yocto Project ships with images that contain toolchains for supported architectures
|
The Yocto Project ships with images that contain toolchains for supported architectures
|
||||||
@@ -170,9 +170,9 @@
|
|||||||
Images are the binary output that runs on specific hardware and for specific
|
Images are the binary output that runs on specific hardware and for specific
|
||||||
use cases.
|
use cases.
|
||||||
For a list of the supported image types that the Yocto Project provides, see the
|
For a list of the supported image types that the Yocto Project provides, see the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#ref-images'>Reference: Images</ulink>"
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html#ref-images'>Reference: Images</ulink>"
|
||||||
appendix in
|
appendix in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||||
The Yocto Project Reference Manual</ulink>.</para></listitem>
|
The Yocto Project Reference Manual</ulink>.</para></listitem>
|
||||||
<listitem><para><emphasis>Layer:</emphasis> A collection of recipes representing the core,
|
<listitem><para><emphasis>Layer:</emphasis> A collection of recipes representing the core,
|
||||||
a BSP, or an application stack.</para></listitem>
|
a BSP, or an application stack.</para></listitem>
|
||||||
@@ -216,14 +216,14 @@
|
|||||||
system in order to do any development using the Yocto Project.</para>
|
system in order to do any development using the Yocto Project.</para>
|
||||||
<para>The name of the top-level directory of the Yocto Project file structure
|
<para>The name of the top-level directory of the Yocto Project file structure
|
||||||
is derived from the Yocto Project release tarball.
|
is derived from the Yocto Project release tarball.
|
||||||
For example, downloading and unpacking <filename>poky-edison-6.0.tar.bz2</filename>
|
For example, downloading and unpacking <filename>poky-edison-6.0.1.tar.bz2</filename>
|
||||||
results in a Yocto Project file structure whose Yocto Project source directory is named
|
results in a Yocto Project file structure whose Yocto Project source directory is named
|
||||||
<filename>poky-edison-6.0</filename>.
|
<filename>poky-edison-6.0.1</filename>.
|
||||||
If you create a Git repository, then you can name the repository anything you like.</para>
|
If you create a Git repository, then you can name the repository anything you like.</para>
|
||||||
<para>You can find instruction on how to set up the Yocto Project files on your
|
<para>You can find instruction on how to set up the Yocto Project files on your
|
||||||
host development system by reading
|
host development system by reading
|
||||||
the
|
the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#getting-setup'>Getting
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#getting-setup'>Getting
|
||||||
Setup</ulink>" section.</para></listitem>
|
Setup</ulink>" section.</para></listitem>
|
||||||
<listitem><para><emphasis>Yocto Project Build Directory:</emphasis>
|
<listitem><para><emphasis>Yocto Project Build Directory:</emphasis>
|
||||||
This term refers to the area used by the Yocto Project for builds.
|
This term refers to the area used by the Yocto Project for builds.
|
||||||
@@ -233,9 +233,9 @@
|
|||||||
You can create the Yocto Project build directory anywhere you want on your
|
You can create the Yocto Project build directory anywhere you want on your
|
||||||
development system.
|
development system.
|
||||||
Here is an example that creates the directory in <filename>mybuilds</filename>
|
Here is an example that creates the directory in <filename>mybuilds</filename>
|
||||||
and names the Yocto Project build directory <filename>YP-6.0</filename>:
|
and names the Yocto Project build directory <filename>YP-6.0.1</filename>:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ source poky-edison-6.0/oe-init-build-env $HOME/mybuilds/YP-6.0
|
$ source poky-edison-6.0.1/oe-init-build-env $HOME/mybuilds/YP-6.0.1
|
||||||
</literallayout>
|
</literallayout>
|
||||||
If you don't specifically name the directory, BitBake creates it
|
If you don't specifically name the directory, BitBake creates it
|
||||||
in the current directory and uses the name <filename>build</filename>.
|
in the current directory and uses the name <filename>build</filename>.
|
||||||
@@ -369,7 +369,7 @@
|
|||||||
will allow the change, and for ultimately pushing the change from your local Git repository
|
will allow the change, and for ultimately pushing the change from your local Git repository
|
||||||
into the project’s upstream (or master) repository.</para></listitem>
|
into the project’s upstream (or master) repository.</para></listitem>
|
||||||
<listitem><para><emphasis><filename>git status</filename>:</emphasis> Reports any modified files that
|
<listitem><para><emphasis><filename>git status</filename>:</emphasis> Reports any modified files that
|
||||||
possibly need to be added and committed.</para></listitem>
|
possibly need added and committed.</para></listitem>
|
||||||
<listitem><para><emphasis><filename>git checkout <branch-name></filename>:</emphasis> Changes
|
<listitem><para><emphasis><filename>git checkout <branch-name></filename>:</emphasis> Changes
|
||||||
your working branch.
|
your working branch.
|
||||||
This command is analogous to “cd”.</para></listitem>
|
This command is analogous to “cd”.</para></listitem>
|
||||||
@@ -423,7 +423,7 @@
|
|||||||
In particular, the information covers basic practices that describe roles and actions in a
|
In particular, the information covers basic practices that describe roles and actions in a
|
||||||
collaborative development environment.
|
collaborative development environment.
|
||||||
Again, if you are familiar with this type of development environment, you might want to just
|
Again, if you are familiar with this type of development environment, you might want to just
|
||||||
skip this section.
|
skip the section.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -436,7 +436,7 @@
|
|||||||
The maintainer is responsible for allowing changes in from other developers and for
|
The maintainer is responsible for allowing changes in from other developers and for
|
||||||
organizing the underlying branch structure to reflect release strategies and so forth.
|
organizing the underlying branch structure to reflect release strategies and so forth.
|
||||||
<note>You can see who is the maintainer for Yocto Project files by examining the
|
<note>You can see who is the maintainer for Yocto Project files by examining the
|
||||||
<filename>distro_tracking_fields.inc</filename> file in the Yocto Project
|
<filename>distro_tracking_fields</filename> file in the Yocto Project
|
||||||
<filename>meta/conf/distro/include</filename> directory.</note>
|
<filename>meta/conf/distro/include</filename> directory.</note>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -475,7 +475,7 @@
|
|||||||
"master" branch of the Git repository, which is controlled by the project’s maintainer.
|
"master" branch of the Git repository, which is controlled by the project’s maintainer.
|
||||||
And, we have a set of developers who independently develop, test, and submit changes
|
And, we have a set of developers who independently develop, test, and submit changes
|
||||||
to "contrib" areas for the maintainer to examine.
|
to "contrib" areas for the maintainer to examine.
|
||||||
The maintainer then chooses which changes are going to become a permanent part of the project.
|
The maintainer then chooses which changes are going to become permanently a part of the project.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -486,18 +486,15 @@
|
|||||||
While each development environment is unique, there are some best practices or methods
|
While each development environment is unique, there are some best practices or methods
|
||||||
that help development run smoothly.
|
that help development run smoothly.
|
||||||
The following list describes some of these practices.
|
The following list describes some of these practices.
|
||||||
For more detailed information about these strategies see
|
For more information about Git workflows, see the workflow topics in the
|
||||||
<ulink url='http://www.kernel.org/pub/software/scm/git/docs/gitworkflows.html'>Git Workflows</ulink>.
|
<ulink url='http://book.git-scm.com'>Git Community Book</ulink>.
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><emphasis>Make Small Changes:</emphasis> It is best to keep the changes you commit
|
<listitem><para><emphasis>Make Small Changes:</emphasis> It is best to keep your changes you commit
|
||||||
small as compared to bundling many disparate changes into a single commit.
|
small as compared to bundling many disparate changes into a single commit.
|
||||||
This practice not only keeps things manageable but also allows the maintainer
|
This practice not only keeps things manageable but also allows the maintainer
|
||||||
to more easily include or refuse changes.</para>
|
to more easily include or refuse changes.</para>
|
||||||
<para>It is also good practice to leave the repository in a state that allows you to
|
<para>It is also good practice to leave the repository in a state that allows you to
|
||||||
still successfully build your project. In other words, do not commit half of a feature,
|
still successfully build your project.</para></listitem>
|
||||||
then add the other half in a separate, later commit.
|
|
||||||
Each commit should take you from one buildable project state to another
|
|
||||||
buildable state.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Use Branches Liberally:</emphasis> It is very easy to create, use, and
|
<listitem><para><emphasis>Use Branches Liberally:</emphasis> It is very easy to create, use, and
|
||||||
delete local branches in your working Git repository.
|
delete local branches in your working Git repository.
|
||||||
You can name these branches anything you like.
|
You can name these branches anything you like.
|
||||||
@@ -530,7 +527,7 @@
|
|||||||
<filename>send-pull-request</filename> that ship with the release to facilitate this
|
<filename>send-pull-request</filename> that ship with the release to facilitate this
|
||||||
workflow.
|
workflow.
|
||||||
You can find these scripts in the local Yocto Project files Git repository in
|
You can find these scripts in the local Yocto Project files Git repository in
|
||||||
the <filename>scripts</filename> directory.</para></listitem>
|
<filename>scripts</filename>.</para></listitem>
|
||||||
<listitem><para><emphasis>Patch Workflow:</emphasis> This workflow allows you to notify the
|
<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
|
maintainer through an email that you have a change (or patch) you would like considered
|
||||||
for the "master" branch of the Git repository.
|
for the "master" branch of the Git repository.
|
||||||
@@ -608,13 +605,13 @@
|
|||||||
You should send patches to the appropriate Yocto Project mailing list to get them
|
You should send patches to the appropriate Yocto Project mailing list to get them
|
||||||
in front of the Yocto Project Maintainer.
|
in front of the Yocto Project Maintainer.
|
||||||
For a list of the Yocto Project mailing lists, see the
|
For a list of the Yocto Project mailing lists, see the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#resources-mailinglist'>Mailing lists</ulink>" section in
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html#resources-mailinglist'>Mailing lists</ulink>" section in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html'> The
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html'> The
|
||||||
Yocto Project Reference Manual</ulink>.
|
Yocto Project Reference Manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The following is some guidance on which mailing list to use for what type of defect:
|
Following is some guidance on which mailing list to use for what type of defect:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>For defects against the Yocto Project build system Poky, send
|
<listitem><para>For defects against the Yocto Project build system Poky, send
|
||||||
your patch to the
|
your patch to the
|
||||||
@@ -633,7 +630,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
When you send a patch, be sure to include a "Signed-off-by:"
|
When you send a patch, be sure to include a "signed-off-by:"
|
||||||
line in the same style as required by the Linux kernel.
|
line in the same style as required by the Linux kernel.
|
||||||
Adding this line signifies the developer has agreed to the Developer's Certificate of Origin 1.1
|
Adding this line signifies the developer has agreed to the Developer's Certificate of Origin 1.1
|
||||||
as follows:
|
as follows:
|
||||||
@@ -679,7 +676,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
When you create a commit, you must follow certain standards established by the
|
When you form a commit, you must follow certain standards established by the
|
||||||
Yocto Project development team.
|
Yocto Project development team.
|
||||||
For each commit, you must provide a single-line summary of the change and you
|
For each commit, you must provide a single-line summary of the change and you
|
||||||
almost always provide a more detailed description of what you did (i.e. the body
|
almost always provide a more detailed description of what you did (i.e. the body
|
||||||
@@ -751,9 +748,8 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can find general Git information on how to push a change upstream
|
You can find general Git information on how to push a change upstream in the
|
||||||
<ulink url='http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#Developing-With-git'>
|
<ulink url='http://book.git-scm.com/3_distributed_workflows.html'>Git Community Book</ulink>.
|
||||||
here</ulink>.
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -793,11 +789,6 @@
|
|||||||
<para>If you provide several commits as part of the command,
|
<para>If you provide several commits as part of the command,
|
||||||
the <filename>git format-patch</filename> command produces a numbered
|
the <filename>git format-patch</filename> command produces a numbered
|
||||||
series of files in the current directory – one for each commit.
|
series of files in the current directory – one for each commit.
|
||||||
If you have more than one patch, you should also use the
|
|
||||||
<filename>--cover</filename> option with the command, which generates a
|
|
||||||
cover letter as the first "patch" in the series.
|
|
||||||
You can then edit the cover letter to provide a description for
|
|
||||||
the series of patches.
|
|
||||||
For information on the <filename>git format-patch</filename> command,
|
For information on the <filename>git format-patch</filename> command,
|
||||||
see <filename>GIT_FORMAT_PATCH(1)</filename> displayed using the
|
see <filename>GIT_FORMAT_PATCH(1)</filename> displayed using the
|
||||||
<filename>man git-format-patch</filename> command.</para></listitem>
|
<filename>man git-format-patch</filename> command.</para></listitem>
|
||||||
@@ -810,15 +801,7 @@
|
|||||||
or remote Mail Transport Agent (MTA) such as
|
or remote Mail Transport Agent (MTA) such as
|
||||||
<filename>msmtp</filename>, <filename>sendmail</filename>, or through a direct
|
<filename>msmtp</filename>, <filename>sendmail</filename>, or through a direct
|
||||||
<filename>smtp</filename> configuration in your Git <filename>config</filename>
|
<filename>smtp</filename> configuration in your Git <filename>config</filename>
|
||||||
file.
|
file.</para>
|
||||||
If you are submitting patches through email only, it is very important
|
|
||||||
that you submit them without any whitespace or HTML formatting that
|
|
||||||
either you or your mailer introduces.
|
|
||||||
The maintainer that receives your patches needs to be able to save and
|
|
||||||
apply them directly from your emails.
|
|
||||||
A good way to verify that what you are sending will be applicable by the
|
|
||||||
maintainer is to do a dry run and send them to yourself and then
|
|
||||||
save and apply them as the maintainer would.</para>
|
|
||||||
<para>The <filename>git send-email</filename> command is the preferred method
|
<para>The <filename>git send-email</filename> command is the preferred method
|
||||||
for sending your patches since there is no risk of compromising whitespace
|
for sending your patches since there is no risk of compromising whitespace
|
||||||
in the body of the message, which can occur when you use your own mail client.
|
in the body of the message, which can occur when you use your own mail client.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
This chapter introduces the Yocto Project and gives you an idea of what you need to get started.
|
This chapter introduces the Yocto Project and gives you an idea of what you need to get started.
|
||||||
You can find enough information to set up your development host and build or use images for
|
You can find enough information to set up your development host and build or use images for
|
||||||
hardware supported by the Yocto Project by reading
|
hardware supported by the Yocto Project by reading
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||||
The Yocto Project Quick Start</ulink>.
|
The Yocto Project Quick Start</ulink>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -36,14 +36,14 @@
|
|||||||
While the Yocto Project does not provide a strict testing framework,
|
While the Yocto Project does not provide a strict testing framework,
|
||||||
it does provide or generate for you artifacts that let you perform target-level and
|
it does provide or generate for you artifacts that let you perform target-level and
|
||||||
emulated testing and debugging.
|
emulated testing and debugging.
|
||||||
Additionally, if you are an <trademark class='trade'>Eclipse</trademark>
|
And, if you are an <trademark class='trade'>Eclipse</trademark>
|
||||||
IDE user, you can install an Eclipse Yocto Plug-in to allow you to
|
IDE user, you can install an Eclipse Yocto Plug-in to allow you to
|
||||||
develop within that familiar environment.
|
develop within that familiar environment.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='getting-setup'>
|
<section id='getting-setup'>
|
||||||
<title>Getting Set Up</title>
|
<title>Getting Setup</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Here is what you need to get set up to use the Yocto Project:
|
Here is what you need to get set up to use the Yocto Project:
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para><emphasis>Packages:</emphasis> The Yocto Project requires certain packages
|
<listitem><para><emphasis>Packages:</emphasis> The Yocto Project requires certain packages
|
||||||
exist on your development system (e.g. Python 2.6 or 2.7).
|
exist on your development system (e.g. Python 2.6 or 2.7).
|
||||||
See "<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#packages'>The Packages</ulink>"
|
See "<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#packages'>The Packages</ulink>"
|
||||||
section in the Yocto Project Quick start for the exact package
|
section in the Yocto Project Quick start for the exact package
|
||||||
requirements and the installation commands to install them
|
requirements and the installation commands to install them
|
||||||
for the supported distributions.</para></listitem>
|
for the supported distributions.</para></listitem>
|
||||||
@@ -75,11 +75,11 @@
|
|||||||
back into the Yocto Project, you can simply download the Yocto Project release you want
|
back into the Yocto Project, you can simply download the Yocto Project release you want
|
||||||
from the website’s <ulink url='http://yoctoproject.org/download'>download page</ulink>.
|
from the website’s <ulink url='http://yoctoproject.org/download'>download page</ulink>.
|
||||||
Once you have the tarball, just extract it into a directory of your choice.</para>
|
Once you have the tarball, just extract it into a directory of your choice.</para>
|
||||||
<para>For example, the following command extracts the Yocto Project 1.1 release tarball
|
<para>For example, the following command extracts the Yocto Project 1.1.1 release tarball
|
||||||
into the current working directory and sets up the Yocto Project file structure
|
into the current working directory and sets up the Yocto Project file structure
|
||||||
with a top-level directory named <filename>poky-edison-6.0</filename>:
|
with a top-level directory named <filename>poky-edison-6.0.1</filename>:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ tar xfj poky-edison-6.0.tar.bz2
|
$ tar xfj poky-edison-6.0.1.tar.bz2
|
||||||
</literallayout></para>
|
</literallayout></para>
|
||||||
<para>This method does not produce a Git repository.
|
<para>This method does not produce a Git repository.
|
||||||
Instead, you simply end up with a local snapshot of the
|
Instead, you simply end up with a local snapshot of the
|
||||||
@@ -117,32 +117,34 @@
|
|||||||
For simplicity, it is recommended that you create these structures outside of the
|
For simplicity, it is recommended that you create these structures outside of the
|
||||||
Yocto Project files' Git repository.</para>
|
Yocto Project files' Git repository.</para>
|
||||||
<para>As an example, the following transcript shows how to create the bare clone
|
<para>As an example, the following transcript shows how to create the bare clone
|
||||||
of the <filename>linux-yocto-3.0</filename> kernel and then create a copy of
|
of the <filename>linux-yocto-3.0-1.1.x</filename> kernel and then create a copy of
|
||||||
that clone.
|
that clone.
|
||||||
<note>When you have a local Linux Yocto kernel Git repository, you can
|
<note>When you have a local Linux Yocto kernel Git repository, you can
|
||||||
reference that repository rather than the upstream Git repository as
|
reference that repository rather than the upstream Git repository as
|
||||||
part of the <filename>clone</filename> command.
|
part of the <filename>clone</filename> command.
|
||||||
Doing so can speed up the process.</note></para>
|
Doing so can speed up the process.</note>
|
||||||
<para>In the following example, the bare clone is named
|
In the following example, the bare clone is named
|
||||||
<filename>linux-yocto-3.0.git</filename>, while the
|
<filename>linux-yocto-3.0-1.1.x.git</filename>, while the
|
||||||
copy is named <filename>linux-yocto-3.0</filename>:
|
copy is named <filename>my-linux-yocto-3.0-1.1.x-work</filename>:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ git clone --bare git://git.yoctoproject.org/linux-yocto-3.0 linux-yocto-3.0.git
|
$ git clone --bare git://git.yoctoproject.org/linux-yocto-3.0-1.1.x linux-yocto-3.0-1.1.x.git
|
||||||
Initialized empty Git repository in /home/scottrif/linux-yocto-3.0.git/
|
Initialized empty Git repository in /home/scottrif/linux-yocto-3.0-1.1.x.git/
|
||||||
remote: Counting objects: 2123870, done.
|
remote: Counting objects: 2259181, done.
|
||||||
remote: Compressing objects: 100% (341338/341338), done.
|
remote: Compressing objects: 100% (373259/373259), done.
|
||||||
remote: Total 2123870 (delta 1778780), reused 2107534 (delta 1762583)
|
remote: Total 2259181 (delta 1892638), reused 2231556 (delta 1865300)
|
||||||
Receiving objects: 100% (2123870/2123870), 445.72 MiB | 2.06 MiB/s, done.
|
Receiving objects: 100% (2259181/2259181), 482.44 MiB | 580 KiB/s, done.
|
||||||
Resolving deltas: 100% (1778780/1778780), done. </literallayout></para>
|
Resolving deltas: 100% (1892638/1892638), done.
|
||||||
|
</literallayout></para>
|
||||||
<para>Now create a clone of the bare clone just created:
|
<para>Now create a clone of the bare clone just created:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ git clone linux-yocto-3.0.git linux-yocto-3.0
|
$ git clone linux-yocto-3.0-1.1.x.git my-linux-yocto-3.0-1.1.x-work
|
||||||
Initialized empty Git repository in /home/scottrif/linux-yocto-3.0/.git/
|
Initialized empty Git repository in /home/scottrif/my-linux-yocto-3.0-1.1.x/.git/
|
||||||
Checking out files: 100% (36898/36898), done. </literallayout></para></listitem>
|
Checking out files: 100% (36898/36898), done.
|
||||||
|
</literallayout></para></listitem>
|
||||||
<listitem id='poky-extras-repo'><para><emphasis>
|
<listitem id='poky-extras-repo'><para><emphasis>
|
||||||
The <filename>poky-extras</filename> Git Repository</emphasis>:
|
The <filename>poky-extras</filename> Git Repository</emphasis>:
|
||||||
The <filename>poky-extras</filename> Git repository contains metadata needed
|
The <filename>poky-extras</filename> Git repository contains metadata needed to
|
||||||
only if you are modifying and building the kernel image.
|
build the kernel image.
|
||||||
In particular, it contains the kernel <filename>.bbappend</filename> files that you
|
In particular, it contains the kernel <filename>.bbappend</filename> files that you
|
||||||
edit to point to your locally modified kernel source files and to build the kernel
|
edit to point to your locally modified kernel source files and to build the kernel
|
||||||
image.
|
image.
|
||||||
@@ -157,11 +159,12 @@
|
|||||||
$ cd ~/poky
|
$ cd ~/poky
|
||||||
$ git clone git://git.yoctoproject.org/poky-extras poky-extras
|
$ git clone git://git.yoctoproject.org/poky-extras poky-extras
|
||||||
Initialized empty Git repository in /home/scottrif/poky/poky-extras/.git/
|
Initialized empty Git repository in /home/scottrif/poky/poky-extras/.git/
|
||||||
remote: Counting objects: 543, done.
|
remote: Counting objects: 561, done.
|
||||||
remote: Compressing objects: 100% (483/483), done.
|
remote: Compressing objects: 100% (501/501), done.
|
||||||
remote: Total 543 (delta 144), reused 307 (delta 39)
|
remote: Total 561 (delta 159), reused 306 (delta 39)
|
||||||
Receiving objects: 100% (543/543), 520.55 KiB, done.
|
Receiving objects: 100% (561/561), 519.96 KiB | 479 KiB/s, done.
|
||||||
Resolving deltas: 100% (144/144), done. </literallayout></para></listitem>
|
Resolving deltas: 100% (159/159), done.
|
||||||
|
</literallayout></para></listitem>
|
||||||
<listitem><para><emphasis>Supported Board Support Packages (BSPs):</emphasis>
|
<listitem><para><emphasis>Supported Board Support Packages (BSPs):</emphasis>
|
||||||
Similar considerations exist for BSPs.
|
Similar considerations exist for BSPs.
|
||||||
You can get set up for BSP development one of two ways: tarball extraction or
|
You can get set up for BSP development one of two ways: tarball extraction or
|
||||||
@@ -195,14 +198,14 @@
|
|||||||
<filename>meta-intel</filename>
|
<filename>meta-intel</filename>
|
||||||
Git repository inside the <filename>poky</filename> Git repository.
|
Git repository inside the <filename>poky</filename> Git repository.
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ cd poky
|
$cd poky
|
||||||
$ git clone git://git.yoctoproject.org/meta-intel.git
|
$ git clone git://git.yoctoproject.org/meta-intel.git
|
||||||
Initialized empty Git repository in /home/scottrif/poky/meta-intel/.git/
|
Initialized empty Git repository in /home/scottrif/poky/meta-intel/.git/
|
||||||
remote: Counting objects: 1325, done.
|
remote: Counting objects: 3279, done.
|
||||||
remote: Compressing objects: 100% (1078/1078), done.
|
remote: Compressing objects: 100% (2708/2708), done.
|
||||||
remote: Total 1325 (delta 546), reused 85 (delta 27)
|
remote: Total 3279 (delta 1761), reused 194 (delta 105)
|
||||||
Receiving objects: 100% (1325/1325), 1.56 MiB | 330 KiB/s, done.
|
Receiving objects: 100% (3279/3279), 1.75 MiB | 377 KiB/s, done.
|
||||||
Resolving deltas: 100% (546/546), done.
|
Resolving deltas: 100% (1761/1761), done.
|
||||||
</literallayout></para>
|
</literallayout></para>
|
||||||
<para>The same
|
<para>The same
|
||||||
<ulink url='https://wiki.yoctoproject.org/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>
|
<ulink url='https://wiki.yoctoproject.org/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>
|
||||||
@@ -213,7 +216,7 @@
|
|||||||
applications using the Eclipse Integrated Development Environment (IDE),
|
applications using the Eclipse Integrated Development Environment (IDE),
|
||||||
you will need this plug-in.
|
you will need this plug-in.
|
||||||
See the
|
See the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/adt-manual/adt-manual.html#setting-up-the-eclipse-ide'>Setting up the Eclipse IDE</ulink>"
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/adt-manual/adt-manual.html#setting-up-the-eclipse-ide'>Setting up the Eclipse IDE</ulink>"
|
||||||
section in the Yocto Application Development Toolkit (ADT)
|
section in the Yocto Application Development Toolkit (ADT)
|
||||||
User’s Guide for more information.</para></listitem>
|
User’s Guide for more information.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
@@ -226,7 +229,7 @@
|
|||||||
<para>
|
<para>
|
||||||
The build process creates an entire Linux distribution, including the toolchain, from source.
|
The build process creates an entire Linux distribution, including the toolchain, from source.
|
||||||
For more information on this topic, see the
|
For more information on this topic, see the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#building-image'>Building an Image</ulink>"
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#building-image'>Building an Image</ulink>"
|
||||||
section in the Yocto Project Quick Start.
|
section in the Yocto Project Quick Start.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -240,8 +243,8 @@
|
|||||||
<listitem><para>Optionally ensure the <filename>conf/local.conf</filename> configuration file is set
|
<listitem><para>Optionally ensure the <filename>conf/local.conf</filename> configuration file is set
|
||||||
up how you want it.
|
up how you want it.
|
||||||
This file defines the target machine architecture and other build options.</para></listitem>
|
This file defines the target machine architecture and other build options.</para></listitem>
|
||||||
<listitem><para>Build the image using the <command>bitbake</command> command.
|
<listitem><para>Build the image using the BitBake command.
|
||||||
If you want information on BitBake, see the user manual at
|
If you want information on Bitbake, see the user manual at
|
||||||
<ulink url='http://docs.openembedded.org/bitbake/html'></ulink>.</para></listitem>
|
<ulink url='http://docs.openembedded.org/bitbake/html'></ulink>.</para></listitem>
|
||||||
<listitem><para>Run the image either on the actual hardware or using the QEMU
|
<listitem><para>Run the image either on the actual hardware or using the QEMU
|
||||||
emulator.</para></listitem>
|
emulator.</para></listitem>
|
||||||
@@ -264,7 +267,7 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can find details on all these steps in the
|
You can find details on all these steps in the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#using-pre-built'>Using Pre-Built Binaries and QEMU</ulink>"
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#using-pre-built'>Using Pre-Built Binaries and QEMU</ulink>"
|
||||||
section of the Yocto Project Quick Start.
|
section of the Yocto Project Quick Start.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -33,10 +33,15 @@
|
|||||||
<date>6 October 2011</date>
|
<date>6 October 2011</date>
|
||||||
<revremark>The initial document released with the Yocto Project 1.1 Release.</revremark>
|
<revremark>The initial document released with the Yocto Project 1.1 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.1.1</revnumber>
|
||||||
|
<date>15 March 2012</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.1.1 Release.</revremark>
|
||||||
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>2010-2011</year>
|
<year>2010-2012</year>
|
||||||
<holder>Linux Foundation</holder>
|
<holder>Linux Foundation</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
|
|
||||||
@@ -51,7 +56,7 @@
|
|||||||
<note>
|
<note>
|
||||||
Due to production processes, there could be differences between the Yocto Project
|
Due to production processes, there could be differences between the Yocto Project
|
||||||
documentation bundled in the release tarball and
|
documentation bundled in the release tarball and
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>
|
||||||
The Yocto Project Development Manual</ulink> on
|
The Yocto Project Development Manual</ulink> on
|
||||||
the <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink> website.
|
the <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink> website.
|
||||||
For the latest version of this manual, see the manual on the website.
|
For the latest version of this manual, see the manual on the website.
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
BIN
documentation/dev-manual/figures/kernel-example-repos-edison.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 24 KiB |
BIN
documentation/dev-manual/figures/kernel-overview-3-edison.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 28 KiB |
@@ -435,6 +435,7 @@ b.keycap,
|
|||||||
font-family: Courier, monospace;
|
font-family: Courier, monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
div.navheader, div.heading{
|
div.navheader, div.heading{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0em;
|
left: 0em;
|
||||||
@@ -965,9 +966,3 @@ table {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footnote {
|
|
||||||
font-size: small;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -159,8 +159,8 @@
|
|||||||
The features are tagged and organized by way of a branching strategy implemented by the
|
The features are tagged and organized by way of a branching strategy implemented by the
|
||||||
source code manager (SCM) Git.
|
source code manager (SCM) Git.
|
||||||
For information on Git as applied to the Yocto Project, see the
|
For information on Git as applied to the Yocto Project, see the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#git'>Git</ulink>"
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#git'>Git</ulink>"
|
||||||
section in <ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>The
|
section in <ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>The
|
||||||
Yocto Project Development Manual</ulink>.
|
Yocto Project Development Manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
@@ -288,8 +288,8 @@
|
|||||||
<para>
|
<para>
|
||||||
You can find documentation on Git at <ulink url='http://git-scm.com/documentation'></ulink>.
|
You can find documentation on Git at <ulink url='http://git-scm.com/documentation'></ulink>.
|
||||||
You can also get an introduction to Git as it applies to the Yocto Project in the
|
You can also get an introduction to Git as it applies to the Yocto Project in the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#git'>Git</ulink>"
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#git'>Git</ulink>"
|
||||||
section in <ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>The
|
section in <ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>The
|
||||||
Yocto Project Development Manual</ulink>.
|
Yocto Project Development Manual</ulink>.
|
||||||
This section overviews Git and describes a minimal set of commands that allow you to be
|
This section overviews Git and describes a minimal set of commands that allow you to be
|
||||||
functional using Git.
|
functional using Git.
|
||||||
|
|||||||
@@ -45,10 +45,10 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
For more discussion on the Yocto Project kernel, you can also see the
|
For more discussion on the Yocto Project kernel, you can also see the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#kernel-overview'>Kernel Overview</ulink>",
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#kernel-overview'>Kernel Overview</ulink>",
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#kernel-modification-workflow'>Kernel Modification Workflow</ulink>", and
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#kernel-modification-workflow'>Kernel Modification Workflow</ulink>", and
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#dev-manual-kernel-appendix'>Kernel Modification Example</ulink>" sections all in
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#dev-manual-kernel-appendix'>Kernel Modification Example</ulink>" sections all in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>The Yocto Project Development Manual</ulink>.
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>The Yocto Project Development Manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
|||||||
@@ -50,8 +50,8 @@
|
|||||||
</literallayout>
|
</literallayout>
|
||||||
For another example of how to set up a local Git repository of the Linux Yocto
|
For another example of how to set up a local Git repository of the Linux Yocto
|
||||||
kernel files, see the
|
kernel files, see the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#local-kernel-files'>Linux Yocto Kernel</ulink>" bulleted item in
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#local-kernel-files'>Linux Yocto Kernel</ulink>" bulleted item in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>The Yocto Project Development Manual</ulink>.
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>The Yocto Project Development Manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Once the Git repository is set up on your local machine, you can switch to the
|
Once the Git repository is set up on your local machine, you can switch to the
|
||||||
@@ -226,9 +226,9 @@
|
|||||||
You can find Git documentation at
|
You can find Git documentation at
|
||||||
<ulink url='http://git-scm.com/documentation'></ulink>.
|
<ulink url='http://git-scm.com/documentation'></ulink>.
|
||||||
You can find a simple overview of using Git with the Yocto Project in the
|
You can find a simple overview of using Git with the Yocto Project in the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#git'>Git</ulink>"
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#git'>Git</ulink>"
|
||||||
section of
|
section of
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>The Yocto
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>The Yocto
|
||||||
Project Development Manual</ulink>.
|
Project Development Manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -354,9 +354,9 @@
|
|||||||
The Yocto Project provides scripts that help you work in a collaborative development
|
The Yocto Project provides scripts that help you work in a collaborative development
|
||||||
environment.
|
environment.
|
||||||
For information on these scripts, see the
|
For information on these scripts, see the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#pushing-a-change-upstream'>Pushing a Change Upstream and Requesting a Pull</ulink>" and
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#pushing-a-change-upstream'>Pushing a Change Upstream and Requesting a Pull</ulink>" and
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#submitting-a-patch'>Submitting a Patch Through Email</ulink>" sections in
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#submitting-a-patch'>Submitting a Patch Through Email</ulink>" sections in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>The
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>The
|
||||||
Yocto Project Development Manual</ulink>".
|
Yocto Project Development Manual</ulink>".
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -637,8 +637,8 @@
|
|||||||
The messages used to commit changes are a large part of these standards.
|
The messages used to commit changes are a large part of these standards.
|
||||||
Consequently, be sure that the headers for each commit have the required information.
|
Consequently, be sure that the headers for each commit have the required information.
|
||||||
For information on how to follow the Yocto Project commit message standards, see the
|
For information on how to follow the Yocto Project commit message standards, see the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#how-to-submit-a-change'>How to Submit a Change</ulink>" section in
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#how-to-submit-a-change'>How to Submit a Change</ulink>" section in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>The
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>The
|
||||||
Yocto Project Development Manual</ulink>".
|
Yocto Project Development Manual</ulink>".
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -772,8 +772,8 @@
|
|||||||
existing similar BSP.
|
existing similar BSP.
|
||||||
The information is introductory in nature and does not provide step-by-step examples.
|
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
|
For detailed information on how to create a BSP given an existing similar BSP, see
|
||||||
the "<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#dev-manual-bsp-appendix'>BSP Development Example</ulink>" appendix in
|
the "<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#dev-manual-bsp-appendix'>BSP Development Example</ulink>" appendix in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>The
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>The
|
||||||
Yocto Project Development Manual</ulink>, or see the
|
Yocto Project Development Manual</ulink>, or see the
|
||||||
<ulink url='https://wiki.yoctoproject.org/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another'>Transcript:_creating_one_generic_Atom_BSP_from_another</ulink>
|
<ulink url='https://wiki.yoctoproject.org/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another'>Transcript:_creating_one_generic_Atom_BSP_from_another</ulink>
|
||||||
wiki page.
|
wiki page.
|
||||||
|
|||||||
@@ -48,10 +48,15 @@
|
|||||||
<date>6 October 2011</date>
|
<date>6 October 2011</date>
|
||||||
<revremark>Released with the Yocto Project 1.1 Release.</revremark>
|
<revremark>Released with the Yocto Project 1.1 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.1.1</revnumber>
|
||||||
|
<date>15 March 2012</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.1.1 Release.</revremark>
|
||||||
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>2010-2011</year>
|
<year>2010-2012</year>
|
||||||
<holder>Linux Foundation</holder>
|
<holder>Linux Foundation</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
|
|
||||||
@@ -63,7 +68,7 @@
|
|||||||
<note>
|
<note>
|
||||||
Due to production processes, there could be differences between the Yocto Project
|
Due to production processes, there could be differences between the Yocto Project
|
||||||
documentation bundled in the release tarball and
|
documentation bundled in the release tarball and
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/kernel-manual/kernel-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/kernel-manual/kernel-manual.html'>
|
||||||
The Yocto Project Kernel Architecture and Use Manual</ulink> on
|
The Yocto Project Kernel Architecture and Use Manual</ulink> on
|
||||||
the <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink> website.
|
the <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink> website.
|
||||||
For the latest version of this manual, see the manual on the website.
|
For the latest version of this manual, see the manual on the website.
|
||||||
|
|||||||
@@ -966,9 +966,3 @@ table {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footnote {
|
|
||||||
font-size: small;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -91,9 +91,9 @@
|
|||||||
with other plug-ins installed into the Eclipse IDE.
|
with other plug-ins installed into the Eclipse IDE.
|
||||||
Once you have your environment setup you need to configure the Eclipse plug-in.
|
Once you have your environment setup you need to configure the Eclipse plug-in.
|
||||||
For information on how to install and configure the Eclipse plug-in, see the
|
For information on how to install and configure the Eclipse plug-in, see the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/adt-manual/adt-manual.html#adt-eclipse'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/adt-manual/adt-manual.html#adt-eclipse'>
|
||||||
"Working Within Eclipse"</ulink> chapter in the
|
"Working Within Eclipse"</ulink> chapter in the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/adt-manual/adt-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/adt-manual/adt-manual.html'>
|
||||||
"Application Development Toolkit (ADT) User's Guide."</ulink>
|
"Application Development Toolkit (ADT) User's Guide."</ulink>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
<title>External Development Using the QEMU Emulator</title>
|
<title>External Development Using the QEMU Emulator</title>
|
||||||
<para>
|
<para>
|
||||||
Running Poky QEMU images is covered in the
|
Running Poky QEMU images is covered in the
|
||||||
<ulink url="http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html">
|
<ulink url="http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html">
|
||||||
Yocto Project Quick Start</ulink> in the "A Quick Test Run" section.
|
Yocto Project Quick Start</ulink> in the "A Quick Test Run" section.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
@@ -284,7 +284,7 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Because an external shell is launched rather than opening directly into the
|
Because an external shell is launched rather than opening directly into the
|
||||||
original terminal window, it allows easier interaction with BitBake's multiple
|
original terminal window, it allows easier interaction with Bitbake's multiple
|
||||||
threads as well as accomodates a future client/server split.
|
threads as well as accomodates a future client/server split.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|||||||
@@ -3,13 +3,14 @@
|
|||||||
|
|
||||||
<chapter id='extendpoky'>
|
<chapter id='extendpoky'>
|
||||||
|
|
||||||
<title>Extending the Yocto Project</title>
|
<title>Common Tasks</title>
|
||||||
<para>
|
<para>
|
||||||
This chapter provides information about how to extend the functionality
|
This chapter describes standard tasks such as adding new
|
||||||
already present in the Yocto Project.
|
|
||||||
The chapter also documents standard tasks such as adding new
|
|
||||||
software packages, extending or customizing images or porting the Yocto Project to
|
software packages, extending or customizing images or porting the Yocto Project to
|
||||||
new hardware (adding a new machine).
|
new hardware (adding a new machine).
|
||||||
|
The chapter also describes ways to modify package source code, combine multiple
|
||||||
|
versions of library files into a single image, track license changes, and handle
|
||||||
|
a package name alias.
|
||||||
Finally, the chapter contains advice about how to make changes to the
|
Finally, the chapter contains advice about how to make changes to the
|
||||||
Yocto Project to achieve the best results.
|
Yocto Project to achieve the best results.
|
||||||
</para>
|
</para>
|
||||||
@@ -531,9 +532,9 @@
|
|||||||
<para>
|
<para>
|
||||||
For a complete example that shows how to add a new machine to the Yocto Project,
|
For a complete example that shows how to add a new machine to the Yocto Project,
|
||||||
see the
|
see the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#dev-manual-bsp-appendix'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#dev-manual-bsp-appendix'>
|
||||||
BSP Development Example</ulink> in Appendix A of
|
BSP Development Example</ulink> in Appendix A of
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>
|
||||||
The Yocto Project Development Manual</ulink>.
|
The Yocto Project Development Manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -658,6 +659,412 @@
|
|||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section id="usingpoky-modifing-packages">
|
||||||
|
<title>Modifying Package Source Code</title>
|
||||||
|
<para>
|
||||||
|
Although the Yocto Project is usually used to build software, you can use it to modify software.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
During a build, source is available in the
|
||||||
|
<filename><link linkend='var-WORKDIR'>WORKDIR</link></filename> directory.
|
||||||
|
The actual location depends on the type of package and the architecture of the target device.
|
||||||
|
For a standard recipe not related to
|
||||||
|
<filename><link linkend='var-MACHINE'>MACHINE</link></filename>, the location is
|
||||||
|
<filename>tmp/work/PACKAGE_ARCH-poky-TARGET_OS/PN-PV-PR/</filename>.
|
||||||
|
For target device-dependent packages, you should use the <filename>MACHINE</filename>
|
||||||
|
variable instead of
|
||||||
|
<filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename>
|
||||||
|
in the directory name.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<tip>
|
||||||
|
Be sure the package recipe sets the
|
||||||
|
<filename><link linkend='var-S'>S</link></filename> variable to something
|
||||||
|
other than the standard <filename>WORKDIR/PN-PV/</filename> value.
|
||||||
|
</tip>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
After building a package, you can modify the package source code without problems.
|
||||||
|
The easiest way to test your changes is by calling the
|
||||||
|
<filename>compile</filename> task as shown in the following example:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ bitbake -c compile -f NAME_OF_PACKAGE
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The <filename>-f</filename> or <filename>--force</filename>
|
||||||
|
option forces re-execution of the specified task.
|
||||||
|
You can call other tasks this way as well.
|
||||||
|
But note that all the modifications in
|
||||||
|
<filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>
|
||||||
|
are gone once you execute <filename>-c clean</filename> for a package.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="usingpoky-modifying-packages-quilt">
|
||||||
|
<title>Modifying Package Source Code with Quilt</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
By default Poky uses <ulink url='http://savannah.nongnu.org/projects/quilt'>Quilt</ulink>
|
||||||
|
to manage patches in the <filename>do_patch</filename> task.
|
||||||
|
This is a powerful tool that you can use to track all modifications to package sources.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Before modifying source code, it is important to notify Quilt so it can track the changes
|
||||||
|
into the new patch file:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ quilt new NAME-OF-PATCH.patch
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
After notifying Quilt, add all modified files into that patch:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ quilt add file1 file2 file3
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You can now start editing.
|
||||||
|
Once you are done editing, you need to use Quilt to generate the final patch that
|
||||||
|
will contain all your modifications.
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ quilt refresh
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You can find the resulting patch file in the
|
||||||
|
<filename>patches/</filename> subdirectory of the source
|
||||||
|
(<filename><link linkend='var-S'>S</link></filename>) directory.
|
||||||
|
For future builds, you should copy the patch into the Yocto Project metadata and add it into the
|
||||||
|
<filename><link linkend='var-SRC_URI'>SRC_URI</link></filename> of a recipe.
|
||||||
|
Here is an example:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
SRC_URI += "file://NAME-OF-PATCH.patch"
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Finally, don't forget to 'bump' the
|
||||||
|
<filename><link linkend='var-PR'>PR</link></filename> value in the same recipe since
|
||||||
|
the resulting packages have changed.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="building-multiple-architecture-libraries-into-one-image">
|
||||||
|
<title>Combining Multiple Versions of Library Files into One Image</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The build system offers the ability to build libraries with different
|
||||||
|
target optimizations or architecture formats and combine these together
|
||||||
|
into one system image.
|
||||||
|
You can link different binaries in the image
|
||||||
|
against the different libraries as needed for specific use cases.
|
||||||
|
This feature is called "Multilib."
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
An example would be where you have most of a system compiled in 32-bit
|
||||||
|
mode using 32-bit libraries, but you have something large, like a database
|
||||||
|
engine, that needs to be a 64-bit application and use 64-bit libraries.
|
||||||
|
Multilib allows you to get the best of both 32-bit and 64-bit libraries.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
While the Multilib feature is most commonly used for 32 and 64-bit differences,
|
||||||
|
the approach the build system uses facilitates different target optimizations.
|
||||||
|
You could compile some binaries to use one set of libraries and other binaries
|
||||||
|
to use other different sets of libraries.
|
||||||
|
The libraries could differ in architecture, compiler options, or other
|
||||||
|
optimizations.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This section overviews the Multilib process only.
|
||||||
|
For more details on how to implement Multilib, see the
|
||||||
|
<ulink url='https://wiki.yoctoproject.org/wiki/Multilib'>Multilib</ulink> wiki
|
||||||
|
page.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<section id='preparing-to-use-multilib'>
|
||||||
|
<title>Preparing to use Multilib</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
User-specific requirements drive the Multilib feature,
|
||||||
|
Consequently, there is no one "out-of-the-box" configuration that likely
|
||||||
|
exists to meet your needs.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
In order to enable Multilib, you first need to ensure your recipe is
|
||||||
|
extended to support multiple libraries.
|
||||||
|
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 Yocto Project files directory to see how this is
|
||||||
|
done using the <filename>BBCLASSEXTEND</filename> variable.
|
||||||
|
Eventually, all recipes will be covered and this list will be unneeded.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For the most part, the Multilib class extension works automatically to
|
||||||
|
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.
|
||||||
|
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.
|
||||||
|
This automatic extension code resides in <filename>multilib.bbclass</filename>.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='using-multilib'>
|
||||||
|
<title>Using Multilib</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
After you have set up the recipes, you need to define the actual
|
||||||
|
combination of multiple libraries you want to build.
|
||||||
|
You accomplish this through your <filename>local.conf</filename>
|
||||||
|
configuration file in the Yocto Project build directory.
|
||||||
|
An example configuration would be as follows:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
MACHINE = "qemux86-64"
|
||||||
|
require conf/multilib.conf
|
||||||
|
MULTILIBS = "multilib:lib32"
|
||||||
|
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
|
||||||
|
MULTILIB_IMAGE_INSTALL = "lib32-connman"
|
||||||
|
</literallayout>
|
||||||
|
This example enables an
|
||||||
|
additional library named <filename>lib32</filename> alongside the
|
||||||
|
normal target packages.
|
||||||
|
When combining these "lib32" alternatives, the example uses "x86" for tuning.
|
||||||
|
For information on this particular tuning, see
|
||||||
|
<filename>meta/conf/machine/include/ia32/arch-ia32.inc</filename>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The example then includes <filename>lib32-connman</filename>
|
||||||
|
in all the images, which illustrates one method of including a
|
||||||
|
multiple library dependency.
|
||||||
|
You can use a normal image build to include this dependency,
|
||||||
|
for example:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ bitbake core-image-sato
|
||||||
|
</literallayout>
|
||||||
|
You can also build Multilib packages specifically with a command like this:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ bitbake lib32-connman
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='additional-implementation-details'>
|
||||||
|
<title>Additional Implementation Details</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Different packaging systems have different levels of native Multilib
|
||||||
|
support.
|
||||||
|
For the RPM Package Management System, the following implementation details
|
||||||
|
exist:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>A unique architecture is defined for the Multilib packages,
|
||||||
|
along with creating a unique deploy folder under
|
||||||
|
<filename>tmp/deploy/rpm</filename> in the Yocto
|
||||||
|
Project build directory.
|
||||||
|
For example, consider <filename>lib32</filename> in a
|
||||||
|
<filename>qemux86-64</filename> image.
|
||||||
|
The possible architectures in the system are "all", "qemux86_64",
|
||||||
|
"lib32_qemux86_64", and "lib32_x86".</para></listitem>
|
||||||
|
<listitem><para>The <filename>${MLPREFIX}</filename> variable is stripped from
|
||||||
|
<filename>${PN}</filename> during RPM packaging.
|
||||||
|
The naming for a normal RPM package and a Multilib RPM package in a
|
||||||
|
<filename>qemux86-64</filename> system resolves to something similar to
|
||||||
|
<filename>bash-4.1-r2.x86_64.rpm</filename> and
|
||||||
|
<filename>bash-4.1.r2.lib32_x86.rpm</filename>, respectively.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>When installing a Multilib image, the RPM backend first
|
||||||
|
installs the base image and then installs the Multilib libraries.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>The build system relies on RPM to resolve the identical files in the
|
||||||
|
two (or more) Multilib packages.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For the IPK Package Management System, the following implementation details exist:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>The <filename>${MLPREFIX}</filename> is not stripped from
|
||||||
|
<filename>${PN}</filename> during IPK packaging.
|
||||||
|
The naming for a normal RPM package and a Multilib IPK package in a
|
||||||
|
<filename>qemux86-64</filename> system resolves to something like
|
||||||
|
<filename>bash_4.1-r2.x86_64.ipk</filename> and
|
||||||
|
<filename>lib32-bash_4.1-rw_x86.ipk</filename>, respectively.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>The IPK deploy folder is not modified with
|
||||||
|
<filename>${MLPREFIX}</filename> because packages with and without
|
||||||
|
the Multilib feature can exist in the same folder due to the
|
||||||
|
<filename>${PN}</filename> differences.</para></listitem>
|
||||||
|
<listitem><para>IPK defines a sanity check for Multilib installation
|
||||||
|
using certain rules for file comparison, overridden, etc.
|
||||||
|
</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="usingpoky-configuring-LIC_FILES_CHKSUM">
|
||||||
|
<title>Tracking License Changes</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The license of an upstream project might change in the future. In order to prevent these changes
|
||||||
|
going unnoticed, the Yocto Project provides a
|
||||||
|
<filename><link linkend='var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</link></filename>
|
||||||
|
variable to track changes to the license text. The checksums are validated at the end of the
|
||||||
|
configure step, and if the checksums do not match, the build will fail.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<section id="usingpoky-specifying-LIC_FILES_CHKSUM">
|
||||||
|
<title>Specifying the <filename>LIC_FILES_CHKSUM</filename> Variable</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The <filename>LIC_FILES_CHKSUM</filename>
|
||||||
|
variable contains checksums of the license text in the source code for the recipe.
|
||||||
|
Following is an example of how to specify <filename>LIC_FILES_CHKSUM</filename>:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
LIC_FILES_CHKSUM = "file://COPYING;md5=xxxx \
|
||||||
|
file://licfile1.txt;beginline=5;endline=29;md5=yyyy \
|
||||||
|
file://licfile2.txt;endline=50;md5=zzzz \
|
||||||
|
..."
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The Yocto Project uses the
|
||||||
|
<filename><link linkend='var-S'>S</link></filename> variable as the
|
||||||
|
default directory used when searching files listed in
|
||||||
|
<filename>LIC_FILES_CHKSUM</filename>.
|
||||||
|
The previous example employs the default directory.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You can also use relative paths as shown in the following example:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
LIC_FILES_CHKSUM = "file://src/ls.c;startline=5;endline=16;\
|
||||||
|
md5=bb14ed3c4cda583abc85401304b5cd4e"
|
||||||
|
LIC_FILES_CHKSUM = "file://../license.html;md5=5c94767cedb5d6987c902ac850ded2c6"
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
In this example, the first line locates a file in
|
||||||
|
<filename><link linkend='var-S'>S</link>/src/ls.c</filename>.
|
||||||
|
The second line refers to a file in
|
||||||
|
<filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>, which is the parent
|
||||||
|
of <filename>S</filename>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Note that this variable is mandatory for all recipes, unless the
|
||||||
|
<filename>LICENSE</filename> variable is set to "CLOSED".
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="usingpoky-LIC_FILES_CHKSUM-explanation-of-syntax">
|
||||||
|
<title>Explanation of Syntax</title>
|
||||||
|
<para>
|
||||||
|
As mentioned in the previous section, the
|
||||||
|
<filename>LIC_FILES_CHKSUM</filename> variable lists all the
|
||||||
|
important files that contain the license text for the source code.
|
||||||
|
It is possible to specify a checksum for an entire file, or a specific section of a
|
||||||
|
file (specified by beginning and ending line numbers with the "beginline" and "endline"
|
||||||
|
parameters, respectively).
|
||||||
|
The latter is useful for source files with a license notice header,
|
||||||
|
README documents, and so forth.
|
||||||
|
If you do not use the "beginline" parameter, then it is assumed that the text begins on the
|
||||||
|
first line of the file.
|
||||||
|
Similarly, if you do not use the "endline" parameter, it is assumed that the license text
|
||||||
|
ends with the last line of the file.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The "md5" parameter stores the md5 checksum of the license text.
|
||||||
|
If the license text changes in any way as compared to this parameter
|
||||||
|
then a mismatch occurs.
|
||||||
|
This mismatch triggers a build failure and notifies the developer.
|
||||||
|
Notification allows the developer to review and address the license text changes.
|
||||||
|
Also note that if a mismatch occurs during the build, the correct md5
|
||||||
|
checksum is placed in the build log and can be easily copied to the recipe.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
There is no limit to how many files you can specify using the
|
||||||
|
<filename>LIC_FILES_CHKSUM</filename> variable.
|
||||||
|
Generally, however, every project requires a few specifications for license tracking.
|
||||||
|
Many projects have a "COPYING" file that stores the license information for all the source
|
||||||
|
code files.
|
||||||
|
This practice allows you to just track the "COPYING" file as long as it is kept up to date.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<tip>
|
||||||
|
If you specify an empty or invalid "md5" parameter, BitBake returns an md5 mis-match
|
||||||
|
error and displays the correct "md5" parameter value during the build.
|
||||||
|
The correct parameter is also captured in the build log.
|
||||||
|
</tip>
|
||||||
|
|
||||||
|
<tip>
|
||||||
|
If the whole file contains only license text, you do not need to use the "beginline" and
|
||||||
|
"endline" parameters.
|
||||||
|
</tip>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="usingpoky-configuring-DISTRO_PN_ALIAS">
|
||||||
|
<title>Handling a Package Name Alias</title>
|
||||||
|
<para>
|
||||||
|
Sometimes a package name you are using might exist under an alias or as a similarly named
|
||||||
|
package in a different distribution.
|
||||||
|
The Yocto Project implements a <filename>distro_check</filename>
|
||||||
|
task that automatically connects to major distributions
|
||||||
|
and checks for these situations.
|
||||||
|
If the package exists under a different name in a different distribution, you get a
|
||||||
|
<filename>distro_check</filename> mismatch.
|
||||||
|
You can resolve this problem by defining a per-distro recipe name alias using the
|
||||||
|
<filename><link linkend='var-DISTRO_PN_ALIAS'>DISTRO_PN_ALIAS</link></filename> variable.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Following is an example that shows how you specify the <filename>DISTRO_PN_ALIAS</filename>
|
||||||
|
variable:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
DISTRO_PN_ALIAS_pn-PACKAGENAME = "distro1=package_name_alias1 \
|
||||||
|
distro2=package_name_alias2 \
|
||||||
|
distro3=package_name_alias3 \
|
||||||
|
..."
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
If you have more than one distribution alias, separate them with a space.
|
||||||
|
Note that the Yocto Project currently automatically checks the
|
||||||
|
Fedora, OpenSuSE, Debian, Ubuntu,
|
||||||
|
and Mandriva distributions for source package recipes without having to specify them
|
||||||
|
using the <filename>DISTRO_PN_ALIAS</filename> variable.
|
||||||
|
For example, the following command generates a report that lists the Linux distributions
|
||||||
|
that include the sources for each of the Yocto Project recipes.
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ bitbake world -f -c distro_check
|
||||||
|
</literallayout>
|
||||||
|
The results are stored in the <filename>build/tmp/log/distro_check-${DATETIME}.results</filename>
|
||||||
|
file found in the Yocto Project files area.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section id="usingpoky-changes">
|
<section id="usingpoky-changes">
|
||||||
<title>Making and Maintaining Changes</title>
|
<title>Making and Maintaining Changes</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -976,411 +1383,6 @@
|
|||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="usingpoky-modifing-packages">
|
|
||||||
<title>Modifying Package Source Code</title>
|
|
||||||
<para>
|
|
||||||
Although the Yocto Project is usually used to build software, you can use it to modify software.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
During a build, source is available in the
|
|
||||||
<filename><link linkend='var-WORKDIR'>WORKDIR</link></filename> directory.
|
|
||||||
The actual location depends on the type of package and the architecture of the target device.
|
|
||||||
For a standard recipe not related to
|
|
||||||
<filename><link linkend='var-MACHINE'>MACHINE</link></filename>, the location is
|
|
||||||
<filename>tmp/work/PACKAGE_ARCH-poky-TARGET_OS/PN-PV-PR/</filename>.
|
|
||||||
For target device-dependent packages, you should use the <filename>MACHINE</filename>
|
|
||||||
variable instead of
|
|
||||||
<filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename>
|
|
||||||
in the directory name.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<tip>
|
|
||||||
Be sure the package recipe sets the
|
|
||||||
<filename><link linkend='var-S'>S</link></filename> variable to something
|
|
||||||
other than the standard <filename>WORKDIR/PN-PV/</filename> value.
|
|
||||||
</tip>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
After building a package, you can modify the package source code without problems.
|
|
||||||
The easiest way to test your changes is by calling the
|
|
||||||
<filename>compile</filename> task as shown in the following example:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
$ bitbake -c compile -f NAME_OF_PACKAGE
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The <filename>-f</filename> or <filename>--force</filename>
|
|
||||||
option forces re-execution of the specified task.
|
|
||||||
You can call other tasks this way as well.
|
|
||||||
But note that all the modifications in
|
|
||||||
<filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>
|
|
||||||
are gone once you execute <filename>-c clean</filename> for a package.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="usingpoky-modifying-packages-quilt">
|
|
||||||
<title>Modifying Package Source Code with Quilt</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
By default Poky uses <ulink url='http://savannah.nongnu.org/projects/quilt'>Quilt</ulink>
|
|
||||||
to manage patches in the <filename>do_patch</filename> task.
|
|
||||||
This is a powerful tool that you can use to track all modifications to package sources.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Before modifying source code, it is important to notify Quilt so it can track the changes
|
|
||||||
into the new patch file:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
$ quilt new NAME-OF-PATCH.patch
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
After notifying Quilt, add all modified files into that patch:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
$ quilt add file1 file2 file3
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
You can now start editing.
|
|
||||||
Once you are done editing, you need to use Quilt to generate the final patch that
|
|
||||||
will contain all your modifications.
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
$ quilt refresh
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
You can find the resulting patch file in the
|
|
||||||
<filename>patches/</filename> subdirectory of the source
|
|
||||||
(<filename><link linkend='var-S'>S</link></filename>) directory.
|
|
||||||
For future builds, you should copy the patch into the Yocto Project metadata and add it into the
|
|
||||||
<filename><link linkend='var-SRC_URI'>SRC_URI</link></filename> of a recipe.
|
|
||||||
Here is an example:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
SRC_URI += "file://NAME-OF-PATCH.patch"
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Finally, don't forget to 'bump' the
|
|
||||||
<filename><link linkend='var-PR'>PR</link></filename> value in the same recipe since
|
|
||||||
the resulting packages have changed.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="building-multiple-architecture-libraries-into-one-image">
|
|
||||||
<title>Combining Multiple versions of Library Files into One Image</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The build system offers the ability to build libraries with different
|
|
||||||
target optimizations or architecture formats and combine these together
|
|
||||||
into one system image.
|
|
||||||
You can link different binaries in the image
|
|
||||||
against the different libraries as needed for specific use cases.
|
|
||||||
This feature is called "Multilib."
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
An example would be where you have most of a system compiled in 32-bit
|
|
||||||
mode using 32-bit libraries, but you have something large, like a database
|
|
||||||
engine, that needs to be a 64-bit application and use 64-bit libraries.
|
|
||||||
Multilib allows you to get the best of both 32-bit and 64-bit libraries.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
While the Multilib feature is most commonly used for 32 and 64-bit differences,
|
|
||||||
the approach the build system uses facilitates different target optimizations.
|
|
||||||
You could compile some binaries to use one set of libraries and other binaries
|
|
||||||
to use other different sets of libraries.
|
|
||||||
The libraries could differ in architecture, compiler options, or other
|
|
||||||
optimizations.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
This section overviews the Multilib process only.
|
|
||||||
For more details on how to implement Multilib, see the
|
|
||||||
<ulink url='https://wiki.yoctoproject.org/wiki/Multilib'>Multilib</ulink> wiki
|
|
||||||
page.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<section id='preparing-to-use-multilib'>
|
|
||||||
<title>Preparing to use Multilib</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
User-specific requirements drive the Multilib feature,
|
|
||||||
Consequently, there is no one "out-of-the-box" configuration that likely
|
|
||||||
exists to meet your needs.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
In order to enable Multilib, you first need to ensure your recipe is
|
|
||||||
extended to support multiple libraries.
|
|
||||||
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 Yocto Project files directory to see how this is
|
|
||||||
done using the <filename>BBCLASSEXTEND</filename> variable.
|
|
||||||
Eventually, all recipes will be covered and this list will be unneeded.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
For the most part, the Multilib class extension works automatically to
|
|
||||||
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.
|
|
||||||
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.
|
|
||||||
This automatic extension code resides in <filename>multilib.bbclass</filename>.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='using-multilib'>
|
|
||||||
<title>Using Multilib</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
After you have set up the recipes, you need to define the actual
|
|
||||||
combination of multiple libraries you want to build.
|
|
||||||
You accomplish this through your <filename>local.conf</filename>
|
|
||||||
configuration file in the Yocto Project build directory.
|
|
||||||
An example configuration would be as follows:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
MACHINE = "qemux86-64"
|
|
||||||
require conf/multilib.conf
|
|
||||||
MULTILIBS = "multilib:lib32"
|
|
||||||
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
|
|
||||||
MULTILIB_IMAGE_INSTALL = "lib32-connman"
|
|
||||||
</literallayout>
|
|
||||||
This example enables an
|
|
||||||
additional library named <filename>lib32</filename> alongside the
|
|
||||||
normal target packages.
|
|
||||||
When combining these "lib32" alternatives, the example uses "x86" for tuning.
|
|
||||||
For information on this particular tuning, see
|
|
||||||
<filename>meta/conf/machine/include/ia32/arch-ia32.inc</filename>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The example then includes <filename>lib32-connman</filename>
|
|
||||||
in all the images, which illustrates one method of including a
|
|
||||||
multiple library dependency.
|
|
||||||
You can use a normal image build to include this dependency,
|
|
||||||
for example:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
$ bitbake core-image-sato
|
|
||||||
</literallayout>
|
|
||||||
You can also build Multilib packages specifically with a command like this:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
$ bitbake lib32-connman
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='additional-implementation-details'>
|
|
||||||
<title>Additional Implementation Details</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Different packaging systems have different levels of native Multilib
|
|
||||||
support.
|
|
||||||
For the RPM Package Management System, the following implementation details
|
|
||||||
exist:
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem><para>A unique architecture is defined for the Multilib packages,
|
|
||||||
along with creating a unique deploy folder under
|
|
||||||
<filename>tmp/deploy/rpm</filename> in the Yocto
|
|
||||||
Project build directory.
|
|
||||||
For example, consider <filename>lib32</filename> in a
|
|
||||||
<filename>qemux86-64</filename> image.
|
|
||||||
The possible architectures in the system are "all", "qemux86_64",
|
|
||||||
"lib32_qemux86_64", and "lib32_x86".</para></listitem>
|
|
||||||
<listitem><para>The <filename>${MLPREFIX}</filename> variable is stripped from
|
|
||||||
<filename>${PN}</filename> during RPM packaging.
|
|
||||||
The naming for a normal RPM package and a Multilib RPM package in a
|
|
||||||
<filename>qemux86-64</filename> system resolves to something similar to
|
|
||||||
<filename>bash-4.1-r2.x86_64.rpm</filename> and
|
|
||||||
<filename>bash-4.1.r2.lib32_x86.rpm</filename>, respectively.
|
|
||||||
</para></listitem>
|
|
||||||
<listitem><para>When installing a Multilib image, the RPM backend first
|
|
||||||
installs the base image and then installs the Multilib libraries.
|
|
||||||
</para></listitem>
|
|
||||||
<listitem><para>The build system relies on RPM to resolve the identical files in the
|
|
||||||
two (or more) Multilib packages.</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
For the IPK Package Management System, the following implementation details exist:
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem><para>The <filename>${MLPREFIX}</filename> is not stripped from
|
|
||||||
<filename>${PN}</filename> during IPK packaging.
|
|
||||||
The naming for a normal RPM package and a Multilib IPK package in a
|
|
||||||
<filename>qemux86-64</filename> system resolves to something like
|
|
||||||
<filename>bash_4.1-r2.x86_64.ipk</filename> and
|
|
||||||
<filename>lib32-bash_4.1-rw_x86.ipk</filename>, respectively.
|
|
||||||
</para></listitem>
|
|
||||||
<listitem><para>The IPK deploy folder is not modified with
|
|
||||||
<filename>${MLPREFIX}</filename> because packages with and without
|
|
||||||
the Multilib feature can exist in the same folder due to the
|
|
||||||
<filename>${PN}</filename> differences.</para></listitem>
|
|
||||||
<listitem><para>IPK defines a sanity check for Multilib installation
|
|
||||||
using certain rules for file comparison, overridden, etc.
|
|
||||||
</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="usingpoky-configuring-LIC_FILES_CHKSUM">
|
|
||||||
<title>Tracking License Changes</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The license of an upstream project might change in the future. In order to prevent these changes
|
|
||||||
going unnoticed, the Yocto Project provides a
|
|
||||||
<filename><link linkend='var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</link></filename>
|
|
||||||
variable to track changes to the license text. The checksums are validated at the end of the
|
|
||||||
configure step, and if the checksums do not match, the build will fail.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<section id="usingpoky-specifying-LIC_FILES_CHKSUM">
|
|
||||||
<title>Specifying the <filename>LIC_FILES_CHKSUM</filename> Variable</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The <filename>LIC_FILES_CHKSUM</filename>
|
|
||||||
variable contains checksums of the license text in the source code for the recipe.
|
|
||||||
Following is an example of how to specify <filename>LIC_FILES_CHKSUM</filename>:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=xxxx \
|
|
||||||
file://licfile1.txt;beginline=5;endline=29;md5=yyyy \
|
|
||||||
file://licfile2.txt;endline=50;md5=zzzz \
|
|
||||||
..."
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The Yocto Project uses the
|
|
||||||
<filename><link linkend='var-S'>S</link></filename> variable as the
|
|
||||||
default directory used when searching files listed in
|
|
||||||
<filename>LIC_FILES_CHKSUM</filename>.
|
|
||||||
The previous example employs the default directory.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
You can also use relative paths as shown in the following example:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
LIC_FILES_CHKSUM = "file://src/ls.c;startline=5;endline=16;\
|
|
||||||
md5=bb14ed3c4cda583abc85401304b5cd4e"
|
|
||||||
LIC_FILES_CHKSUM = "file://../license.html;md5=5c94767cedb5d6987c902ac850ded2c6"
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
In this example, the first line locates a file in
|
|
||||||
<filename><link linkend='var-S'>S</link>/src/ls.c</filename>.
|
|
||||||
The second line refers to a file in
|
|
||||||
<filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>, which is the parent
|
|
||||||
of <filename>S</filename>.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Note that this variable is mandatory for all recipes, unless the
|
|
||||||
<filename>LICENSE</filename> variable is set to "CLOSED".
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="usingpoky-LIC_FILES_CHKSUM-explanation-of-syntax">
|
|
||||||
<title>Explanation of Syntax</title>
|
|
||||||
<para>
|
|
||||||
As mentioned in the previous section, the
|
|
||||||
<filename>LIC_FILES_CHKSUM</filename> variable lists all the
|
|
||||||
important files that contain the license text for the source code.
|
|
||||||
It is possible to specify a checksum for an entire file, or a specific section of a
|
|
||||||
file (specified by beginning and ending line numbers with the "beginline" and "endline"
|
|
||||||
parameters, respectively).
|
|
||||||
The latter is useful for source files with a license notice header,
|
|
||||||
README documents, and so forth.
|
|
||||||
If you do not use the "beginline" parameter, then it is assumed that the text begins on the
|
|
||||||
first line of the file.
|
|
||||||
Similarly, if you do not use the "endline" parameter, it is assumed that the license text
|
|
||||||
ends with the last line of the file.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The "md5" parameter stores the md5 checksum of the license text.
|
|
||||||
If the license text changes in any way as compared to this parameter
|
|
||||||
then a mismatch occurs.
|
|
||||||
This mismatch triggers a build failure and notifies the developer.
|
|
||||||
Notification allows the developer to review and address the license text changes.
|
|
||||||
Also note that if a mismatch occurs during the build, the correct md5
|
|
||||||
checksum is placed in the build log and can be easily copied to the recipe.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
There is no limit to how many files you can specify using the
|
|
||||||
<filename>LIC_FILES_CHKSUM</filename> variable.
|
|
||||||
Generally, however, every project requires a few specifications for license tracking.
|
|
||||||
Many projects have a "COPYING" file that stores the license information for all the source
|
|
||||||
code files.
|
|
||||||
This practice allows you to just track the "COPYING" file as long as it is kept up to date.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<tip>
|
|
||||||
If you specify an empty or invalid "md5" parameter, BitBake returns an md5 mis-match
|
|
||||||
error and displays the correct "md5" parameter value during the build.
|
|
||||||
The correct parameter is also captured in the build log.
|
|
||||||
</tip>
|
|
||||||
|
|
||||||
<tip>
|
|
||||||
If the whole file contains only license text, you do not need to use the "beginline" and
|
|
||||||
"endline" parameters.
|
|
||||||
</tip>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="usingpoky-configuring-DISTRO_PN_ALIAS">
|
|
||||||
<title>Handling a Package Name Alias</title>
|
|
||||||
<para>
|
|
||||||
Sometimes a package name you are using might exist under an alias or as a similarly named
|
|
||||||
package in a different distribution.
|
|
||||||
The Yocto Project implements a <filename>distro_check</filename>
|
|
||||||
task that automatically connects to major distributions
|
|
||||||
and checks for these situations.
|
|
||||||
If the package exists under a different name in a different distribution, you get a
|
|
||||||
<filename>distro_check</filename> mismatch.
|
|
||||||
You can resolve this problem by defining a per-distro recipe name alias using the
|
|
||||||
<filename><link linkend='var-DISTRO_PN_ALIAS'>DISTRO_PN_ALIAS</link></filename> variable.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Following is an example that shows how you specify the <filename>DISTRO_PN_ALIAS</filename>
|
|
||||||
variable:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
DISTRO_PN_ALIAS_pn-PACKAGENAME = "distro1=package_name_alias1 \
|
|
||||||
distro2=package_name_alias2 \
|
|
||||||
distro3=package_name_alias3 \
|
|
||||||
..."
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
If you have more than one distribution alias, separate them with a space.
|
|
||||||
Note that the Yocto Project currently automatically checks the
|
|
||||||
Fedora, OpenSuSE, Debian, Ubuntu,
|
|
||||||
and Mandriva distributions for source package recipes without having to specify them
|
|
||||||
using the <filename>DISTRO_PN_ALIAS</filename> variable.
|
|
||||||
For example, the following command generates a report that lists the Linux distributions
|
|
||||||
that include the sources for each of the Yocto Project recipes.
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
$ bitbake world -f -c distro_check
|
|
||||||
</literallayout>
|
|
||||||
The results are stored in the <filename>build/tmp/log/distro_check-${DATETIME}.results</filename>
|
|
||||||
file found in the Yocto Project files area.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
@@ -33,8 +33,8 @@
|
|||||||
You can use a stand-alone tarball to provide Python 2.6.
|
You can use a stand-alone tarball to provide Python 2.6.
|
||||||
You can find pre-built 32 and 64-bit versions of Python 2.6 at the following locations:
|
You can find pre-built 32 and 64-bit versions of Python 2.6 at the following locations:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><ulink url='http://www.yoctoproject.org/downloads/miscsupport/yocto-1.1-python-nativesdk/python-nativesdk-standalone-i686.tar.bz2'>32-bit tarball</ulink></para></listitem>
|
<listitem><para><ulink url='http://downloads.yoctoproject.org/releases/miscsupport/yocto-1.0-python-nativesdk/python-nativesdk-standalone-i686.tar.bz2'>32-bit tarball</ulink></para></listitem>
|
||||||
<listitem><para><ulink url='http://www.yoctoproject.org/downloads/miscsupport/yocto-1.1-python-nativesdk/python-nativesdk-standalone-x86_64.tar.bz2'>64-bit tarball</ulink></para></listitem>
|
<listitem><para><ulink url='http://downloads.yoctoproject.org/releases/miscsupport/yocto-1.0-python-nativesdk/python-nativesdk-standalone-x86_64.tar.bz2'>64-bit tarball</ulink></para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
|
|||||||
@@ -15,8 +15,11 @@
|
|||||||
construct complete Linux images.
|
construct complete Linux images.
|
||||||
You can find complete introductory and getting started information on the Yocto Project
|
You can find complete introductory and getting started information on the Yocto Project
|
||||||
by reading the
|
by reading the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||||
Yocto Project Quick Start</ulink>.
|
Yocto Project Quick Start</ulink>.
|
||||||
|
For task-based information using the Yocto Project, see
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1//dev-manual/dev-manual.html'>
|
||||||
|
The Yocto Project Development Manual</ulink>.
|
||||||
You can also find lots of information on the Yocto Project on the
|
You can also find lots of information on the Yocto Project on the
|
||||||
<ulink url="http://www.yoctoproject.org">Yocto Project website</ulink>.
|
<ulink url="http://www.yoctoproject.org">Yocto Project website</ulink>.
|
||||||
</para>
|
</para>
|
||||||
@@ -36,6 +39,11 @@
|
|||||||
<link linkend='extendpoky'>Extending the Yocto Project</link>:</emphasis> This chapter
|
<link linkend='extendpoky'>Extending the Yocto Project</link>:</emphasis> This chapter
|
||||||
provides information about how to extend and customize the Yocto Project
|
provides information about how to extend and customize the Yocto Project
|
||||||
along with advice on how to manage these changes.</para></listitem>
|
along with advice on how to manage these changes.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<link linkend='technical-details'>Technical Details</link>:</emphasis>
|
||||||
|
This chapter describes fundamental Yocto Project components as well as an explanation
|
||||||
|
behind how the Yocto Project uses shared state (sstate) cache to speed build time.
|
||||||
|
</para></listitem>
|
||||||
<listitem><para><emphasis>
|
<listitem><para><emphasis>
|
||||||
<link linkend='bsp'>Board Support Packages (BSP) - Developer's Guide</link>:</emphasis>
|
<link linkend='bsp'>Board Support Packages (BSP) - Developer's Guide</link>:</emphasis>
|
||||||
This chapter describes the example filesystem layout for BSP development and
|
This chapter describes the example filesystem layout for BSP development and
|
||||||
@@ -89,10 +97,10 @@
|
|||||||
<section id='intro-requirements'>
|
<section id='intro-requirements'>
|
||||||
<title>System Requirements</title>
|
<title>System Requirements</title>
|
||||||
<para>
|
<para>
|
||||||
For Yocto Project system requirements, see the
|
For system Yocto Project system requirements, see the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#resources'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#resources'>
|
||||||
What You Need and How You Get It</ulink> section in the
|
What You Need and How You Get It</ulink> section in the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||||
Yocto Project Quick Start</ulink>.
|
Yocto Project Quick Start</ulink>.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -125,9 +133,9 @@
|
|||||||
You can get these files by downloading a Yocto Project release tarball and unpacking it,
|
You can get these files by downloading a Yocto Project release tarball and unpacking it,
|
||||||
or by establishing a Git repository of the files.
|
or by establishing a Git repository of the files.
|
||||||
For information on both these methods, see
|
For information on both these methods, see
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#getting-setup'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#getting-setup'>
|
||||||
Getting Setup</ulink> section in
|
Getting Setup</ulink> section in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>
|
||||||
The Yocto Project Development Manual</ulink>.
|
The Yocto Project Development Manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -62,10 +62,15 @@
|
|||||||
<date>6 October 2011</date>
|
<date>6 October 2011</date>
|
||||||
<revremark>Released with the Yocto Project 1.1 Release.</revremark>
|
<revremark>Released with the Yocto Project 1.1 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.1.1</revnumber>
|
||||||
|
<date>15 March 2012</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.1.1 Release.</revremark>
|
||||||
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>2007-2011</year>
|
<year>2007-2012</year>
|
||||||
<holder>Linux Foundation</holder>
|
<holder>Linux Foundation</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
|
|
||||||
@@ -77,7 +82,7 @@
|
|||||||
<note>
|
<note>
|
||||||
Due to production processes, there could be differences between the Yocto Project
|
Due to production processes, there could be differences between the Yocto Project
|
||||||
documentation bundled in the release tarball and
|
documentation bundled in the release tarball and
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||||
The Yocto Project Reference Manual</ulink> on
|
The Yocto Project Reference Manual</ulink> on
|
||||||
the <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink> website.
|
the <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink> website.
|
||||||
For the latest version of this manual, see the manual on the website.
|
For the latest version of this manual, see the manual on the website.
|
||||||
@@ -92,6 +97,8 @@
|
|||||||
|
|
||||||
<xi:include href="extendpoky.xml"/>
|
<xi:include href="extendpoky.xml"/>
|
||||||
|
|
||||||
|
<xi:include href="technical-details.xml"/>
|
||||||
|
|
||||||
<xi:include href="../bsp-guide/bsp.xml"/>
|
<xi:include href="../bsp-guide/bsp.xml"/>
|
||||||
|
|
||||||
<xi:include href="development.xml"/>
|
<xi:include href="development.xml"/>
|
||||||
|
|||||||
@@ -207,9 +207,9 @@
|
|||||||
It is worth noting that you can greatly speed up the build time by properly setting
|
It is worth noting that you can greatly speed up the build time by properly setting
|
||||||
the <filename>BB_NUMBER_THREADS</filename> variable.
|
the <filename>BB_NUMBER_THREADS</filename> variable.
|
||||||
See the
|
See the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#building-image'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#building-image'>
|
||||||
Building an Image</ulink> section in the
|
Building an Image</ulink> section in the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||||
Yocto Project Quick Start</ulink> for more information.
|
Yocto Project Quick Start</ulink> for more information.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -260,8 +260,50 @@
|
|||||||
<para>
|
<para>
|
||||||
Once all the tasks have been completed BitBake exits.
|
Once all the tasks have been completed BitBake exits.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
|
||||||
|
|
||||||
|
<para>
|
||||||
|
When running a task, BitBake tightly controls the execution environment
|
||||||
|
of the build tasks to make sure unwanted contamination from the build machine
|
||||||
|
cannot influence the build.
|
||||||
|
Consequently, if you do want something to get passed into the build
|
||||||
|
task's environment, you must take a few steps:
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para>Tell BitBake to load what you want from the environment
|
||||||
|
into the data store.
|
||||||
|
You can do so through the <filename>BB_ENV_WHITELIST</filename>
|
||||||
|
variable.
|
||||||
|
For example, assume you want to prevent the build system from
|
||||||
|
accessing your <filename>$HOME/.ccache</filename> directory.
|
||||||
|
The following command tells BitBake to load
|
||||||
|
<filename>CCACHE_DIR</filename> from the environment into the data
|
||||||
|
store:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR"
|
||||||
|
</literallayout></para></listitem>
|
||||||
|
<listitem><para>Tell BitBake to export what you have loaded into the
|
||||||
|
environment store to the task environment of every running task.
|
||||||
|
Loading something from the environment into the data store
|
||||||
|
(previous step) only makes it available in the datastore.
|
||||||
|
To export it to the task environment of every running task,
|
||||||
|
use a command similar to the following in your
|
||||||
|
<filename>local.conf</filename> or distro configuration file:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
export CCACHE_DIR
|
||||||
|
</literallayout></para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<note>
|
||||||
|
A side effect of the previous steps is that BitBake records the variable
|
||||||
|
as a dependency of the build process in things like the shared state
|
||||||
|
checksums.
|
||||||
|
If doing so results in unnecessary rebuilds of tasks, you can whitelist the
|
||||||
|
variable so that the shared state code ignores the dependency when it creates
|
||||||
|
checksums.
|
||||||
|
For information on this process, see the <filename>BB_HASHBASE_WHITELIST</filename>
|
||||||
|
example in <xref linkend='checksums'>Checksums (Signatures)</xref>.
|
||||||
|
</note>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section id='ref-bitbake-commandline'>
|
<section id='ref-bitbake-commandline'>
|
||||||
<title>BitBake Command Line</title>
|
<title>BitBake Command Line</title>
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
During staging, BitBake installs such scripts into the
|
During staging, Bitbake installs such scripts into the
|
||||||
<filename>sysroots/</filename> directory.
|
<filename>sysroots/</filename> directory.
|
||||||
BitBake also changes all paths to point into the <filename>sysroots/</filename>
|
BitBake also changes all paths to point into the <filename>sysroots/</filename>
|
||||||
directory so all builds that use the script will use the correct
|
directory so all builds that use the script will use the correct
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
During staging, BitBake installs <filename>pkg-config</filename> data into the
|
During staging, Bitbake installs <filename>pkg-config</filename> data into the
|
||||||
<filename>sysroots/</filename> directory.
|
<filename>sysroots/</filename> directory.
|
||||||
By making use of sysroot functionality within <filename>pkg-config</filename>,
|
By making use of sysroot functionality within <filename>pkg-config</filename>,
|
||||||
this class no longer has to manipulate the files.
|
this class no longer has to manipulate the files.
|
||||||
@@ -391,6 +391,87 @@
|
|||||||
for common problems that show up during runtime.
|
for common problems that show up during runtime.
|
||||||
Distribution policy usually dictates whether to include this class as the Yocto Project does.
|
Distribution policy usually dictates whether to include this class as the Yocto Project does.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You can configure the sanity checks so that specific test failures either raise a warning or
|
||||||
|
an error message.
|
||||||
|
Typically, failures for new tests generate a warning.
|
||||||
|
Subsequent failures for the same test would then generate an error message
|
||||||
|
once the metadata is in a known and good condition.
|
||||||
|
You use the <filename>WARN_QA</filename> variable to specify tests for which you
|
||||||
|
want to generate a warning message on failure.
|
||||||
|
You use the <filename>ERROR_QA</filename> variable to specify tests for which you
|
||||||
|
want to generate an error message on failure.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The following list shows the tests you can list with the <filename>WARN_QA</filename>
|
||||||
|
and <filename>ERROR_QA</filename> variables:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><emphasis><filename>ldflags:</filename></emphasis>
|
||||||
|
Ensures that the binaries were linked with the
|
||||||
|
<filename>LDFLAGS</filename> options provided by the build system.
|
||||||
|
If this test fails, check that the <filename>LDFLAGS</filename> variable
|
||||||
|
is being passed to the linker command.</para></listitem>
|
||||||
|
<listitem><para><emphasis><filename>useless-rpaths:</filename></emphasis>
|
||||||
|
Checks for dynamic library load paths (rpaths) in the binaries that
|
||||||
|
by default on a standard system are searched by the linker (e.g.
|
||||||
|
<filename>/lib</filename> and <filename>/usr/lib</filename>).
|
||||||
|
While these paths will not cause any breakage, they do waste space and
|
||||||
|
are unnecessary.</para></listitem>
|
||||||
|
<listitem><para><emphasis><filename>rpaths:</filename></emphasis>
|
||||||
|
Checks for rpaths in the binaries that contain build system paths such
|
||||||
|
as <filename>TMPDIR</filename>.
|
||||||
|
If this test fails, bad <filename>-rpath</filename> options are being
|
||||||
|
passed to the linker commands and your binaries have potential security
|
||||||
|
issues.</para></listitem>
|
||||||
|
<listitem><para><emphasis><filename>dev-so:</filename></emphasis>
|
||||||
|
Checks that the <filename>.so</filename> symbolic links are in the
|
||||||
|
<filename>-dev</filename> package and not in any of the other packages.
|
||||||
|
In general, these symlinks are only useful for development purposes.
|
||||||
|
Thus, the <filename>-dev</filename> package is the correct location for
|
||||||
|
them.
|
||||||
|
Some very rare cases do exist for dynamically loaded modules where
|
||||||
|
these symlinks are needed instead in the main package.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis><filename>debug-files:</filename></emphasis>
|
||||||
|
Checks for <filename>.debug</filename> directories in anything but the
|
||||||
|
<filename>-dbg</filename> package.
|
||||||
|
The debug files should all be in the <filename>-dbg</filename> package.
|
||||||
|
Thus, anything packaged elsewhere is incorrect packaging.</para></listitem>
|
||||||
|
<listitem><para><emphasis><filename>arch:</filename></emphasis>
|
||||||
|
Checks the Executable and Linkable Format (ELF) type, bit size and endianness
|
||||||
|
of any binaries to ensure it matches the target architecture.
|
||||||
|
This test fails if any binaries don't match the type since there would be an
|
||||||
|
incompatibility.
|
||||||
|
Sometimes software, like bootloaders, might need to bypass this check.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis><filename>debug-deps:</filename></emphasis>
|
||||||
|
Checks that <filename>-dbg</filename> packages only depend on other
|
||||||
|
<filename>-dbg</filename> packages and not on any other types of packages,
|
||||||
|
which would cause a packaging bug.</para></listitem>
|
||||||
|
<listitem><para><emphasis><filename>dev-deps:</filename></emphasis>
|
||||||
|
Checks that <filename>-dev</filename> packages only depend on other
|
||||||
|
<filename>-dev</filename> packages and not on any other types of packages,
|
||||||
|
which would be a packaging bug.</para></listitem>
|
||||||
|
<listitem><para><emphasis><filename>pkgconfig:</filename></emphasis>
|
||||||
|
Checks <filename>.pc</filename> files for any
|
||||||
|
<filename>TMPDIR/WORKDIR</filename> paths.
|
||||||
|
Any <filename>.pc</filename> file containing these paths is incorrect
|
||||||
|
since <filename>pkg-config</filename> itself adds the correct sysroot prefix
|
||||||
|
when the files are accessed.</para></listitem>
|
||||||
|
<listitem><para><emphasis><filename>la:</filename></emphasis>
|
||||||
|
Checks <filename>.la</filename> files for any <filename>TMPDIR</filename>
|
||||||
|
paths.
|
||||||
|
Any <filename>.la</filename> file continaing these paths is incorrect since
|
||||||
|
<filename>libtool</filename> adds the correct sysroot prefix when using the
|
||||||
|
files automatically itself.</para></listitem>
|
||||||
|
<listitem><para><emphasis><filename>desktop:</filename></emphasis>
|
||||||
|
Runs the <filename>desktop-file-validate</filename> program against any
|
||||||
|
<filename>.desktop</filename> files to validate their contents against
|
||||||
|
the specification for <filename>.desktop</filename> files.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='ref-classes-siteinfo'>
|
<section id='ref-classes-siteinfo'>
|
||||||
|
|||||||
@@ -14,9 +14,9 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
For information on how to establish the Yocto Project files on your local development system, see the
|
For information on how to establish the Yocto Project files on your local development system, see the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#getting-started'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#getting-started'>
|
||||||
Getting Setup</ulink> section in the
|
Getting Setup</ulink> section in the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>
|
||||||
The Yocto Project Development Manual</ulink>.
|
The Yocto Project Development Manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|||||||
@@ -285,6 +285,7 @@
|
|||||||
|
|
||||||
<glossentry id='var-DISTRO_EXTRA_RRECOMMENDS'><glossterm>DISTRO_EXTRA_RRECOMMENDS</glossterm>
|
<glossentry id='var-DISTRO_EXTRA_RRECOMMENDS'><glossterm>DISTRO_EXTRA_RRECOMMENDS</glossterm>
|
||||||
<glossdef>
|
<glossdef>
|
||||||
|
<para></para>
|
||||||
<para>The list of packages which extend usability of the image.
|
<para>The list of packages which extend usability of the image.
|
||||||
Those packages will automatically be installed but can be removed by user.</para>
|
Those packages will automatically be installed but can be removed by user.</para>
|
||||||
</glossdef>
|
</glossdef>
|
||||||
@@ -328,6 +329,7 @@
|
|||||||
|
|
||||||
<glossentry id='var-ENABLE_BINARY_LOCALE_GENERATION'><glossterm>ENABLE_BINARY_LOCALE_GENERATION</glossterm>
|
<glossentry id='var-ENABLE_BINARY_LOCALE_GENERATION'><glossterm>ENABLE_BINARY_LOCALE_GENERATION</glossterm>
|
||||||
<glossdef>
|
<glossdef>
|
||||||
|
<para></para>
|
||||||
<para>Variable that controls which locales for <filename>eglibc</filename> are
|
<para>Variable that controls which locales for <filename>eglibc</filename> are
|
||||||
to be generated during the build (useful if the target device has 64Mbytes
|
to be generated during the build (useful if the target device has 64Mbytes
|
||||||
of RAM or less).</para>
|
of RAM or less).</para>
|
||||||
@@ -379,25 +381,6 @@
|
|||||||
</glossdef>
|
</glossdef>
|
||||||
</glossentry>
|
</glossentry>
|
||||||
|
|
||||||
<glossentry id='var-EXTRA_IMAGEDEPENDS'><glossterm>EXTRA_IMAGEDEPENDS</glossterm>
|
|
||||||
<glossdef>
|
|
||||||
<para>A list of recipes to be built that do not provide packages to be installed in
|
|
||||||
the root filesystem.
|
|
||||||
</para>
|
|
||||||
<para>Sometimes a recipe is required to build the final image but is not
|
|
||||||
needed in the root filesystem.
|
|
||||||
You can use the <filename>EXTRA_IMAGEDEPENDS</filename> variable to
|
|
||||||
list these recipes and thus, specify the dependencies.
|
|
||||||
A typical example is a required bootloader in a machine configuration.
|
|
||||||
</para>
|
|
||||||
<note>
|
|
||||||
To add packages to the root filesystem, see the various
|
|
||||||
<filename>*DEPENDS</filename> and <filename>*RECOMMENDS</filename>
|
|
||||||
variables.
|
|
||||||
</note>
|
|
||||||
</glossdef>
|
|
||||||
</glossentry>
|
|
||||||
|
|
||||||
<glossentry id='var-EXTRA_OECMAKE'><glossterm>EXTRA_OECMAKE</glossterm>
|
<glossentry id='var-EXTRA_OECMAKE'><glossterm>EXTRA_OECMAKE</glossterm>
|
||||||
<glossdef>
|
<glossdef>
|
||||||
<para>Additional <filename>cmake</filename> options.</para>
|
<para>Additional <filename>cmake</filename> options.</para>
|
||||||
@@ -712,6 +695,7 @@
|
|||||||
|
|
||||||
<glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'><glossterm>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</glossterm>
|
<glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'><glossterm>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</glossterm>
|
||||||
<glossdef>
|
<glossdef>
|
||||||
|
<para></para>
|
||||||
<para>
|
<para>
|
||||||
A list of required packages to install as part of the package being
|
A list of required packages to install as part of the package being
|
||||||
built.
|
built.
|
||||||
@@ -741,6 +725,7 @@
|
|||||||
|
|
||||||
<glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><glossterm>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</glossterm>
|
<glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><glossterm>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</glossterm>
|
||||||
<glossdef>
|
<glossdef>
|
||||||
|
<para></para>
|
||||||
<para>
|
<para>
|
||||||
A list of recommended packages to install as part of the package being
|
A list of recommended packages to install as part of the package being
|
||||||
built.
|
built.
|
||||||
@@ -824,6 +809,7 @@
|
|||||||
|
|
||||||
<glossentry id='var-MACHINE_EXTRA_RRECOMMENDS'><glossterm>MACHINE_EXTRA_RRECOMMENDS</glossterm>
|
<glossentry id='var-MACHINE_EXTRA_RRECOMMENDS'><glossterm>MACHINE_EXTRA_RRECOMMENDS</glossterm>
|
||||||
<glossdef>
|
<glossdef>
|
||||||
|
<para></para>
|
||||||
<para>
|
<para>
|
||||||
A list of optional but non-machine essential packages to install as
|
A list of optional but non-machine essential packages to install as
|
||||||
part of the package being built.
|
part of the package being built.
|
||||||
@@ -946,7 +932,7 @@
|
|||||||
This variable is usually in the form <filename>-j 4</filename>, where the number
|
This variable is usually in the form <filename>-j 4</filename>, where the number
|
||||||
represents the maximum number of parallel threads make can run.
|
represents the maximum number of parallel threads make can run.
|
||||||
If you development host supports multiple cores a good rule of thumb is to set
|
If you development host supports multiple cores a good rule of thumb is to set
|
||||||
this variable to twice the number of cores on the host.</para>
|
this variable to one and a half times the number of cores on the host.</para>
|
||||||
</glossdef>
|
</glossdef>
|
||||||
</glossentry>
|
</glossentry>
|
||||||
|
|
||||||
@@ -1249,6 +1235,7 @@
|
|||||||
|
|
||||||
<glossentry id='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'><glossterm>SRC_URI_OVERRIDES_PACKAGE_ARCH</glossterm>
|
<glossentry id='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'><glossterm>SRC_URI_OVERRIDES_PACKAGE_ARCH</glossterm>
|
||||||
<glossdef>
|
<glossdef>
|
||||||
|
<para></para>
|
||||||
<para>
|
<para>
|
||||||
By default, the Yocto Project automatically detects whether
|
By default, the Yocto Project automatically detects whether
|
||||||
<filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>
|
<filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>
|
||||||
|
|||||||
@@ -10,9 +10,9 @@
|
|||||||
The Yocto Project team is happy for people to experiment with the Yocto Project.
|
The Yocto Project team is happy for people to experiment with the Yocto Project.
|
||||||
A number of places exist to find help if you run into difficulties or find bugs.
|
A number of places exist to find help if you run into difficulties or find bugs.
|
||||||
To find out how to download source code,
|
To find out how to download source code,
|
||||||
see the <ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#local-yp-release'>
|
see the <ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#local-yp-release'>
|
||||||
Yocto Project Release</ulink> list item in
|
Yocto Project Release</ulink> list item in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>The Yocto
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>The Yocto
|
||||||
Project Development Manual</ulink>.
|
Project Development Manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
<title>Internet Relay Chat (IRC)</title>
|
<title>Internet Relay Chat (IRC)</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Two IRC channels on freenode are available for the Yocto Project and Poky discussions:
|
Two IRC channels on freenode are available for Yocto Project and Poky discussions:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><filename>#yocto</filename></para></listitem>
|
<listitem><para><filename>#yocto</filename></para></listitem>
|
||||||
<listitem><para><filename>#poky</filename></para></listitem>
|
<listitem><para><filename>#poky</filename></para></listitem>
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
The upstream, generic, embedded distribution the Yocto Project build system (Poky) derives
|
The upstream, generic, embedded distribution the Yocto Project build system (Poky) derives
|
||||||
from and to which it contributes.</para></listitem>
|
from and to which it contributes.</para></listitem>
|
||||||
<listitem><para><emphasis><ulink url='http://developer.berlios.de/projects/bitbake/'>
|
<listitem><para><emphasis><ulink url='http://developer.berlios.de/projects/bitbake/'>
|
||||||
BitBake</ulink>:</emphasis> The tool used to process Yocto Project metadata.</para></listitem>
|
Bitbake</ulink>:</emphasis> The tool used to process Yocto Project metadata.</para></listitem>
|
||||||
<listitem><para><emphasis><ulink url='http://bitbake.berlios.de/manual/'>
|
<listitem><para><emphasis><ulink url='http://bitbake.berlios.de/manual/'>
|
||||||
BitBake User Manual</ulink>:</emphasis> A comprehensive guide to the BitBake tool.
|
BitBake User Manual</ulink>:</emphasis> A comprehensive guide to the BitBake tool.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
@@ -97,9 +97,9 @@
|
|||||||
You can submit changes to the project either by creating and sending pull requests,
|
You can submit changes to the project either by creating and sending pull requests,
|
||||||
or by submitting patches through email.
|
or by submitting patches through email.
|
||||||
For information on how to do both, see
|
For information on how to do both, see
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#how-to-submit-a-change'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#how-to-submit-a-change'>
|
||||||
How to Submit a Change</ulink> in
|
How to Submit a Change</ulink> in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>
|
||||||
The Yocto Project Development Manual</ulink>.
|
The Yocto Project Development Manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -966,9 +966,3 @@ table {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footnote {
|
|
||||||
font-size: small;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
574
documentation/poky-ref-manual/technical-details.xml
Normal file
@@ -0,0 +1,574 @@
|
|||||||
|
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
<chapter id='technical-details'>
|
||||||
|
<title>Technical Details</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This chapter provides technical details for various parts of the Yocto Project.
|
||||||
|
Currently, topics include Yocto Project components and shared state (sstate) cache.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<section id='usingpoky-components'>
|
||||||
|
<title>Yocto Project Components</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The BitBake task executor together with various types of configuration files form the
|
||||||
|
Yocto Project core.
|
||||||
|
This section overviews the BitBake task executor and the
|
||||||
|
configuration files by describing what they are used for and how they interact.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
BitBake handles the parsing and execution of the data files.
|
||||||
|
The data itself is of various types:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><emphasis>Recipes:</emphasis> Provides details about particular
|
||||||
|
pieces of software</para></listitem>
|
||||||
|
<listitem><para><emphasis>Class Data:</emphasis> An abstraction of common build
|
||||||
|
information (e.g. how to build a Linux kernel).</para></listitem>
|
||||||
|
<listitem><para><emphasis>Configuration Data:</emphasis> Defines machine-specific settings,
|
||||||
|
policy decisions, etc.
|
||||||
|
Configuration data acts as the glue to bind everything together.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
For more information on data, see the
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1//dev-manual/dev-manual.html#yocto-project-terms'>
|
||||||
|
Yocto Project Terms</ulink> section in
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1//dev-manual/dev-manual.html'>
|
||||||
|
The Yocto Project Development Manual</ulink>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
BitBake knows how to combine multiple data sources together and refers to each data source
|
||||||
|
as a "<link linkend='usingpoky-changes-layers'>layer</link>".
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Following are some brief details on these core components.
|
||||||
|
For more detailed information on these components see the
|
||||||
|
<link linkend='ref-structure'>'Reference: Directory Structure'</link>
|
||||||
|
appendix.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<section id='usingpoky-components-bitbake'>
|
||||||
|
<title>BitBake</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
BitBake is the tool at the heart of the Yocto Project and is responsible
|
||||||
|
for parsing the metadata, generating a list of tasks from it,
|
||||||
|
and then executing those tasks.
|
||||||
|
To see a list of the options BitBake supports, use the following help command:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ bitbake --help
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The most common usage for BitBake is <filename>bitbake <packagename></filename>, where
|
||||||
|
<filename>packagename</filename> is the name of the package you want to build
|
||||||
|
(referred to as the "target" in this manual).
|
||||||
|
The target often equates to the first part of a <filename>.bb</filename> filename.
|
||||||
|
So, to run the <filename>matchbox-desktop_1.2.3.bb</filename> file, you
|
||||||
|
might type the following:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ bitbake matchbox-desktop
|
||||||
|
</literallayout>
|
||||||
|
Several different versions of <filename>matchbox-desktop</filename> might exist.
|
||||||
|
BitBake chooses the one selected by the distribution configuration.
|
||||||
|
You can get more details about how BitBake chooses between different
|
||||||
|
target versions and providers in the
|
||||||
|
<link linkend='ref-bitbake-providers'>Preferences and Providers</link> section.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
BitBake also tries to execute any dependent tasks first.
|
||||||
|
So for example, before building <filename>matchbox-desktop</filename>, BitBake
|
||||||
|
would build a cross compiler and <filename>eglibc</filename> if they had not already
|
||||||
|
been built.
|
||||||
|
<note>This release of the Yocto Project does not support the <filename>glibc</filename>
|
||||||
|
GNU version of the Unix standard C library. By default, the Yocto Project builds with
|
||||||
|
<filename>eglibc</filename>.</note>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
A useful BitBake option to consider is the <filename>-k</filename> or
|
||||||
|
<filename>--continue</filename> option.
|
||||||
|
This option instructs BitBake to try and continue processing the job as much
|
||||||
|
as possible even after encountering an error.
|
||||||
|
When an error occurs, the target that
|
||||||
|
failed and those that depend on it cannot be remade.
|
||||||
|
However, when you use this option other dependencies can still be processed.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='usingpoky-components-metadata'>
|
||||||
|
<title>Metadata (Recipes)</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The <filename>.bb</filename> files are usually referred to as "recipes."
|
||||||
|
In general, a recipe contains information about a single piece of software.
|
||||||
|
The information includes the location from which to download the source patches
|
||||||
|
(if any are needed), which special configuration options to apply,
|
||||||
|
how to compile the source files, and how to package the compiled output.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The term "package" can also be used to describe recipes.
|
||||||
|
However, since the same word is used for the packaged output from the Yocto
|
||||||
|
Project (i.e. <filename>.ipk</filename> or <filename>.deb</filename> files),
|
||||||
|
this document avoids using the term "package" when refering to recipes.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='usingpoky-components-classes'>
|
||||||
|
<title>Classes</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Class files (<filename>.bbclass</filename>) contain information that is useful to share
|
||||||
|
between metadata files.
|
||||||
|
An example is the Autotools class, which contains
|
||||||
|
common settings for any application that Autotools uses.
|
||||||
|
The <link linkend='ref-classes'>Reference: Classes</link> appendix provides details
|
||||||
|
about common classes and how to use them.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='usingpoky-components-configuration'>
|
||||||
|
<title>Configuration</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The configuration files (<filename>.conf</filename>) define various configuration variables
|
||||||
|
that govern the Yocto Project build process.
|
||||||
|
These files fall into several areas that define machine configuration options,
|
||||||
|
distribution configuration options, compiler tuning options, general common configuration
|
||||||
|
options and user configuration options (<filename>local.conf</filename>, which is found
|
||||||
|
in the Yocto Project files build directory).
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="shared-state-cache">
|
||||||
|
<title>Shared State Cache</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
By design, the Yocto Project build system builds everything from scratch unless
|
||||||
|
BitBake can determine that parts don't need to be rebuilt.
|
||||||
|
Fundamentally, building from scratch is attractive as it means all parts are
|
||||||
|
built fresh and there is no possibility of stale data causing problems.
|
||||||
|
When developers hit problems, they typically default back to building from scratch
|
||||||
|
so they know the state of things from the start.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Building an image from scratch is both an advantage and a disadvantage to the process.
|
||||||
|
As mentioned in the previous paragraph, building from scratch ensures that
|
||||||
|
everything is current and starts from a known state.
|
||||||
|
However, building from scratch also takes much longer as it generally means
|
||||||
|
rebuiding things that don't necessarily need rebuilt.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The Yocto Project implements shared state code that supports incremental builds.
|
||||||
|
The implementation of the shared state code answers the following questions that
|
||||||
|
were fundamental roadblocks within the Yocto Project incremental build support system:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>What pieces of the system have changed and what pieces have not changed?</listitem>
|
||||||
|
<listitem>How are changed pieces of software removed and replaced?</listitem>
|
||||||
|
<listitem>How are pre-built components that don't need to be rebuilt from scratch
|
||||||
|
used when they are available?</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For the first question, the build system detects changes in the "inputs" to a given task by
|
||||||
|
creating a checksum (or signature) of the task's inputs.
|
||||||
|
If the checksum changes, the system assumes the inputs have changed and the task needs to be
|
||||||
|
rerun.
|
||||||
|
For the second question, the shared state (sstate) code tracks which tasks add which output
|
||||||
|
to the build process.
|
||||||
|
This means the output from a given task can be removed, upgraded or otherwise manipulated.
|
||||||
|
The third question is partly addressed by the solution for the second question
|
||||||
|
assuming the build system can fetch the sstate objects from remote locations and
|
||||||
|
install them if they are deemed to be valid.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The rest of this section goes into detail about the overall incremental build
|
||||||
|
architecture, the checksums (signatures), shared state, and some tips and tricks.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<section id='overall-architecture'>
|
||||||
|
<title>Overall Architecture</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
When determining what parts of the system need to be built, BitBake
|
||||||
|
uses a per-task basis and does not use a per-recipe basis.
|
||||||
|
You might wonder why using a per-task basis is preferred over a per-recipe basis.
|
||||||
|
To help explain, consider having the IPK packaging backend enabled and then switching to DEB.
|
||||||
|
In this case, <filename>do_install</filename> and <filename>do_package</filename>
|
||||||
|
output are still valid.
|
||||||
|
However, with a per-recipe approach, the build would not include the
|
||||||
|
<filename>.deb</filename> files.
|
||||||
|
Consequently, you would have to invalidate the whole build and rerun it.
|
||||||
|
Rerunning everything is not the best situation.
|
||||||
|
Also in this case, the core must be "taught" much about specific tasks.
|
||||||
|
This methodology does not scale well and does not allow users to easily add new tasks
|
||||||
|
in layers or as external recipes without touching the packaged-staging core.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='checksums'>
|
||||||
|
<title>Checksums (Signatures)</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The shared state code uses a checksum, which is a unique signature of a task's
|
||||||
|
inputs, to determine if a task needs to be run again.
|
||||||
|
Because it is a change in a task's inputs that triggers a rerun, the process
|
||||||
|
needs to detect all the inputs to a given task.
|
||||||
|
For shell tasks, this turns out to be fairly easy because
|
||||||
|
the build process generates a "run" shell script for each task and
|
||||||
|
it is possible to create a checksum that gives you a good idea of when
|
||||||
|
the task's data changes.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
To complicate the problem, there are things that should not be included in
|
||||||
|
the checksum.
|
||||||
|
First, there is the actual specific build path of a given task -
|
||||||
|
the <filename>WORKDIR</filename>.
|
||||||
|
It does not matter if the working directory changes because it should not
|
||||||
|
affect the output for target packages.
|
||||||
|
Also, the build process has the objective of making native/cross packages relocatable.
|
||||||
|
The checksum therefore needs to exclude <filename>WORKDIR</filename>.
|
||||||
|
The simplistic approach for excluding the worknig directory is to set
|
||||||
|
<filename>WORKDIR</filename> to some fixed value and create the checksum
|
||||||
|
for the "run" script.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Another problem results from the "run" scripts containing functions that
|
||||||
|
might or might not get called.
|
||||||
|
The incremental build solution contains code that figures out dependencies
|
||||||
|
between shell functions.
|
||||||
|
This code is used to prune the "run" scripts down to the minimum set,
|
||||||
|
thereby alleviating this problem and making the "run" scripts much more
|
||||||
|
readable as a bonus.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
So far we have solutions for shell scripts.
|
||||||
|
What about python tasks?
|
||||||
|
The same approach applies even though these tasks are more difficult.
|
||||||
|
The process needs to figure out what variables a python function accesses
|
||||||
|
and what functions it calls.
|
||||||
|
Again, the incremental build solution contains code that first figures out
|
||||||
|
the variable and function dependencies, and then creates a checksum for the data
|
||||||
|
used as the input to the task.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Like the <filename>WORKDIR</filename> case, situations exist where dependencies
|
||||||
|
should be ignored.
|
||||||
|
For these cases, you can instruct the build process to ignore a dependency
|
||||||
|
by using a line like the following:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
PACKAGE_ARCHS[vardepsexclude] = "MACHINE"
|
||||||
|
</literallayout>
|
||||||
|
This example ensures that the <filename>PACKAGE_ARCHS</filename> variable does not
|
||||||
|
depend on the value of <filename>MACHINE</filename>, even if it does reference it.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Equally, there are cases where we need to add dependencies BitBake is not able to find.
|
||||||
|
You can accomplish this by using a line like the following:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
PACKAGE_ARCHS[vardeps] = "MACHINE"
|
||||||
|
</literallayout>
|
||||||
|
This example explicitly adds the <filename>MACHINE</filename> variable as a
|
||||||
|
dependency for <filename>PACKAGE_ARCHS</filename>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Consider a case with inline python, for example, where BitBake is not
|
||||||
|
able to figure out dependencies.
|
||||||
|
When running in debug mode (i.e. using <filename>-DDD</filename>), BitBake
|
||||||
|
produces output when it discovers something for which it cannot figure out
|
||||||
|
dependencies.
|
||||||
|
The Yocto Project team has currently not managed to cover those dependencies
|
||||||
|
in detail and is aware of the need to fix this situation.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Thus far, this section has limited discussion to the direct inputs into a task.
|
||||||
|
Information based on direct inputs is referred to as the "basehash" in the code.
|
||||||
|
However, there is still the question of a task's indirect inputs, the things that
|
||||||
|
were already built and present in the build directory.
|
||||||
|
The checksum (or signature) for a particular task needs to add the hashes of all the
|
||||||
|
tasks on which the particular task depends.
|
||||||
|
Choosing which dependencies to add is a policy decision.
|
||||||
|
However, the effect is to generate a master checksum that combines the
|
||||||
|
basehash and the hashes of the task's dependencies.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
While figuring out the dependencies and creating these checksums is good,
|
||||||
|
what does the Yocto Project build system do with the checksum information?
|
||||||
|
The build system uses a signature handler that is responsible for
|
||||||
|
processing the checksum information.
|
||||||
|
By default, there is a dummy "noop" signature handler enabled in BitBake.
|
||||||
|
This means that behaviour is unchanged from previous versions.
|
||||||
|
OECore uses the "basic" signature handler through this setting in the
|
||||||
|
<filename>bitbake.conf</filename> file:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
BB_SIGNATURE_HANDLER ?= "basic"
|
||||||
|
</literallayout>
|
||||||
|
Also within the BitBake configuration file, we can give BitBake
|
||||||
|
some extra information to help it handle this information.
|
||||||
|
The following statements effectively result in a list of global
|
||||||
|
variable dependency excludes - variables never included in
|
||||||
|
any checksum:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH"
|
||||||
|
BB_HASHBASE_WHITELIST += "DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS"
|
||||||
|
BB_HASHBASE_WHITELIST += "FILE_DIRNAME HOME LOGNAME SHELL TERM USER"
|
||||||
|
BB_HASHBASE_WHITELIST += "FILESPATH USERNAME STAGING_DIR_HOST STAGING_DIR_TARGET"
|
||||||
|
BB_HASHTASK_WHITELIST += "(.*-cross$|.*-native$|.*-cross-initial$| \
|
||||||
|
.*-cross-intermediate$|^virtual:native:.*|^virtual:nativesdk:.*)"
|
||||||
|
</literallayout>
|
||||||
|
This example is actually where <filename>WORKDIR</filename>
|
||||||
|
is excluded since <filename>WORKDIR</filename> is constructed as a
|
||||||
|
path within <filename>TMPDIR</filename>, which is on the whitelist.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The <filename>BB_HASHTASK_WHITELIST</filename> covers dependent tasks and
|
||||||
|
excludes certain kinds of tasks from the dependency chains.
|
||||||
|
The effect of the previous example is to isolate the native, target,
|
||||||
|
and cross-components.
|
||||||
|
So, for example, toolchain changes do not force a rebuild of the whole system.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The end result of the "basic" handler is to make some dependency and
|
||||||
|
hash information available to the build.
|
||||||
|
This includes:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
BB_BASEHASH_task-<taskname> - the base hashes for each task in the recipe
|
||||||
|
BB_BASEHASH_<filename:taskname> - the base hashes for each dependent task
|
||||||
|
BBHASHDEPS_<filename:taskname> - The task dependencies for each task
|
||||||
|
BB_TASKHASH - the hash of the currently running task
|
||||||
|
</literallayout>
|
||||||
|
There is also a "basichash" <filename>BB_SIGNATURE_HANDLER</filename>,
|
||||||
|
which is the same as the basic version but adds the task hash to the stamp files.
|
||||||
|
This results in any metadata change that changes the task hash,
|
||||||
|
automatically causing the task to be run again.
|
||||||
|
This removes the need to bump <filename>PR</filename>
|
||||||
|
values and changes to metadata automatically ripple across the build.
|
||||||
|
Currently, this behavior is not the default behavior.
|
||||||
|
However, it is likely that the Yocto Project team will go forward with this
|
||||||
|
behavior in the future since all the functionality exists.
|
||||||
|
The reason for the delay is the potential impact to the distribution feed
|
||||||
|
creation as they need increasing <filename>PR</filename> fields
|
||||||
|
and the Yocto Project currently lacks a mechanism to automate incrementing
|
||||||
|
this field.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='shared-state'>
|
||||||
|
<title>Shared State</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Checksums and dependencies, as discussed in the previous section, solve half the
|
||||||
|
problem.
|
||||||
|
The other part of the problem is being able to use checksum information during the build
|
||||||
|
and being able to reuse or rebuild specific components.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The shared state class (<filename>sstate.bbclass</filename>)
|
||||||
|
is a relatively generic implementation of how to "capture" a snapshot of a given task.
|
||||||
|
The idea is that the build process does not care about the source of a task's output.
|
||||||
|
Output could be freshly built or it could be downloaded and unpacked from
|
||||||
|
somewhere - the build process doesn't need to worry about its source.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
There are two types of output, one is just about creating a directory
|
||||||
|
in <filename>WORKDIR</filename>.
|
||||||
|
A good example is the output of either <filename>do_install</filename> or
|
||||||
|
<filename>do_package</filename>.
|
||||||
|
The other type of output occurs when a set of data is merged into a shared directory
|
||||||
|
tree such as the sysroot.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The Yocto Project team has tried to keep the details of the implementation hidden in
|
||||||
|
<filename>sstate.bbclass</filename>.
|
||||||
|
From a user's perspective, adding shared state wrapping to a task
|
||||||
|
is as simple as this <filename>do_deploy</filename> example taken from
|
||||||
|
<filename>do_deploy.bbclass</filename>:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
|
||||||
|
SSTATETASKS += "do_deploy"
|
||||||
|
do_deploy[sstate-name] = "deploy"
|
||||||
|
do_deploy[sstate-inputdirs] = "${DEPLOYDIR}"
|
||||||
|
do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
|
||||||
|
|
||||||
|
python do_deploy_setscene () {
|
||||||
|
sstate_setscene(d)
|
||||||
|
}
|
||||||
|
addtask do_deploy_setscene
|
||||||
|
</literallayout>
|
||||||
|
In the example, we add some extra flags to the task, a name field ("deploy"), an
|
||||||
|
input directory where the task sends data, and the output
|
||||||
|
directory where the data from the task should eventually be copied.
|
||||||
|
We also add a <filename>_setscene</filename> variant of the task and add the task
|
||||||
|
name to the <filename>SSTATETASKS</filename> list.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
If you have a directory whose contents you need to preserve, you can do this with
|
||||||
|
a line like the following:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}"
|
||||||
|
</literallayout>
|
||||||
|
This method, as well as the following example, also works for mutliple directories.
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
do_package[sstate-inputdirs] = "${PKGDESTWORK} ${SHLIBSWORKDIR}"
|
||||||
|
do_package[sstate-outputdirs] = "${PKGDATA_DIR} ${SHLIBSDIR}"
|
||||||
|
do_package[sstate-lockfile] = "${PACKAGELOCK}"
|
||||||
|
</literallayout>
|
||||||
|
These methods also include the ability to take a lockfile when manipulating
|
||||||
|
shared state directory structures since some cases are sensitive to file
|
||||||
|
additions or removals.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Behind the scenes, the shared state code works by looking in
|
||||||
|
<filename>SSTATE_DIR</filename> and
|
||||||
|
<filename>SSTATE_MIRRORS</filename> for shared state files.
|
||||||
|
Here is an example:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
SSTATE_MIRRORS ?= "\
|
||||||
|
file://.* http://someserver.tld/share/sstate/ \n \
|
||||||
|
file://.* file:///some/local/dir/sstate/"
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The shared state package validity can be detected just by looking at the
|
||||||
|
filename since the filename contains the task checksum (or signature) as
|
||||||
|
described earlier in this section.
|
||||||
|
If a valid shared state package is found, the build process downloads it
|
||||||
|
and uses it to accelerate the task.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The build processes uses the <filename>*_setscene</filename> tasks
|
||||||
|
for the task acceleration phase.
|
||||||
|
BitBake goes through this phase before the main execution code and tries
|
||||||
|
to accelerate any tasks for which it can find shared state packages.
|
||||||
|
If a shared state package for a task is available, the shared state
|
||||||
|
package is used.
|
||||||
|
This means the task and any tasks on which it is dependent are not
|
||||||
|
executed.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
As a real world example, the aim is when building an IPK-based image,
|
||||||
|
only the <filename>do_package_write_ipk</filename> tasks would have their
|
||||||
|
shared state packages fetched and extracted.
|
||||||
|
Since the sysroot is not used, it would never get extracted.
|
||||||
|
This is another reason why a task-based approach is preferred over a
|
||||||
|
recipe-based approach, which would have to install the output from every task.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='tips-and-tricks'>
|
||||||
|
<title>Tips and Tricks</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The code in the Yocto Project that supports incremental builds is not
|
||||||
|
simple code.
|
||||||
|
This section presents some tips and tricks that help you work around
|
||||||
|
issues related to shared state code.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<section id='debugging'>
|
||||||
|
<title>Debugging</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
When things go wrong, debugging needs to be straightforward.
|
||||||
|
Because of this, the Yocto Project team included strong debugging
|
||||||
|
tools:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>Whenever a shared state package is written out, so is a
|
||||||
|
corresponding <filename>.siginfo</filename> file.
|
||||||
|
This practice results in a pickled python database of all
|
||||||
|
the metadata that went into creating the hash for a given shared state
|
||||||
|
package.</para></listitem>
|
||||||
|
<listitem><para>If BitBake is run with the <filename>--dump-signatures</filename>
|
||||||
|
(or <filename>-S</filename>) option, BitBake dumps out
|
||||||
|
<filename>.siginfo</filename> files in
|
||||||
|
the stamp directory for every task it would have executed instead of
|
||||||
|
building the specified target package.</para></listitem>
|
||||||
|
<listitem><para>There is a <filename>bitbake-diffsigs</filename> command that
|
||||||
|
can process these <filename>.siginfo</filename> files.
|
||||||
|
If one file is specified, it will dump out the dependency
|
||||||
|
information in the file.
|
||||||
|
If two files are specified, it will compare the two files and dump out
|
||||||
|
the differences between the two.
|
||||||
|
This allows the question of "What changed between X and Y?" to be
|
||||||
|
answered easily.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='invalidating-shared-state'>
|
||||||
|
<title>Invalidating Shared State</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The shared state code uses checksums and shared state memory
|
||||||
|
cache to avoid unnecessarily rebuilding tasks.
|
||||||
|
As with all schemes, this one has some drawbacks.
|
||||||
|
It is possible that you could make implicit changes that are not factored
|
||||||
|
into the checksum calculation, but do affect a task's output.
|
||||||
|
A good example is perhaps when a tool changes its output.
|
||||||
|
Let's say that the output of <filename>rpmdeps</filename> needed to change.
|
||||||
|
The result of the change should be that all the "package", "package_write_rpm",
|
||||||
|
and "package_deploy-rpm" shared state cache items would become invalid.
|
||||||
|
But, because this is a change that is external to the code and therefore implicit,
|
||||||
|
the associated shared state cache items do not become invalidated.
|
||||||
|
In this case, the build process would use the cached items rather than running the
|
||||||
|
task again.
|
||||||
|
Obviously, these types of implicit changes can cause problems.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
To avoid these problems during the build, you need to understand the effects of any
|
||||||
|
change you make.
|
||||||
|
Note that any changes you make directly to a function automatically are factored into
|
||||||
|
the checksum calculation and thus, will invalidate the associated area of sstate cache.
|
||||||
|
You need to be aware of any implicit changes that are not obvious changes to the
|
||||||
|
code and could affect the output of a given task.
|
||||||
|
Once you are aware of such a change, you can take steps to invalidate the cache
|
||||||
|
and force the task to run.
|
||||||
|
The step to take is as simple as changing a function's comments in the source code.
|
||||||
|
For example, to invalidate package shared state files, change the comment statments
|
||||||
|
of <filename>do_package</filename> or the comments of one of the functions it calls.
|
||||||
|
The change is purely cosmetic, but it causes the checksum to be recalculated and
|
||||||
|
forces the task to be run again.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<note>
|
||||||
|
For an example of a commit that makes a cosmetic change to invalidate
|
||||||
|
a shared state, see this
|
||||||
|
<ulink url='http://git.yoctoproject.org/cgit.cgi/poky/commit/meta/classes/package.bbclass?id=737f8bbb4f27b4837047cb9b4fbfe01dfde36d54'>commit</ulink>.
|
||||||
|
</note>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</chapter>
|
||||||
|
<!--
|
||||||
|
vim: expandtab tw=80 ts=4
|
||||||
|
-->
|
||||||
@@ -4,213 +4,84 @@
|
|||||||
<title>Using the Yocto Project</title>
|
<title>Using the Yocto Project</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This section gives an overview of the components that make up the Yocto Project
|
This chapter describes common usage for the Yocto Project.
|
||||||
followed by information about Yocto Project builds and dealing with any
|
The information is introductory in nature as other manuals in the Yocto Project
|
||||||
problems that might arise.
|
provide more details on how to use the Yocto Project.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='usingpoky-components'>
|
|
||||||
<title>Yocto Project Components</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The BitBake task executor together with various types of configuration files form the
|
|
||||||
Yocto Project core.
|
|
||||||
This section overviews the BitBake task executor and the
|
|
||||||
configuration files by describing what they are used for and how they interact.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
BitBake handles the parsing and execution of the data files.
|
|
||||||
The data itself is of various types:
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem><para><emphasis>Recipes:</emphasis> Provides details about particular
|
|
||||||
pieces of software</para></listitem>
|
|
||||||
<listitem><para><emphasis>Class Data:</emphasis> An abstraction of common build
|
|
||||||
information (e.g. how to build a Linux kernel).</para></listitem>
|
|
||||||
<listitem><para><emphasis>Configuration Data:</emphasis> Defines machine-specific settings,
|
|
||||||
policy decisions, etc.
|
|
||||||
Configuration data acts as the glue to bind everything together.</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
For more information on data, see the
|
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#yocto-project-terms'>
|
|
||||||
Yocto Project Terms</ulink> section in
|
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>
|
|
||||||
The Yocto Project Development Manual</ulink>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
BitBake knows how to combine multiple data sources together and refers to each data source
|
|
||||||
as a <link linkend='usingpoky-changes-layers'>'layer'</link>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Following are some brief details on these core components.
|
|
||||||
For more detailed information on these components see the
|
|
||||||
<link linkend='ref-structure'>'Reference: Directory Structure'</link>
|
|
||||||
appendix.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<section id='usingpoky-components-bitbake'>
|
|
||||||
<title>BitBake</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
BitBake is the tool at the heart of the Yocto Project and is responsible
|
|
||||||
for parsing the metadata, generating a list of tasks from it,
|
|
||||||
and then executing those tasks.
|
|
||||||
To see a list of the options BitBake supports, use the following help command:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
$ bitbake --help
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The most common usage for BitBake is <filename>bitbake <packagename></filename>, where
|
|
||||||
<filename>packagename</filename> is the name of the package you want to build
|
|
||||||
(referred to as the "target" in this manual).
|
|
||||||
The target often equates to the first part of a <filename>.bb</filename> filename.
|
|
||||||
So, to run the <filename>matchbox-desktop_1.2.3.bb</filename> file, you
|
|
||||||
might type the following:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
$ bitbake matchbox-desktop
|
|
||||||
</literallayout>
|
|
||||||
Several different versions of <filename>matchbox-desktop</filename> might exist.
|
|
||||||
BitBake chooses the one selected by the distribution configuration.
|
|
||||||
You can get more details about how BitBake chooses between different
|
|
||||||
target versions and providers in the
|
|
||||||
<link linkend='ref-bitbake-providers'>Preferences and Providers</link> section.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
BitBake also tries to execute any dependent tasks first.
|
|
||||||
So for example, before building <filename>matchbox-desktop</filename>, BitBake
|
|
||||||
would build a cross compiler and <filename>eglibc</filename> if they had not already
|
|
||||||
been built.
|
|
||||||
<note>This release of the Yocto Project does not support the <filename>glibc</filename>
|
|
||||||
GNU version of the Unix standard C library. By default, the Yocto Project builds with
|
|
||||||
<filename>eglibc</filename>.</note>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
A useful BitBake option to consider is the <filename>-k</filename> or
|
|
||||||
<filename>--continue</filename> option.
|
|
||||||
This option instructs BitBake to try and continue processing the job as much
|
|
||||||
as possible even after encountering an error.
|
|
||||||
When an error occurs, the target that
|
|
||||||
failed and those that depend on it cannot be remade.
|
|
||||||
However, when you use this option other dependencies can still be processed.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='usingpoky-components-metadata'>
|
|
||||||
<title>Metadata (Recipes)</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The <filename>.bb</filename> files are usually referred to as "recipes."
|
|
||||||
In general, a recipe contains information about a single piece of software.
|
|
||||||
The information includes the location from which to download the source patches
|
|
||||||
(if any are needed), which special configuration options to apply,
|
|
||||||
how to compile the source files, and how to package the compiled output.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The term "package" can also be used to describe recipes.
|
|
||||||
However, since the same word is used for the packaged output from the Yocto
|
|
||||||
Project (i.e. <filename>.ipk</filename> or <filename>.deb</filename> files),
|
|
||||||
this document avoids using the term "package" to refer to recipes.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='usingpoky-components-classes'>
|
|
||||||
<title>Classes</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Class files (<filename>.bbclass</filename>) contain information that is useful to share
|
|
||||||
between metadata files.
|
|
||||||
An example is the Autotools class, which contains
|
|
||||||
common settings for any application that Autotools uses.
|
|
||||||
The <link linkend='ref-classes'>Reference: Classes</link> appendix provides details
|
|
||||||
about common classes and how to use them.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='usingpoky-components-configuration'>
|
|
||||||
<title>Configuration</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The configuration files (<filename>.conf</filename>) define various configuration variables
|
|
||||||
that govern the Yocto Project build process.
|
|
||||||
These files fall into several areas that define machine configuration options,
|
|
||||||
distribution configuration options, compiler tuning options, general common configuration
|
|
||||||
options and user configuration options (<filename>local.conf</filename>, which is found
|
|
||||||
in the Yocto Project files build directory).
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
|
|
||||||
<section id='usingpoky-build'>
|
<section id='usingpoky-build'>
|
||||||
<title>Running a Build</title>
|
<title>Running a Build</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can find information on how to build an image using the Yocto Project in the
|
You can find general information on how to build an image using the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#building-image'>
|
Yocto Project in the
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#building-image'>
|
||||||
Building an Image</ulink> section of the
|
Building an Image</ulink> section of the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||||
Yocto Project Quick Start</ulink>.
|
Yocto Project Quick Start</ulink>.
|
||||||
This section provides a quick overview.
|
This section provides a summary of the build process and provides information
|
||||||
|
for less obvious aspects of the build process.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<section id='build-overview'>
|
||||||
The first thing you need to do is set up the Yocto Project build environment by sourcing
|
<title>Build Overview</title>
|
||||||
the environment setup script as follows:
|
|
||||||
<literallayout class='monospaced'>
|
<para>
|
||||||
|
The first thing you need to do is set up the Yocto Project build environment by sourcing
|
||||||
|
the environment setup script as follows:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
$ source oe-init-build-env [build_dir]
|
$ source oe-init-build-env [build_dir]
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The <filename>build_dir</filename> is optional and specifies the directory Yocto Project
|
The <filename>build_dir</filename> is optional and specifies the directory Yocto Project
|
||||||
uses for the build.
|
uses for the build.
|
||||||
If you do not specify a build directory it defaults to <filename>build</filename>
|
If you do not specify a build directory it defaults to <filename>build</filename>
|
||||||
in your current working directory.
|
in your current working directory.
|
||||||
A common practice is to use a different build directory for different targets.
|
A common practice is to use a different build directory for different targets.
|
||||||
For example, <filename>~/build/x86</filename> for a <filename>qemux86</filename>
|
For example, <filename>~/build/x86</filename> for a <filename>qemux86</filename>
|
||||||
target, and <filename>~/build/arm</filename> for a <filename>qemuarm</filename> target.
|
target, and <filename>~/build/arm</filename> for a <filename>qemuarm</filename> target.
|
||||||
See <link linkend="structure-core-script">oe-init-build-env</link>
|
See <link linkend="structure-core-script">oe-init-build-env</link>
|
||||||
for more information on this script.
|
for more information on this script.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Once the Yocto Project build environment is set up, you can build a target using:
|
Once the Yocto Project build environment is set up, you can build a target using:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ bitbake <target>
|
$ bitbake <target>
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The <filename>target</filename> is the name of the recipe you want to build.
|
The <filename>target</filename> is the name of the recipe you want to build.
|
||||||
Common targets are the images in <filename>meta/recipes-core/images</filename>,
|
Common targets are the images in <filename>meta/recipes-core/images</filename>,
|
||||||
<filename>/meta/recipes-sato/images</filename>, etc. all found in the Yocto Project
|
<filename>/meta/recipes-sato/images</filename>, etc. all found in the Yocto Project
|
||||||
files.
|
files.
|
||||||
Or, the target can be the name of a recipe for a specific piece of software such as
|
Or, the target can be the name of a recipe for a specific piece of software such as
|
||||||
<application>busybox</application>.
|
<application>busybox</application>.
|
||||||
For more details about the images Yocto Project supports, see the
|
For more details about the images Yocto Project supports, see the
|
||||||
<link linkend="ref-images">'Reference: Images'</link> appendix.
|
<link linkend="ref-images">'Reference: Images'</link> appendix.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
Building an image without GNU Public License Version 3 (GPLv3) components is
|
Building an image without GNU Public License Version 3 (GPLv3) components is
|
||||||
only supported for minimal and base images.
|
only supported for minimal and base images.
|
||||||
See <link linkend='ref-images'>'Reference: Images'</link> for more information.
|
See <link linkend='ref-images'>'Reference: Images'</link> for more information.
|
||||||
</note>
|
</note>
|
||||||
|
</section>
|
||||||
|
|
||||||
<note>
|
<section id='building-an-image-using-gpl-components'>
|
||||||
When building an image using GPL components, you need to maintain your original
|
<title>Building an Image Using GPL Components</title>
|
||||||
settings and not switch back and forth applying different versions of the GNU
|
|
||||||
Public License.
|
<para>
|
||||||
If you rebuild using different versions of GPL, dependency errors might occur
|
When building an image using GPL components, you need to maintain your original
|
||||||
due to some components not being rebuilt.
|
settings and not switch back and forth applying different versions of the GNU
|
||||||
</note>
|
Public License.
|
||||||
|
If you rebuild using different versions of GPL, dependency errors might occur
|
||||||
|
due to some components not being rebuilt.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='usingpoky-install'>
|
<section id='usingpoky-install'>
|
||||||
@@ -222,9 +93,9 @@
|
|||||||
<filename class="directory">tmp/deploy/images</filename>.
|
<filename class="directory">tmp/deploy/images</filename>.
|
||||||
For information on how to run pre-built images such as <filename>qemux86</filename>
|
For information on how to run pre-built images such as <filename>qemux86</filename>
|
||||||
and <filename>qemuarm</filename>, see the
|
and <filename>qemuarm</filename>, see the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html#using-pre-built'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#using-pre-built'>
|
||||||
Using Pre-Built Binaries and QEMU</ulink> section in the
|
Using Pre-Built Binaries and QEMU</ulink> section in the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||||
Yocto Project Quick Start</ulink>.
|
Yocto Project Quick Start</ulink>.
|
||||||
For information about how to install these images, see the documentation for your
|
For information about how to install these images, see the documentation for your
|
||||||
particular board/machine.
|
particular board/machine.
|
||||||
@@ -310,7 +181,7 @@
|
|||||||
You can view a list of tasks in a given package by running the
|
You can view a list of tasks in a given package by running the
|
||||||
<filename>listtasks</filename> task as follows:
|
<filename>listtasks</filename> task as follows:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ bitbake matchbox-desktop -c listtasks
|
$ bitbake matchbox-desktop -c
|
||||||
</literallayout>
|
</literallayout>
|
||||||
The results are in the file <filename>${WORKDIR}/temp/log.do_listtasks</filename>.
|
The results are in the file <filename>${WORKDIR}/temp/log.do_listtasks</filename>.
|
||||||
</para>
|
</para>
|
||||||
|
|||||||
@@ -966,9 +966,3 @@ table {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footnote {
|
|
||||||
font-size: small;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<section id='fake-title'>
|
<section id='fake-title'>
|
||||||
<title>Yocto Project Quick Start</title>
|
<title>Yocto Project Quick Start</title>
|
||||||
<para>Copyright © 2010-2011 Linux Foundation</para>
|
<para>Copyright © 2010-2012 Linux Foundation</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='welcome'>
|
<section id='welcome'>
|
||||||
@@ -37,13 +37,13 @@
|
|||||||
Finally, you might find the Frequently Asked Questions (FAQ) for the Yocto Project
|
Finally, you might find the Frequently Asked Questions (FAQ) for the Yocto Project
|
||||||
at <ulink url='https://wiki.yoctoproject.org/wiki/FAQ'>Yocto Project FAQ</ulink> and
|
at <ulink url='https://wiki.yoctoproject.org/wiki/FAQ'>Yocto Project FAQ</ulink> and
|
||||||
the FAQ appendix located in
|
the FAQ appendix located in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||||
The Yocto Project Reference Manual</ulink> helpful.
|
The Yocto Project Reference Manual</ulink> helpful.
|
||||||
</para>
|
</para>
|
||||||
<note>
|
<note>
|
||||||
Due to production processes, there could be differences between the Yocto Project
|
Due to production processes, there could be differences between the Yocto Project
|
||||||
documentation bundled in the release tarball and the
|
documentation bundled in the release tarball and the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||||
Yocto Project Quick Start</ulink> on
|
Yocto Project Quick Start</ulink> on
|
||||||
the <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink> website.
|
the <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink> website.
|
||||||
For the latest version of this manual, see the manual on the website.
|
For the latest version of this manual, see the manual on the website.
|
||||||
@@ -285,9 +285,9 @@
|
|||||||
development system.
|
development system.
|
||||||
Doing so allows you to contribute back to the project.
|
Doing so allows you to contribute back to the project.
|
||||||
For information on how to get set up using this method, see the
|
For information on how to get set up using this method, see the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#local-yp-release'>Yocto
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#local-yp-release'>Yocto
|
||||||
Project Release</ulink>" item in
|
Project Release</ulink>" item in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>The Yocto Project
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>The Yocto Project
|
||||||
Development Manual</ulink>.
|
Development Manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -345,22 +345,22 @@
|
|||||||
If you encounter problems with the Yocto Project finding and downloading source code, see
|
If you encounter problems with the Yocto Project finding and downloading source code, see
|
||||||
the FAQ entry "How does Poky obtain source code and will it work behind my
|
the FAQ entry "How does Poky obtain source code and will it work behind my
|
||||||
firewall or proxy server?" in
|
firewall or proxy server?" in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||||
The Yocto Project Reference Manual</ulink>.
|
The Yocto Project Reference Manual</ulink>.
|
||||||
</para></note>
|
</para></note>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ wget http://downloads.yoctoproject.org/releases/yocto/yocto-1.1/poky-edison-6.0.tar.bz2
|
$ wget http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/poky-edison-6.0.1.tar.bz2
|
||||||
$ tar xjf poky-edison-6.0.tar.bz2
|
$ tar xjf poky-edison-6.0.1.tar.bz2
|
||||||
$ source poky-edison-6.0/oe-init-build-env edison-6.0-build
|
$ source poky-edison-6.0.1/oe-init-build-env edison-6.0.1-build
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<tip><para>
|
<tip><para>
|
||||||
To help conserve disk space during builds, you can add the following statement
|
To help conserve disk space during builds, you can add the following statement
|
||||||
to your project's configuration file, which for this example
|
to your project's configuration file, which for this example
|
||||||
is <filename>edison-6.0-build/conf/local.conf</filename>.
|
is <filename>edison-6.0.1-build/conf/local.conf</filename>.
|
||||||
Adding this statement deletes the work directory used for building a package
|
Adding this statement deletes the work directory used for building a package
|
||||||
once the package is built.
|
once the package is built.
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
@@ -376,13 +376,13 @@
|
|||||||
<ulink url='http://www.yoctoproject.org/download'>Yocto Project website</ulink>
|
<ulink url='http://www.yoctoproject.org/download'>Yocto Project website</ulink>
|
||||||
Downloads page to retrieve the tarball.</para></listitem>
|
Downloads page to retrieve the tarball.</para></listitem>
|
||||||
<listitem><para>The second command extracts the files from the tarball and places
|
<listitem><para>The second command extracts the files from the tarball and places
|
||||||
them into a directory named <filename>poky-edison-6.0</filename> in the current
|
them into a directory named <filename>poky-edison-6.0.1</filename> in the current
|
||||||
directory.</para></listitem>
|
directory.</para></listitem>
|
||||||
<listitem><para>The third command runs the Yocto Project environment setup script.
|
<listitem><para>The third command runs the Yocto Project environment setup script.
|
||||||
Running this script defines Yocto Project build environment settings needed to
|
Running this script defines Yocto Project build environment settings needed to
|
||||||
complete the build.
|
complete the build.
|
||||||
The script also creates the Yocto Project
|
The script also creates the Yocto Project
|
||||||
build directory, which is <filename>edison-6.0-build</filename> in this case.
|
build directory, which is <filename>edison-6.0.1-build</filename> in this case.
|
||||||
After the script runs, your current working directory is set
|
After the script runs, your current working directory is set
|
||||||
to the build directory.
|
to the build directory.
|
||||||
Later, when the build completes, the build directory contains all the files
|
Later, when the build completes, the build directory contains all the files
|
||||||
@@ -406,12 +406,15 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Another couple of variables of interest are the
|
Another couple of variables of interest are the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></ulink> and the
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html#var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></ulink> and the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></ulink> variables.
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></ulink> variables.
|
||||||
By default, these variables are commented out.
|
By default, these variables are commented out.
|
||||||
However, if you have a multi-core CPU you might want to uncomment
|
However, if you have a multi-core CPU you might want to uncomment
|
||||||
the lines and set both variables equal to twice the number of your
|
the lines and set the variable
|
||||||
|
<filename>BB_NUMBER_THREADS</filename> equal to twice the number of your
|
||||||
host's processor cores.
|
host's processor cores.
|
||||||
|
Also, you could set the variable <filename>PARALLEL_MAKE</filename> equal to
|
||||||
|
1.5 times the number of processor cores.
|
||||||
Setting these variables can significantly shorten your build time.
|
Setting these variables can significantly shorten your build time.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -420,10 +423,10 @@
|
|||||||
the image.
|
the image.
|
||||||
By default, the Yocto Project build system uses the RPM package manager.
|
By default, the Yocto Project build system uses the RPM package manager.
|
||||||
You can control this configuration by using the
|
You can control this configuration by using the
|
||||||
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink></filename> variable.
|
<filename><ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink></filename> variable.
|
||||||
For additional package manager selection information, see
|
For additional package manager selection information, see
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#ref-classes-package'>Packaging - <filename>package*.bbclass</filename></ulink>" in
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html#ref-classes-package'>Packaging - <filename>package*.bbclass</filename></ulink>" in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||||
The Yocto Project Reference Manual</ulink>.
|
The Yocto Project Reference Manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -432,15 +435,15 @@
|
|||||||
<filename>core-image-sato</filename> in this example.
|
<filename>core-image-sato</filename> in this example.
|
||||||
For information on the <filename>-k</filename> option use the
|
For information on the <filename>-k</filename> option use the
|
||||||
<filename>bitbake --help</filename> command or see the
|
<filename>bitbake --help</filename> command or see the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#usingpoky-components-bitbake'>BitBake</ulink>" section in
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html#usingpoky-components-bitbake'>BitBake</ulink>" section in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html'>The Yocto Project Reference Manual</ulink>.
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html'>The Yocto Project Reference Manual</ulink>.
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ bitbake -k core-image-sato
|
$ bitbake -k core-image-sato
|
||||||
</literallayout>
|
</literallayout>
|
||||||
<note><para>
|
<note><para>
|
||||||
BitBake requires Python 2.6 or 2.7. For more information on this requirement,
|
BitBake requires Python 2.6 or 2.7. For more information on this requirement,
|
||||||
see the FAQ appendix in
|
see the FAQ appendix in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||||
The Yocto Project Reference Manual</ulink>.
|
The Yocto Project Reference Manual</ulink>.
|
||||||
</para></note>
|
</para></note>
|
||||||
The final command runs the image:
|
The final command runs the image:
|
||||||
@@ -494,7 +497,7 @@
|
|||||||
<para>
|
<para>
|
||||||
You can download the pre-built toolchain, which includes the <filename>runqemu</filename>
|
You can download the pre-built toolchain, which includes the <filename>runqemu</filename>
|
||||||
script and support files, from the appropriate directory under
|
script and support files, from the appropriate directory under
|
||||||
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1/toolchain/'></ulink>.
|
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/toolchain/'></ulink>.
|
||||||
Toolchains are available for 32-bit and 64-bit development systems from the
|
Toolchains are available for 32-bit and 64-bit development systems from the
|
||||||
<filename>i686</filename> and <filename>x86_64</filename> directories, respectively.
|
<filename>i686</filename> and <filename>x86_64</filename> directories, respectively.
|
||||||
Each type of development system supports five target architectures.
|
Each type of development system supports five target architectures.
|
||||||
@@ -522,7 +525,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
poky-eglibc-x86_64-i586-toolchain-gmae-1.1.tar.bz2
|
poky-eglibc-x86_64-i586-toolchain-gmae-1.1.1.tar.bz2
|
||||||
</literallayout>
|
</literallayout>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -535,15 +538,15 @@
|
|||||||
<para>
|
<para>
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ cd /
|
$ cd /
|
||||||
$ sudo tar -xvjf ~/toolchains/poky-eglibc-x86_64-i586-toolchain-gmae-1.1.tar.bz2
|
$ sudo tar -xvjf ~/toolchains/poky-eglibc-x86_64-i586-toolchain-gmae-1.1.1.tar.bz2
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
For more information on how to install tarballs, see the
|
For more information on how to install tarballs, see the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/adt-manual/adt-manual.html#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>" and
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/adt-manual/adt-manual.html#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>" and
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/adt-manual/adt-manual.html#using-the-toolchain-from-within-the-build-tree'>Using BitBake and the Yocto Project Build Tree</ulink>" sections in
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/adt-manual/adt-manual.html#using-the-toolchain-from-within-the-build-tree'>Using BitBake and the Yocto Project Build Tree</ulink>" sections in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/adt-manual/adt-manual.html'>The Yocto Project
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/adt-manual/adt-manual.html'>The Yocto Project
|
||||||
Application Development Toolkit (ADT) User's Guide</ulink>.
|
Application Development Toolkit (ADT) User's Guide</ulink>.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -553,7 +556,7 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can download the pre-built Linux kernel suitable for running in the QEMU emulator from
|
You can download the pre-built Linux kernel suitable for running in the QEMU emulator from
|
||||||
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1/machines/qemu'></ulink>.
|
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/machines/qemu'></ulink>.
|
||||||
Be sure to use the kernel that matches the architecture you want to simulate.
|
Be sure to use the kernel that matches the architecture you want to simulate.
|
||||||
Download areas exist for the five supported machine architectures:
|
Download areas exist for the five supported machine architectures:
|
||||||
<filename>qemuarm</filename>, <filename>qemumips</filename>, <filename>qemuppc</filename>,
|
<filename>qemuarm</filename>, <filename>qemumips</filename>, <filename>qemuppc</filename>,
|
||||||
@@ -574,8 +577,8 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can learn more about downloading a Yocto Project kernel in the
|
You can learn more about downloading a Yocto Project kernel in the
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#local-kernel-files'>Linux Yocto Kernel</ulink>" section of
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#local-kernel-files'>Linux Yocto Kernel</ulink>" section of
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html'>The
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>The
|
||||||
Yocto Project Development Manual</ulink>.
|
Yocto Project Development Manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -585,7 +588,7 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can also download the filesystem image suitable for your target architecture from
|
You can also download the filesystem image suitable for your target architecture from
|
||||||
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1/machines/qemu'></ulink>.
|
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/machines/qemu'></ulink>.
|
||||||
Again, be sure to use the filesystem that matches the architecture you want
|
Again, be sure to use the filesystem that matches the architecture you want
|
||||||
to simulate.
|
to simulate.
|
||||||
</para>
|
</para>
|
||||||
@@ -605,7 +608,7 @@
|
|||||||
<<emphasis>profile</emphasis>> is the filesystem image's profile:
|
<<emphasis>profile</emphasis>> is the filesystem image's profile:
|
||||||
lsb, lsb-dev, lsb-sdk, lsb-qt3, minimal, minimal-dev, sato, sato-dev, or sato-sdk.
|
lsb, lsb-dev, lsb-sdk, lsb-qt3, minimal, minimal-dev, sato, sato-dev, or sato-sdk.
|
||||||
For information on these types of image profiles, see
|
For information on these types of image profiles, see
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#ref-images'>Reference: Images</ulink> in the Yocto Project Reference Manual.
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html#ref-images'>Reference: Images</ulink> in the Yocto Project Reference Manual.
|
||||||
|
|
||||||
<<emphasis>arch</emphasis>> is a string representing the target architecture:
|
<<emphasis>arch</emphasis>> is a string representing the target architecture:
|
||||||
x86, x86-64, ppc, mips, or arm.
|
x86, x86-64, ppc, mips, or arm.
|
||||||
@@ -620,7 +623,7 @@
|
|||||||
Before you start the QEMU emulator, you need to set up the emulation environment.
|
Before you start the QEMU emulator, you need to set up the emulation environment.
|
||||||
The following command form sets up the emulation environment.
|
The following command form sets up the emulation environment.
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ source /opt/poky/1.1/environment-setup-<<emphasis>arch</emphasis>>-poky-linux-<<emphasis>if</emphasis>>
|
$ source /opt/poky/1.1.1/environment-setup-<<emphasis>arch</emphasis>>-poky-linux-<<emphasis>if</emphasis>>
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
<<emphasis>arch</emphasis>> is a string representing the target architecture:
|
<<emphasis>arch</emphasis>> is a string representing the target architecture:
|
||||||
@@ -650,11 +653,12 @@
|
|||||||
<para>
|
<para>
|
||||||
Continuing with the example, the following two commands setup the emulation
|
Continuing with the example, the following two commands setup the emulation
|
||||||
environment and launch QEMU.
|
environment and launch QEMU.
|
||||||
This example assumes the root filesystem tarball has been downloaded and expanded, and
|
This example assumes the toolchain tarball has been downloaded and expanded
|
||||||
|
into <filename>/opt/poky</filename> and
|
||||||
that the kernel and filesystem are for a 32-bit target architecture.
|
that the kernel and filesystem are for a 32-bit target architecture.
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ source /opt/poky/1.1/environment-setup-i686-poky-linux
|
$ source /opt/poky/1.1.1/environment-setup-i586-poky-linux
|
||||||
$ runqemu qemux86 bzImage-3.0-qemux86-1.1.bin \
|
$ runqemu qemux86 bzImage-3.0-qemux86-1.1.1.bin \
|
||||||
core-image-sato-qemux86.ext3
|
core-image-sato-qemux86.ext3
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
DESCRIPTION = "FarSight is an audio/video conferencing framework specifically designed for Instant Messengers."
|
DESCRIPTION = "FarSight is an audio/video conferencing framework specifically designed for Instant Messengers."
|
||||||
HOMEPAGE = "http://farsight.sf.net"
|
HOMEPAGE = "http://farsight.sf.net"
|
||||||
SRC_URI = "http://farsight.freedesktop.org/releases/farsight2/${BPN}-${PV}.tar.gz"
|
SRC_URI = "http://farsight.freedesktop.org/releases/farsight2/${BPN}-${PV}.tar.gz"
|
||||||
LICENSE = "LGPLv2.1"
|
LICENSE = "GPLv2.1"
|
||||||
DEPENDS = "libnice glib-2.0 libxml2 zlib dbus gstreamer gst-plugins-base"
|
DEPENDS = "libnice glib-2.0 libxml2 zlib dbus gstreamer gst-plugins-base"
|
||||||
|
|
||||||
inherit autotools
|
inherit autotools
|
||||||
|
|
||||||
PR = "r2"
|
PR = "r1"
|
||||||
|
|
||||||
EXTRA_OECONF = " \
|
EXTRA_OECONF = " \
|
||||||
--disable-debug \
|
--disable-debug \
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ RDEPENDS_${PN} = "glibc-gconv-ibm850 glibc-gconv-cp1252 \
|
|||||||
SRC_URI = "http://www.abiword.org/downloads/abiword/${PV}/source/abiword-${PV}.tar.gz"
|
SRC_URI = "http://www.abiword.org/downloads/abiword/${PV}/source/abiword-${PV}.tar.gz"
|
||||||
|
|
||||||
#want 2.x from 2.x.y for the installation directory
|
#want 2.x from 2.x.y for the installation directory
|
||||||
SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
|
SHRT_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}"
|
||||||
|
|
||||||
FILES_${PN} += " \
|
FILES_${PN} += " \
|
||||||
${datadir}/icons/* \
|
${datadir}/icons/* \
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ RRECOMMENDS_${PN} = "glibc-gconv-ibm850 glibc-gconv-cp1252 \
|
|||||||
RELURI = "http://www.abiword.org/downloads/abiword/${PV}/source/abiword-${PV}.tar.gz"
|
RELURI = "http://www.abiword.org/downloads/abiword/${PV}/source/abiword-${PV}.tar.gz"
|
||||||
RELSRC = "${WORKDIR}/abiword-${PV}/abi"
|
RELSRC = "${WORKDIR}/abiword-${PV}/abi"
|
||||||
|
|
||||||
SVNURI = "svn://svn.abisource.com/abiword/trunk;module=abiword;proto=http"
|
CVSURI = "cvs://anoncvs:anoncvs@anoncvs.abisource.com/cvsroot;module=abi"
|
||||||
SVNSRC = "${WORKDIR}/abi"
|
CVSSRC = "${WORKDIR}/abi"
|
||||||
|
|
||||||
#want 2.x from 2.x.y for the installation directory
|
#want 2.x from 2.x.y for the installation directory
|
||||||
SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
|
SHRT_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}"
|
||||||
|
|
||||||
FILES_${PN} += " \
|
FILES_${PN} += " \
|
||||||
${datadir}/icons/* \
|
${datadir}/icons/* \
|
||||||
|
|||||||
10
meta-demoapps/recipes-gnome/abiword/abiword_cvs.bb
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
require abiword.inc
|
||||||
|
|
||||||
|
SRCDATE = "20070130"
|
||||||
|
PV="2.5.0+cvs${SRCDATE}"
|
||||||
|
PR = "r4"
|
||||||
|
|
||||||
|
SRC_URI = "${CVSURI}"
|
||||||
|
|
||||||
|
S = "${CVSSRC}"
|
||||||
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
require abiword.inc
|
|
||||||
|
|
||||||
SRCREV = "21818"
|
|
||||||
PV="2.5.2+svnr${SRCPV}"
|
|
||||||
PR = "r0"
|
|
||||||
|
|
||||||
SRC_URI = "${SVNURI}"
|
|
||||||
|
|
||||||
S = "${SVNSRC}"
|
|
||||||
|
|
||||||
@@ -1,14 +1,10 @@
|
|||||||
DESCRIPTION = "GNOME Structured File Library"
|
DESCRIPTION = "GNOME Structured File Library"
|
||||||
LICENSE = "GPL"
|
LICENSE = "GPL"
|
||||||
SECTION = "libs"
|
SECTION = "libs"
|
||||||
PR = "r2"
|
PR = "r1"
|
||||||
|
|
||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=dc7371b50816c96e145fa0f8ade8e24d \
|
|
||||||
file://COPYING.LIB;md5=61464cfe342798eeced82efe9ae55f63 \
|
|
||||||
file://gsf/gsf.h;endline=25;md5=15cf6d31ad023167779ab5f0bbb76f49"
|
|
||||||
|
|
||||||
DEPENDS= "libxml2 bzip2 glib-2.0 zlib"
|
DEPENDS= "libxml2 bzip2 glib-2.0 zlib"
|
||||||
RDEPENDS_${PN} = "gconf"
|
RDEPENDS_${PN} = "gconf gnome-vfs"
|
||||||
|
|
||||||
|
|
||||||
PACKAGES =+ "${PN}-gnome ${PN}-gnome-dev "
|
PACKAGES =+ "${PN}-gnome ${PN}-gnome-dev "
|
||||||
|
|||||||
13
meta-demoapps/recipes-graphics/clutter/table.inc
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
DESCRIPTION = "Table Clutter Demo"
|
||||||
|
HOMEPAGE = "http://www.clutter-project.org/"
|
||||||
|
LICENSE = "LGPLv2.1 & GPLv2"
|
||||||
|
|
||||||
|
DEPENDS = "clutter-gst-1.4 gnome-vfs"
|
||||||
|
|
||||||
|
inherit autotools pkgconfig
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
install -d ${D}${bindir}
|
||||||
|
install -m 0755 ${S}/table ${D}${bindir}/table
|
||||||
|
}
|
||||||
|
|
||||||
16
meta-demoapps/recipes-graphics/clutter/table/fixes.patch
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
Upstream-Status: Pending
|
||||||
|
|
||||||
|
Index: table/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- table.orig/Makefile 2007-07-10 13:24:18.000000000 +0100
|
||||||
|
+++ table/Makefile 2007-07-10 13:28:10.000000000 +0100
|
||||||
|
@@ -8,7 +8,7 @@ all: table
|
||||||
|
|
||||||
|
|
||||||
|
table: table.o clutter-dominatrix.o clutter-video-player.o
|
||||||
|
- $(CC) -g -Wall $(CFLAGS) -o $@ table.o clutter-dominatrix.o clutter-video-player.o $(LIBS)
|
||||||
|
+ $(CC) -g -Wall $(CFLAGS) $(LDFLAGS) -o $@ table.o clutter-dominatrix.o clutter-video-player.o $(LIBS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -fr *.o table
|
||||||
|
\ No newline at end of file
|
||||||
15
meta-demoapps/recipes-graphics/clutter/table_git.bb
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
require table.inc
|
||||||
|
|
||||||
|
LIC_FILES_CHKSUM = "file://fluttr/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
|
||||||
|
file://script-viewer/COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
|
||||||
|
|
||||||
|
SRCREV = "4b267533ce16656cba4104fc39dc12709c1bdddf"
|
||||||
|
PV = "0.3.0+git${SRCPV}"
|
||||||
|
PR = "r1"
|
||||||
|
|
||||||
|
SRC_URI = "git://git.clutter-project.org/toys.git;protocol=git \
|
||||||
|
file://fixes.patch;patch=1"
|
||||||
|
|
||||||
|
S = "${WORKDIR}/git/table"
|
||||||
|
|
||||||
|
|
||||||
@@ -3,7 +3,7 @@ DESCRIPTION = "Mail user agent"
|
|||||||
#DEPENDS = "gtk+ gpgme libetpan libgnomeprint aspell openssl"
|
#DEPENDS = "gtk+ gpgme libetpan libgnomeprint aspell openssl"
|
||||||
DEPENDS = "gtk+ libetpan openssl libowl"
|
DEPENDS = "gtk+ libetpan openssl libowl"
|
||||||
LICENSE = "GPL"
|
LICENSE = "GPL"
|
||||||
PR = "r7"
|
PR = "r6"
|
||||||
|
|
||||||
SRC_URI = "\
|
SRC_URI = "\
|
||||||
${SOURCEFORGE_MIRROR}/sylpheed-claws/claws-mail-${PV}.tar.bz2 \
|
${SOURCEFORGE_MIRROR}/sylpheed-claws/claws-mail-${PV}.tar.bz2 \
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
def get_poppler_fpu_setting(bb, d):
|
def get_poppler_fpu_setting(bb, d):
|
||||||
if d.getVar('TARGET_FPU', 1) in [ 'soft' ]:
|
if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
|
||||||
return "--enable-fixedpoint"
|
return "--enable-fixedpoint"
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
DISTRO = "poky"
|
DISTRO = "poky"
|
||||||
DISTRO_NAME = "Yocto (Built by Poky 6.0)"
|
DISTRO_NAME = "Yocto (Built by Poky 6.0.1)"
|
||||||
DISTRO_VERSION = "1.1+snapshot-${DATE}"
|
DISTRO_VERSION = "1.1.1"
|
||||||
SDK_VENDOR = "-pokysdk"
|
SDK_VENDOR = "-pokysdk"
|
||||||
SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
|
SDK_VERSION := "${DISTRO_VERSION}"
|
||||||
|
|
||||||
MAINTAINER = "Poky <poky@yoctoproject.org>"
|
MAINTAINER = "Poky <poky@yoctoproject.org>"
|
||||||
|
|
||||||
@@ -18,6 +18,11 @@ PREFERRED_VERSION_linux-yocto_qemux86-64 ?= "3.0%"
|
|||||||
PREFERRED_VERSION_linux-yocto_qemuarm ?= "3.0%"
|
PREFERRED_VERSION_linux-yocto_qemuarm ?= "3.0%"
|
||||||
PREFERRED_VERSION_linux-yocto_qemumips ?= "3.0%"
|
PREFERRED_VERSION_linux-yocto_qemumips ?= "3.0%"
|
||||||
PREFERRED_VERSION_linux-yocto_qemuppc ?= "3.0%"
|
PREFERRED_VERSION_linux-yocto_qemuppc ?= "3.0%"
|
||||||
|
PREFERRED_VERSION_linux-yocto-rt_qemux86 ?= "3.0%"
|
||||||
|
PREFERRED_VERSION_linux-yocto-rt_qemux86-64 ?= "3.0%"
|
||||||
|
PREFERRED_VERSION_linux-yocto-rt_qemuarm ?= "3.0%"
|
||||||
|
PREFERRED_VERSION_linux-yocto-rt_qemumips ?= "3.0%"
|
||||||
|
PREFERRED_VERSION_linux-yocto-rt_qemuppc ?= "3.0%"
|
||||||
|
|
||||||
SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TARGET_ARCH}"
|
SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TARGET_ARCH}"
|
||||||
SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}"
|
SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}"
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ MACHINE ??= "qemux86"
|
|||||||
#
|
#
|
||||||
# Where to place downloads
|
# Where to place downloads
|
||||||
#
|
#
|
||||||
# During a first build the system will download many different source code tarballs
|
# During a first build the system will download many differernt source code tarballs
|
||||||
# from various upstream projects. This can take a while, particularly if your network
|
# from various upstream projects. This can take a while, particularly if your network
|
||||||
# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you
|
# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you
|
||||||
# can preserve this directory to speed up this part of subsequent builds. This directory
|
# can preserve this directory to speed up this part of subsequent builds. This directory
|
||||||
@@ -71,7 +71,7 @@ MACHINE ??= "qemux86"
|
|||||||
# and this option determines where those files are placed.
|
# and this option determines where those files are placed.
|
||||||
#
|
#
|
||||||
# You can wipe out TMPDIR leaving this directory intact and the build would regenerate
|
# You can wipe out TMPDIR leaving this directory intact and the build would regenerate
|
||||||
# from these files if no changes were made to the configuration. If changes were made
|
# from these files if no chages were made to the configuration. If changes were made
|
||||||
# to the configuration, only shared state files where the state was still valid would
|
# to the configuration, only shared state files where the state was still valid would
|
||||||
# be used (done using checksums).
|
# be used (done using checksums).
|
||||||
#
|
#
|
||||||
@@ -84,7 +84,7 @@ MACHINE ??= "qemux86"
|
|||||||
#
|
#
|
||||||
# This option specifies where the bulk of the building work should be done and
|
# This option specifies where the bulk of the building work should be done and
|
||||||
# where BitBake should place its temporary files and output. Keep in mind that
|
# where BitBake should place its temporary files and output. Keep in mind that
|
||||||
# this includes the extraction and compilation of many applications and the toolchain
|
# this includes the extraction and complation of many applications and the toolchain
|
||||||
# which can use Gigabytes of hard disk space.
|
# which can use Gigabytes of hard disk space.
|
||||||
#
|
#
|
||||||
# The default is a tmp directory under TOPDIR.
|
# The default is a tmp directory under TOPDIR.
|
||||||
@@ -100,9 +100,9 @@ MACHINE ??= "qemux86"
|
|||||||
# these defaults.
|
# these defaults.
|
||||||
#
|
#
|
||||||
DISTRO ?= "poky"
|
DISTRO ?= "poky"
|
||||||
# As an example of a subclass there is a "bleeding" edge policy configuration
|
# As an exable of a subclass there is a "bleeding" egde policy configuration
|
||||||
# where many versions are set to the absolute latest code from the upstream
|
# where many versions are set to the absolute latest code from the upstream
|
||||||
# source control systems. This is just mentioned here as an example, its not
|
# source control systems. This is just mentioned here an an example, its not
|
||||||
# useful to most new users.
|
# useful to most new users.
|
||||||
# DISTRO ?= "poky-bleeding"
|
# DISTRO ?= "poky-bleeding"
|
||||||
|
|
||||||
@@ -190,16 +190,20 @@ USER_CLASSES ?= "image-mklibs image-prelink"
|
|||||||
# Under certain circumstances the system may need input from you and to do this it
|
# Under certain circumstances the system may need input from you and to do this it
|
||||||
# can launch an interactive shell. It needs to do this since the build is
|
# can launch an interactive shell. It needs to do this since the build is
|
||||||
# multithreaded and needs to be able to handle the case where more than one parallel
|
# multithreaded and needs to be able to handle the case where more than one parallel
|
||||||
# process may require the user's attention. The default is iterate over the available
|
# process may require the user's attention. The default is to use xterm.
|
||||||
# terminal types to find one that works.
|
|
||||||
#
|
#
|
||||||
# Examples of the occasions this may happen are when resolving patches which cannot
|
# Examples of the occasions this may happen are when resolving patches which cannot
|
||||||
# be applied, to use the devshell or the kernel menuconfig
|
# be applied, to use the devshell or the kernel menuconfig
|
||||||
#
|
#
|
||||||
# Supported values are auto, gnome, xfce, rxvt, xcreen, konsole (3.x only), none
|
# If you do not use (or have installed) xterm you will need to
|
||||||
|
# uncomment these variables and set them to the terminal you wish to use
|
||||||
|
#
|
||||||
|
# Supported shell prefixes for *_TERMCMD and *_TERMCMDRUN are:
|
||||||
|
# GNOME, SCREEN, XTERM and KONSOLE
|
||||||
# Note: currently, Konsole support only works for KDE 3.x due to the way
|
# Note: currently, Konsole support only works for KDE 3.x due to the way
|
||||||
# newer Konsole versions behave
|
# newer Konsole versions behave
|
||||||
#OE_TERMINAL = "auto"
|
#TERMCMD = "${XTERM_TERMCMD}"
|
||||||
|
#TERMCMDRUN = "${XTERM_TERMCMDRUN}"
|
||||||
# By default disable interactive patch resolution (tasks will just fail instead):
|
# By default disable interactive patch resolution (tasks will just fail instead):
|
||||||
PATCHRESOLVE = "noop"
|
PATCHRESOLVE = "noop"
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# certain recipes.
|
# certain recipes.
|
||||||
#BBMASK = ""
|
#BBMASK = ""
|
||||||
|
|
||||||
# eglibc configurability is used to reduce minimal image's size.
|
# eglibc configurability is used to reduce minimal images's size.
|
||||||
# the all supported eglibc options are listed in DISTRO_FEATURES_LIBC
|
# the all supported eglibc options are listed in DISTRO_FEATURES_LIBC
|
||||||
# and disabled by default. Uncomment and copy the DISTRO_FEATURES_LIBC
|
# and disabled by default. Uncomment and copy the DISTRO_FEATURES_LIBC
|
||||||
# and DISTRO_FEATURES definitions to local.conf to enable the options.
|
# and DISTRO_FEATURES definitions to local.conf to enable the options.
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
# The default is "default"
|
# The default is "default"
|
||||||
# Use "external-MODE" to use the precompiled external toolchains where MODE
|
# Use "external-MODE" to use the precompiled external toolchains where MODE
|
||||||
# is the type of external toolchain to use e.g. eabi. You need to ensure
|
# is the type of external toolchain to use e.g. eabi. You need to ensure
|
||||||
# the toolchain you want to use is included in an appropriate layer
|
# the toolchain you want to use is included in an an appropriate layer
|
||||||
# TCMODE = "external-eabi"
|
# TCMODE = "external-eabi"
|
||||||
|
|
||||||
# mklibs library size optimization is more useful to smaller images,
|
# mklibs library size optimization is more useful to smaller images,
|
||||||
@@ -117,9 +117,3 @@
|
|||||||
# The network based PR service host and port
|
# The network based PR service host and port
|
||||||
#PRSERV_HOST = "localhost"
|
#PRSERV_HOST = "localhost"
|
||||||
#PRSERV_PORT = "8585"
|
#PRSERV_PORT = "8585"
|
||||||
|
|
||||||
# Additional image generation features
|
|
||||||
#
|
|
||||||
# The following is a list of classes to import to use in the generation of images
|
|
||||||
# currently an example class is image_types_uboot
|
|
||||||
# IMAGE_CLASSES = " image_types_uboot"
|
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ KERNEL_IMAGETYPE = "bzImage"
|
|||||||
|
|
||||||
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
|
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
|
||||||
PREFERRED_VERSION_linux-yocto ?= "3.0%"
|
PREFERRED_VERSION_linux-yocto ?= "3.0%"
|
||||||
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
|
#PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto"
|
||||||
XSERVER ?= "xserver-xorg \
|
PREFERRED_PROVIDER_virtual/libx11 ?= "libx11-trim"
|
||||||
xserver-xorg-extension-dri2 \
|
PREFERRED_PROVIDER_virtual/libgl ?= "mesa-dri"
|
||||||
xserver-xorg-extension-glx \
|
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xf86-dri-lite"
|
||||||
xserver-xorg-extension-extmod \
|
PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xf86-dri-lite"
|
||||||
xserver-xorg-extension-dbe \
|
XSERVER ?= "xserver-xf86-dri-lite \
|
||||||
xf86-input-mouse \
|
xf86-input-mouse \
|
||||||
xf86-input-keyboard \
|
xf86-input-keyboard \
|
||||||
xf86-input-evdev \
|
xf86-input-evdev \
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
#@NAME: Beagleboard machine
|
#@NAME: Beagleboard machine
|
||||||
#@DESCRIPTION: Machine configuration for the http://beagleboard.org/ board
|
#@DESCRIPTION: Machine configuration for the http://beagleboard.org/ board
|
||||||
|
|
||||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg-lite"
|
PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86-lite"
|
||||||
XSERVER = "xserver-xorg-lite \
|
XSERVER = "xserver-xf86-lite \
|
||||||
xf86-input-evdev \
|
xf86-input-evdev \
|
||||||
xf86-input-mouse \
|
xf86-input-mouse \
|
||||||
xf86-video-omapfb \
|
xf86-video-omapfb \
|
||||||
@@ -32,6 +32,7 @@ EXTRA_IMAGECMD_jffs2 = "-lnp "
|
|||||||
SERIAL_CONSOLE = "115200 ttyO2"
|
SERIAL_CONSOLE = "115200 ttyO2"
|
||||||
|
|
||||||
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
|
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
|
||||||
|
#PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto"
|
||||||
|
|
||||||
KERNEL_IMAGETYPE = "uImage"
|
KERNEL_IMAGETYPE = "uImage"
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial"
|
|||||||
PREFERRED_VERSION_linux-yocto ?= "3.0%"
|
PREFERRED_VERSION_linux-yocto ?= "3.0%"
|
||||||
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
|
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
|
||||||
|
|
||||||
|
#PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto"
|
||||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive"
|
PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive"
|
||||||
XSERVER = "xserver-kdrive-fbdev"
|
XSERVER = "xserver-kdrive-fbdev"
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ KERNEL_IMAGETYPE = "vmlinux"
|
|||||||
KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
|
KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
|
||||||
|
|
||||||
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
|
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
|
||||||
|
#PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto"
|
||||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive"
|
PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive"
|
||||||
XSERVER = "xserver-kdrive-fbdev"
|
XSERVER = "xserver-kdrive-fbdev"
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
DEPENDS_atom-pc = "${STDDEPENDS} virtual/xserver-xf86 virtual/libgl"
|
||||||
|
EXTRA_OECONF_atom-pc = "${BASE_CONF} --with-flavour=glx"
|
||||||
|
PACKAGE_ARCH_atom-pc = "${MACHINE_ARCH}"
|
||||||
|
|
||||||
4
meta-yocto/recipes-graphics/clutter/clutter_git.bbappend
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
DEPENDS_atom-pc = "${STDDEPENDS} virtual/xserver-xf86 virtual/libgl"
|
||||||
|
EXTRA_OECONF_atom-pc = "${BASE_CONF} --with-flavour=glx"
|
||||||
|
PACKAGE_ARCH_atom-pc = "${MACHINE_ARCH}"
|
||||||
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
# Atom PCs have DRI support so use mesa-dri by default
|
# Atom PCs have DRI support so use mesa-dri by default
|
||||||
DEFAULT_PREFERENCE_atom-pc = "2"
|
DEFAULT_PREFERENCE_atom-pc = "1"
|
||||||
|
|
||||||
12
meta-yocto/recipes-kernel/linux/linux-yocto_2.6.34.bbappend
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
KMACHINE_atom-pc = "atom-pc"
|
||||||
|
KMACHINE_routerstationpro = "routerstationpro"
|
||||||
|
KMACHINE_mpc8315e-rdb = "fsl-mpc8315e-rdb"
|
||||||
|
KMACHINE_beagleboard = "beagleboard"
|
||||||
|
|
||||||
|
SRCREV_machine_atom-pc = "72ca49ab08b8eb475cec82a10049503602325791"
|
||||||
|
SRCREV_machine_routerstationpro = "49745cd45c92a89e70c6e2334caa80818c134562"
|
||||||
|
SRCREV_machine_mpc8315e-rdb = "a1c0ed6bf4060c10874b2a8547d81b3169dcf16a"
|
||||||
|
SRCREV_machine_beagleboard = "ef7f944e773950d4016b7643f9ecf052bbe250cd"
|
||||||
|
|
||||||
|
COMPATIBLE_MACHINE += "(atom-pc|routerstationpro|mpc8315e-rdb|beagleboard)"
|
||||||
|
|
||||||