Compare commits
1274 Commits
1.1_M3.rc3
...
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 | ||
|
|
ff8f0ea563 | ||
|
|
2da22470c8 | ||
|
|
2179edee1d | ||
|
|
28b0653dbd | ||
|
|
1e3644cdd3 | ||
|
|
c1cd38cc01 | ||
|
|
1b449dd0b0 | ||
|
|
72ff0c54b9 | ||
|
|
3d69181692 | ||
|
|
3ac49c3a52 | ||
|
|
e4c57fa3d8 | ||
|
|
7042e14c70 | ||
|
|
0f6ef5cc92 | ||
|
|
7f59cbceb4 | ||
|
|
a5313695cc | ||
|
|
a502a18484 | ||
|
|
ee6e30adc3 | ||
|
|
f0b9d793ff | ||
|
|
d9d2c9c75f | ||
|
|
4d3bac9a6d | ||
|
|
ad0c9a13ea | ||
|
|
093c27a8fd | ||
|
|
03b86748ae | ||
|
|
4ea42b64a8 | ||
|
|
e7f40dd8f2 | ||
|
|
97bded5bc4 | ||
|
|
bcfff457f6 | ||
|
|
863f43a093 | ||
|
|
7dc4495951 | ||
|
|
6a2c85ff97 | ||
|
|
d887bac4a2 | ||
|
|
737f8bbb4f | ||
|
|
d380bb126a | ||
|
|
c81cd242df | ||
|
|
9aa8b769d5 | ||
|
|
a0530fc847 | ||
|
|
87849d8420 | ||
|
|
2fa80ef30e | ||
|
|
29aa617a48 | ||
|
|
64ea342b4f | ||
|
|
719e1edaeb | ||
|
|
59a08907ea | ||
|
|
efc88ff010 | ||
|
|
c2db80b4de | ||
|
|
86d05bfb3d | ||
|
|
8b96f552a0 | ||
|
|
23773a899b | ||
|
|
f45ef8d9fa | ||
|
|
6bed96c4dc | ||
|
|
081990b2a3 | ||
|
|
8ebca0c5a8 | ||
|
|
92015c7863 | ||
|
|
28c3aa8b85 | ||
|
|
35fdd5a195 | ||
|
|
9e4dc60c75 | ||
|
|
1fba7bec25 | ||
|
|
d2f34d350d | ||
|
|
934e9ba7b4 | ||
|
|
2a09a93cba | ||
|
|
7a0cbe6b0e | ||
|
|
3a6a38e3c6 | ||
|
|
9b5175255b | ||
|
|
aed5247980 | ||
|
|
f48f4562b4 | ||
|
|
92518c5017 | ||
|
|
dfc13c9ae7 | ||
|
|
6be481711a | ||
|
|
849bf66e28 | ||
|
|
596a1973d9 | ||
|
|
99dd3c0b2c | ||
|
|
aab71071d7 | ||
|
|
27f8868509 | ||
|
|
f5a1b3c8f7 | ||
|
|
bb0cc3cfa6 | ||
|
|
ce2b383d04 | ||
|
|
e4fe5542a5 | ||
|
|
6f797c9398 | ||
|
|
0ecc7bbb46 | ||
|
|
a5de479418 | ||
|
|
000068e1ce | ||
|
|
66f4ceb7ff | ||
|
|
bf51268786 | ||
|
|
5a489eceb5 | ||
|
|
36aba35c07 | ||
|
|
14666c0b63 | ||
|
|
0b9e2fa758 | ||
|
|
6c4d3f5a56 | ||
|
|
e6706bf559 | ||
|
|
49a34b1dc8 | ||
|
|
0a27b8b76d | ||
|
|
bb4a5c44da | ||
|
|
fb8a0ad576 | ||
|
|
e20ceb918c | ||
|
|
04c66de8ab | ||
|
|
79e3952527 | ||
|
|
4471d3d73d | ||
|
|
dd605b1777 | ||
|
|
7b6b3b8655 | ||
|
|
bcd1bca880 | ||
|
|
978f48b7e2 | ||
|
|
420a5455ab | ||
|
|
1080d52f57 | ||
|
|
8c310ee0a9 | ||
|
|
d1f4cebf7e | ||
|
|
b75cf8ea80 | ||
|
|
c2bbc59b21 | ||
|
|
90ded12e48 | ||
|
|
ce66e2c6bd | ||
|
|
a765b9afdf | ||
|
|
7eea637db0 | ||
|
|
a45fafcada | ||
|
|
2f1d30ad65 | ||
|
|
dab5ffcf46 | ||
|
|
a7d58b50b3 | ||
|
|
0bd5bba8ab | ||
|
|
826a53adf6 | ||
|
|
684a7c655b | ||
|
|
58570ec6a5 | ||
|
|
3d09687196 | ||
|
|
a1c62ae8f4 | ||
|
|
50e184e0d9 | ||
|
|
3117530f44 | ||
|
|
aa203e4605 | ||
|
|
cba78fed34 | ||
|
|
20dbf00243 | ||
|
|
acf62d33d0 | ||
|
|
9c740e0425 | ||
|
|
c505815742 | ||
|
|
5a83e50250 | ||
|
|
32bb9c3184 | ||
|
|
b9386c6ec0 | ||
|
|
c6caa2e077 | ||
|
|
fa071627ad | ||
|
|
98c2da694c | ||
|
|
95d3988846 | ||
|
|
52835dd301 | ||
|
|
00b47701f4 | ||
|
|
8712dfb3af | ||
|
|
129c98c182 | ||
|
|
62892b2f68 | ||
|
|
f50a17684d | ||
|
|
e5e6e761d1 | ||
|
|
0efd5b3d11 | ||
|
|
7283bb980b | ||
|
|
ac0b2cbe45 | ||
|
|
0342cf81d5 | ||
|
|
f0d490684b | ||
|
|
9e48dd7411 | ||
|
|
8d5c35bf99 | ||
|
|
84760050ab | ||
|
|
4669760ac1 | ||
|
|
939b9c80a6 | ||
|
|
f048ccd677 | ||
|
|
f6bebe501b | ||
|
|
921d73b405 | ||
|
|
e691f43161 | ||
|
|
93ca6d36a5 | ||
|
|
44fd68da7c | ||
|
|
dc3a8274c7 | ||
|
|
f85cb8f6e1 | ||
|
|
8253571c52 | ||
|
|
b8b4a92625 | ||
|
|
168b89a7cd | ||
|
|
244ebdc595 | ||
|
|
dbff56238e | ||
|
|
0126118729 | ||
|
|
4376a81af1 | ||
|
|
f8ba142505 | ||
|
|
886440c535 | ||
|
|
314131e472 | ||
|
|
b45e5a3ee2 | ||
|
|
593b2e277b | ||
|
|
654112e76c | ||
|
|
fa45552688 | ||
|
|
334a2ef94d | ||
|
|
6ca3b3107d | ||
|
|
b6aa703748 | ||
|
|
726a9d299a | ||
|
|
a6994f8413 | ||
|
|
a9325ecad8 | ||
|
|
88852a522d | ||
|
|
09d78741ea | ||
|
|
38653d64d2 | ||
|
|
c0cb486a39 | ||
|
|
9a67398791 | ||
|
|
7d3d3e9000 | ||
|
|
cffbab5c06 | ||
|
|
ba91445de5 | ||
|
|
bb024d7a8c | ||
|
|
75ff724be4 | ||
|
|
99cb233e0c | ||
|
|
ce0456d95d | ||
|
|
e48d5008ad | ||
|
|
04ca8b2862 | ||
|
|
77d1ba446c | ||
|
|
b214cdc7e8 | ||
|
|
4884e38a6c | ||
|
|
31acde62ad | ||
|
|
0d6dc5c2c0 | ||
|
|
97768b81c1 | ||
|
|
8a4282d9fa | ||
|
|
f3cb36b751 | ||
|
|
837a46434f | ||
|
|
5da4d3eb2b | ||
|
|
f7cb20c84b | ||
|
|
de5d52711b | ||
|
|
050e43a57f | ||
|
|
c04ae9bf71 | ||
|
|
f9c3639238 | ||
|
|
accab54cd5 | ||
|
|
6ebcc6c199 | ||
|
|
7046e28afc | ||
|
|
37285ab358 | ||
|
|
9ba02cca0e | ||
|
|
380f38cfdf | ||
|
|
c4fbcc5d62 | ||
|
|
99666e772d | ||
|
|
06a89cb47d | ||
|
|
c9c76ef2cf | ||
|
|
4baae7875d | ||
|
|
d1a84c9f3d | ||
|
|
c0df2ab7eb | ||
|
|
705ec50edd | ||
|
|
c1c52a88fb | ||
|
|
ec28538315 | ||
|
|
57aa993684 | ||
|
|
7a27253f56 | ||
|
|
c9f5a4f930 | ||
|
|
d5edc9c1a0 | ||
|
|
e2ff50830b | ||
|
|
c9767ea7ee | ||
|
|
8294f427d0 | ||
|
|
a8d5225c3c | ||
|
|
0c78dbc607 | ||
|
|
8c1c37a149 | ||
|
|
c7869b4d4c | ||
|
|
9958a579e7 | ||
|
|
64327ba9ea | ||
|
|
8a78ed689d | ||
|
|
9df33286b0 | ||
|
|
ac47c1b30d | ||
|
|
b3922cad79 | ||
|
|
de4f814bb0 | ||
|
|
197595632b | ||
|
|
a6b35d9613 | ||
|
|
d08f3f4856 | ||
|
|
d15df2e6f7 | ||
|
|
ea711865bd | ||
|
|
38f03e27ef | ||
|
|
e853d0a378 | ||
|
|
ea33ddc6a4 | ||
|
|
ed15be3313 | ||
|
|
bfdc8a295b | ||
|
|
9a047762cf | ||
|
|
e2a3f28330 | ||
|
|
76b228c602 | ||
|
|
ca975f5fba | ||
|
|
748afbad90 | ||
|
|
fdbc652b08 | ||
|
|
4a39412086 | ||
|
|
2b3563fca8 | ||
|
|
d67201e600 | ||
|
|
ba3069c9c6 | ||
|
|
c3e83278c6 | ||
|
|
79bd1a1518 | ||
|
|
ffbed4c03a | ||
|
|
dd92838748 | ||
|
|
0e87c3e01e | ||
|
|
dfce2695b9 | ||
|
|
5d75eb2739 | ||
|
|
85cf4de96c | ||
|
|
cd51ea63e6 | ||
|
|
744f58fbfd | ||
|
|
7d8d3e6784 | ||
|
|
0963d513a0 | ||
|
|
e4ebecd065 | ||
|
|
7d017c354a | ||
|
|
0e7bcf12ee | ||
|
|
45f805a6c8 | ||
|
|
ae2a894756 | ||
|
|
d205a164e7 | ||
|
|
73b8ac611b | ||
|
|
c7850ddfeb | ||
|
|
8a8a3b3905 | ||
|
|
5633ac73b3 | ||
|
|
e70a369d2a | ||
|
|
4d8b2dae00 | ||
|
|
9ce2cc6e14 | ||
|
|
ae4ad20edb | ||
|
|
de36669053 | ||
|
|
84ef84dbb8 | ||
|
|
5d463057b4 | ||
|
|
36cda02715 | ||
|
|
6c2b7beac3 | ||
|
|
c031954822 | ||
|
|
9ca6806de9 | ||
|
|
b5fc6d78cb | ||
|
|
8e0ba4e638 | ||
|
|
d02e56fd14 | ||
|
|
88dfc936dc | ||
|
|
954444f1d3 | ||
|
|
1e18d85170 | ||
|
|
cf65497076 | ||
|
|
75fc3840aa | ||
|
|
23a7eec172 | ||
|
|
547ba60f85 | ||
|
|
3906b60791 | ||
|
|
88c16945fa | ||
|
|
e4e0d026c1 | ||
|
|
82fd0556c2 | ||
|
|
6ca8903629 | ||
|
|
d1b1109e82 | ||
|
|
39e90c81d7 | ||
|
|
8ac3cec827 | ||
|
|
cd80b4fc6d | ||
|
|
64c1f93828 | ||
|
|
c6b808413d | ||
|
|
4c2baa237f | ||
|
|
a097c26ca0 | ||
|
|
f5cddf955d | ||
|
|
f34001139b | ||
|
|
d8ac3ed435 | ||
|
|
f6c1e8ec29 | ||
|
|
2ee520a726 | ||
|
|
f08b8c9640 | ||
|
|
2c8120d489 | ||
|
|
d7b152da65 | ||
|
|
4f4475f498 | ||
|
|
6ba3b6ba9b | ||
|
|
45a0c38167 | ||
|
|
9a623a6481 | ||
|
|
ed7affc42c | ||
|
|
16ca6dda2c | ||
|
|
f8cddd7457 | ||
|
|
51351e3f93 | ||
|
|
d02f6b0c23 | ||
|
|
94638de796 | ||
|
|
61d65d11df | ||
|
|
638ffa90db | ||
|
|
70bd76e658 | ||
|
|
7a59fbde96 | ||
|
|
87f4bfd0a3 | ||
|
|
5b171729f2 | ||
|
|
95ef8d7a2e | ||
|
|
32a860851c | ||
|
|
39de08c105 | ||
|
|
cde376cc04 | ||
|
|
31d594802f | ||
|
|
8fd890a8ec | ||
|
|
ec6b3071eb | ||
|
|
10ddfd6f51 | ||
|
|
776834d63b | ||
|
|
ed4caadd13 | ||
|
|
90d5834ad2 | ||
|
|
e384051ded | ||
|
|
7f9b16defb | ||
|
|
8aa163ba69 | ||
|
|
295b855fc9 | ||
|
|
00d483d65a | ||
|
|
8165eefb1f | ||
|
|
96f0c57a0a | ||
|
|
34de499685 | ||
|
|
266b83c8e1 | ||
|
|
45aa3ff3b8 | ||
|
|
1e789e60b5 | ||
|
|
0a2e82c007 | ||
|
|
73be798329 | ||
|
|
9346231745 | ||
|
|
5b5ace9e1f | ||
|
|
cc340cdfbb | ||
|
|
cc4a9d7e8d | ||
|
|
7d465d6040 | ||
|
|
53dcd99b31 | ||
|
|
472f050077 | ||
|
|
9471db5ff4 | ||
|
|
5f6dcb2bc2 | ||
|
|
ec63594a8e | ||
|
|
5c78d94543 | ||
|
|
9a75040320 | ||
|
|
1eb4426599 | ||
|
|
6f5066a3a0 | ||
|
|
628d09cdff | ||
|
|
505be75bbf | ||
|
|
b6bd7133c2 | ||
|
|
ac77252ffb | ||
|
|
c52c2acf4e | ||
|
|
90d11a0faa | ||
|
|
4403816625 | ||
|
|
67f5a955b0 | ||
|
|
7629ec7dac | ||
|
|
86c90582f4 | ||
|
|
a0dc330b4a | ||
|
|
e30a104c9c | ||
|
|
1f26aa3ea5 | ||
|
|
b2266beeb3 | ||
|
|
09761c95e7 | ||
|
|
5c34022a11 | ||
|
|
ba63660821 | ||
|
|
17bd3a0c6b | ||
|
|
a17e6c4a2e | ||
|
|
4ea4f44645 | ||
|
|
989ce0cf55 | ||
|
|
b6009b2952 | ||
|
|
d2f1ede68a | ||
|
|
c1b31f8996 | ||
|
|
108220137b | ||
|
|
38393fb3c2 | ||
|
|
edd8e1e8b9 | ||
|
|
cb8f3b1ad7 | ||
|
|
7946934811 | ||
|
|
d5d0f08c32 | ||
|
|
b29e5ba430 | ||
|
|
73b44c65ae | ||
|
|
ca9366edf2 | ||
|
|
1ae239ff80 | ||
|
|
958c355665 | ||
|
|
7e8ae603b5 | ||
|
|
36396b6ecb | ||
|
|
03211ed092 | ||
|
|
0427c2bd68 | ||
|
|
8aa14b444f | ||
|
|
89034c2ab8 | ||
|
|
c7016bac66 | ||
|
|
b8a4d1033a | ||
|
|
ddc01beb5d | ||
|
|
f6206cbfb0 | ||
|
|
1216f6fe63 | ||
|
|
3b387d7b63 | ||
|
|
90d20d0d63 | ||
|
|
30ba9839a2 | ||
|
|
b174d51b42 | ||
|
|
a6e564b6ab | ||
|
|
02a702806a | ||
|
|
e303a46902 | ||
|
|
357434dfb1 | ||
|
|
db530d7c81 | ||
|
|
1927021c78 | ||
|
|
85a6d0c260 | ||
|
|
ce4c33ed8a | ||
|
|
be71f55f27 | ||
|
|
d66c0672a4 | ||
|
|
ce1f0286b9 | ||
|
|
5f32d1fcc5 | ||
|
|
e043c9d1ce | ||
|
|
333d571b36 | ||
|
|
915f1e0773 | ||
|
|
e744900fa5 | ||
|
|
978cdd5cb5 | ||
|
|
5ab332a205 | ||
|
|
354bd05ee6 | ||
|
|
0671cf3b68 | ||
|
|
718e07647d | ||
|
|
c8294d1e6d | ||
|
|
08a5e24689 | ||
|
|
17f8e984cf | ||
|
|
032f3963ef | ||
|
|
99fbca7271 | ||
|
|
4580761533 | ||
|
|
f08d7da6f4 | ||
|
|
8c9add68f4 | ||
|
|
ce6a08ce95 | ||
|
|
7bf3c4f793 | ||
|
|
87bffdb9c4 | ||
|
|
c94bc4d6ee | ||
|
|
ad96bb7f00 | ||
|
|
57bd62ad5c | ||
|
|
f759bde4f7 | ||
|
|
d77948e1cf | ||
|
|
867032e10a | ||
|
|
80041138cc | ||
|
|
4219debe9d | ||
|
|
c228ffb3f1 | ||
|
|
b51e8344ca | ||
|
|
5440cb560d | ||
|
|
2df547206a | ||
|
|
e1297d1cd0 | ||
|
|
b7937a4f39 | ||
|
|
a21ff559e7 | ||
|
|
a7e4747f49 | ||
|
|
8c45abc747 | ||
|
|
e45f2aa8db | ||
|
|
e04e02cd46 | ||
|
|
9584cb5d15 | ||
|
|
a10057e507 | ||
|
|
c263dbd223 | ||
|
|
4cf3cd4a9d | ||
|
|
fe155a19f2 | ||
|
|
65485af49b | ||
|
|
3c631db138 | ||
|
|
fe76c380cc | ||
|
|
53a901e92e | ||
|
|
8d95334b5a | ||
|
|
ae7a214522 | ||
|
|
264785096a | ||
|
|
376a7e5ec3 | ||
|
|
d328082279 | ||
|
|
04c77b9fb5 | ||
|
|
d14ab10f5b | ||
|
|
1cafae44ec | ||
|
|
f12904a922 | ||
|
|
bfb2c2c6af | ||
|
|
572449b29c | ||
|
|
209158c26b | ||
|
|
c9b3c34049 | ||
|
|
55f384a38f | ||
|
|
b4da263510 | ||
|
|
fa1fb04bbb | ||
|
|
07544deddc | ||
|
|
97f2475f13 | ||
|
|
0fb815e5fd | ||
|
|
e60821b980 | ||
|
|
5756282dde | ||
|
|
52435ce880 | ||
|
|
898e161009 | ||
|
|
12afc63888 | ||
|
|
8fc3ea6b96 | ||
|
|
b10a2ba200 | ||
|
|
356ae2563b | ||
|
|
16bbb3144c | ||
|
|
c3a66d9919 | ||
|
|
92b2e942e1 | ||
|
|
9939c3664e | ||
|
|
8f56fc89cc | ||
|
|
98d201f860 | ||
|
|
3c1701b7c9 | ||
|
|
0a5fe1cdd1 | ||
|
|
254b09ede7 | ||
|
|
171efb209d | ||
|
|
5b4c0b327a | ||
|
|
f9e9d8d45c | ||
|
|
a7500e27a7 | ||
|
|
8cb51a508c | ||
|
|
fb2dfe7ac8 | ||
|
|
375cf1561c | ||
|
|
92ad22dc08 | ||
|
|
c7dbcf85c9 | ||
|
|
e7981ad10d | ||
|
|
61d83c6d6b | ||
|
|
a6c48298b1 | ||
|
|
09ce78cc4f | ||
|
|
6f32cb2741 | ||
|
|
6ba1beb76c | ||
|
|
dc2c873dc6 | ||
|
|
1c30381714 | ||
|
|
cf1cd31c5c | ||
|
|
c82dc42d4d | ||
|
|
912a33bd7e | ||
|
|
2bd2717198 | ||
|
|
7ee93b206a | ||
|
|
fce0b963b4 | ||
|
|
30381645ee | ||
|
|
7eb72b07ef | ||
|
|
b829654a5a | ||
|
|
fdcf262672 | ||
|
|
1926591876 | ||
|
|
57fd78eae9 | ||
|
|
246dcc3a22 | ||
|
|
1319890793 | ||
|
|
15c2a7035d | ||
|
|
d9bf0a05c2 | ||
|
|
eca7687996 | ||
|
|
a197c6faf6 | ||
|
|
cb08a02101 | ||
|
|
3a68590a54 | ||
|
|
8f7cb53a29 | ||
|
|
b6c9c183fc | ||
|
|
897f83efc0 | ||
|
|
3e8a98489d | ||
|
|
86504a12ad | ||
|
|
7449a372eb | ||
|
|
577a914512 | ||
|
|
83ada5598f | ||
|
|
9308457404 | ||
|
|
8bc2ebf59a | ||
|
|
4a9955837c | ||
|
|
ce110eddfc | ||
|
|
07de9dc55c | ||
|
|
5ddbfab109 | ||
|
|
f93ddea31f | ||
|
|
f1982dfb52 | ||
|
|
c45e3150e9 | ||
|
|
b85957b011 | ||
|
|
d31d5e5b34 | ||
|
|
e79534d2af | ||
|
|
0350be9458 | ||
|
|
e8ca7c9046 | ||
|
|
6cfe8c0a14 | ||
|
|
6ede105953 | ||
|
|
8f8facbed4 | ||
|
|
6697ce2885 | ||
|
|
1dd10a5405 | ||
|
|
eeaa87f3ec | ||
|
|
33dc927bef | ||
|
|
af8ef31667 | ||
|
|
858c79c3e9 | ||
|
|
786033f53c | ||
|
|
6bb2a22b36 | ||
|
|
a43fcd15e9 | ||
|
|
83eacdcf13 | ||
|
|
1a3a1f1e42 | ||
|
|
d0552e9c65 | ||
|
|
057cc1e816 | ||
|
|
94faa71d5c | ||
|
|
a86252db8b | ||
|
|
073caff599 | ||
|
|
b0761479e4 | ||
|
|
cf3ed8231c | ||
|
|
18ec7f6091 | ||
|
|
2a0f785c9e | ||
|
|
7239530a13 | ||
|
|
7898960c43 | ||
|
|
e154e51011 | ||
|
|
6503452732 | ||
|
|
d50bfaa9a1 | ||
|
|
138178f5d2 | ||
|
|
ecab5d610b | ||
|
|
ae213b252f | ||
|
|
ff6b14d03f | ||
|
|
b3dbcb0368 | ||
|
|
3808ff2419 | ||
|
|
153ae95c9b | ||
|
|
23c16e22e7 | ||
|
|
ca394457c5 | ||
|
|
4ae834e747 | ||
|
|
3fad1d8c7f | ||
|
|
e27ff5a9ad | ||
|
|
098ae437df | ||
|
|
9e53f354e1 | ||
|
|
5e4a6bd7e2 | ||
|
|
b0f12a1612 | ||
|
|
24e952255e | ||
|
|
d26c9bd80d | ||
|
|
ab1e331a88 | ||
|
|
7ae7e7e09a | ||
|
|
4a5336d403 | ||
|
|
2a4de1ef1f | ||
|
|
74f64be449 | ||
|
|
2ac54c4519 | ||
|
|
35fa8dc5f7 | ||
|
|
2fa1f7de32 | ||
|
|
8358485e1c | ||
|
|
040e26ac09 | ||
|
|
fe53449330 | ||
|
|
12cd07cd69 | ||
|
|
7f471e09fd | ||
|
|
773c555648 | ||
|
|
2d9a3b7695 | ||
|
|
8c9fe92aa1 | ||
|
|
e3bdc689f2 | ||
|
|
999a84bdb3 | ||
|
|
34bdd8b33b | ||
|
|
29208d2e35 | ||
|
|
e8f456613a | ||
|
|
d6bbdcc030 | ||
|
|
be030d3bf5 | ||
|
|
3a0942ec51 | ||
|
|
acfcc85da0 | ||
|
|
05f8db8bf9 | ||
|
|
7d3c85eb5e | ||
|
|
06aee01aa0 | ||
|
|
e08ea67d7f | ||
|
|
dc8bd9e2a1 | ||
|
|
3f18bf155f | ||
|
|
378151b53a | ||
|
|
281fc55ff9 | ||
|
|
db6b664257 | ||
|
|
b525fc1306 | ||
|
|
17e8d8558d | ||
|
|
5561aaad28 | ||
|
|
9e5890d900 | ||
|
|
5ce8039fde | ||
|
|
71dc0c6fdf | ||
|
|
e4448dac93 | ||
|
|
e3687ca853 | ||
|
|
0c38b24fed | ||
|
|
dd2883be8f | ||
|
|
46af251ce0 | ||
|
|
4285c3c968 | ||
|
|
ce9a0c1513 | ||
|
|
ea7d4cbd57 | ||
|
|
bb91aa636f | ||
|
|
406824fe15 | ||
|
|
df815c1543 | ||
|
|
938d43de3c | ||
|
|
aa764cef07 | ||
|
|
33f9253be7 | ||
|
|
343fc6476b | ||
|
|
896c9decee | ||
|
|
3f7385d52b | ||
|
|
68ee0fa47a | ||
|
|
a246c304de | ||
|
|
fe51c0d7ce | ||
|
|
0fbbadb56c | ||
|
|
7865487a7a | ||
|
|
ebf0399891 | ||
|
|
0bea49d340 | ||
|
|
93e530c7a5 | ||
|
|
c28a1896e9 | ||
|
|
eb7fe72e0c | ||
|
|
568a15c821 | ||
|
|
3a9da1c681 | ||
|
|
05b0b88882 | ||
|
|
4737719dc1 | ||
|
|
3aef350c39 | ||
|
|
6d7c8f6398 | ||
|
|
fd02be8686 | ||
|
|
5b8301a3b8 | ||
|
|
b67922f0c3 | ||
|
|
0dbc9ba611 | ||
|
|
9709d1315d | ||
|
|
49e6b1d83c | ||
|
|
60eb60cd08 | ||
|
|
167f154460 | ||
|
|
4281568444 | ||
|
|
24cbfd4926 | ||
|
|
bed9ff31b6 | ||
|
|
5492fa39a0 | ||
|
|
313f932aaa | ||
|
|
2c7834cae6 | ||
|
|
e77f5649e0 | ||
|
|
fbe93b6a54 | ||
|
|
0e697a6c9e | ||
|
|
5c6753735f | ||
|
|
70b317ecce | ||
|
|
c6a7a82a9c | ||
|
|
5c8f83592b | ||
|
|
f91f0c7fbb | ||
|
|
fed0630941 | ||
|
|
af22a8c671 | ||
|
|
307b04d98b | ||
|
|
026f146329 | ||
|
|
70e006ec0c | ||
|
|
468d7898fc | ||
|
|
cf4ab5363f | ||
|
|
1c1e27a779 | ||
|
|
6b9521743f | ||
|
|
9610ab39d9 | ||
|
|
9eb25be609 | ||
|
|
03ca33e2eb | ||
|
|
735e7081be | ||
|
|
b72e281bb7 | ||
|
|
fbab04f9e3 | ||
|
|
2a5dab5a56 | ||
|
|
c02ce802fc | ||
|
|
4ac307ec40 | ||
|
|
c8f8ca9e46 | ||
|
|
6f3597a637 | ||
|
|
92ed28ccc7 | ||
|
|
59be4fe98d | ||
|
|
f3146ae8ce | ||
|
|
d76a2ee76a | ||
|
|
0d789a3a71 | ||
|
|
10304e08ad | ||
|
|
5d87fb8b7b | ||
|
|
cb3de7d9ca | ||
|
|
422c7a5fcf | ||
|
|
af415b4d16 | ||
|
|
e69dd2f509 | ||
|
|
fa5d871577 | ||
|
|
e3f0cff334 | ||
|
|
1094f15735 | ||
|
|
6d3c2628c5 | ||
|
|
b77f1f327b | ||
|
|
9a78cb7980 | ||
|
|
e57a0bdfd4 | ||
|
|
20ee0c715d | ||
|
|
0b4b8d89a3 | ||
|
|
79e36a3ccf | ||
|
|
a242da91a2 | ||
|
|
8a1114d175 | ||
|
|
bfcf50a1dd | ||
|
|
dde02ad31e | ||
|
|
c5c9c53c4e | ||
|
|
810259e6e0 | ||
|
|
5fbac72eb8 | ||
|
|
0a4953bab4 | ||
|
|
ddb8aa2f29 | ||
|
|
37fb8cd049 | ||
|
|
889455c98e | ||
|
|
6f93e34866 | ||
|
|
a01e3120f5 | ||
|
|
8c21a0d66c | ||
|
|
847d38ed84 | ||
|
|
fd2cbd4f6b | ||
|
|
d86fdf1307 | ||
|
|
f353148390 | ||
|
|
647643b654 | ||
|
|
be1f70d68b | ||
|
|
9a49eb78ec | ||
|
|
fb98479c47 | ||
|
|
23774530c1 | ||
|
|
e8e06a48b3 | ||
|
|
b65fd46ee2 | ||
|
|
8c4598a532 | ||
|
|
e03114b352 | ||
|
|
2da73ed388 | ||
|
|
fdece011d6 | ||
|
|
5f33a63fea | ||
|
|
15689067a4 | ||
|
|
ade2a27179 | ||
|
|
639e9d9481 |
8
.gitignore
vendored
@@ -9,11 +9,9 @@ build*/pyshtables.py
|
|||||||
pstage/
|
pstage/
|
||||||
scripts/oe-git-proxy-socks
|
scripts/oe-git-proxy-socks
|
||||||
sources/
|
sources/
|
||||||
meta-darwin
|
meta-*
|
||||||
meta-maemo
|
!meta-skeleton
|
||||||
meta-extras
|
!meta-demoapps
|
||||||
meta-m2
|
|
||||||
meta-prvt*
|
|
||||||
*.swp
|
*.swp
|
||||||
*.orig
|
*.orig
|
||||||
*.rej
|
*.rej
|
||||||
|
|||||||
@@ -68,12 +68,12 @@ Intel Atom based PCs and devices (atom-pc)
|
|||||||
|
|
||||||
The atom-pc MACHINE is tested on the following platforms:
|
The atom-pc MACHINE is tested on the following platforms:
|
||||||
|
|
||||||
o Asus eee901
|
o Asus EeePC 901
|
||||||
o Acer Aspire One
|
o Acer Aspire One
|
||||||
o Toshiba NB305
|
o Toshiba NB305
|
||||||
o Intel Embedded Development Board 1-N450 (Black Sand)
|
o Intel Embedded Development Board 1-N450 (Black Sand)
|
||||||
|
|
||||||
and is likely to work on many unlisted atom based devices. The MACHINE type
|
and is likely to work on many unlisted Atom based devices. The MACHINE type
|
||||||
supports ethernet, wifi, sound, and i915 graphics by default in addition to
|
supports ethernet, wifi, sound, and i915 graphics by default in addition to
|
||||||
common PC input devices, busses, and so on.
|
common PC input devices, busses, and so on.
|
||||||
|
|
||||||
@@ -83,26 +83,18 @@ straightforward with a caveat for USB devices. The following examples assume the
|
|||||||
target boot device is /dev/sdb, be sure to verify this and use the correct
|
target boot device is /dev/sdb, be sure to verify this and use the correct
|
||||||
device as the following commands are run as root and are not reversable.
|
device as the following commands are run as root and are not reversable.
|
||||||
|
|
||||||
Hard Disk:
|
|
||||||
1. Build a directdisk image format. This will generate proper partition tables
|
|
||||||
that will in turn be written to the physical media. For example:
|
|
||||||
|
|
||||||
$ bitbake core-image-minimal-directdisk
|
|
||||||
|
|
||||||
2. Use the "dd" utility to write the image to the raw block device. For example:
|
|
||||||
|
|
||||||
# dd if=core-image-minimal-directdisk-atom-pc.hdddirect of=/dev/sdb
|
|
||||||
|
|
||||||
USB Device:
|
USB Device:
|
||||||
1. Build an hddimg image format. This is a simple filesystem without partition
|
1. Build a live image. This image type consists of a simple filesystem
|
||||||
tables and is suitable for USB keys. For example:
|
without a partition table, which is suitable for USB keys, and with the
|
||||||
|
default setup for the atom-pc machine, this image type is built
|
||||||
|
automatically for any image you build. For example:
|
||||||
|
|
||||||
$ bitbake core-image-minimal-live
|
$ bitbake core-image-minimal
|
||||||
|
|
||||||
2. Use the "dd" utility to write the image to the raw block device. For
|
2. Use the "dd" utility to write the image to the raw block device. For
|
||||||
example:
|
example:
|
||||||
|
|
||||||
# dd if=core-image-minimal-live-atom-pc.hddimg of=/dev/sdb
|
# dd if=core-image-minimal-atom-pc.hddimg of=/dev/sdb
|
||||||
|
|
||||||
If the device fails to boot with "Boot error" displayed, it is likely the BIOS
|
If the device fails to boot with "Boot error" displayed, it is likely the BIOS
|
||||||
cannot understand the physical layout of the disk (or rather it expects a
|
cannot understand the physical layout of the disk (or rather it expects a
|
||||||
@@ -126,7 +118,7 @@ USB Device:
|
|||||||
|
|
||||||
b. Copy the contents of the poky image to the USB-ZIP mode device:
|
b. Copy the contents of the poky image to the USB-ZIP mode device:
|
||||||
|
|
||||||
# mount -o loop core-image-minimal-live-atom-pc.hddimg /tmp/image
|
# mount -o loop core-image-minimal-atom-pc.hddimg /tmp/image
|
||||||
# mount /dev/sdb4 /tmp/usbkey
|
# mount /dev/sdb4 /tmp/usbkey
|
||||||
# cp -rf /tmp/image/* /tmp/usbkey
|
# cp -rf /tmp/image/* /tmp/usbkey
|
||||||
|
|
||||||
@@ -150,7 +142,7 @@ faster CPU, more RAM, an ethernet port, more USB ports, microSD, and removes
|
|||||||
the NAND flash. The beagleboard MACHINE is tested on the following platforms:
|
the NAND flash. The beagleboard MACHINE is tested on the following platforms:
|
||||||
|
|
||||||
o Beagleboard C4
|
o Beagleboard C4
|
||||||
o Beagleboard xM Rev A
|
o Beagleboard xM rev A & B
|
||||||
|
|
||||||
The Beagleboard C4 has NAND, while the xM does not. For the sake of simplicity,
|
The Beagleboard C4 has NAND, while the xM does not. For the sake of simplicity,
|
||||||
these instructions assume you have erased the NAND on the C4 so its boot
|
these instructions assume you have erased the NAND on the C4 so its boot
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ Default BBFILES are the .bb files in the current directory.""")
|
|||||||
# server is daemonized this logfile will be truncated.
|
# server is daemonized this logfile will be truncated.
|
||||||
cooker_logfile = os.path.join(os.getcwd(), "cooker.log")
|
cooker_logfile = os.path.join(os.getcwd(), "cooker.log")
|
||||||
|
|
||||||
bb.utils.init_logger(bb.msg, configuration.verbose, configuration.debug,
|
bb.msg.init_msgconfig(configuration.verbose, configuration.debug,
|
||||||
configuration.debug_domains)
|
configuration.debug_domains)
|
||||||
|
|
||||||
# Ensure logging messages get sent to the UI as events
|
# Ensure logging messages get sent to the UI as events
|
||||||
@@ -228,6 +228,7 @@ Default BBFILES are the .bb files in the current directory.""")
|
|||||||
try:
|
try:
|
||||||
return server.launchUI(ui_main, server_connection.connection, server_connection.events)
|
return server.launchUI(ui_main, server_connection.connection, server_connection.events)
|
||||||
finally:
|
finally:
|
||||||
|
bb.event.ui_queue = []
|
||||||
server_connection.terminate()
|
server_connection.terminate()
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
# This script has subcommands which operate against your bitbake layers, either
|
# This script has subcommands which operate against your bitbake layers, either
|
||||||
# displaying useful information, or acting against them.
|
# displaying useful information, or acting against them.
|
||||||
# Currently, it only provides a show_appends command, which shows you what
|
# See the help output for details on available commands.
|
||||||
# bbappends are in effect, and warns you if you have appends which are not being
|
|
||||||
# utilized.
|
|
||||||
|
|
||||||
import cmd
|
import cmd
|
||||||
import logging
|
import logging
|
||||||
@@ -23,25 +21,30 @@ from bb.cooker import state
|
|||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger('BitBake')
|
logger = logging.getLogger('BitBake')
|
||||||
default_cmd = 'show_appends'
|
|
||||||
|
|
||||||
|
|
||||||
def main(args):
|
def main(args):
|
||||||
logging.basicConfig(format='%(levelname)s: %(message)s')
|
# Set up logging
|
||||||
|
console = logging.StreamHandler(sys.stdout)
|
||||||
|
format = bb.msg.BBLogFormatter("%(levelname)s: %(message)s")
|
||||||
|
bb.msg.addDefaultlogFilter(console)
|
||||||
|
console.setFormatter(format)
|
||||||
|
logger.addHandler(console)
|
||||||
|
|
||||||
|
initialenv = os.environ.copy()
|
||||||
bb.utils.clean_environment()
|
bb.utils.clean_environment()
|
||||||
|
|
||||||
cmds = Commands()
|
cmds = Commands(initialenv)
|
||||||
if args:
|
if args:
|
||||||
cmds.onecmd(' '.join(args))
|
cmds.onecmd(' '.join(args))
|
||||||
else:
|
else:
|
||||||
cmds.onecmd(default_cmd)
|
cmds.do_help('')
|
||||||
return cmds.returncode
|
return cmds.returncode
|
||||||
|
|
||||||
|
|
||||||
class Commands(cmd.Cmd):
|
class Commands(cmd.Cmd):
|
||||||
def __init__(self):
|
def __init__(self, initialenv):
|
||||||
cmd.Cmd.__init__(self)
|
cmd.Cmd.__init__(self)
|
||||||
initialenv = os.environ.copy()
|
|
||||||
self.returncode = 0
|
self.returncode = 0
|
||||||
self.config = Config(parse_only=True)
|
self.config = Config(parse_only=True)
|
||||||
self.cooker = bb.cooker.BBCooker(self.config,
|
self.cooker = bb.cooker.BBCooker(self.config,
|
||||||
@@ -76,33 +79,66 @@ class Commands(cmd.Cmd):
|
|||||||
if not self.cooker_data:
|
if not self.cooker_data:
|
||||||
self.prepare_cooker()
|
self.prepare_cooker()
|
||||||
|
|
||||||
|
def default(self, line):
|
||||||
|
"""Handle unrecognised commands"""
|
||||||
|
sys.stderr.write("Unrecognised command or option\n")
|
||||||
|
self.do_help('')
|
||||||
|
|
||||||
|
def do_help(self, topic):
|
||||||
|
"""display general help or help on a specified command"""
|
||||||
|
if topic:
|
||||||
|
sys.stdout.write('%s: ' % topic)
|
||||||
|
cmd.Cmd.do_help(self,topic)
|
||||||
|
else:
|
||||||
|
sys.stdout.write("usage: bitbake-layers <command> [arguments]\n\n")
|
||||||
|
sys.stdout.write("Available commands:\n")
|
||||||
|
procnames = self.get_names()
|
||||||
|
for procname in procnames:
|
||||||
|
if procname[:3] == 'do_':
|
||||||
|
sys.stdout.write(" %s\n" % procname[3:])
|
||||||
|
doc = getattr(self, procname).__doc__
|
||||||
|
if doc:
|
||||||
|
sys.stdout.write(" %s\n" % doc.splitlines()[0])
|
||||||
|
|
||||||
def do_show_layers(self, args):
|
def do_show_layers(self, args):
|
||||||
"""show_layers: shows current configured layers"""
|
"""show current configured layers"""
|
||||||
self.check_prepare_cooker()
|
self.check_prepare_cooker()
|
||||||
logger.info(str(self.config_data.getVar('BBLAYERS', True)))
|
logger.plain('')
|
||||||
|
logger.plain("%s %s %s" % ("layer".ljust(20), "path".ljust(40), "priority"))
|
||||||
|
logger.plain('=' * 74)
|
||||||
|
layerdirs = str(self.config_data.getVar('BBLAYERS', True)).split()
|
||||||
|
for layerdir in layerdirs:
|
||||||
|
layername = '?'
|
||||||
|
layerpri = 0
|
||||||
|
for layer, _, regex, pri in self.cooker.status.bbfile_config_priorities:
|
||||||
|
if regex.match(os.path.join(layerdir, 'test')):
|
||||||
|
layername = layer
|
||||||
|
layerpri = pri
|
||||||
|
break
|
||||||
|
|
||||||
|
logger.plain("%s %s %d" % (layername.ljust(20), layerdir.ljust(40), layerpri))
|
||||||
|
|
||||||
def do_show_overlayed(self, args):
|
def do_show_overlayed(self, args):
|
||||||
"""show_overlayed: list overlayed recipes (where there is a recipe in another
|
"""list overlayed recipes (where there is a recipe in another layer that has a higher layer priority)
|
||||||
layer that has a higher layer priority)
|
|
||||||
|
|
||||||
syntax: show_overlayed
|
usage: show_overlayed
|
||||||
|
|
||||||
Highest priority recipes are listed with the recipes they overlay as subitems.
|
Highest priority recipes are listed with the recipes they overlay as subitems.
|
||||||
"""
|
"""
|
||||||
self.check_prepare_cooker()
|
self.check_prepare_cooker()
|
||||||
if self.cooker.overlayed:
|
if self.cooker.overlayed:
|
||||||
logger.info('Overlayed recipes:')
|
logger.plain('Overlayed recipes:')
|
||||||
for f in self.cooker.overlayed.iterkeys():
|
for f in self.cooker.overlayed.iterkeys():
|
||||||
logger.info('%s' % f)
|
logger.plain('%s' % f)
|
||||||
for of in self.cooker.overlayed[f]:
|
for of in self.cooker.overlayed[f]:
|
||||||
logger.info(' %s' % of)
|
logger.plain(' %s' % of)
|
||||||
else:
|
else:
|
||||||
logger.info('No overlayed recipes found')
|
logger.plain('No overlayed recipes found')
|
||||||
|
|
||||||
def do_flatten(self, args):
|
def do_flatten(self, args):
|
||||||
"""flatten: flattens layer configuration into a separate output directory.
|
"""flattens layer configuration into a separate output directory.
|
||||||
|
|
||||||
syntax: flatten <outputdir>
|
usage: flatten <outputdir>
|
||||||
|
|
||||||
Takes the current layer configuration and builds a "flattened" directory
|
Takes the current layer configuration and builds a "flattened" directory
|
||||||
containing the contents of all layers, with any overlayed recipes removed
|
containing the contents of all layers, with any overlayed recipes removed
|
||||||
@@ -134,12 +170,12 @@ cleanup may still be necessary afterwards, in particular:
|
|||||||
if of.startswith(layer):
|
if of.startswith(layer):
|
||||||
overlayed.append(of)
|
overlayed.append(of)
|
||||||
|
|
||||||
logger.info('Copying files from %s...' % layer )
|
logger.plain('Copying files from %s...' % layer )
|
||||||
for root, dirs, files in os.walk(layer):
|
for root, dirs, files in os.walk(layer):
|
||||||
for f1 in files:
|
for f1 in files:
|
||||||
f1full = os.sep.join([root, f1])
|
f1full = os.sep.join([root, f1])
|
||||||
if f1full in overlayed:
|
if f1full in overlayed:
|
||||||
logger.info(' Skipping overlayed file %s' % f1full )
|
logger.plain(' Skipping overlayed file %s' % f1full )
|
||||||
else:
|
else:
|
||||||
ext = os.path.splitext(f1)[1]
|
ext = os.path.splitext(f1)[1]
|
||||||
if ext != '.bbappend':
|
if ext != '.bbappend':
|
||||||
@@ -148,7 +184,7 @@ cleanup may still be necessary afterwards, in particular:
|
|||||||
bb.utils.mkdirhier(os.path.dirname(fdest))
|
bb.utils.mkdirhier(os.path.dirname(fdest))
|
||||||
if os.path.exists(fdest):
|
if os.path.exists(fdest):
|
||||||
if f1 == 'layer.conf' and root.endswith('/conf'):
|
if f1 == 'layer.conf' and root.endswith('/conf'):
|
||||||
logger.info(' Skipping layer config file %s' % f1full )
|
logger.plain(' Skipping layer config file %s' % f1full )
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
logger.warn('Overwriting file %s', fdest)
|
logger.warn('Overwriting file %s', fdest)
|
||||||
@@ -157,7 +193,7 @@ cleanup may still be necessary afterwards, in particular:
|
|||||||
if f1 in self.cooker_data.appends:
|
if f1 in self.cooker_data.appends:
|
||||||
appends = self.cooker_data.appends[f1]
|
appends = self.cooker_data.appends[f1]
|
||||||
if appends:
|
if appends:
|
||||||
logger.info(' Applying appends to %s' % fdest )
|
logger.plain(' Applying appends to %s' % fdest )
|
||||||
for appendname in appends:
|
for appendname in appends:
|
||||||
self.apply_append(appendname, fdest)
|
self.apply_append(appendname, fdest)
|
||||||
|
|
||||||
@@ -175,18 +211,18 @@ cleanup may still be necessary afterwards, in particular:
|
|||||||
recipefile.writelines(appendfile.readlines())
|
recipefile.writelines(appendfile.readlines())
|
||||||
|
|
||||||
def do_show_appends(self, args):
|
def do_show_appends(self, args):
|
||||||
"""show_appends: List bbappend files and recipe files they apply to
|
"""list bbappend files and recipe files they apply to
|
||||||
|
|
||||||
syntax: show_appends
|
usage: show_appends
|
||||||
|
|
||||||
Recipes are listed with the bbappends that apply to them as subitems.
|
Recipes are listed with the bbappends that apply to them as subitems.
|
||||||
"""
|
"""
|
||||||
self.check_prepare_cooker()
|
self.check_prepare_cooker()
|
||||||
if not self.cooker_data.appends:
|
if not self.cooker_data.appends:
|
||||||
logger.info('No append files found')
|
logger.plain('No append files found')
|
||||||
return
|
return
|
||||||
|
|
||||||
logger.info('State of append files:')
|
logger.plain('State of append files:')
|
||||||
|
|
||||||
pnlist = list(self.cooker_data.pkg_pn.keys())
|
pnlist = list(self.cooker_data.pkg_pn.keys())
|
||||||
pnlist.sort()
|
pnlist.sort()
|
||||||
@@ -215,9 +251,9 @@ Recipes are listed with the bbappends that apply to them as subitems.
|
|||||||
appended, missing = self.get_appends_for_files(filenames)
|
appended, missing = self.get_appends_for_files(filenames)
|
||||||
if appended:
|
if appended:
|
||||||
for basename, appends in appended:
|
for basename, appends in appended:
|
||||||
logger.info('%s%s:', basename, name_suffix)
|
logger.plain('%s%s:', basename, name_suffix)
|
||||||
for append in appends:
|
for append in appends:
|
||||||
logger.info(' %s', append)
|
logger.plain(' %s', append)
|
||||||
|
|
||||||
if best_filename:
|
if best_filename:
|
||||||
if best_filename in missing:
|
if best_filename in missing:
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import warnings
|
import warnings
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib'))
|
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib'))
|
||||||
|
from bb import fetch2
|
||||||
|
import logging
|
||||||
|
|
||||||
|
logger = logging.getLogger("BitBake")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import cPickle as pickle
|
import cPickle as pickle
|
||||||
@@ -16,13 +20,20 @@ class BBConfiguration(object):
|
|||||||
Manages build options and configurations for one run
|
Manages build options and configurations for one run
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, debug, debug_domains):
|
def __init__(self, **options):
|
||||||
setattr(self, "data", {})
|
self.data = {}
|
||||||
setattr(self, "file", [])
|
self.file = []
|
||||||
setattr(self, "cmd", None)
|
self.cmd = None
|
||||||
setattr(self, "dump_signatures", True)
|
self.dump_signatures = True
|
||||||
setattr(self, "debug", debug)
|
self.prefile = []
|
||||||
setattr(self, "debug_domains", debug_domains)
|
self.postfile = []
|
||||||
|
self.parse_only = True
|
||||||
|
|
||||||
|
def __getattr__(self, attribute):
|
||||||
|
try:
|
||||||
|
return super(BBConfiguration, self).__getattribute__(attribute)
|
||||||
|
except AttributeError:
|
||||||
|
return None
|
||||||
|
|
||||||
_warnings_showwarning = warnings.showwarning
|
_warnings_showwarning = warnings.showwarning
|
||||||
def _showwarning(message, category, filename, lineno, file=None, line=None):
|
def _showwarning(message, category, filename, lineno, file=None, line=None):
|
||||||
@@ -39,82 +50,70 @@ warnings.showwarning = _showwarning
|
|||||||
warnings.simplefilter("ignore", DeprecationWarning)
|
warnings.simplefilter("ignore", DeprecationWarning)
|
||||||
|
|
||||||
import bb.event
|
import bb.event
|
||||||
|
|
||||||
# Need to map our I/O correctly. stdout is a pipe to the server expecting
|
|
||||||
# events. We save this and then map stdout to stderr.
|
|
||||||
|
|
||||||
eventfd = os.dup(sys.stdout.fileno())
|
|
||||||
bb.event.worker_pipe = os.fdopen(eventfd, 'w', 0)
|
|
||||||
|
|
||||||
# map stdout to stderr
|
|
||||||
os.dup2(sys.stderr.fileno(), sys.stdout.fileno())
|
|
||||||
|
|
||||||
# Replace those fds with our own
|
|
||||||
#logout = data.expand("${TMPDIR}/log/stdout.%s" % os.getpid(), self.cfgData, True)
|
|
||||||
#mkdirhier(os.path.dirname(logout))
|
|
||||||
#newso = open("/tmp/stdout.%s" % os.getpid(), 'w')
|
|
||||||
#os.dup2(newso.fileno(), sys.stdout.fileno())
|
|
||||||
#os.dup2(newso.fileno(), sys.stderr.fileno())
|
|
||||||
|
|
||||||
# Don't read from stdin from the parent
|
|
||||||
si = file("/dev/null", 'r')
|
|
||||||
os.dup2(si.fileno( ), sys.stdin.fileno( ))
|
|
||||||
|
|
||||||
# We don't want to see signals to our parent, e.g. Ctrl+C
|
|
||||||
os.setpgrp()
|
|
||||||
|
|
||||||
# Save out the PID so that the event can include it the
|
|
||||||
# events
|
|
||||||
bb.event.worker_pid = os.getpid()
|
|
||||||
bb.event.useStdout = False
|
|
||||||
|
|
||||||
hashfile = sys.argv[1]
|
|
||||||
buildfile = sys.argv[2]
|
|
||||||
taskname = sys.argv[3]
|
|
||||||
|
|
||||||
import bb.cooker
|
import bb.cooker
|
||||||
|
|
||||||
p = pickle.Unpickler(file(hashfile, "rb"))
|
buildfile = sys.argv[1]
|
||||||
hashdata = p.load()
|
taskname = sys.argv[2]
|
||||||
|
if len(sys.argv) >= 4:
|
||||||
|
dryrun = sys.argv[3]
|
||||||
|
else:
|
||||||
|
dryrun = False
|
||||||
|
if len(sys.argv) >= 5:
|
||||||
|
hashfile = sys.argv[4]
|
||||||
|
p = pickle.Unpickler(file(hashfile, "rb"))
|
||||||
|
hashdata = p.load()
|
||||||
|
else:
|
||||||
|
hashdata = None
|
||||||
|
|
||||||
debug = hashdata["msg-debug"]
|
handler = bb.event.LogHandler()
|
||||||
debug_domains = hashdata["msg-debug-domains"]
|
logger.addHandler(handler)
|
||||||
verbose = hashdata["verbose"]
|
|
||||||
|
|
||||||
bb.utils.init_logger(bb.msg, verbose, debug, debug_domains)
|
#An example to make debug log messages show up
|
||||||
|
#bb.msg.init_msgconfig(True, 3, [])
|
||||||
|
|
||||||
cooker = bb.cooker.BBCooker(BBConfiguration(debug, debug_domains), None)
|
console = logging.StreamHandler(sys.stdout)
|
||||||
cooker.parseConfiguration()
|
format = bb.msg.BBLogFormatter("%(levelname)s: %(message)s")
|
||||||
|
bb.msg.addDefaultlogFilter(console)
|
||||||
|
console.setFormatter(format)
|
||||||
|
|
||||||
cooker.bb_cache = bb.cache.init(cooker)
|
def worker_fire(event, d):
|
||||||
cooker.status = bb.cache.CacheData()
|
if isinstance(event, logging.LogRecord):
|
||||||
|
console.handle(event)
|
||||||
|
bb.event.worker_fire = worker_fire
|
||||||
|
bb.event.worker_pid = os.getpid()
|
||||||
|
|
||||||
(fn, cls) = cooker.bb_cache.virtualfn2realfn(buildfile)
|
initialenv = os.environ.copy()
|
||||||
|
config = BBConfiguration()
|
||||||
|
|
||||||
|
def register_idle_function(self, function, data):
|
||||||
|
pass
|
||||||
|
|
||||||
|
cooker = bb.cooker.BBCooker(config, register_idle_function, initialenv)
|
||||||
|
config_data = cooker.configuration.data
|
||||||
|
cooker.status = config_data
|
||||||
|
cooker.handleCollections(bb.data.getVar("BBFILE_COLLECTIONS", config_data, 1))
|
||||||
|
|
||||||
|
fn, cls = bb.cache.Cache.virtualfn2realfn(buildfile)
|
||||||
buildfile = cooker.matchFile(fn)
|
buildfile = cooker.matchFile(fn)
|
||||||
fn = cooker.bb_cache.realfn2virtual(buildfile, cls)
|
fn = bb.cache.Cache.realfn2virtual(buildfile, cls)
|
||||||
|
|
||||||
cooker.buildSetVars()
|
cooker.buildSetVars()
|
||||||
|
|
||||||
# Load data into the cache for fn and parse the loaded cache data
|
# Load data into the cache for fn and parse the loaded cache data
|
||||||
the_data = cooker.bb_cache.loadDataFull(fn, cooker.get_file_appends(fn), cooker.configuration.data)
|
the_data = bb.cache.Cache.loadDataFull(fn, cooker.get_file_appends(fn), cooker.configuration.data)
|
||||||
cooker.bb_cache.setData(fn, buildfile, the_data)
|
|
||||||
cooker.bb_cache.handle_data(fn, cooker.status)
|
|
||||||
|
|
||||||
#exportlist = bb.utils.preserved_envvars_export_list()
|
|
||||||
#bb.utils.filter_environment(exportlist)
|
|
||||||
|
|
||||||
if taskname.endswith("_setscene"):
|
if taskname.endswith("_setscene"):
|
||||||
the_data.setVarFlag(taskname, "quieterrors", "1")
|
the_data.setVarFlag(taskname, "quieterrors", "1")
|
||||||
|
|
||||||
bb.parse.siggen.set_taskdata(hashdata["hashes"], hashdata["deps"])
|
if hashdata:
|
||||||
|
bb.parse.siggen.set_taskdata(hashdata["hashes"], hashdata["deps"])
|
||||||
for h in hashdata["hashes"]:
|
for h in hashdata["hashes"]:
|
||||||
bb.data.setVar("BBHASH_%s" % h, hashdata["hashes"][h], the_data)
|
bb.data.setVar("BBHASH_%s" % h, hashdata["hashes"][h], the_data)
|
||||||
for h in hashdata["deps"]:
|
for h in hashdata["deps"]:
|
||||||
bb.data.setVar("BBHASHDEPS_%s" % h, hashdata["deps"][h], the_data)
|
bb.data.setVar("BBHASHDEPS_%s" % h, hashdata["deps"][h], the_data)
|
||||||
|
|
||||||
ret = 0
|
ret = 0
|
||||||
if sys.argv[4] != "True":
|
if dryrun != "True":
|
||||||
ret = bb.build.exec_task(fn, taskname, the_data)
|
ret = bb.build.exec_task(fn, taskname, the_data)
|
||||||
sys.exit(ret)
|
sys.exit(ret)
|
||||||
|
|
||||||
|
|||||||
@@ -430,9 +430,8 @@ Create a set of html pages (documentation) for a bitbake.conf....
|
|||||||
action = "store_true", dest = "verbose", default = False )
|
action = "store_true", dest = "verbose", default = False )
|
||||||
|
|
||||||
options, args = parser.parse_args( sys.argv )
|
options, args = parser.parse_args( sys.argv )
|
||||||
|
|
||||||
if options.debug:
|
bb.msg.init_msgconfig(options.verbose, options.debug)
|
||||||
bb.msg.set_debug_level(options.debug)
|
|
||||||
|
|
||||||
return options.config, options.output
|
return options.config, options.output
|
||||||
|
|
||||||
|
|||||||
@@ -12,9 +12,10 @@
|
|||||||
<corpauthor>BitBake Team</corpauthor>
|
<corpauthor>BitBake Team</corpauthor>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>2004, 2005, 2006</year>
|
<year>2004, 2005, 2006, 2011</year>
|
||||||
<holder>Chris Larson</holder>
|
<holder>Chris Larson</holder>
|
||||||
<holder>Phil Blundell</holder>
|
<holder>Phil Blundell</holder>
|
||||||
|
<holder>Richard Purdie</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
<legalnotice>
|
<legalnotice>
|
||||||
<para>This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit <ulink url="http://creativecommons.org/licenses/by/2.5/">http://creativecommons.org/licenses/by/2.5/</ulink> or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.</para>
|
<para>This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit <ulink url="http://creativecommons.org/licenses/by/2.5/">http://creativecommons.org/licenses/by/2.5/</ulink> or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.</para>
|
||||||
@@ -26,7 +27,7 @@
|
|||||||
<title>Overview</title>
|
<title>Overview</title>
|
||||||
<para>BitBake is, at its simplest, a tool for executing
|
<para>BitBake is, at its simplest, a tool for executing
|
||||||
tasks and managing metadata. As such, its similarities to GNU make and other
|
tasks and managing metadata. As such, its similarities to GNU make and other
|
||||||
build tools are readily apparent. It was inspired by Portage, the package management system used by the Gentoo Linux distribution. BitBake is the basis of the <ulink url="http://www.openembedded.org/">OpenEmbedded</ulink> project, which is being used to build and maintain a number of embedded Linux distributions, including OpenZaurus and Familiar.</para>
|
build tools are readily apparent. It was inspired by Portage, the package management system used by the Gentoo Linux distribution. BitBake is the basis of the <ulink url="http://www.openembedded.org/">OpenEmbedded</ulink> project, which is being used to build and maintain a number of embedded Linux distributions/projects such as Angstrom and the Yocto project.</para>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<title>Background and goals</title>
|
<title>Background and goals</title>
|
||||||
@@ -37,7 +38,7 @@ important functionality, and none of the ad-hoc
|
|||||||
<emphasis>buildroot</emphasis> systems, prevalent in the
|
<emphasis>buildroot</emphasis> systems, prevalent in the
|
||||||
embedded space, were scalable or maintainable.</para>
|
embedded space, were scalable or maintainable.</para>
|
||||||
|
|
||||||
<para>Some important goals for BitBake were:
|
<para>Some important original goals for BitBake were:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>Handle crosscompilation.</para></listitem>
|
<listitem><para>Handle crosscompilation.</para></listitem>
|
||||||
<listitem><para>Handle interpackage dependencies (build time on target architecture, build time on native architecture, and runtime).</para></listitem>
|
<listitem><para>Handle interpackage dependencies (build time on target architecture, build time on native architecture, and runtime).</para></listitem>
|
||||||
@@ -53,10 +54,18 @@ between multiple projects using BitBake for their
|
|||||||
builds.</para></listitem>
|
builds.</para></listitem>
|
||||||
<listitem><para>Should provide an inheritance mechanism to
|
<listitem><para>Should provide an inheritance mechanism to
|
||||||
share common metadata between many packages.</para></listitem>
|
share common metadata between many packages.</para></listitem>
|
||||||
<listitem><para>Et cetera...</para></listitem>
|
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
<para>BitBake satisfies all these and many more. Flexibility and power have always been the priorities. It is highly extensible, supporting embedded Python code and execution of any arbitrary tasks.</para>
|
<para>Over time it has become apparent that some further requirements were necessary:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>Handle variants of a base recipe (native, sdk, multilib).</para></listitem>
|
||||||
|
<listitem><para>Able to split metadata into layers and allow layers to override each other.</para></listitem>
|
||||||
|
<listitem><para>Allow representation of a given set of input variables to a task as a checksum.</para></listitem>
|
||||||
|
<listitem><para>based on that checksum, allow acceleration of builds with prebuilt components.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>BitBake satisfies all the original requirements and many more with extensions being made to the basic functionality to reflect the additionl requirements. Flexibility and power have always been the priorities. It is highly extensible, supporting embedded Python code and execution of any arbitrary tasks.</para>
|
||||||
</section>
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
<chapter>
|
<chapter>
|
||||||
@@ -94,10 +103,10 @@ share common metadata between many packages.</para></listitem>
|
|||||||
<para>If <varname>A</varname> is set before the above is called, it will retain its previous value. If <varname>A</varname> is unset prior to the above call, <varname>A</varname> will be set to <literal>aval</literal>. Note that this assignment is immediate, so if there are multiple ?= assignments to a single variable, the first of those will be used.</para>
|
<para>If <varname>A</varname> is set before the above is called, it will retain its previous value. If <varname>A</varname> is unset prior to the above call, <varname>A</varname> will be set to <literal>aval</literal>. Note that this assignment is immediate, so if there are multiple ?= assignments to a single variable, the first of those will be used.</para>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<title>Setting a default value (??=)</title>
|
<title>Setting a weak default value (??=)</title>
|
||||||
<para><screen><varname>A</varname> ??= "somevalue"</screen></para>
|
<para><screen><varname>A</varname> ??= "somevalue"
|
||||||
<para><screen><varname>A</varname> ??= "someothervalue"</screen></para>
|
<varname>A</varname> ??= "someothervalue"</screen></para>
|
||||||
<para>If <varname>A</varname> is set before the above, it will retain that value. If <varname>A</varname> is unset prior to the above, <varname>A</varname> will be set to <literal>someothervalue</literal>. This is a lazy version of ??=, in that the assignment does not occur until the end of the parsing process, so that the last, rather than the first, ??= assignment to a given variable will be used.</para>
|
<para>If <varname>A</varname> is set before the above, it will retain that value. If <varname>A</varname> is unset prior to the above, <varname>A</varname> will be set to <literal>someothervalue</literal>. This is a lazy/weak assignment in that the assignment does not occur until the end of the parsing process, so that the last, rather than the first, ??= assignment to a given variable will be used. Any other setting of A using = or ?= will however override the value set with ??=</para>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<title>Immediate variable expansion (:=)</title>
|
<title>Immediate variable expansion (:=)</title>
|
||||||
@@ -209,6 +218,19 @@ include</literal> directive.</para>
|
|||||||
addtask printdate before do_build</screen></para>
|
addtask printdate before do_build</screen></para>
|
||||||
<para>This defines the necessary Python function and adds it as a task which is now a dependency of do_build, the default task. If anyone executes the do_build task, that will result in do_printdate being run first.</para>
|
<para>This defines the necessary Python function and adds it as a task which is now a dependency of do_build, the default task. If anyone executes the do_build task, that will result in do_printdate being run first.</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<title>Task Flags</title>
|
||||||
|
<para>Tasks support a number of flags which control various functionality of the task. These are as follows:</para>
|
||||||
|
<para>'dirs' - directories which should be created before the task runs</para>
|
||||||
|
<para>'cleandirs' - directories which should created before the task runs but should be empty</para>
|
||||||
|
<para>'noexec' - marks the tasks as being empty and no execution required. These are used as dependency placeholders or used when added tasks need to be subsequently disabled.</para>
|
||||||
|
<para>'nostamp' - don't generate a stamp file for a task. This means the task is always rexecuted.</para>
|
||||||
|
<para>'fakeroot' - this task needs to be run in a fakeroot environment, obtained by adding the variables in FAKEROOTENV to the environment.</para>
|
||||||
|
<para>'umask' - the umask to run the task under.</para>
|
||||||
|
<para> For the 'deptask', 'rdeptask', 'recdeptask' and 'recrdeptask' flags please see the dependencies section.</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<title>Events</title>
|
<title>Events</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>
|
||||||
@@ -239,6 +261,51 @@ SRC_URI_append_1.0.7+ = "file://some_patch_which_the_new_versions_need.patch;pat
|
|||||||
<para>Note that the name of the range will default to the original version of the recipe, so given OE, a recipe file of foo_1.0.0+.bb will default the name of its versions to 1.0.0+. This is useful, as the range name is not only placed into overrides; it's also made available for the metadata to use in the form of the <varname>BPV</varname> variable, for use in file:// search paths (<varname>FILESPATH</varname>).</para>
|
<para>Note that the name of the range will default to the original version of the recipe, so given OE, a recipe file of foo_1.0.0+.bb will default the name of its versions to 1.0.0+. This is useful, as the range name is not only placed into overrides; it's also made available for the metadata to use in the form of the <varname>BPV</varname> variable, for use in file:// search paths (<varname>FILESPATH</varname>).</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<title>Variable interaction: Worked Examples</title>
|
||||||
|
<para>Despite the documentation of the different forms of variable definition above, it can be hard to work out what happens when variable operators are combined. This section documents some common questions people have regarding the way variables interact.</para>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<title>Override and append ordering</title>
|
||||||
|
|
||||||
|
<para>There is often confusion about which order overrides and the various append operators take effect.</para>
|
||||||
|
|
||||||
|
<para><screen><varname>OVERRIDES</varname> = "foo"
|
||||||
|
<varname>A_foo_append</varname> = "X"</screen></para>
|
||||||
|
<para>In this case, X is unconditionally appended to the variable <varname>A_foo</varname>. Since foo is an override, A_foo would then replace <varname>A</varname>.</para>
|
||||||
|
|
||||||
|
<para><screen><varname>OVERRIDES</varname> = "foo"
|
||||||
|
<varname>A</varname> = "X"
|
||||||
|
<varname>A_append_foo</varname> = "Y"</screen></para>
|
||||||
|
<para>In this case, only when foo is in OVERRIDES, Y is appended to the variable <varname>A</varname> so the value of <varname>A</varname> would become XY (NB: no spaces are appended).</para>
|
||||||
|
|
||||||
|
<para><screen><varname>OVERRIDES</varname> = "foo"
|
||||||
|
<varname>A_foo_append</varname> = "X"
|
||||||
|
<varname>A_foo_append</varname> += "Y"</screen></para>
|
||||||
|
<para>This behaves as per the first case above, but the value of <varname>A</varname> would be "X Y" instead of just "X".</para>
|
||||||
|
|
||||||
|
<para><screen><varname>A</varname> = "1"
|
||||||
|
<varname>A_append</varname> = "2"
|
||||||
|
<varname>A_append</varname> = "3"
|
||||||
|
<varname>A</varname> += "4"
|
||||||
|
<varname>A</varname> .= "5"</screen></para>
|
||||||
|
|
||||||
|
<para>Would ultimately result in <varname>A</varname> taking the value "1 4523" since the _append operator executes at the same time as the expansion of other overrides.</para>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<title>Key Expansion</title>
|
||||||
|
|
||||||
|
<para>Key expansion happens at the data store finalisation time just before overrides are expanded.</para>
|
||||||
|
|
||||||
|
<para><screen><varname>A${B}</varname> = "X"
|
||||||
|
<varname>B</varname> = "2"
|
||||||
|
<varname>A2</varname> = "Y"</screen></para>
|
||||||
|
<para>So in this case <varname>A2</varname> would take the value of "X".</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<title>Dependency handling</title>
|
<title>Dependency handling</title>
|
||||||
<para>BitBake 1.7.x onwards works with the metadata at the task level since this is optimal when dealing with multiple threads of execution. A robust method of specifing task dependencies is therefore needed. </para>
|
<para>BitBake 1.7.x onwards works with the metadata at the task level since this is optimal when dealing with multiple threads of execution. A robust method of specifing task dependencies is therefore needed. </para>
|
||||||
@@ -299,13 +366,35 @@ SRC_URI_append_1.0.7+ = "file://some_patch_which_the_new_versions_need.patch;pat
|
|||||||
<title>File download support</title>
|
<title>File download support</title>
|
||||||
<section>
|
<section>
|
||||||
<title>Overview</title>
|
<title>Overview</title>
|
||||||
<para>BitBake provides support to download files this procedure is called fetching. The SRC_URI is normally used to tell BitBake which files to fetch. The next sections will describe the available fetchers and their options. Each fetcher honors a set of variables and per URI parameters separated by a <quote>;</quote> consisting of a key and a value. The semantics of the variables and parameters are defined by the fetcher. BitBake tries to have consistent semantics between the different fetchers.
|
<para>BitBake provides support to download files this procedure is called fetching and it handled by the fetch and fetch2 modules. At this point the original fetch code is considered to be replaced by fetch2 and this manual only related to the fetch2 codebase.</para>
|
||||||
|
|
||||||
|
<para>The SRC_URI is normally used to tell BitBake which files to fetch. The next sections will describe the available fetchers and their options. Each fetcher honors a set of variables and per URI parameters separated by a <quote>;</quote> consisting of a key and a value. The semantics of the variables and parameters are defined by the fetcher. BitBake tries to have consistent semantics between the different fetchers.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>The overall fetch process is that first, fetches are attempted from PREMIRRORS. If those don't work, the original SRC_URI is attempted and if that fails, BitBake will fall back to MIRRORS. Cross urls are supported, so its possible to mirror a git repository on an http server as a tarball for example. Some example commonly used mirror definitions are:</para>
|
||||||
|
|
||||||
|
<para><screen><varname>PREMIRRORS</varname> ?= "\
|
||||||
|
bzr://.*/.* http://somemirror.org/sources/ \n \
|
||||||
|
cvs://.*/.* http://somemirror.org/sources/ \n \
|
||||||
|
git://.*/.* http://somemirror.org/sources/ \n \
|
||||||
|
hg://.*/.* http://somemirror.org/sources/ \n \
|
||||||
|
osc://.*/.* http://somemirror.org/sources/ \n \
|
||||||
|
p4://.*/.* http://somemirror.org/sources/ \n \
|
||||||
|
svk://.*/.* http://somemirror.org/sources/ \n \
|
||||||
|
svn://.*/.* http://somemirror.org/sources/ \n"
|
||||||
|
|
||||||
|
<varname>MIRRORS</varname> =+ "\
|
||||||
|
ftp://.*/.* http://somemirror.org/sources/ \n \
|
||||||
|
http://.*/.* http://somemirror.org/sources/ \n \
|
||||||
|
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 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>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<title>Local file fetcher</title>
|
<title>Local file fetcher</title>
|
||||||
<para>The URN for the local file fetcher is <emphasis>file</emphasis>. The filename can be either absolute or relative. If the filename is relative, <varname>FILESPATH</varname> and <varname>FILESDIR</varname> will be used to find the appropriate relative file, depending on the <varname>OVERRIDES</varname>. Single files and complete directories can be specified.
|
<para>The URN for the local file fetcher is <emphasis>file</emphasis>. The filename can be either absolute or relative. If the filename is relative, <varname>FILESPATH</varname> and failing that <varname>FILESDIR</varname> will be used to find the appropriate relative file. The metadata usually extend these variables to include variations of the values in <varname>OVERRIDES</varname>. Single files and complete directories can be specified.
|
||||||
<screen><varname>SRC_URI</varname>= "file://relativefile.patch"
|
<screen><varname>SRC_URI</varname>= "file://relativefile.patch"
|
||||||
<varname>SRC_URI</varname>= "file://relativefile.patch;this=ignored"
|
<varname>SRC_URI</varname>= "file://relativefile.patch;this=ignored"
|
||||||
<varname>SRC_URI</varname>= "file:///Users/ich/very_important_software"
|
<varname>SRC_URI</varname>= "file:///Users/ich/very_important_software"
|
||||||
@@ -314,8 +403,8 @@ SRC_URI_append_1.0.7+ = "file://some_patch_which_the_new_versions_need.patch;pat
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<title>CVS file fetcher</title>
|
<title>CVS fetcher</title>
|
||||||
<para>The URN for the CVS fetcher is <emphasis>cvs</emphasis>. This fetcher honors the variables <varname>DL_DIR</varname>, <varname>SRCDATE</varname>, <varname>FETCHCOMMAND_cvs</varname>, <varname>UPDATECOMMAND_cvs</varname>. <varname>DL_DIR</varname> specifies where a temporary checkout is saved. <varname>SRCDATE</varname> specifies which date to use when doing the fetching (the special value of "now" will cause the checkout to be updated on every build). <varname>FETCHCOMMAND</varname> and <varname>UPDATECOMMAND</varname> specify which executables to use for the CVS checkout or update.
|
<para>The URN for the CVS fetcher is <emphasis>cvs</emphasis>. This fetcher honors the variables <varname>CVSDIR</varname>, <varname>SRCDATE</varname>, <varname>FETCHCOMMAND_cvs</varname>, <varname>UPDATECOMMAND_cvs</varname>. <varname>DL_DIR</varname> specifies where a temporary checkout is saved. <varname>SRCDATE</varname> specifies which date to use when doing the fetching (the special value of "now" will cause the checkout to be updated on every build). <varname>FETCHCOMMAND</varname> and <varname>UPDATECOMMAND</varname> specify which executables to use for the CVS checkout or update.
|
||||||
</para>
|
</para>
|
||||||
<para>The supported parameters are <varname>module</varname>, <varname>tag</varname>, <varname>date</varname>, <varname>method</varname>, <varname>localdir</varname>, <varname>rsh</varname> and <varname>scmdata</varname>. The <varname>module</varname> specifies which module to check out, the <varname>tag</varname> describes which CVS TAG should be used for the checkout. By default the TAG is empty. A <varname>date</varname> can be specified to override the SRCDATE of the configuration to checkout a specific date. The special value of "now" will cause the checkout to be updated on every build.<varname>method</varname> is by default <emphasis>pserver</emphasis>. If <emphasis>ext</emphasis> is used the <varname>rsh</varname> parameter will be evaluated and <varname>CVS_RSH</varname> will be set. Finally, <varname>localdir</varname> is used to checkout into a special directory relative to <varname>CVSDIR</varname>.
|
<para>The supported parameters are <varname>module</varname>, <varname>tag</varname>, <varname>date</varname>, <varname>method</varname>, <varname>localdir</varname>, <varname>rsh</varname> and <varname>scmdata</varname>. The <varname>module</varname> specifies which module to check out, the <varname>tag</varname> describes which CVS TAG should be used for the checkout. By default the TAG is empty. A <varname>date</varname> can be specified to override the SRCDATE of the configuration to checkout a specific date. The special value of "now" will cause the checkout to be updated on every build.<varname>method</varname> is by default <emphasis>pserver</emphasis>. If <emphasis>ext</emphasis> is used the <varname>rsh</varname> parameter will be evaluated and <varname>CVS_RSH</varname> will be set. Finally, <varname>localdir</varname> is used to checkout into a special directory relative to <varname>CVSDIR</varname>.
|
||||||
|
|
||||||
@@ -327,28 +416,19 @@ SRC_URI_append_1.0.7+ = "file://some_patch_which_the_new_versions_need.patch;pat
|
|||||||
|
|
||||||
<section>
|
<section>
|
||||||
<title>HTTP/FTP fetcher</title>
|
<title>HTTP/FTP fetcher</title>
|
||||||
<para>The URNs for the HTTP/FTP fetcher are <emphasis>http</emphasis>, <emphasis>https</emphasis> and <emphasis>ftp</emphasis>. This fetcher honors the variables <varname>DL_DIR</varname>, <varname>FETCHCOMMAND_wget</varname>, <varname>PREMIRRORS</varname>, <varname>MIRRORS</varname>. The <varname>DL_DIR</varname> defines where to store the fetched file. <varname>FETCHCOMMAND</varname> contains the command used for fetching. <quote>${URI}</quote> and <quote>${FILES}</quote> will be replaced by the URI and basename of the file to be fetched. <varname>PREMIRRORS</varname> will be tried first when fetching a file. If that fails, the actual file will be tried and finally all <varname>MIRRORS</varname> will be tried.
|
<para>The URNs for the HTTP/FTP fetcher are <emphasis>http</emphasis>, <emphasis>https</emphasis> and <emphasis>ftp</emphasis>. This fetcher honors the variables <varname>FETCHCOMMAND_wget</varname>. <varname>FETCHCOMMAND</varname> contains the command used for fetching. <quote>${URI}</quote> and <quote>${FILES}</quote> will be replaced by the URI and basename of the file to be fetched.
|
||||||
</para>
|
</para>
|
||||||
<para>The only supported parameter is <varname>md5sum</varname>. After a fetch the <varname>md5sum</varname> of the file will be calculated and the two sums will be compared.
|
<para><screen><varname>SRC_URI</varname> = "http://oe.handhelds.org/not_there.aac"
|
||||||
</para>
|
<varname>SRC_URI</varname> = "ftp://oe.handhelds.org/not_there_as_well.aac"
|
||||||
<para><screen><varname>SRC_URI</varname> = "http://oe.handhelds.org/not_there.aac;md5sum=12343"
|
<varname>SRC_URI</varname> = "ftp://you@oe.handheld.sorg/home/you/secret.plan"
|
||||||
<varname>SRC_URI</varname> = "ftp://oe.handhelds.org/not_there_as_well.aac;md5sum=1234"
|
|
||||||
<varname>SRC_URI</varname> = "ftp://you@oe.handheld.sorg/home/you/secret.plan;md5sum=1234"
|
|
||||||
</screen></para>
|
</screen></para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
|
||||||
<title>SVK fetcher</title>
|
|
||||||
<para>
|
|
||||||
<emphasis>Currently NOT supported</emphasis>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<title>SVN fetcher</title>
|
<title>SVN fetcher</title>
|
||||||
<para>The URN for the SVN fetcher is <emphasis>svn</emphasis>.
|
<para>The URN for the SVN fetcher is <emphasis>svn</emphasis>.
|
||||||
</para>
|
</para>
|
||||||
<para>This fetcher honors the variables <varname>FETCHCOMMAND_svn</varname>, <varname>DL_DIR</varname>, <varname>SRCDATE</varname>. <varname>FETCHCOMMAND</varname> contains the subversion command. <varname>DL_DIR</varname> is the directory where tarballs will be saved. <varname>SRCDATE</varname> specifies which date to use when doing the fetching (the special value of "now" will cause the checkout to be updated on every build).
|
<para>This fetcher honors the variables <varname>FETCHCOMMAND_svn</varname>, <varname>SVNDIR</varname>, <varname>SRCREV</varname>. <varname>FETCHCOMMAND</varname> contains the subversion command. <varname>SRCREV</varname> specifies which revision to use when doing the fetching.
|
||||||
</para>
|
</para>
|
||||||
<para>The supported parameters are <varname>proto</varname>, <varname>rev</varname> and <varname>scmdata</varname>. <varname>proto</varname> is the Subversion protocol, <varname>rev</varname> is the Subversion revision. If <varname>scmdata</varname> is set to <quote>keep</quote>, the <quote>.svn</quote> directories will be available during compile-time.
|
<para>The supported parameters are <varname>proto</varname>, <varname>rev</varname> and <varname>scmdata</varname>. <varname>proto</varname> is the Subversion protocol, <varname>rev</varname> is the Subversion revision. If <varname>scmdata</varname> is set to <quote>keep</quote>, the <quote>.svn</quote> directories will be available during compile-time.
|
||||||
</para>
|
</para>
|
||||||
@@ -361,9 +441,9 @@ SRC_URI_append_1.0.7+ = "file://some_patch_which_the_new_versions_need.patch;pat
|
|||||||
<title>GIT fetcher</title>
|
<title>GIT fetcher</title>
|
||||||
<para>The URN for the GIT Fetcher is <emphasis>git</emphasis>.
|
<para>The URN for the GIT Fetcher is <emphasis>git</emphasis>.
|
||||||
</para>
|
</para>
|
||||||
<para>The Variables <varname>DL_DIR</varname>, <varname>GITDIR</varname> are used. <varname>DL_DIR</varname> will be used to store the checkedout version. <varname>GITDIR</varname> will be used as the base directory where the git tree is cloned to.
|
<para>The variable <varname>GITDIR</varname> will be used as the base directory where the git tree is cloned to.
|
||||||
</para>
|
</para>
|
||||||
<para>The parameters are <emphasis>tag</emphasis>, <emphasis>protocol</emphasis> and <emphasis>scmdata</emphasis>. <emphasis>tag</emphasis> is a Git tag, the default is <quote>master</quote>. <emphasis>protocol</emphasis> is the Git protocol to use and defaults to <quote>rsync</quote>. If <emphasis>scmdata</emphasis> is set to <quote>keep</quote>, the <quote>.git</quote> directory will be available during compile-time.
|
<para>The parameters are <emphasis>tag</emphasis>, <emphasis>protocol</emphasis> and <emphasis>scmdata</emphasis>. <emphasis>tag</emphasis> is a Git tag, the default is <quote>master</quote>. <emphasis>protocol</emphasis> is the Git protocol to use and defaults to <quote>git</quote> if a hostname is set, otherwise its <quote>file</quote>. If <emphasis>scmdata</emphasis> is set to <quote>keep</quote>, the <quote>.git</quote> directory will be available during compile-time.
|
||||||
</para>
|
</para>
|
||||||
<para><screen><varname>SRC_URI</varname> = "git://git.oe.handhelds.org/git/vip.git;tag=version-1"
|
<para><screen><varname>SRC_URI</varname> = "git://git.oe.handhelds.org/git/vip.git;tag=version-1"
|
||||||
<varname>SRC_URI</varname> = "git://git.oe.handhelds.org/git/vip.git;protocol=http"
|
<varname>SRC_URI</varname> = "git://git.oe.handhelds.org/git/vip.git;protocol=http"
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ logging.setLoggerClass(BBLogger)
|
|||||||
|
|
||||||
logger = logging.getLogger("BitBake")
|
logger = logging.getLogger("BitBake")
|
||||||
logger.addHandler(NullHandler())
|
logger.addHandler(NullHandler())
|
||||||
logger.setLevel(logging.INFO)
|
logger.setLevel(logging.DEBUG - 2)
|
||||||
|
|
||||||
# This has to be imported after the setLoggerClass, as the import of bb.msg
|
# This has to be imported after the setLoggerClass, as the import of bb.msg
|
||||||
# can result in construction of the various loggers.
|
# can result in construction of the various loggers.
|
||||||
|
|||||||
@@ -149,8 +149,7 @@ def exec_func(func, d, dirs = None):
|
|||||||
adir = dirs[-1]
|
adir = dirs[-1]
|
||||||
else:
|
else:
|
||||||
adir = data.getVar('B', d, 1)
|
adir = data.getVar('B', d, 1)
|
||||||
if not os.path.exists(adir):
|
bb.utils.mkdirhier(adir)
|
||||||
adir = None
|
|
||||||
|
|
||||||
ispython = flags.get('python')
|
ispython = flags.get('python')
|
||||||
if flags.get('fakeroot') and not flags.get('task'):
|
if flags.get('fakeroot') and not flags.get('task'):
|
||||||
@@ -223,7 +222,7 @@ def exec_func_shell(function, d, runfile, cwd=None):
|
|||||||
|
|
||||||
with open(runfile, 'w') as script:
|
with open(runfile, 'w') as script:
|
||||||
script.write('#!/bin/sh -e\n')
|
script.write('#!/bin/sh -e\n')
|
||||||
if logger.isEnabledFor(logging.DEBUG):
|
if bb.msg.loggerDefaultVerbose:
|
||||||
script.write("set -x\n")
|
script.write("set -x\n")
|
||||||
data.emit_func(function, script, d)
|
data.emit_func(function, script, d)
|
||||||
if cwd:
|
if cwd:
|
||||||
@@ -234,7 +233,7 @@ def exec_func_shell(function, d, runfile, cwd=None):
|
|||||||
|
|
||||||
cmd = runfile
|
cmd = runfile
|
||||||
|
|
||||||
if logger.isEnabledFor(logging.DEBUG):
|
if bb.msg.loggerDefaultVerbose:
|
||||||
logfile = LogTee(logger, sys.stdout)
|
logfile = LogTee(logger, sys.stdout)
|
||||||
else:
|
else:
|
||||||
logfile = sys.stdout
|
logfile = sys.stdout
|
||||||
@@ -308,6 +307,8 @@ def _exec_task(fn, task, d, quieterr):
|
|||||||
# Ensure python logging goes to the logfile
|
# Ensure python logging goes to the logfile
|
||||||
handler = logging.StreamHandler(logfile)
|
handler = logging.StreamHandler(logfile)
|
||||||
handler.setFormatter(logformatter)
|
handler.setFormatter(logformatter)
|
||||||
|
# Always enable full debug output into task logfiles
|
||||||
|
handler.setLevel(logging.DEBUG - 2)
|
||||||
bblogger.addHandler(handler)
|
bblogger.addHandler(handler)
|
||||||
|
|
||||||
localdata.setVar('BB_LOGFILE', logfn)
|
localdata.setVar('BB_LOGFILE', logfn)
|
||||||
|
|||||||
@@ -286,14 +286,14 @@ class Cache(object):
|
|||||||
old_mtimes.append(newest_mtime)
|
old_mtimes.append(newest_mtime)
|
||||||
newest_mtime = max(old_mtimes)
|
newest_mtime = max(old_mtimes)
|
||||||
|
|
||||||
bNeedUpdate = True
|
cache_ok = True
|
||||||
if self.caches_array:
|
if self.caches_array:
|
||||||
for cache_class in self.caches_array:
|
for cache_class in self.caches_array:
|
||||||
if type(cache_class) is type and issubclass(cache_class, RecipeInfoCommon):
|
if type(cache_class) is type and issubclass(cache_class, RecipeInfoCommon):
|
||||||
cachefile = getCacheFile(self.cachedir, cache_class.cachefile)
|
cachefile = getCacheFile(self.cachedir, cache_class.cachefile)
|
||||||
bNeedUpdate = bNeedUpdate and (bb.parse.cached_mtime_noerror(cachefile) >= newest_mtime)
|
cache_ok = cache_ok and (bb.parse.cached_mtime_noerror(cachefile) >= newest_mtime)
|
||||||
cache_class.init_cacheData(self)
|
cache_class.init_cacheData(self)
|
||||||
if bNeedUpdate:
|
if cache_ok:
|
||||||
self.load_cachefile()
|
self.load_cachefile()
|
||||||
elif os.path.isfile(self.cachefile):
|
elif os.path.isfile(self.cachefile):
|
||||||
logger.info("Out of date cache found, rebuilding...")
|
logger.info("Out of date cache found, rebuilding...")
|
||||||
|
|||||||
@@ -150,117 +150,79 @@ def parser_cache_savemerge(d):
|
|||||||
bb.utils.unlockfile(glf)
|
bb.utils.unlockfile(glf)
|
||||||
|
|
||||||
|
|
||||||
|
Logger = logging.getLoggerClass()
|
||||||
|
class BufferedLogger(Logger):
|
||||||
|
def __init__(self, name, level=0, target=None):
|
||||||
|
Logger.__init__(self, name)
|
||||||
|
self.setLevel(level)
|
||||||
|
self.buffer = []
|
||||||
|
self.target = target
|
||||||
|
|
||||||
|
def handle(self, record):
|
||||||
|
self.buffer.append(record)
|
||||||
|
|
||||||
|
def flush(self):
|
||||||
|
for record in self.buffer:
|
||||||
|
self.target.handle(record)
|
||||||
|
self.buffer = []
|
||||||
|
|
||||||
class PythonParser():
|
class PythonParser():
|
||||||
class ValueVisitor():
|
getvars = ("d.getVar", "bb.data.getVar", "data.getVar")
|
||||||
"""Visitor to traverse a python abstract syntax tree and obtain
|
execfuncs = ("bb.build.exec_func", "bb.build.exec_task")
|
||||||
the variables referenced via bitbake metadata APIs, and the external
|
|
||||||
functions called.
|
def warn(self, func, arg):
|
||||||
|
"""Warn about calls of bitbake APIs which pass a non-literal
|
||||||
|
argument for the variable name, as we're not able to track such
|
||||||
|
a reference.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
getvars = ("d.getVar", "bb.data.getVar", "data.getVar")
|
try:
|
||||||
expands = ("d.expand", "bb.data.expand", "data.expand")
|
funcstr = codegen.to_source(func)
|
||||||
execs = ("bb.build.exec_func", "bb.build.exec_task")
|
argstr = codegen.to_source(arg)
|
||||||
|
except TypeError:
|
||||||
|
self.log.debug(2, 'Failed to convert function and argument to source form')
|
||||||
|
else:
|
||||||
|
self.log.debug(1, self.unhandled_message % (funcstr, argstr))
|
||||||
|
|
||||||
@classmethod
|
def visit_Call(self, node):
|
||||||
def _compare_name(cls, strparts, node):
|
name = self.called_node_name(node.func)
|
||||||
"""Given a sequence of strings representing a python name,
|
if name in self.getvars:
|
||||||
where the last component is the actual Name and the prior
|
if isinstance(node.args[0], ast.Str):
|
||||||
elements are Attribute nodes, determine if the supplied node
|
self.var_references.add(node.args[0].s)
|
||||||
matches.
|
else:
|
||||||
"""
|
self.warn(node.func, node.args[0])
|
||||||
|
elif name in self.execfuncs:
|
||||||
|
if isinstance(node.args[0], ast.Str):
|
||||||
|
self.var_execs.add(node.args[0].s)
|
||||||
|
else:
|
||||||
|
self.warn(node.func, node.args[0])
|
||||||
|
elif name and isinstance(node.func, (ast.Name, ast.Attribute)):
|
||||||
|
self.execs.add(name)
|
||||||
|
|
||||||
if not strparts:
|
def called_node_name(self, node):
|
||||||
return True
|
"""Given a called node, return its original string form"""
|
||||||
|
components = []
|
||||||
current, rest = strparts[0], strparts[1:]
|
while node:
|
||||||
if isinstance(node, ast.Attribute):
|
if isinstance(node, ast.Attribute):
|
||||||
if current == node.attr:
|
components.append(node.attr)
|
||||||
return cls._compare_name(rest, node.value)
|
node = node.value
|
||||||
elif isinstance(node, ast.Name):
|
elif isinstance(node, ast.Name):
|
||||||
if current == node.id:
|
components.append(node.id)
|
||||||
return True
|
return '.'.join(reversed(components))
|
||||||
return False
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def compare_name(cls, value, node):
|
|
||||||
"""Convenience function for the _compare_node method, which
|
|
||||||
can accept a string (which is split by '.' for you), or an
|
|
||||||
iterable of strings, in which case it checks to see if any of
|
|
||||||
them match, similar to isinstance.
|
|
||||||
"""
|
|
||||||
|
|
||||||
if isinstance(value, basestring):
|
|
||||||
return cls._compare_name(tuple(reversed(value.split("."))),
|
|
||||||
node)
|
|
||||||
else:
|
else:
|
||||||
return any(cls.compare_name(item, node) for item in value)
|
break
|
||||||
|
|
||||||
def __init__(self, value):
|
def __init__(self, name, log):
|
||||||
self.var_references = set()
|
self.var_references = set()
|
||||||
self.var_execs = set()
|
self.var_execs = set()
|
||||||
self.direct_func_calls = set()
|
|
||||||
self.var_expands = set()
|
|
||||||
self.value = value
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def warn(cls, func, arg):
|
|
||||||
"""Warn about calls of bitbake APIs which pass a non-literal
|
|
||||||
argument for the variable name, as we're not able to track such
|
|
||||||
a reference.
|
|
||||||
"""
|
|
||||||
|
|
||||||
try:
|
|
||||||
funcstr = codegen.to_source(func)
|
|
||||||
argstr = codegen.to_source(arg)
|
|
||||||
except TypeError:
|
|
||||||
logger.debug(2, 'Failed to convert function and argument to source form')
|
|
||||||
else:
|
|
||||||
logger.debug(1, "Warning: in call to '%s', argument '%s' is "
|
|
||||||
"not a literal", funcstr, argstr)
|
|
||||||
|
|
||||||
def visit_Call(self, node):
|
|
||||||
if self.compare_name(self.getvars, node.func):
|
|
||||||
if isinstance(node.args[0], ast.Str):
|
|
||||||
self.var_references.add(node.args[0].s)
|
|
||||||
else:
|
|
||||||
self.warn(node.func, node.args[0])
|
|
||||||
elif self.compare_name(self.expands, node.func):
|
|
||||||
if isinstance(node.args[0], ast.Str):
|
|
||||||
self.warn(node.func, node.args[0])
|
|
||||||
self.var_expands.update(node.args[0].s)
|
|
||||||
elif isinstance(node.args[0], ast.Call) and \
|
|
||||||
self.compare_name(self.getvars, node.args[0].func):
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
self.warn(node.func, node.args[0])
|
|
||||||
elif self.compare_name(self.execs, node.func):
|
|
||||||
if isinstance(node.args[0], ast.Str):
|
|
||||||
self.var_execs.add(node.args[0].s)
|
|
||||||
else:
|
|
||||||
self.warn(node.func, node.args[0])
|
|
||||||
elif isinstance(node.func, ast.Name):
|
|
||||||
self.direct_func_calls.add(node.func.id)
|
|
||||||
elif isinstance(node.func, ast.Attribute):
|
|
||||||
# We must have a qualified name. Therefore we need
|
|
||||||
# to walk the chain of 'Attribute' nodes to determine
|
|
||||||
# the qualification.
|
|
||||||
attr_node = node.func.value
|
|
||||||
identifier = node.func.attr
|
|
||||||
while isinstance(attr_node, ast.Attribute):
|
|
||||||
identifier = attr_node.attr + "." + identifier
|
|
||||||
attr_node = attr_node.value
|
|
||||||
if isinstance(attr_node, ast.Name):
|
|
||||||
identifier = attr_node.id + "." + identifier
|
|
||||||
self.direct_func_calls.add(identifier)
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
#self.funcdefs = set()
|
|
||||||
self.execs = set()
|
self.execs = set()
|
||||||
#self.external_cmds = set()
|
|
||||||
self.references = set()
|
self.references = set()
|
||||||
|
self.log = BufferedLogger('BitBake.Data.%s' % name, logging.DEBUG, log)
|
||||||
|
|
||||||
|
self.unhandled_message = "in call of %s, argument '%s' is not a string literal"
|
||||||
|
self.unhandled_message = "while parsing %s, %s" % (name, self.unhandled_message)
|
||||||
|
|
||||||
def parse_python(self, node):
|
def parse_python(self, node):
|
||||||
|
|
||||||
h = hash(str(node))
|
h = hash(str(node))
|
||||||
|
|
||||||
if h in pythonparsecache:
|
if h in pythonparsecache:
|
||||||
@@ -271,24 +233,25 @@ class PythonParser():
|
|||||||
code = compile(check_indent(str(node)), "<string>", "exec",
|
code = compile(check_indent(str(node)), "<string>", "exec",
|
||||||
ast.PyCF_ONLY_AST)
|
ast.PyCF_ONLY_AST)
|
||||||
|
|
||||||
visitor = self.ValueVisitor(code)
|
|
||||||
for n in ast.walk(code):
|
for n in ast.walk(code):
|
||||||
if n.__class__.__name__ == "Call":
|
if n.__class__.__name__ == "Call":
|
||||||
visitor.visit_Call(n)
|
self.visit_Call(n)
|
||||||
|
|
||||||
self.references.update(visitor.var_references)
|
self.references.update(self.var_references)
|
||||||
self.references.update(visitor.var_execs)
|
self.references.update(self.var_execs)
|
||||||
self.execs = visitor.direct_func_calls
|
|
||||||
|
|
||||||
pythonparsecache[h] = {}
|
pythonparsecache[h] = {}
|
||||||
pythonparsecache[h]["refs"] = self.references
|
pythonparsecache[h]["refs"] = self.references
|
||||||
pythonparsecache[h]["execs"] = self.execs
|
pythonparsecache[h]["execs"] = self.execs
|
||||||
|
|
||||||
class ShellParser():
|
class ShellParser():
|
||||||
def __init__(self):
|
def __init__(self, name, log):
|
||||||
self.funcdefs = set()
|
self.funcdefs = set()
|
||||||
self.allexecs = set()
|
self.allexecs = set()
|
||||||
self.execs = set()
|
self.execs = set()
|
||||||
|
self.log = BufferedLogger('BitBake.Data.%s' % name, logging.DEBUG, log)
|
||||||
|
self.unhandled_template = "unable to handle non-literal command '%s'"
|
||||||
|
self.unhandled_template = "while parsing %s, %s" % (name, self.unhandled_template)
|
||||||
|
|
||||||
def parse_shell(self, value):
|
def parse_shell(self, value):
|
||||||
"""Parse the supplied shell code in a string, returning the external
|
"""Parse the supplied shell code in a string, returning the external
|
||||||
@@ -403,8 +366,7 @@ class ShellParser():
|
|||||||
|
|
||||||
cmd = word[1]
|
cmd = word[1]
|
||||||
if cmd.startswith("$"):
|
if cmd.startswith("$"):
|
||||||
logger.debug(1, "Warning: execution of non-literal "
|
self.log.debug(1, self.unhandled_template % cmd)
|
||||||
"command '%s'", cmd)
|
|
||||||
elif cmd == "eval":
|
elif cmd == "eval":
|
||||||
command = " ".join(word for _, word in words[1:])
|
command = " ".join(word for _, word in words[1:])
|
||||||
self.parse_shell(command)
|
self.parse_shell(command)
|
||||||
|
|||||||
@@ -172,6 +172,13 @@ class CommandsSync:
|
|||||||
value = params[1]
|
value = params[1]
|
||||||
bb.data.setVar(varname, value, command.cooker.configuration.data)
|
bb.data.setVar(varname, value, command.cooker.configuration.data)
|
||||||
|
|
||||||
|
def resetCooker(self, command, params):
|
||||||
|
"""
|
||||||
|
Reset the cooker to its initial state, thus forcing a reparse for
|
||||||
|
any async command that has the needcache property set to True
|
||||||
|
"""
|
||||||
|
command.cooker.reset()
|
||||||
|
|
||||||
|
|
||||||
class CommandsAsync:
|
class CommandsAsync:
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -169,7 +169,8 @@ class BBCooker:
|
|||||||
if not self.server_registration_cb:
|
if not self.server_registration_cb:
|
||||||
bb.data.setVar("BB_WORKERCONTEXT", "1", self.configuration.data)
|
bb.data.setVar("BB_WORKERCONTEXT", "1", self.configuration.data)
|
||||||
|
|
||||||
bb.data.inheritFromOS(self.configuration.data, self.savedenv)
|
filtered_keys = bb.utils.approved_variables()
|
||||||
|
bb.data.inheritFromOS(self.configuration.data, self.savedenv, filtered_keys)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.parseConfigurationFiles(self.configuration.prefile,
|
self.parseConfigurationFiles(self.configuration.prefile,
|
||||||
@@ -243,13 +244,18 @@ class BBCooker:
|
|||||||
# Need files parsed
|
# Need files parsed
|
||||||
self.updateCache()
|
self.updateCache()
|
||||||
|
|
||||||
|
# Need to ensure data store is expanded
|
||||||
|
localdata = data.createCopy(self.configuration.data)
|
||||||
|
bb.data.update_data(localdata)
|
||||||
|
bb.data.expandKeys(localdata)
|
||||||
|
|
||||||
pkg_pn = self.status.pkg_pn
|
pkg_pn = self.status.pkg_pn
|
||||||
preferred_versions = {}
|
preferred_versions = {}
|
||||||
latest_versions = {}
|
latest_versions = {}
|
||||||
|
|
||||||
# Sort by priority
|
# Sort by priority
|
||||||
for pn in pkg_pn:
|
for pn in pkg_pn:
|
||||||
(last_ver, last_file, pref_ver, pref_file) = bb.providers.findBestProvider(pn, self.configuration.data, self.status)
|
(last_ver, last_file, pref_ver, pref_file) = bb.providers.findBestProvider(pn, localdata, self.status)
|
||||||
preferred_versions[pn] = (pref_ver, pref_file)
|
preferred_versions[pn] = (pref_ver, pref_file)
|
||||||
latest_versions[pn] = (last_ver, last_file)
|
latest_versions[pn] = (last_ver, last_file)
|
||||||
|
|
||||||
@@ -276,7 +282,15 @@ class BBCooker:
|
|||||||
envdata = None
|
envdata = None
|
||||||
|
|
||||||
if buildfile:
|
if buildfile:
|
||||||
fn = self.matchFile(buildfile)
|
# Parse the configuration here. We need to do it explicitly here since
|
||||||
|
# this showEnvironment() code path doesn't use the cache
|
||||||
|
self.parseConfiguration()
|
||||||
|
self.status = bb.cache.CacheData(self.caches_array)
|
||||||
|
self.handleCollections( bb.data.getVar("BBFILE_COLLECTIONS", self.configuration.data, 1) )
|
||||||
|
|
||||||
|
fn, cls = bb.cache.Cache.virtualfn2realfn(buildfile)
|
||||||
|
fn = self.matchFile(fn)
|
||||||
|
fn = bb.cache.Cache.realfn2virtual(fn, cls)
|
||||||
elif len(pkgs_to_build) == 1:
|
elif len(pkgs_to_build) == 1:
|
||||||
self.updateCache()
|
self.updateCache()
|
||||||
|
|
||||||
@@ -615,9 +629,33 @@ class BBCooker:
|
|||||||
collectlog.warn("No bb files matched BBFILE_PATTERN_%s '%s'" % (collection, pattern))
|
collectlog.warn("No bb files matched BBFILE_PATTERN_%s '%s'" % (collection, pattern))
|
||||||
|
|
||||||
def findConfigFilePath(self, configfile):
|
def findConfigFilePath(self, configfile):
|
||||||
|
"""
|
||||||
|
Find the location on disk of configfile and if it exists and was parsed by BitBake
|
||||||
|
emit the ConfigFilePathFound event with the path to the file.
|
||||||
|
"""
|
||||||
path = self._findConfigFile(configfile)
|
path = self._findConfigFile(configfile)
|
||||||
if path:
|
if not path:
|
||||||
bb.event.fire(bb.event.ConfigFilePathFound(path), self.configuration.data)
|
return
|
||||||
|
|
||||||
|
# Generate a list of parsed configuration files by searching the files
|
||||||
|
# listed in the __depends and __base_depends variables with a .conf suffix.
|
||||||
|
conffiles = []
|
||||||
|
dep_files = bb.data.getVar('__depends', self.configuration.data) or set()
|
||||||
|
dep_files.union(bb.data.getVar('__base_depends', self.configuration.data) or set())
|
||||||
|
|
||||||
|
for f in dep_files:
|
||||||
|
if f[0].endswith(".conf"):
|
||||||
|
conffiles.append(f[0])
|
||||||
|
|
||||||
|
_, conf, conffile = path.rpartition("conf/")
|
||||||
|
match = os.path.join(conf, conffile)
|
||||||
|
# Try and find matches for conf/conffilename.conf as we don't always
|
||||||
|
# have the full path to the file.
|
||||||
|
for cfg in conffiles:
|
||||||
|
if cfg.endswith(match):
|
||||||
|
bb.event.fire(bb.event.ConfigFilePathFound(path),
|
||||||
|
self.configuration.data)
|
||||||
|
break
|
||||||
|
|
||||||
def findFilesMatchingInDir(self, filepattern, directory):
|
def findFilesMatchingInDir(self, filepattern, directory):
|
||||||
"""
|
"""
|
||||||
@@ -1074,8 +1112,8 @@ class BBCooker:
|
|||||||
|
|
||||||
self.server_registration_cb(buildTargetsIdle, rq)
|
self.server_registration_cb(buildTargetsIdle, rq)
|
||||||
|
|
||||||
def updateCache(self, force=False):
|
def updateCache(self):
|
||||||
if self.state == state.running and not force:
|
if self.state == state.running:
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.state in (state.shutdown, state.stop):
|
if self.state in (state.shutdown, state.stop):
|
||||||
@@ -1260,8 +1298,11 @@ class BBCooker:
|
|||||||
self.state = state.stop
|
self.state = state.stop
|
||||||
|
|
||||||
def reparseFiles(self):
|
def reparseFiles(self):
|
||||||
|
return
|
||||||
|
|
||||||
|
def reset(self):
|
||||||
|
self.state = state.initial
|
||||||
self.loadConfigurationData()
|
self.loadConfigurationData()
|
||||||
self.updateCache(force=True)
|
|
||||||
|
|
||||||
def server_main(cooker, func, *args):
|
def server_main(cooker, func, *args):
|
||||||
cooker.pre_serve()
|
cooker.pre_serve()
|
||||||
@@ -1324,7 +1365,7 @@ def catch_parse_error(func):
|
|||||||
return wrapped
|
return wrapped
|
||||||
|
|
||||||
@catch_parse_error
|
@catch_parse_error
|
||||||
def _parse(fn, data, include=False):
|
def _parse(fn, data, include=True):
|
||||||
return bb.parse.handle(fn, data, include)
|
return bb.parse.handle(fn, data, include)
|
||||||
|
|
||||||
@catch_parse_error
|
@catch_parse_error
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ from bb import data_smart
|
|||||||
from bb import codeparser
|
from bb import codeparser
|
||||||
import bb
|
import bb
|
||||||
|
|
||||||
|
logger = data_smart.logger
|
||||||
_dict_type = data_smart.DataSmart
|
_dict_type = data_smart.DataSmart
|
||||||
|
|
||||||
def init():
|
def init():
|
||||||
@@ -159,16 +160,17 @@ def expandKeys(alterdata, readdata = None):
|
|||||||
ekey = todolist[key]
|
ekey = todolist[key]
|
||||||
renameVar(key, ekey, alterdata)
|
renameVar(key, ekey, alterdata)
|
||||||
|
|
||||||
def inheritFromOS(d, savedenv):
|
def inheritFromOS(d, savedenv, permitted):
|
||||||
"""Inherit variables from the initial environment."""
|
"""Inherit variables from the initial environment."""
|
||||||
exportlist = bb.utils.preserved_envvars_exported()
|
exportlist = bb.utils.preserved_envvars_exported()
|
||||||
for s in savedenv.keys():
|
for s in savedenv.keys():
|
||||||
try:
|
if s in permitted:
|
||||||
setVar(s, getVar(s, savedenv, True), d)
|
try:
|
||||||
if s in exportlist:
|
setVar(s, getVar(s, savedenv, True), d)
|
||||||
setVarFlag(s, "export", True, d)
|
if s in exportlist:
|
||||||
except TypeError:
|
setVarFlag(s, "export", True, d)
|
||||||
pass
|
except TypeError:
|
||||||
|
pass
|
||||||
|
|
||||||
def emit_var(var, o=sys.__stdout__, d = init(), all=False):
|
def emit_var(var, o=sys.__stdout__, d = init(), all=False):
|
||||||
"""Emit a variable to be sourced by a shell."""
|
"""Emit a variable to be sourced by a shell."""
|
||||||
@@ -257,7 +259,7 @@ def emit_func(func, o=sys.__stdout__, d = init()):
|
|||||||
emit_var(key, o, d, False) and o.write('\n')
|
emit_var(key, o, d, False) and o.write('\n')
|
||||||
|
|
||||||
emit_var(func, o, d, False) and o.write('\n')
|
emit_var(func, o, d, False) and o.write('\n')
|
||||||
newdeps = bb.codeparser.ShellParser().parse_shell(d.getVar(func, True))
|
newdeps = bb.codeparser.ShellParser(func, logger).parse_shell(d.getVar(func, True))
|
||||||
seen = set()
|
seen = set()
|
||||||
while newdeps:
|
while newdeps:
|
||||||
deps = newdeps
|
deps = newdeps
|
||||||
@@ -266,39 +268,45 @@ def emit_func(func, o=sys.__stdout__, d = init()):
|
|||||||
for dep in deps:
|
for dep in deps:
|
||||||
if bb.data.getVarFlag(dep, "func", d):
|
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().parse_shell(d.getVar(dep, True))
|
newdeps |= bb.codeparser.ShellParser(dep, logger).parse_shell(d.getVar(dep, True))
|
||||||
newdeps -= seen
|
newdeps -= seen
|
||||||
|
|
||||||
def update_data(d):
|
def update_data(d):
|
||||||
"""Performs final steps upon the datastore, including application of overrides"""
|
"""Performs final steps upon the datastore, including application of overrides"""
|
||||||
d.finalize()
|
d.finalize()
|
||||||
|
|
||||||
def build_dependencies(key, keys, shelldeps, d):
|
def build_dependencies(key, keys, shelldeps, vardepvals, d):
|
||||||
deps = set()
|
deps = set()
|
||||||
|
vardeps = d.getVarFlag(key, "vardeps", True)
|
||||||
try:
|
try:
|
||||||
if d.getVarFlag(key, "func"):
|
value = d.getVar(key, False)
|
||||||
|
if key in vardepvals:
|
||||||
|
value = d.getVarFlag(key, "vardepvalue", True)
|
||||||
|
elif d.getVarFlag(key, "func"):
|
||||||
if d.getVarFlag(key, "python"):
|
if d.getVarFlag(key, "python"):
|
||||||
parsedvar = d.expandWithRefs(d.getVar(key, False), key)
|
parsedvar = d.expandWithRefs(value, key)
|
||||||
parser = bb.codeparser.PythonParser()
|
parser = bb.codeparser.PythonParser(key, logger)
|
||||||
parser.parse_python(parsedvar.value)
|
parser.parse_python(parsedvar.value)
|
||||||
deps = deps | parser.references
|
deps = deps | parser.references
|
||||||
else:
|
else:
|
||||||
parsedvar = d.expandWithRefs(d.getVar(key, False), key)
|
parsedvar = d.expandWithRefs(value, key)
|
||||||
parser = bb.codeparser.ShellParser()
|
parser = bb.codeparser.ShellParser(key, logger)
|
||||||
parser.parse_shell(parsedvar.value)
|
parser.parse_shell(parsedvar.value)
|
||||||
deps = deps | shelldeps
|
deps = deps | shelldeps
|
||||||
|
if vardeps is None:
|
||||||
|
parser.log.flush()
|
||||||
deps = deps | parsedvar.references
|
deps = deps | parsedvar.references
|
||||||
deps = deps | (keys & parser.execs) | (keys & parsedvar.execs)
|
deps = deps | (keys & parser.execs) | (keys & parsedvar.execs)
|
||||||
else:
|
else:
|
||||||
parser = d.expandWithRefs(d.getVar(key, False), key)
|
parser = d.expandWithRefs(value, key)
|
||||||
deps |= parser.references
|
deps |= parser.references
|
||||||
deps = deps | (keys & parser.execs)
|
deps = deps | (keys & parser.execs)
|
||||||
deps |= set((d.getVarFlag(key, "vardeps", True) or "").split())
|
deps |= set((vardeps or "").split())
|
||||||
deps -= set((d.getVarFlag(key, "vardepsexclude", True) or "").split())
|
deps -= set((d.getVarFlag(key, "vardepsexclude", True) or "").split())
|
||||||
except:
|
except:
|
||||||
bb.note("Error expanding variable %s" % key)
|
bb.note("Error expanding variable %s" % key)
|
||||||
raise
|
raise
|
||||||
return deps
|
return deps, value
|
||||||
#bb.note("Variable %s references %s and calls %s" % (key, str(deps), str(execs)))
|
#bb.note("Variable %s references %s and calls %s" % (key, str(deps), str(execs)))
|
||||||
#d.setVarFlag(key, "vardeps", deps)
|
#d.setVarFlag(key, "vardeps", deps)
|
||||||
|
|
||||||
@@ -306,12 +314,14 @@ def generate_dependencies(d):
|
|||||||
|
|
||||||
keys = set(key for key in d.keys() if not key.startswith("__"))
|
keys = set(key for key in d.keys() if not key.startswith("__"))
|
||||||
shelldeps = set(key for key in keys if d.getVarFlag(key, "export") and not d.getVarFlag(key, "unexport"))
|
shelldeps = set(key for key in keys if d.getVarFlag(key, "export") and not d.getVarFlag(key, "unexport"))
|
||||||
|
vardepvals = set(key for key in keys if d.getVarFlag(key, "vardepvalue"))
|
||||||
|
|
||||||
deps = {}
|
deps = {}
|
||||||
|
values = {}
|
||||||
|
|
||||||
tasklist = bb.data.getVar('__BBTASKS', d) or []
|
tasklist = bb.data.getVar('__BBTASKS', d) or []
|
||||||
for task in tasklist:
|
for task in tasklist:
|
||||||
deps[task] = build_dependencies(task, keys, shelldeps, d)
|
deps[task], values[task] = build_dependencies(task, keys, shelldeps, vardepvals, d)
|
||||||
newdeps = deps[task]
|
newdeps = deps[task]
|
||||||
seen = set()
|
seen = set()
|
||||||
while newdeps:
|
while newdeps:
|
||||||
@@ -320,11 +330,11 @@ def generate_dependencies(d):
|
|||||||
newdeps = set()
|
newdeps = set()
|
||||||
for dep in nextdeps:
|
for dep in nextdeps:
|
||||||
if dep not in deps:
|
if dep not in deps:
|
||||||
deps[dep] = build_dependencies(dep, keys, shelldeps, d)
|
deps[dep], values[dep] = build_dependencies(dep, keys, shelldeps, vardepvals, d)
|
||||||
newdeps |= deps[dep]
|
newdeps |= deps[dep]
|
||||||
newdeps -= seen
|
newdeps -= seen
|
||||||
#print "For %s: %s" % (task, str(taskdeps[task]))
|
#print "For %s: %s" % (task, str(taskdeps[task]))
|
||||||
return tasklist, deps
|
return tasklist, deps, values
|
||||||
|
|
||||||
def inherits_class(klass, d):
|
def inherits_class(klass, d):
|
||||||
val = getVar('__inherit_cache', d) or []
|
val = getVar('__inherit_cache', d) or []
|
||||||
|
|||||||
@@ -68,8 +68,14 @@ class VariableParse:
|
|||||||
code = match.group()[3:-1]
|
code = match.group()[3:-1]
|
||||||
codeobj = compile(code.strip(), self.varname or "<expansion>", "eval")
|
codeobj = compile(code.strip(), self.varname or "<expansion>", "eval")
|
||||||
|
|
||||||
parser = bb.codeparser.PythonParser()
|
parser = bb.codeparser.PythonParser(self.varname, logger)
|
||||||
parser.parse_python(code)
|
parser.parse_python(code)
|
||||||
|
if self.varname:
|
||||||
|
vardeps = self.d.getVarFlag(self.varname, "vardeps", True)
|
||||||
|
if vardeps is None:
|
||||||
|
parser.log.flush()
|
||||||
|
else:
|
||||||
|
parser.log.flush()
|
||||||
self.references |= parser.references
|
self.references |= parser.references
|
||||||
self.execs |= parser.execs
|
self.execs |= parser.execs
|
||||||
|
|
||||||
@@ -268,7 +274,12 @@ class DataSmart(MutableMapping):
|
|||||||
self.dict[var]["content"] = value
|
self.dict[var]["content"] = value
|
||||||
|
|
||||||
def getVar(self, var, expand=False, noweakdefault=False):
|
def getVar(self, var, expand=False, noweakdefault=False):
|
||||||
return self.getVarFlag(var, "content", expand, noweakdefault)
|
value = self.getVarFlag(var, "content", False, noweakdefault)
|
||||||
|
|
||||||
|
# Call expand() separately to make use of the expand cache
|
||||||
|
if expand and value:
|
||||||
|
return self.expand(value, var)
|
||||||
|
return value
|
||||||
|
|
||||||
def renameVar(self, key, newkey):
|
def renameVar(self, key, newkey):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ def execute_handler(name, handler, event, d):
|
|||||||
event.data = d
|
event.data = d
|
||||||
try:
|
try:
|
||||||
ret = handler(event)
|
ret = handler(event)
|
||||||
|
except bb.parse.SkipPackage:
|
||||||
|
raise
|
||||||
except Exception:
|
except Exception:
|
||||||
etype, value, tb = sys.exc_info()
|
etype, value, tb = sys.exc_info()
|
||||||
logger.error("Execution of event handler '%s' failed" % name,
|
logger.error("Execution of event handler '%s' failed" % name,
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ def uri_replace(ud, uri_find, uri_replace, d):
|
|||||||
uri_decoded = list(decodeurl(ud.url))
|
uri_decoded = list(decodeurl(ud.url))
|
||||||
uri_find_decoded = list(decodeurl(uri_find))
|
uri_find_decoded = list(decodeurl(uri_find))
|
||||||
uri_replace_decoded = list(decodeurl(uri_replace))
|
uri_replace_decoded = list(decodeurl(uri_replace))
|
||||||
|
logger.debug(2, "For url %s comparing %s to %s" % (uri_decoded, uri_find_decoded, uri_replace_decoded))
|
||||||
result_decoded = ['', '', '', '', '', {}]
|
result_decoded = ['', '', '', '', '', {}]
|
||||||
for i in uri_find_decoded:
|
for i in uri_find_decoded:
|
||||||
loc = uri_find_decoded.index(i)
|
loc = uri_find_decoded.index(i)
|
||||||
@@ -209,12 +210,18 @@ def uri_replace(ud, uri_find, uri_replace, d):
|
|||||||
result_decoded[loc] = re.sub(i, uri_replace_decoded[loc], uri_decoded[loc])
|
result_decoded[loc] = re.sub(i, uri_replace_decoded[loc], uri_decoded[loc])
|
||||||
if uri_find_decoded.index(i) == 2:
|
if uri_find_decoded.index(i) == 2:
|
||||||
if ud.mirrortarball:
|
if ud.mirrortarball:
|
||||||
result_decoded[loc] = os.path.join(os.path.dirname(result_decoded[loc]), os.path.basename(ud.mirrortarball))
|
if result_decoded[loc].endswith("/"):
|
||||||
|
result_decoded[loc] = os.path.dirname(result_decoded[loc])
|
||||||
|
result_decoded[loc] = os.path.join(result_decoded[loc], os.path.basename(ud.mirrortarball))
|
||||||
elif ud.localpath:
|
elif ud.localpath:
|
||||||
result_decoded[loc] = os.path.join(os.path.dirname(result_decoded[loc]), os.path.basename(ud.localpath))
|
if result_decoded[loc].endswith("/"):
|
||||||
|
result_decoded[loc] = os.path.dirname(result_decoded[loc])
|
||||||
|
result_decoded[loc] = os.path.join(result_decoded[loc], os.path.basename(ud.localpath))
|
||||||
else:
|
else:
|
||||||
return ud.url
|
return ud.url
|
||||||
return encodeurl(result_decoded)
|
result = encodeurl(result_decoded)
|
||||||
|
logger.debug(2, "For url %s returning %s" % (ud.url, result))
|
||||||
|
return result
|
||||||
|
|
||||||
methods = []
|
methods = []
|
||||||
urldata_cache = {}
|
urldata_cache = {}
|
||||||
@@ -385,7 +392,8 @@ def runfetchcmd(cmd, d, quiet = False, cleanup = []):
|
|||||||
exportvars = ['PATH', 'GIT_PROXY_COMMAND', 'GIT_PROXY_HOST',
|
exportvars = ['PATH', 'GIT_PROXY_COMMAND', 'GIT_PROXY_HOST',
|
||||||
'GIT_PROXY_PORT', 'GIT_CONFIG', 'http_proxy', 'ftp_proxy',
|
'GIT_PROXY_PORT', 'GIT_CONFIG', 'http_proxy', 'ftp_proxy',
|
||||||
'https_proxy', 'no_proxy', 'ALL_PROXY', 'all_proxy',
|
'https_proxy', 'no_proxy', 'ALL_PROXY', 'all_proxy',
|
||||||
'SSH_AUTH_SOCK', 'SSH_AGENT_PID', 'HOME']
|
'SSH_AUTH_SOCK', 'SSH_AGENT_PID', 'HOME',
|
||||||
|
'GIT_PROXY_IGNORE', 'SOCKS5_USER', 'SOCKS5_PASSWD']
|
||||||
|
|
||||||
for var in exportvars:
|
for var in exportvars:
|
||||||
val = bb.data.getVar(var, d, True)
|
val = bb.data.getVar(var, d, True)
|
||||||
@@ -956,7 +964,7 @@ class Fetch(object):
|
|||||||
raise
|
raise
|
||||||
|
|
||||||
except BBFetchException as e:
|
except BBFetchException as e:
|
||||||
logger.debug(1, str(e))
|
logger.warn(str(e))
|
||||||
# Remove any incomplete fetch
|
# Remove any incomplete fetch
|
||||||
if os.path.isfile(ud.localpath):
|
if os.path.isfile(ud.localpath):
|
||||||
bb.utils.remove(ud.localpath)
|
bb.utils.remove(ud.localpath)
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ class Git(FetchMethod):
|
|||||||
else:
|
else:
|
||||||
ud.proto = "git"
|
ud.proto = "git"
|
||||||
|
|
||||||
if not ud.proto in ('git', 'file', 'ssh', 'http', 'https'):
|
if not ud.proto in ('git', 'file', 'ssh', 'http', 'https', 'rsync'):
|
||||||
raise bb.fetch2.ParameterError("Invalid protocol type", ud.url)
|
raise bb.fetch2.ParameterError("Invalid protocol type", ud.url)
|
||||||
|
|
||||||
ud.nocheckout = ud.parm.get("nocheckout","0") == "1"
|
ud.nocheckout = ud.parm.get("nocheckout","0") == "1"
|
||||||
@@ -168,10 +168,11 @@ class Git(FetchMethod):
|
|||||||
os.chdir(ud.clonedir)
|
os.chdir(ud.clonedir)
|
||||||
runfetchcmd("tar -xzf %s" % (ud.fullmirror), d)
|
runfetchcmd("tar -xzf %s" % (ud.fullmirror), d)
|
||||||
|
|
||||||
|
repourl = "%s://%s%s%s" % (ud.proto, username, ud.host, ud.path)
|
||||||
|
|
||||||
# If the repo still doesn't exist, fallback to cloning it
|
# If the repo still doesn't exist, fallback to cloning it
|
||||||
if not os.path.exists(ud.clonedir):
|
if not os.path.exists(ud.clonedir):
|
||||||
clone_cmd = "%s clone --bare --mirror %s://%s%s%s %s" % \
|
clone_cmd = "%s clone --bare --mirror %s %s" % (ud.basecmd, repourl, ud.clonedir)
|
||||||
(ud.basecmd, ud.proto, username, ud.host, ud.path, ud.clonedir)
|
|
||||||
bb.fetch2.check_network_access(d, clone_cmd)
|
bb.fetch2.check_network_access(d, clone_cmd)
|
||||||
runfetchcmd(clone_cmd, d)
|
runfetchcmd(clone_cmd, d)
|
||||||
|
|
||||||
@@ -187,9 +188,9 @@ class Git(FetchMethod):
|
|||||||
runfetchcmd("%s remote rm origin" % ud.basecmd, d)
|
runfetchcmd("%s remote rm origin" % ud.basecmd, d)
|
||||||
except bb.fetch2.FetchError:
|
except bb.fetch2.FetchError:
|
||||||
logger.debug(1, "No Origin")
|
logger.debug(1, "No Origin")
|
||||||
|
|
||||||
runfetchcmd("%s remote add --mirror origin %s://%s%s%s" % (ud.basecmd, ud.proto, username, ud.host, ud.path), d)
|
runfetchcmd("%s remote add --mirror=fetch origin %s" % (ud.basecmd, repourl), d)
|
||||||
fetch_cmd = "%s fetch --all -t" % ud.basecmd
|
fetch_cmd = "%s fetch -f --prune %s refs/*:refs/*" % (ud.basecmd, repourl)
|
||||||
bb.fetch2.check_network_access(d, fetch_cmd, ud.url)
|
bb.fetch2.check_network_access(d, fetch_cmd, ud.url)
|
||||||
runfetchcmd(fetch_cmd, d)
|
runfetchcmd(fetch_cmd, d)
|
||||||
runfetchcmd("%s prune-packed" % ud.basecmd, d)
|
runfetchcmd("%s prune-packed" % ud.basecmd, d)
|
||||||
@@ -209,14 +210,17 @@ class Git(FetchMethod):
|
|||||||
subdir = ud.parm.get("subpath", "")
|
subdir = ud.parm.get("subpath", "")
|
||||||
if subdir != "":
|
if subdir != "":
|
||||||
readpathspec = ":%s" % (subdir)
|
readpathspec = ":%s" % (subdir)
|
||||||
|
def_destsuffix = "%s/" % os.path.basename(subdir)
|
||||||
else:
|
else:
|
||||||
readpathspec = ""
|
readpathspec = ""
|
||||||
|
def_destsuffix = "git/"
|
||||||
|
|
||||||
destdir = os.path.join(destdir, "git/")
|
destsuffix = ud.parm.get("destsuffix", def_destsuffix)
|
||||||
|
destdir = os.path.join(destdir, destsuffix)
|
||||||
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 != "":
|
||||||
@@ -237,7 +241,10 @@ class Git(FetchMethod):
|
|||||||
|
|
||||||
def _contains_ref(self, tag, d):
|
def _contains_ref(self, tag, d):
|
||||||
basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
|
basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
|
||||||
output = runfetchcmd("%s log --pretty=oneline -n 1 %s -- 2> /dev/null | wc -l" % (basecmd, tag), d, quiet=True)
|
cmd = "%s log --pretty=oneline -n 1 %s -- 2> /dev/null | wc -l" % (basecmd, tag)
|
||||||
|
output = runfetchcmd(cmd, d, quiet=True)
|
||||||
|
if len(output.split()) > 1:
|
||||||
|
raise bb.fetch2.FetchError("The command '%s' gave output with more then 1 line unexpectedly, output: '%s'" % (cmd, output))
|
||||||
return output.split()[0] != "0"
|
return output.split()[0] != "0"
|
||||||
|
|
||||||
def _revision_key(self, url, ud, d, name):
|
def _revision_key(self, url, ud, d, name):
|
||||||
@@ -278,7 +285,7 @@ class Git(FetchMethod):
|
|||||||
# Check if we have the rev already
|
# Check if we have the rev already
|
||||||
|
|
||||||
if not os.path.exists(ud.clonedir):
|
if not os.path.exists(ud.clonedir):
|
||||||
logging.debug("GIT repository for %s does not exist in %s. \
|
logger.debug(1, "GIT repository for %s does not exist in %s. \
|
||||||
Downloading.", url, ud.clonedir)
|
Downloading.", url, ud.clonedir)
|
||||||
self.download(None, ud, d)
|
self.download(None, ud, d)
|
||||||
if not os.path.exists(ud.clonedir):
|
if not os.path.exists(ud.clonedir):
|
||||||
@@ -298,3 +305,11 @@ class Git(FetchMethod):
|
|||||||
buildindex = "%s" % output.split()[0]
|
buildindex = "%s" % output.split()[0]
|
||||||
logger.debug(1, "GIT repository for %s in %s is returning %s revisions in rev-list before %s", url, ud.clonedir, buildindex, rev)
|
logger.debug(1, "GIT repository for %s in %s is returning %s revisions in rev-list before %s", url, ud.clonedir, buildindex, rev)
|
||||||
return buildindex
|
return buildindex
|
||||||
|
|
||||||
|
def checkstatus(self, uri, ud, d):
|
||||||
|
fetchcmd = "%s ls-remote %s" % (ud.basecmd, uri)
|
||||||
|
try:
|
||||||
|
runfetchcmd(fetchcmd, d, quiet=True)
|
||||||
|
return True
|
||||||
|
except FetchError:
|
||||||
|
return False
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ class Hg(FetchMethod):
|
|||||||
output = runfetchcmd(self._buildhgcommand(ud, d, "info"), d)
|
output = runfetchcmd(self._buildhgcommand(ud, d, "info"), d)
|
||||||
return output.strip()
|
return output.strip()
|
||||||
|
|
||||||
def _build_revision(self, url, ud, d):
|
def _build_revision(self, url, ud, d, name):
|
||||||
return ud.revision
|
return ud.revision
|
||||||
|
|
||||||
def _revision_key(self, url, ud, d, name):
|
def _revision_key(self, url, ud, d, name):
|
||||||
|
|||||||
@@ -50,9 +50,6 @@ class Local(FetchMethod):
|
|||||||
path = url.split("://")[1]
|
path = url.split("://")[1]
|
||||||
path = path.split(";")[0]
|
path = path.split(";")[0]
|
||||||
newpath = path
|
newpath = path
|
||||||
dldirfile = os.path.join(data.getVar("DL_DIR", d, True), os.path.basename(path))
|
|
||||||
if os.path.exists(dldirfile):
|
|
||||||
return dldirfile
|
|
||||||
if path[0] != "/":
|
if path[0] != "/":
|
||||||
filespath = data.getVar('FILESPATH', d, True)
|
filespath = data.getVar('FILESPATH', d, True)
|
||||||
if filespath:
|
if filespath:
|
||||||
@@ -62,6 +59,7 @@ class Local(FetchMethod):
|
|||||||
if filesdir:
|
if filesdir:
|
||||||
newpath = os.path.join(filesdir, path)
|
newpath = os.path.join(filesdir, path)
|
||||||
if not os.path.exists(newpath) and path.find("*") == -1:
|
if not os.path.exists(newpath) and path.find("*") == -1:
|
||||||
|
dldirfile = os.path.join(data.getVar("DL_DIR", d, True), os.path.basename(path))
|
||||||
return dldirfile
|
return dldirfile
|
||||||
return newpath
|
return newpath
|
||||||
|
|
||||||
|
|||||||
@@ -69,10 +69,11 @@ class Wget(FetchMethod):
|
|||||||
|
|
||||||
fetchcmd = fetchcmd.replace("${URI}", uri.split(";")[0])
|
fetchcmd = fetchcmd.replace("${URI}", uri.split(";")[0])
|
||||||
fetchcmd = fetchcmd.replace("${FILE}", ud.basename)
|
fetchcmd = fetchcmd.replace("${FILE}", ud.basename)
|
||||||
logger.info("fetch " + uri)
|
if not checkonly:
|
||||||
logger.debug(2, "executing " + fetchcmd)
|
logger.info("fetch " + uri)
|
||||||
|
logger.debug(2, "executing " + fetchcmd)
|
||||||
bb.fetch2.check_network_access(d, fetchcmd)
|
bb.fetch2.check_network_access(d, fetchcmd)
|
||||||
runfetchcmd(fetchcmd, d)
|
runfetchcmd(fetchcmd, d, quiet=checkonly)
|
||||||
|
|
||||||
# Sanity check since wget can pretend it succeed when it didn't
|
# Sanity check since wget can pretend it succeed when it didn't
|
||||||
# Also, this used to happen if sourceforge sent us to the mirror page
|
# Also, this used to happen if sourceforge sent us to the mirror page
|
||||||
|
|||||||
@@ -75,130 +75,69 @@ class BBLogFormatter(logging.Formatter):
|
|||||||
msg += '\n' + ''.join(formatted)
|
msg += '\n' + ''.join(formatted)
|
||||||
return msg
|
return msg
|
||||||
|
|
||||||
class Loggers(dict):
|
class BBLogFilter(object):
|
||||||
def __getitem__(self, key):
|
def __init__(self, handler, level, debug_domains):
|
||||||
if key in self:
|
self.stdlevel = level
|
||||||
return dict.__getitem__(self, key)
|
self.debug_domains = debug_domains
|
||||||
else:
|
loglevel = level
|
||||||
log = logging.getLogger("BitBake.%s" % domain._fields[key])
|
for domain in debug_domains:
|
||||||
dict.__setitem__(self, key, log)
|
if debug_domains[domain] < loglevel:
|
||||||
return log
|
loglevel = debug_domains[domain]
|
||||||
|
handler.setLevel(loglevel)
|
||||||
|
handler.addFilter(self)
|
||||||
|
|
||||||
class DebugLevel(dict):
|
def filter(self, record):
|
||||||
def __getitem__(self, key):
|
if record.levelno >= self.stdlevel:
|
||||||
if key == "default":
|
return True
|
||||||
key = domain.Default
|
if record.name in self.debug_domains and record.levelno >= self.debug_domains[record.name]:
|
||||||
return get_debug_level(key)
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def _NamedTuple(name, fields):
|
|
||||||
Tuple = collections.namedtuple(name, " ".join(fields))
|
|
||||||
return Tuple(*range(len(fields)))
|
|
||||||
|
|
||||||
domain = _NamedTuple("Domain", (
|
|
||||||
"Default",
|
|
||||||
"Build",
|
|
||||||
"Cache",
|
|
||||||
"Collection",
|
|
||||||
"Data",
|
|
||||||
"Depends",
|
|
||||||
"Fetcher",
|
|
||||||
"Parsing",
|
|
||||||
"PersistData",
|
|
||||||
"Provider",
|
|
||||||
"RunQueue",
|
|
||||||
"TaskData",
|
|
||||||
"Util"))
|
|
||||||
logger = logging.getLogger("BitBake")
|
|
||||||
loggers = Loggers()
|
|
||||||
debug_level = DebugLevel()
|
|
||||||
|
|
||||||
# Message control functions
|
# Message control functions
|
||||||
#
|
#
|
||||||
|
|
||||||
def set_debug_level(level):
|
loggerDefaultDebugLevel = 0
|
||||||
for log in loggers.itervalues():
|
loggerDefaultVerbose = False
|
||||||
log.setLevel(logging.NOTSET)
|
loggerDefaultDomains = []
|
||||||
|
|
||||||
if level:
|
def init_msgconfig(verbose, debug, debug_domains = []):
|
||||||
logger.setLevel(logging.DEBUG - level + 1)
|
"""
|
||||||
|
Set default verbosity and debug levels config the logger
|
||||||
|
"""
|
||||||
|
bb.msg.loggerDefaultDebugLevel = debug
|
||||||
|
bb.msg.loggerDefaultVerbose = verbose
|
||||||
|
bb.msg.loggerDefaultDomains = debug_domains
|
||||||
|
|
||||||
|
def addDefaultlogFilter(handler):
|
||||||
|
|
||||||
|
debug = loggerDefaultDebugLevel
|
||||||
|
verbose = loggerDefaultVerbose
|
||||||
|
domains = loggerDefaultDomains
|
||||||
|
|
||||||
|
if debug:
|
||||||
|
level = BBLogFormatter.DEBUG - debug + 1
|
||||||
|
elif verbose:
|
||||||
|
level = BBLogFormatter.VERBOSE
|
||||||
else:
|
else:
|
||||||
logger.setLevel(logging.INFO)
|
level = BBLogFormatter.NOTE
|
||||||
|
|
||||||
def get_debug_level(msgdomain = domain.Default):
|
debug_domains = {}
|
||||||
if not msgdomain:
|
for (domainarg, iterator) in groupby(domains):
|
||||||
level = logger.getEffectiveLevel()
|
dlevel = len(tuple(iterator))
|
||||||
else:
|
debug_domains["BitBake.%s" % domainarg] = logging.DEBUG - dlevel + 1
|
||||||
level = loggers[msgdomain].getEffectiveLevel()
|
|
||||||
return max(0, logging.DEBUG - level + 1)
|
|
||||||
|
|
||||||
def set_verbose(level):
|
BBLogFilter(handler, level, debug_domains)
|
||||||
if level:
|
|
||||||
logger.setLevel(BBLogFormatter.VERBOSE)
|
|
||||||
else:
|
|
||||||
logger.setLevel(BBLogFormatter.INFO)
|
|
||||||
|
|
||||||
def set_debug_domains(domainargs):
|
|
||||||
for (domainarg, iterator) in groupby(domainargs):
|
|
||||||
for index, msgdomain in enumerate(domain._fields):
|
|
||||||
if msgdomain == domainarg:
|
|
||||||
level = len(tuple(iterator))
|
|
||||||
if level:
|
|
||||||
loggers[index].setLevel(logging.DEBUG - level + 1)
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
warn(None, "Logging domain %s is not valid, ignoring" % domainarg)
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Message handling functions
|
# Message handling functions
|
||||||
#
|
#
|
||||||
|
|
||||||
def debug(level, msgdomain, msg):
|
|
||||||
warnings.warn("bb.msg.debug is deprecated in favor of the python 'logging' module",
|
|
||||||
DeprecationWarning, stacklevel=2)
|
|
||||||
level = logging.DEBUG - (level - 1)
|
|
||||||
if not msgdomain:
|
|
||||||
logger.debug(level, msg)
|
|
||||||
else:
|
|
||||||
loggers[msgdomain].debug(level, msg)
|
|
||||||
|
|
||||||
def plain(msg):
|
|
||||||
warnings.warn("bb.msg.plain is deprecated in favor of the python 'logging' module",
|
|
||||||
DeprecationWarning, stacklevel=2)
|
|
||||||
logger.plain(msg)
|
|
||||||
|
|
||||||
def note(level, msgdomain, msg):
|
|
||||||
warnings.warn("bb.msg.note is deprecated in favor of the python 'logging' module",
|
|
||||||
DeprecationWarning, stacklevel=2)
|
|
||||||
if level > 1:
|
|
||||||
if msgdomain:
|
|
||||||
logger.verbose(msg)
|
|
||||||
else:
|
|
||||||
loggers[msgdomain].verbose(msg)
|
|
||||||
else:
|
|
||||||
if msgdomain:
|
|
||||||
logger.info(msg)
|
|
||||||
else:
|
|
||||||
loggers[msgdomain].info(msg)
|
|
||||||
|
|
||||||
def warn(msgdomain, msg):
|
|
||||||
warnings.warn("bb.msg.warn is deprecated in favor of the python 'logging' module",
|
|
||||||
DeprecationWarning, stacklevel=2)
|
|
||||||
if not msgdomain:
|
|
||||||
logger.warn(msg)
|
|
||||||
else:
|
|
||||||
loggers[msgdomain].warn(msg)
|
|
||||||
|
|
||||||
def error(msgdomain, msg):
|
|
||||||
warnings.warn("bb.msg.error is deprecated in favor of the python 'logging' module",
|
|
||||||
DeprecationWarning, stacklevel=2)
|
|
||||||
if not msgdomain:
|
|
||||||
logger.error(msg)
|
|
||||||
else:
|
|
||||||
loggers[msgdomain].error(msg)
|
|
||||||
|
|
||||||
def fatal(msgdomain, msg):
|
def fatal(msgdomain, msg):
|
||||||
if not msgdomain:
|
if msgdomain:
|
||||||
logger.critical(msg)
|
logger = logging.getLogger("BitBake.%s" % msgdomain)
|
||||||
else:
|
else:
|
||||||
loggers[msgdomain].critical(msg)
|
logger = logging.getLogger("BitBake")
|
||||||
|
logger.critical(msg)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ def handle(fn, d, include):
|
|||||||
|
|
||||||
# DONE WITH PARSING... time to evaluate
|
# DONE WITH PARSING... time to evaluate
|
||||||
if ext != ".bbclass":
|
if ext != ".bbclass":
|
||||||
data.setVar('FILE', fn, d)
|
data.setVar('FILE', abs_fn, d)
|
||||||
|
|
||||||
statements.eval(d)
|
statements.eval(d)
|
||||||
|
|
||||||
@@ -194,21 +194,21 @@ def feeder(lineno, s, fn, root, statements):
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
# Skip empty lines
|
if s and s[0] == '#':
|
||||||
if s == '':
|
|
||||||
return
|
|
||||||
|
|
||||||
if 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))
|
||||||
|
|
||||||
if s[-1] == '\\':
|
if s and s[-1] == '\\':
|
||||||
__residue__.append(s[:-1])
|
__residue__.append(s[:-1])
|
||||||
return
|
return
|
||||||
|
|
||||||
s = "".join(__residue__) + s
|
s = "".join(__residue__) + s
|
||||||
__residue__ = []
|
__residue__ = []
|
||||||
|
|
||||||
|
# Skip empty lines
|
||||||
|
if s == '':
|
||||||
|
return
|
||||||
|
|
||||||
# Skip comments
|
# Skip comments
|
||||||
if s[0] == '#':
|
if s[0] == '#':
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ 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
|
||||||
bb.data.setVar('FILE', fn, data)
|
bb.data.setVar('FILE', abs_fn, data)
|
||||||
statements.eval(data)
|
statements.eval(data)
|
||||||
if oldfile:
|
if oldfile:
|
||||||
bb.data.setVar('FILE', oldfile, data)
|
bb.data.setVar('FILE', oldfile, data)
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ def filterProvidersRunTime(providers, item, cfgData, dataCache):
|
|||||||
provides = dataCache.pn_provides[pn]
|
provides = dataCache.pn_provides[pn]
|
||||||
for provide in provides:
|
for provide in provides:
|
||||||
prefervar = bb.data.getVar('PREFERRED_PROVIDER_%s' % provide, cfgData, 1)
|
prefervar = bb.data.getVar('PREFERRED_PROVIDER_%s' % provide, cfgData, 1)
|
||||||
logger.verbose("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)
|
||||||
logger.verbose("selecting %s to satisfy runtime %s due to %s", prefervar, item, var)
|
logger.verbose("selecting %s to satisfy runtime %s due to %s", prefervar, item, var)
|
||||||
|
|||||||
@@ -362,7 +362,7 @@ class RunQueueData:
|
|||||||
message = "\n"
|
message = "\n"
|
||||||
for msg in msgs:
|
for msg in msgs:
|
||||||
message = message + msg
|
message = message + msg
|
||||||
bb.msg.fatal(bb.msg.domain.RunQueue, message)
|
bb.msg.fatal("RunQueue", message)
|
||||||
|
|
||||||
return weight
|
return weight
|
||||||
|
|
||||||
@@ -470,7 +470,7 @@ class RunQueueData:
|
|||||||
dep = taskData.fn_index[depdata]
|
dep = taskData.fn_index[depdata]
|
||||||
taskid = taskData.gettask_id(dep, idependtask, False)
|
taskid = taskData.gettask_id(dep, idependtask, False)
|
||||||
if taskid is None:
|
if taskid is None:
|
||||||
bb.msg.fatal(bb.msg.domain.RunQueue, "Task %s in %s depends upon nonexistant task %s in %s" % (taskData.tasks_name[task], fn, idependtask, dep))
|
bb.msg.fatal("RunQueue", "Task %s in %s depends upon nonexistant task %s in %s" % (taskData.tasks_name[task], fn, idependtask, dep))
|
||||||
depends.append(taskid)
|
depends.append(taskid)
|
||||||
if depdata != fnid:
|
if depdata != fnid:
|
||||||
tdepends_fnid[fnid].add(taskid)
|
tdepends_fnid[fnid].add(taskid)
|
||||||
@@ -587,7 +587,7 @@ class RunQueueData:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if target[1] not in taskData.tasks_lookup[fnid]:
|
if target[1] not in taskData.tasks_lookup[fnid]:
|
||||||
bb.msg.fatal(bb.msg.domain.RunQueue, "Task %s does not exist for target %s" % (target[1], target[0]))
|
bb.msg.fatal("RunQueue", "Task %s does not exist for target %s" % (target[1], target[0]))
|
||||||
|
|
||||||
listid = taskData.tasks_lookup[fnid][target[1]]
|
listid = taskData.tasks_lookup[fnid][target[1]]
|
||||||
|
|
||||||
@@ -619,9 +619,9 @@ class RunQueueData:
|
|||||||
# Check to make sure we still have tasks to run
|
# Check to make sure we still have tasks to run
|
||||||
if len(self.runq_fnid) == 0:
|
if len(self.runq_fnid) == 0:
|
||||||
if not taskData.abort:
|
if not taskData.abort:
|
||||||
bb.msg.fatal(bb.msg.domain.RunQueue, "All buildable tasks have been run but the build is incomplete (--continue mode). Errors for the tasks that failed will have been printed above.")
|
bb.msg.fatal("RunQueue", "All buildable tasks have been run but the build is incomplete (--continue mode). Errors for the tasks that failed will have been printed above.")
|
||||||
else:
|
else:
|
||||||
bb.msg.fatal(bb.msg.domain.RunQueue, "No active tasks and not in --continue mode?! Please report this bug.")
|
bb.msg.fatal("RunQueue", "No active tasks and not in --continue mode?! Please report this bug.")
|
||||||
|
|
||||||
logger.verbose("Pruned %s inactive tasks, %s left", delcount, len(self.runq_fnid))
|
logger.verbose("Pruned %s inactive tasks, %s left", delcount, len(self.runq_fnid))
|
||||||
|
|
||||||
@@ -632,7 +632,7 @@ class RunQueueData:
|
|||||||
origdeps = self.runq_depends[listid]
|
origdeps = self.runq_depends[listid]
|
||||||
for origdep in origdeps:
|
for origdep in origdeps:
|
||||||
if maps[origdep] == -1:
|
if maps[origdep] == -1:
|
||||||
bb.msg.fatal(bb.msg.domain.RunQueue, "Invalid mapping - Should never happen!")
|
bb.msg.fatal("RunQueue", "Invalid mapping - Should never happen!")
|
||||||
newdeps.append(maps[origdep])
|
newdeps.append(maps[origdep])
|
||||||
self.runq_depends[listid] = set(newdeps)
|
self.runq_depends[listid] = set(newdeps)
|
||||||
|
|
||||||
@@ -653,7 +653,7 @@ class RunQueueData:
|
|||||||
for dep in revdeps:
|
for dep in revdeps:
|
||||||
if dep in self.runq_depends[listid]:
|
if dep in self.runq_depends[listid]:
|
||||||
#self.dump_data(taskData)
|
#self.dump_data(taskData)
|
||||||
bb.msg.fatal(bb.msg.domain.RunQueue, "Task %s (%s) has circular dependency on %s (%s)" % (taskData.fn_index[self.runq_fnid[dep]], self.runq_task[dep], taskData.fn_index[self.runq_fnid[listid]], self.runq_task[listid]))
|
bb.msg.fatal("RunQueue", "Task %s (%s) has circular dependency on %s (%s)" % (taskData.fn_index[self.runq_fnid[dep]], self.runq_task[dep], taskData.fn_index[self.runq_fnid[listid]], self.runq_task[listid]))
|
||||||
|
|
||||||
logger.verbose("Compute totals (have %s endpoint(s))", len(endpoints))
|
logger.verbose("Compute totals (have %s endpoint(s))", len(endpoints))
|
||||||
|
|
||||||
@@ -861,7 +861,7 @@ class RunQueue:
|
|||||||
#print "Not current: %s" % notcurrent
|
#print "Not current: %s" % notcurrent
|
||||||
|
|
||||||
if len(unchecked) > 0:
|
if len(unchecked) > 0:
|
||||||
bb.msg.fatal(bb.msg.domain.RunQueue, "check_stamps fatal internal error")
|
bb.msg.fatal("RunQueue", "check_stamps fatal internal error")
|
||||||
return current
|
return current
|
||||||
|
|
||||||
def check_stamp_task(self, task, taskname = None):
|
def check_stamp_task(self, task, taskname = None):
|
||||||
@@ -1072,6 +1072,7 @@ class RunQueueExecute:
|
|||||||
# a fork() or exec*() activates PSEUDO...
|
# a fork() or exec*() activates PSEUDO...
|
||||||
|
|
||||||
envbackup = {}
|
envbackup = {}
|
||||||
|
fakeenv = {}
|
||||||
umask = None
|
umask = None
|
||||||
|
|
||||||
taskdep = self.rqdata.dataCache.task_deps[fn]
|
taskdep = self.rqdata.dataCache.task_deps[fn]
|
||||||
@@ -1087,6 +1088,7 @@ class RunQueueExecute:
|
|||||||
for key, value in (var.split('=') for var in envvars):
|
for key, value in (var.split('=') for var in envvars):
|
||||||
envbackup[key] = os.environ.get(key)
|
envbackup[key] = os.environ.get(key)
|
||||||
os.environ[key] = value
|
os.environ[key] = value
|
||||||
|
fakeenv[key] = value
|
||||||
|
|
||||||
fakedirs = (self.rqdata.dataCache.fakerootdirs[fn] or "").split()
|
fakedirs = (self.rqdata.dataCache.fakerootdirs[fn] or "").split()
|
||||||
for p in fakedirs:
|
for p in fakedirs:
|
||||||
@@ -1103,7 +1105,7 @@ class RunQueueExecute:
|
|||||||
pipeout = os.fdopen(pipeout, 'wb', 0)
|
pipeout = os.fdopen(pipeout, 'wb', 0)
|
||||||
pid = os.fork()
|
pid = os.fork()
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
bb.msg.fatal(bb.msg.domain.RunQueue, "fork failed: %d (%s)" % (e.errno, e.strerror))
|
bb.msg.fatal("RunQueue", "fork failed: %d (%s)" % (e.errno, e.strerror))
|
||||||
|
|
||||||
if pid == 0:
|
if pid == 0:
|
||||||
pipein.close()
|
pipein.close()
|
||||||
@@ -1136,7 +1138,15 @@ class RunQueueExecute:
|
|||||||
for h in self.rqdata.hash_deps:
|
for h in self.rqdata.hash_deps:
|
||||||
the_data.setVar("BBHASHDEPS_%s" % h, self.rqdata.hash_deps[h])
|
the_data.setVar("BBHASHDEPS_%s" % h, self.rqdata.hash_deps[h])
|
||||||
|
|
||||||
os.environ.update(bb.data.exported_vars(the_data))
|
# exported_vars() returns a generator which *cannot* be passed to os.environ.update()
|
||||||
|
# successfully. We also need to unset anything from the environment which shouldn't be there
|
||||||
|
exports = bb.data.exported_vars(the_data)
|
||||||
|
bb.utils.empty_environment()
|
||||||
|
for e, v in exports:
|
||||||
|
os.environ[e] = v
|
||||||
|
for e in fakeenv:
|
||||||
|
os.environ[e] = fakeenv[e]
|
||||||
|
the_data.setVar(e, fakeenv[e])
|
||||||
|
|
||||||
if quieterrors:
|
if quieterrors:
|
||||||
the_data.setVarFlag(taskname, "quieterrors", "1")
|
the_data.setVarFlag(taskname, "quieterrors", "1")
|
||||||
@@ -1193,8 +1203,14 @@ class RunQueueExecuteTasks(RunQueueExecute):
|
|||||||
if task in self.rq.scenequeue_covered:
|
if task in self.rq.scenequeue_covered:
|
||||||
continue
|
continue
|
||||||
if len(self.rqdata.runq_revdeps[task]) > 0 and self.rqdata.runq_revdeps[task].issubset(self.rq.scenequeue_covered):
|
if len(self.rqdata.runq_revdeps[task]) > 0 and self.rqdata.runq_revdeps[task].issubset(self.rq.scenequeue_covered):
|
||||||
self.rq.scenequeue_covered.add(task)
|
ok = True
|
||||||
found = True
|
for revdep in self.rqdata.runq_revdeps[task]:
|
||||||
|
if self.rqdata.runq_fnid[task] != self.rqdata.runq_fnid[revdep]:
|
||||||
|
ok = False
|
||||||
|
break
|
||||||
|
if ok:
|
||||||
|
found = True
|
||||||
|
self.rq.scenequeue_covered.add(task)
|
||||||
|
|
||||||
# Detect when the real task needs to be run anyway by looking to see
|
# 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
|
# if any of its dependencies within the same package are scheduled
|
||||||
@@ -1217,9 +1233,6 @@ class RunQueueExecuteTasks(RunQueueExecute):
|
|||||||
|
|
||||||
logger.debug(1, 'Full skip list %s', self.rq.scenequeue_covered)
|
logger.debug(1, 'Full skip list %s', self.rq.scenequeue_covered)
|
||||||
|
|
||||||
for task in self.rq.scenequeue_covered:
|
|
||||||
self.task_skip(task)
|
|
||||||
|
|
||||||
event.fire(bb.event.StampUpdate(self.rqdata.target_pairs, self.rqdata.dataCache.stamp), self.cfgData)
|
event.fire(bb.event.StampUpdate(self.rqdata.target_pairs, self.rqdata.dataCache.stamp), self.cfgData)
|
||||||
|
|
||||||
schedulers = self.get_schedulers()
|
schedulers = self.get_schedulers()
|
||||||
@@ -1313,8 +1326,14 @@ class RunQueueExecuteTasks(RunQueueExecute):
|
|||||||
task = self.sched.next()
|
task = self.sched.next()
|
||||||
if task is not None:
|
if task is not None:
|
||||||
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]
|
taskname = self.rqdata.runq_task[task]
|
||||||
|
|
||||||
|
if task in self.rq.scenequeue_covered:
|
||||||
|
logger.debug(2, "Setscene covered task %s (%s)", task,
|
||||||
|
self.rqdata.get_user_idstring(task))
|
||||||
|
self.task_skip(task)
|
||||||
|
return True
|
||||||
|
|
||||||
if self.rq.check_stamp_task(task, taskname):
|
if self.rq.check_stamp_task(task, taskname):
|
||||||
logger.debug(2, "Stamp current task %s (%s)", task,
|
logger.debug(2, "Stamp current task %s (%s)", task,
|
||||||
self.rqdata.get_user_idstring(task))
|
self.rqdata.get_user_idstring(task))
|
||||||
@@ -1436,7 +1455,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
|
|||||||
deps.add(self.rqdata.runq_setscene.index(dep))
|
deps.add(self.rqdata.runq_setscene.index(dep))
|
||||||
sq_revdeps_squash.append(deps)
|
sq_revdeps_squash.append(deps)
|
||||||
elif len(sq_revdeps_new[task]) != 0:
|
elif len(sq_revdeps_new[task]) != 0:
|
||||||
bb.msg.fatal(bb.msg.domain.RunQueue, "Something went badly wrong during scenequeue generation, aborting. Please report this problem.")
|
bb.msg.fatal("RunQueue", "Something went badly wrong during scenequeue generation, aborting. Please report this problem.")
|
||||||
|
|
||||||
#for task in xrange(len(sq_revdeps_squash)):
|
#for task in xrange(len(sq_revdeps_squash)):
|
||||||
# print "Task %s: %s.%s is %s " % (task, self.taskData.fn_index[self.runq_fnid[self.runq_setscene[task]]], self.runq_task[self.runq_setscene[task]] + "_setscene", sq_revdeps_squash[task])
|
# print "Task %s: %s.%s is %s " % (task, self.taskData.fn_index[self.runq_fnid[self.runq_setscene[task]]], self.runq_task[self.runq_setscene[task]] + "_setscene", sq_revdeps_squash[task])
|
||||||
@@ -1496,8 +1515,9 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
|
|||||||
|
|
||||||
for task in xrange(len(self.sq_revdeps)):
|
for task in xrange(len(self.sq_revdeps)):
|
||||||
if task not in valid_new and task not in noexec:
|
if task not in valid_new and task not in noexec:
|
||||||
|
realtask = self.rqdata.runq_setscene[task]
|
||||||
logger.debug(2, 'No package found, so skipping setscene task %s',
|
logger.debug(2, 'No package found, so skipping setscene task %s',
|
||||||
self.rqdata.get_user_idstring(task))
|
self.rqdata.get_user_idstring(realtask))
|
||||||
self.task_failoutright(task)
|
self.task_failoutright(task)
|
||||||
|
|
||||||
logger.info('Executing SetScene Tasks')
|
logger.info('Executing SetScene Tasks')
|
||||||
@@ -1570,7 +1590,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
|
|||||||
taskname = self.rqdata.runq_task[realtask] + "_setscene"
|
taskname = self.rqdata.runq_task[realtask] + "_setscene"
|
||||||
if self.rq.check_stamp_task(realtask, self.rqdata.runq_task[realtask]):
|
if self.rq.check_stamp_task(realtask, self.rqdata.runq_task[realtask]):
|
||||||
logger.debug(2, 'Stamp for underlying task %s(%s) is current, so skipping setscene variant',
|
logger.debug(2, 'Stamp for underlying task %s(%s) is current, so skipping setscene variant',
|
||||||
task, self.rqdata.get_user_idstring(task))
|
task, self.rqdata.get_user_idstring(realtask))
|
||||||
self.task_failoutright(task)
|
self.task_failoutright(task)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@@ -1612,7 +1632,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
|
|||||||
for task in oldcovered:
|
for task in oldcovered:
|
||||||
self.rq.scenequeue_covered.add(self.rqdata.runq_setscene[task])
|
self.rq.scenequeue_covered.add(self.rqdata.runq_setscene[task])
|
||||||
|
|
||||||
logger.debug(1, 'We can skip tasks %s', self.rq.scenequeue_covered)
|
logger.debug(1, 'We can skip tasks %s', sorted(self.rq.scenequeue_covered))
|
||||||
|
|
||||||
self.rq.state = runQueueRunInit
|
self.rq.state = runQueueRunInit
|
||||||
return True
|
return True
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class SignatureGenerator(object):
|
|||||||
return
|
return
|
||||||
|
|
||||||
def get_taskhash(self, fn, task, deps, dataCache):
|
def get_taskhash(self, fn, task, deps, dataCache):
|
||||||
return 0
|
return "0"
|
||||||
|
|
||||||
def set_taskdata(self, hashes, deps):
|
def set_taskdata(self, hashes, deps):
|
||||||
return
|
return
|
||||||
@@ -72,11 +72,10 @@ class SignatureGeneratorBasic(SignatureGenerator):
|
|||||||
|
|
||||||
def _build_data(self, fn, d):
|
def _build_data(self, fn, d):
|
||||||
|
|
||||||
tasklist, gendeps = bb.data.generate_dependencies(d)
|
tasklist, gendeps, lookupcache = bb.data.generate_dependencies(d)
|
||||||
|
|
||||||
taskdeps = {}
|
taskdeps = {}
|
||||||
basehash = {}
|
basehash = {}
|
||||||
lookupcache = {}
|
|
||||||
|
|
||||||
for task in tasklist:
|
for task in tasklist:
|
||||||
data = d.getVar(task, False)
|
data = d.getVar(task, False)
|
||||||
@@ -101,6 +100,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
|
|||||||
alldeps = seen - self.basewhitelist
|
alldeps = seen - self.basewhitelist
|
||||||
|
|
||||||
for dep in sorted(alldeps):
|
for dep in sorted(alldeps):
|
||||||
|
data = data + dep
|
||||||
if dep in lookupcache:
|
if dep in lookupcache:
|
||||||
var = lookupcache[dep]
|
var = lookupcache[dep]
|
||||||
else:
|
else:
|
||||||
@@ -135,7 +135,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
|
|||||||
k = fn + "." + task
|
k = fn + "." + task
|
||||||
data = dataCache.basetaskhash[k]
|
data = dataCache.basetaskhash[k]
|
||||||
self.runtaskdeps[k] = []
|
self.runtaskdeps[k] = []
|
||||||
for dep in sorted(deps):
|
for dep in sorted(deps, key=clean_basepath):
|
||||||
# We only manipulate the dependencies for packages not in the whitelist
|
# We only manipulate the dependencies for packages not in the whitelist
|
||||||
if self.twl and not self.twl.search(dataCache.pkg_fn[fn]):
|
if self.twl and not self.twl.search(dataCache.pkg_fn[fn]):
|
||||||
# then process the actual dependencies
|
# then process the actual dependencies
|
||||||
@@ -159,7 +159,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
|
|||||||
k = fn + "." + task
|
k = fn + "." + task
|
||||||
if runtime == "customfile":
|
if runtime == "customfile":
|
||||||
sigfile = stampbase
|
sigfile = stampbase
|
||||||
elif runtime:
|
elif runtime and k in self.taskhash:
|
||||||
sigfile = stampbase + "." + task + ".sigdata" + "." + self.taskhash[k]
|
sigfile = stampbase + "." + task + ".sigdata" + "." + self.taskhash[k]
|
||||||
else:
|
else:
|
||||||
sigfile = stampbase + "." + task + ".sigbasedata" + "." + self.basehash[k]
|
sigfile = stampbase + "." + task + ".sigbasedata" + "." + self.basehash[k]
|
||||||
@@ -180,7 +180,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
|
|||||||
data['gendeps'][dep] = self.gendeps[fn][dep]
|
data['gendeps'][dep] = self.gendeps[fn][dep]
|
||||||
data['varvals'][dep] = self.lookupcache[fn][dep]
|
data['varvals'][dep] = self.lookupcache[fn][dep]
|
||||||
|
|
||||||
if runtime:
|
if runtime and k in self.taskhash:
|
||||||
data['runtaskdeps'] = self.runtaskdeps[k]
|
data['runtaskdeps'] = self.runtaskdeps[k]
|
||||||
data['runtaskhashes'] = {}
|
data['runtaskhashes'] = {}
|
||||||
for dep in data['runtaskdeps']:
|
for dep in data['runtaskdeps']:
|
||||||
@@ -217,19 +217,32 @@ def dump_this_task(outfile, d):
|
|||||||
task = "do_" + d.getVar("BB_CURRENTTASK", True)
|
task = "do_" + d.getVar("BB_CURRENTTASK", True)
|
||||||
bb.parse.siggen.dump_sigtask(fn, task, outfile, "customfile")
|
bb.parse.siggen.dump_sigtask(fn, task, outfile, "customfile")
|
||||||
|
|
||||||
|
def clean_basepath(a):
|
||||||
|
if a.startswith("virtual:"):
|
||||||
|
b = a.rsplit(":", 1)[0] + a.rsplit("/", 1)[1]
|
||||||
|
else:
|
||||||
|
b = a.rsplit("/", 1)[1]
|
||||||
|
return b
|
||||||
|
|
||||||
|
def clean_basepaths(a):
|
||||||
|
b = {}
|
||||||
|
for x in a:
|
||||||
|
b[clean_basepath(x)] = a[x]
|
||||||
|
return b
|
||||||
|
|
||||||
def compare_sigfiles(a, b):
|
def compare_sigfiles(a, b):
|
||||||
p1 = pickle.Unpickler(file(a, "rb"))
|
p1 = pickle.Unpickler(file(a, "rb"))
|
||||||
a_data = p1.load()
|
a_data = p1.load()
|
||||||
p2 = pickle.Unpickler(file(b, "rb"))
|
p2 = pickle.Unpickler(file(b, "rb"))
|
||||||
b_data = p2.load()
|
b_data = p2.load()
|
||||||
|
|
||||||
def dict_diff(a, b):
|
def dict_diff(a, b, whitelist=set()):
|
||||||
sa = set(a.keys())
|
sa = set(a.keys())
|
||||||
sb = set(b.keys())
|
sb = set(b.keys())
|
||||||
common = sa & sb
|
common = sa & sb
|
||||||
changed = set()
|
changed = set()
|
||||||
for i in common:
|
for i in common:
|
||||||
if a[i] != b[i]:
|
if a[i] != b[i] and i not in whitelist:
|
||||||
changed.add(i)
|
changed.add(i)
|
||||||
added = sa - sb
|
added = sa - sb
|
||||||
removed = sb - sa
|
removed = sb - sa
|
||||||
@@ -237,20 +250,23 @@ def compare_sigfiles(a, b):
|
|||||||
|
|
||||||
if 'basewhitelist' in a_data and a_data['basewhitelist'] != b_data['basewhitelist']:
|
if 'basewhitelist' in a_data and a_data['basewhitelist'] != b_data['basewhitelist']:
|
||||||
print "basewhitelist changed from %s to %s" % (a_data['basewhitelist'], b_data['basewhitelist'])
|
print "basewhitelist changed from %s to %s" % (a_data['basewhitelist'], b_data['basewhitelist'])
|
||||||
|
print "changed items: %s" % a_data['basewhitelist'].symmetric_difference(b_data['basewhitelist'])
|
||||||
|
|
||||||
if 'taskwhitelist' in a_data and a_data['taskwhitelist'] != b_data['taskwhitelist']:
|
if 'taskwhitelist' in a_data and a_data['taskwhitelist'] != b_data['taskwhitelist']:
|
||||||
print "taskwhitelist changed from %s to %s" % (a_data['taskwhitelist'], b_data['taskwhitelist'])
|
print "taskwhitelist changed from %s to %s" % (a_data['taskwhitelist'], b_data['taskwhitelist'])
|
||||||
|
print "changed items: %s" % a_data['taskwhitelist'].symmetric_difference(b_data['taskwhitelist'])
|
||||||
|
|
||||||
if a_data['taskdeps'] != b_data['taskdeps']:
|
if a_data['taskdeps'] != b_data['taskdeps']:
|
||||||
print "Task dependencies changed from %s to %s" % (sorted(a_data['taskdeps']), sorted(b_data['taskdeps']))
|
print "Task dependencies changed from:\n%s\nto:\n%s" % (sorted(a_data['taskdeps']), sorted(b_data['taskdeps']))
|
||||||
|
|
||||||
if a_data['basehash'] != b_data['basehash']:
|
if a_data['basehash'] != b_data['basehash']:
|
||||||
print "basehash changed from %s to %s" % (a_data['basehash'], b_data['basehash'])
|
print "basehash changed from %s to %s" % (a_data['basehash'], b_data['basehash'])
|
||||||
|
|
||||||
changed, added, removed = dict_diff(a_data['gendeps'], b_data['gendeps'])
|
changed, added, removed = dict_diff(a_data['gendeps'], b_data['gendeps'], a_data['basewhitelist'] & b_data['basewhitelist'])
|
||||||
if changed:
|
if changed:
|
||||||
for dep in changed:
|
for dep in changed:
|
||||||
print "List of dependencies for variable %s changed from %s to %s" % (dep, a_data['gendeps'][dep], b_data['gendeps'][dep])
|
print "List of dependencies for variable %s changed from %s to %s" % (dep, a_data['gendeps'][dep], b_data['gendeps'][dep])
|
||||||
|
print "changed items: %s" % a_data['gendeps'][dep].symmetric_difference(b_data['gendeps'][dep])
|
||||||
if added:
|
if added:
|
||||||
for dep in added:
|
for dep in added:
|
||||||
print "Dependency on variable %s was added" % (dep)
|
print "Dependency on variable %s was added" % (dep)
|
||||||
@@ -265,7 +281,9 @@ def compare_sigfiles(a, b):
|
|||||||
print "Variable %s value changed from %s to %s" % (dep, a_data['varvals'][dep], b_data['varvals'][dep])
|
print "Variable %s value changed from %s to %s" % (dep, a_data['varvals'][dep], b_data['varvals'][dep])
|
||||||
|
|
||||||
if 'runtaskhashes' in a_data and 'runtaskhashes' in b_data:
|
if 'runtaskhashes' in a_data and 'runtaskhashes' in b_data:
|
||||||
changed, added, removed = dict_diff(a_data['runtaskhashes'], b_data['runtaskhashes'])
|
a = clean_basepaths(a_data['runtaskhashes'])
|
||||||
|
b = clean_basepaths(b_data['runtaskhashes'])
|
||||||
|
changed, added, removed = dict_diff(a, b)
|
||||||
if added:
|
if added:
|
||||||
for dep in added:
|
for dep in added:
|
||||||
print "Dependency on task %s was added" % (dep)
|
print "Dependency on task %s was added" % (dep)
|
||||||
@@ -274,9 +292,10 @@ def compare_sigfiles(a, b):
|
|||||||
print "Dependency on task %s was removed" % (dep)
|
print "Dependency on task %s was removed" % (dep)
|
||||||
if changed:
|
if changed:
|
||||||
for dep in changed:
|
for dep in changed:
|
||||||
print "Hash for dependent task %s changed from %s to %s" % (dep, a_data['runtaskhashes'][dep], b_data['runtaskhashes'][dep])
|
print "Hash for dependent task %s changed from %s to %s" % (dep, a[dep], b[dep])
|
||||||
elif 'runtaskdeps' in a_data and 'runtaskdeps' in b_data and sorted(a_data['runtaskdeps']) != sorted(b_data['runtaskdeps']):
|
elif 'runtaskdeps' in a_data and 'runtaskdeps' in b_data and sorted(a_data['runtaskdeps']) != sorted(b_data['runtaskdeps']):
|
||||||
print "Tasks this task depends on changed from %s to %s" % (sorted(a_data['runtaskdeps']), sorted(b_data['runtaskdeps']))
|
print "Tasks this task depends on changed from %s to %s" % (sorted(a_data['runtaskdeps']), sorted(b_data['runtaskdeps']))
|
||||||
|
print "changed items: %s" % a_data['runtaskdeps'].symmetric_difference(b_data['runtaskdeps'])
|
||||||
|
|
||||||
def dump_sigfile(a):
|
def dump_sigfile(a):
|
||||||
p1 = pickle.Unpickler(file(a, "rb"))
|
p1 = pickle.Unpickler(file(a, "rb"))
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ class TaskData:
|
|||||||
fnid = self.getfn_id(fn)
|
fnid = self.getfn_id(fn)
|
||||||
|
|
||||||
if fnid in self.failed_fnids:
|
if fnid in self.failed_fnids:
|
||||||
bb.msg.fatal(bb.msg.domain.TaskData, "Trying to re-add a failed file? Something is broken...")
|
bb.msg.fatal("TaskData", "Trying to re-add a failed file? Something is broken...")
|
||||||
|
|
||||||
# Check if we've already seen this fn
|
# Check if we've already seen this fn
|
||||||
if fnid in self.tasks_fnid:
|
if fnid in self.tasks_fnid:
|
||||||
@@ -175,7 +175,7 @@ class TaskData:
|
|||||||
for dep in task_deps['depends'][task].split():
|
for dep in task_deps['depends'][task].split():
|
||||||
if dep:
|
if dep:
|
||||||
if ":" not in dep:
|
if ":" not in dep:
|
||||||
bb.msg.fatal(bb.msg.domain.TaskData, "Error, dependency %s does not contain ':' character\n. Task 'depends' should be specified in the form 'packagename:task'" % (dep, fn))
|
bb.msg.fatal("TaskData", "Error for %s, dependency %s does not contain ':' character\n. Task 'depends' should be specified in the form 'packagename:task'" % (fn, dep))
|
||||||
ids.append(((self.getbuild_id(dep.split(":")[0])), dep.split(":")[1]))
|
ids.append(((self.getbuild_id(dep.split(":")[0])), dep.split(":")[1]))
|
||||||
self.tasks_idepends[taskid].extend(ids)
|
self.tasks_idepends[taskid].extend(ids)
|
||||||
|
|
||||||
|
|||||||
@@ -40,12 +40,13 @@ class Configurator(gobject.GObject):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
gobject.GObject.__init__(self)
|
gobject.GObject.__init__(self)
|
||||||
self.local = None
|
|
||||||
self.bblayers = None
|
self.bblayers = None
|
||||||
self.enabled_layers = {}
|
self.enabled_layers = {}
|
||||||
self.loaded_layers = {}
|
self.loaded_layers = {}
|
||||||
self.config = {}
|
self.config = {}
|
||||||
self.orig_config = {}
|
self.orig_config = {}
|
||||||
|
self.preconf = None
|
||||||
|
self.postconf = None
|
||||||
|
|
||||||
# NOTE: cribbed from the cooker...
|
# NOTE: cribbed from the cooker...
|
||||||
def _parse(self, f, data, include=False):
|
def _parse(self, f, data, include=False):
|
||||||
@@ -55,18 +56,16 @@ class Configurator(gobject.GObject):
|
|||||||
parselog.critical("Unable to parse %s: %s" % (f, exc))
|
parselog.critical("Unable to parse %s: %s" % (f, exc))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
def _loadLocalConf(self, path):
|
def _loadConf(self, path):
|
||||||
def getString(var):
|
def getString(var):
|
||||||
return bb.data.getVar(var, data, True) or ""
|
return bb.data.getVar(var, data, True) or ""
|
||||||
|
|
||||||
self.local = path
|
|
||||||
|
|
||||||
if self.orig_config:
|
if self.orig_config:
|
||||||
del self.orig_config
|
del self.orig_config
|
||||||
self.orig_config = {}
|
self.orig_config = {}
|
||||||
|
|
||||||
data = bb.data.init()
|
data = bb.data.init()
|
||||||
data = self._parse(self.local, data)
|
data = self._parse(path, data)
|
||||||
|
|
||||||
# We only need to care about certain variables
|
# We only need to care about certain variables
|
||||||
mach = getString('MACHINE')
|
mach = getString('MACHINE')
|
||||||
@@ -76,6 +75,8 @@ class Configurator(gobject.GObject):
|
|||||||
if sdkmach and sdkmach != self.config.get('SDKMACHINE', ''):
|
if sdkmach and sdkmach != self.config.get('SDKMACHINE', ''):
|
||||||
self.config['SDKMACHINE'] = sdkmach
|
self.config['SDKMACHINE'] = sdkmach
|
||||||
distro = getString('DISTRO')
|
distro = getString('DISTRO')
|
||||||
|
if not distro:
|
||||||
|
distro = "defaultsetup"
|
||||||
if distro and distro != self.config.get('DISTRO', ''):
|
if distro and distro != self.config.get('DISTRO', ''):
|
||||||
self.config['DISTRO'] = distro
|
self.config['DISTRO'] = distro
|
||||||
bbnum = getString('BB_NUMBER_THREADS')
|
bbnum = getString('BB_NUMBER_THREADS')
|
||||||
@@ -109,10 +110,10 @@ class Configurator(gobject.GObject):
|
|||||||
|
|
||||||
self.orig_config = copy.deepcopy(self.config)
|
self.orig_config = copy.deepcopy(self.config)
|
||||||
|
|
||||||
def setLocalConfVar(self, var, val):
|
def setConfVar(self, var, val):
|
||||||
self.config[var] = val
|
self.config[var] = val
|
||||||
|
|
||||||
def getLocalConfVar(self, var):
|
def getConfVar(self, var):
|
||||||
if var in self.config:
|
if var in self.config:
|
||||||
return self.config[var]
|
return self.config[var]
|
||||||
else:
|
else:
|
||||||
@@ -135,9 +136,17 @@ class Configurator(gobject.GObject):
|
|||||||
self.emit("layers-loaded")
|
self.emit("layers-loaded")
|
||||||
|
|
||||||
def _addConfigFile(self, path):
|
def _addConfigFile(self, path):
|
||||||
|
conffiles = ["local.conf", "hob-pre.conf", "hob-post.conf"]
|
||||||
pref, sep, filename = path.rpartition("/")
|
pref, sep, filename = path.rpartition("/")
|
||||||
if filename == "local.conf" or filename == "hob.local.conf":
|
|
||||||
self._loadLocalConf(path)
|
if filename == "hob-pre.conf":
|
||||||
|
self.preconf = path
|
||||||
|
|
||||||
|
if filename == "hob-post.conf":
|
||||||
|
self.postconf = path
|
||||||
|
|
||||||
|
if filename in conffiles:
|
||||||
|
self._loadConf(path)
|
||||||
elif filename == "bblayers.conf":
|
elif filename == "bblayers.conf":
|
||||||
self._loadLayerConf(path)
|
self._loadLayerConf(path)
|
||||||
|
|
||||||
@@ -158,11 +167,14 @@ class Configurator(gobject.GObject):
|
|||||||
def addLayerConf(self, confpath):
|
def addLayerConf(self, confpath):
|
||||||
layerpath = self._splitLayer(confpath)
|
layerpath = self._splitLayer(confpath)
|
||||||
name = self._getLayerName(layerpath)
|
name = self._getLayerName(layerpath)
|
||||||
if name not in self.enabled_layers:
|
|
||||||
|
if not layerpath or not name:
|
||||||
|
return None, None
|
||||||
|
elif name not in self.enabled_layers:
|
||||||
self.addLayer(name, layerpath)
|
self.addLayer(name, layerpath)
|
||||||
return name, layerpath
|
return name, layerpath
|
||||||
else:
|
else:
|
||||||
return None, None
|
return name, None
|
||||||
|
|
||||||
def addLayer(self, name, path):
|
def addLayer(self, name, path):
|
||||||
self.enabled_layers[name] = path
|
self.enabled_layers[name] = path
|
||||||
@@ -204,26 +216,21 @@ class Configurator(gobject.GObject):
|
|||||||
|
|
||||||
return "".join(layer_entry)
|
return "".join(layer_entry)
|
||||||
|
|
||||||
def writeLocalConf(self):
|
def writeConfFile(self, conffile, contents):
|
||||||
# Dictionary containing only new or modified variables
|
"""
|
||||||
changed_values = {}
|
Make a backup copy of conffile and write a new file in its stead with
|
||||||
for var in self.config:
|
the lines in the contents list.
|
||||||
val = self.config[var]
|
"""
|
||||||
if self.orig_config.get(var, None) != val:
|
# Create a backup of the conf file
|
||||||
changed_values[var] = val
|
bkup = "%s~" % conffile
|
||||||
|
os.rename(conffile, bkup)
|
||||||
|
|
||||||
if not len(changed_values):
|
# Write the contents list object to the conf file
|
||||||
return
|
with open(conffile, "w") as new:
|
||||||
|
new.write("".join(contents))
|
||||||
|
|
||||||
# Create a backup of the local.conf
|
def updateConf(self, orig_lines, changed_values):
|
||||||
bkup = "%s~" % self.local
|
new_config_lines = []
|
||||||
os.rename(self.local, bkup)
|
|
||||||
|
|
||||||
# read the original conf into a list
|
|
||||||
with open(bkup, 'r') as config:
|
|
||||||
config_lines = config.readlines()
|
|
||||||
|
|
||||||
new_config_lines = ["\n"]
|
|
||||||
for var in changed_values:
|
for var in changed_values:
|
||||||
# Convenience function for re.subn(). If the pattern matches
|
# Convenience function for re.subn(). If the pattern matches
|
||||||
# return a string which contains an assignment using the same
|
# return a string which contains an assignment using the same
|
||||||
@@ -242,10 +249,10 @@ class Configurator(gobject.GObject):
|
|||||||
# Iterate over the local.conf lines and if they are a match
|
# Iterate over the local.conf lines and if they are a match
|
||||||
# for the pattern comment out the line and append a new line
|
# for the pattern comment out the line and append a new line
|
||||||
# with the new VAR op "value" entry
|
# with the new VAR op "value" entry
|
||||||
for line in config_lines:
|
for line in orig_lines:
|
||||||
new_line, replacements = p.subn(replace_val, line)
|
new_line, replacements = p.subn(replace_val, line)
|
||||||
if replacements:
|
if replacements:
|
||||||
config_lines[cnt] = "#%s" % line
|
orig_lines[cnt] = "#%s" % line
|
||||||
new_config_lines.append(new_line)
|
new_config_lines.append(new_line)
|
||||||
replaced = True
|
replaced = True
|
||||||
cnt = cnt + 1
|
cnt = cnt + 1
|
||||||
@@ -254,22 +261,53 @@ class Configurator(gobject.GObject):
|
|||||||
new_config_lines.append("%s = \"%s\"\n" % (var, changed_values[var]))
|
new_config_lines.append("%s = \"%s\"\n" % (var, changed_values[var]))
|
||||||
|
|
||||||
# Add the modified variables
|
# Add the modified variables
|
||||||
config_lines.extend(new_config_lines)
|
orig_lines.extend(new_config_lines)
|
||||||
|
return orig_lines
|
||||||
|
|
||||||
# Write the updated lines list object to the local.conf
|
def writeConf(self):
|
||||||
with open(self.local, "w") as n:
|
pre_vars = ["MACHINE", "SDKMACHINE", "DISTRO",
|
||||||
n.write("".join(config_lines))
|
"INCOMPATIBLE_LICENSE"]
|
||||||
|
post_vars = ["BB_NUMBER_THREADS", "PARALLEL_MAKE", "PACKAGE_CLASSES",
|
||||||
|
"IMAGE_FSTYPES", "HOB_BUILD_TOOLCHAIN",
|
||||||
|
"HOB_BUILD_TOOLCHAIN_HEADERS"]
|
||||||
|
pre_values = {}
|
||||||
|
post_values = {}
|
||||||
|
changed_values = {}
|
||||||
|
pre_lines = None
|
||||||
|
post_lines = None
|
||||||
|
|
||||||
|
for var in self.config:
|
||||||
|
val = self.config[var]
|
||||||
|
if self.orig_config.get(var, None) != val:
|
||||||
|
changed_values[var] = val
|
||||||
|
|
||||||
|
if not len(changed_values):
|
||||||
|
return
|
||||||
|
|
||||||
|
for var in changed_values:
|
||||||
|
if var in pre_vars:
|
||||||
|
pre_values[var] = changed_values[var]
|
||||||
|
elif var in post_vars:
|
||||||
|
post_values[var] = changed_values[var]
|
||||||
|
|
||||||
|
with open(self.preconf, 'r') as pre:
|
||||||
|
pre_lines = pre.readlines()
|
||||||
|
pre_lines = self.updateConf(pre_lines, pre_values)
|
||||||
|
if len(pre_lines):
|
||||||
|
self.writeConfFile(self.preconf, pre_lines)
|
||||||
|
|
||||||
|
with open(self.postconf, 'r') as post:
|
||||||
|
post_lines = post.readlines()
|
||||||
|
post_lines = self.updateConf(post_lines, post_values)
|
||||||
|
if len(post_lines):
|
||||||
|
self.writeConfFile(self.postconf, post_lines)
|
||||||
|
|
||||||
del self.orig_config
|
del self.orig_config
|
||||||
self.orig_config = copy.deepcopy(self.config)
|
self.orig_config = copy.deepcopy(self.config)
|
||||||
|
|
||||||
def insertTempBBPath(self, bbpath, bbfiles):
|
def insertTempBBPath(self, bbpath, bbfiles):
|
||||||
# Create a backup of the local.conf
|
|
||||||
bkup = "%s~" % self.local
|
|
||||||
os.rename(self.local, bkup)
|
|
||||||
|
|
||||||
# read the original conf into a list
|
# read the original conf into a list
|
||||||
with open(bkup, 'r') as config:
|
with open(self.postconf, 'r') as config:
|
||||||
config_lines = config.readlines()
|
config_lines = config.readlines()
|
||||||
|
|
||||||
if bbpath:
|
if bbpath:
|
||||||
@@ -277,9 +315,7 @@ class Configurator(gobject.GObject):
|
|||||||
if bbfiles:
|
if bbfiles:
|
||||||
config_lines.append("BBFILES := \"${BBFILES} %s\"\n" % bbfiles)
|
config_lines.append("BBFILES := \"${BBFILES} %s\"\n" % bbfiles)
|
||||||
|
|
||||||
# Write the updated lines list object to the local.conf
|
self.writeConfFile(self.postconf, config_lines)
|
||||||
with open(self.local, "w") as n:
|
|
||||||
n.write("".join(config_lines))
|
|
||||||
|
|
||||||
def writeLayerConf(self):
|
def writeLayerConf(self):
|
||||||
# If we've not added/removed new layers don't write
|
# If we've not added/removed new layers don't write
|
||||||
@@ -289,23 +325,14 @@ class Configurator(gobject.GObject):
|
|||||||
# This pattern should find the existing BBLAYERS
|
# This pattern should find the existing BBLAYERS
|
||||||
pattern = 'BBLAYERS\s=\s\".*\"'
|
pattern = 'BBLAYERS\s=\s\".*\"'
|
||||||
|
|
||||||
# Backup the users bblayers.conf
|
|
||||||
bkup = "%s~" % self.bblayers
|
|
||||||
os.rename(self.bblayers, bkup)
|
|
||||||
|
|
||||||
replacement = self._constructLayerEntry()
|
replacement = self._constructLayerEntry()
|
||||||
|
|
||||||
with open(bkup, "r") as f:
|
with open(self.bblayers, "r") as f:
|
||||||
contents = f.read()
|
contents = f.read()
|
||||||
p = re.compile(pattern, re.DOTALL)
|
p = re.compile(pattern, re.DOTALL)
|
||||||
new = p.sub(replacement, contents)
|
new = p.sub(replacement, contents)
|
||||||
|
|
||||||
with open(self.bblayers, "w") as n:
|
self.writeConfFile(self.bblayers, new)
|
||||||
n.write(new)
|
|
||||||
|
|
||||||
# At some stage we should remove the backup we've created
|
|
||||||
# though we should probably verify it first
|
|
||||||
#os.remove(bkup)
|
|
||||||
|
|
||||||
# set loaded_layers for dirtiness tracking
|
# set loaded_layers for dirtiness tracking
|
||||||
self.loaded_layers = copy.deepcopy(self.enabled_layers)
|
self.loaded_layers = copy.deepcopy(self.enabled_layers)
|
||||||
|
|||||||
@@ -19,6 +19,9 @@
|
|||||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
import gobject
|
import gobject
|
||||||
|
import logging
|
||||||
|
import tempfile
|
||||||
|
import datetime
|
||||||
|
|
||||||
progress_total = 0
|
progress_total = 0
|
||||||
|
|
||||||
@@ -49,31 +52,44 @@ class HobHandler(gobject.GObject):
|
|||||||
"data-generated" : (gobject.SIGNAL_RUN_LAST,
|
"data-generated" : (gobject.SIGNAL_RUN_LAST,
|
||||||
gobject.TYPE_NONE,
|
gobject.TYPE_NONE,
|
||||||
()),
|
()),
|
||||||
"error" : (gobject.SIGNAL_RUN_LAST,
|
"fatal-error" : (gobject.SIGNAL_RUN_LAST,
|
||||||
|
gobject.TYPE_NONE,
|
||||||
|
(gobject.TYPE_STRING,
|
||||||
|
gobject.TYPE_STRING,)),
|
||||||
|
"command-failed" : (gobject.SIGNAL_RUN_LAST,
|
||||||
gobject.TYPE_NONE,
|
gobject.TYPE_NONE,
|
||||||
(gobject.TYPE_STRING,)),
|
(gobject.TYPE_STRING,)),
|
||||||
"reload-triggered" : (gobject.SIGNAL_RUN_LAST,
|
"reload-triggered" : (gobject.SIGNAL_RUN_LAST,
|
||||||
gobject.TYPE_NONE,
|
gobject.TYPE_NONE,
|
||||||
(gobject.TYPE_STRING,
|
(gobject.TYPE_STRING,
|
||||||
gobject.TYPE_STRING)),
|
gobject.TYPE_STRING,)),
|
||||||
}
|
}
|
||||||
|
|
||||||
(CFG_PATH_LOCAL, CFG_PATH_HOB, CFG_PATH_LAYERS, CFG_FILES_DISTRO, CFG_FILES_MACH, CFG_FILES_SDK, FILES_MATCH_CLASS, GENERATE_TGTS, REPARSE_FILES, BUILD_IMAGE) = range(10)
|
(CFG_PATH_LOCAL, CFG_PATH_PRE, CFG_PATH_POST, CFG_PATH_LAYERS, CFG_FILES_DISTRO, CFG_FILES_MACH, CFG_FILES_SDK, FILES_MATCH_CLASS, GENERATE_TGTS, REPARSE_FILES, BUILD_IMAGE) = range(11)
|
||||||
|
|
||||||
def __init__(self, taskmodel, server):
|
def __init__(self, taskmodel, server):
|
||||||
gobject.GObject.__init__(self)
|
gobject.GObject.__init__(self)
|
||||||
|
|
||||||
self.current_command = None
|
self.current_command = None
|
||||||
self.building = None
|
self.building = False
|
||||||
self.build_toolchain = False
|
self.build_toolchain = False
|
||||||
self.build_toolchain_headers = False
|
self.build_toolchain_headers = False
|
||||||
self.generating = False
|
self.generating = False
|
||||||
self.build_queue = []
|
self.build_queue = []
|
||||||
|
self.current_phase = None
|
||||||
|
self.bbpath_ok = False
|
||||||
|
self.bbfiles_ok = False
|
||||||
|
self.build_type = "image"
|
||||||
|
self.image_dir = os.path.join(tempfile.gettempdir(), 'hob-images')
|
||||||
|
|
||||||
self.model = taskmodel
|
self.model = taskmodel
|
||||||
self.server = server
|
self.server = server
|
||||||
|
|
||||||
|
deploy_dir = self.server.runCommand(["getVariable", "DEPLOY_DIR"])
|
||||||
|
self.image_out_dir = os.path.join(deploy_dir, "images")
|
||||||
self.image_output_types = self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]).split(" ")
|
self.image_output_types = self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]).split(" ")
|
||||||
|
self.bbpath = self.server.runCommand(["getVariable", "BBPATH"])
|
||||||
|
self.bbfiles = self.server.runCommand(["getVariable", "BBFILES"])
|
||||||
|
|
||||||
def run_next_command(self):
|
def run_next_command(self):
|
||||||
if self.current_command and not self.generating:
|
if self.current_command and not self.generating:
|
||||||
@@ -81,9 +97,12 @@ class HobHandler(gobject.GObject):
|
|||||||
self.generating = True
|
self.generating = True
|
||||||
|
|
||||||
if self.current_command == self.CFG_PATH_LOCAL:
|
if self.current_command == self.CFG_PATH_LOCAL:
|
||||||
self.current_command = self.CFG_PATH_HOB
|
self.current_command = self.CFG_PATH_PRE
|
||||||
self.server.runCommand(["findConfigFilePath", "hob.local.conf"])
|
self.server.runCommand(["findConfigFilePath", "hob-pre.conf"])
|
||||||
elif self.current_command == self.CFG_PATH_HOB:
|
elif self.current_command == self.CFG_PATH_PRE:
|
||||||
|
self.current_command = self.CFG_PATH_POST
|
||||||
|
self.server.runCommand(["findConfigFilePath", "hob-post.conf"])
|
||||||
|
elif self.current_command == self.CFG_PATH_POST:
|
||||||
self.current_command = self.CFG_PATH_LAYERS
|
self.current_command = self.CFG_PATH_LAYERS
|
||||||
self.server.runCommand(["findConfigFilePath", "bblayers.conf"])
|
self.server.runCommand(["findConfigFilePath", "bblayers.conf"])
|
||||||
elif self.current_command == self.CFG_PATH_LAYERS:
|
elif self.current_command == self.CFG_PATH_LAYERS:
|
||||||
@@ -111,14 +130,13 @@ class HobHandler(gobject.GObject):
|
|||||||
self.current_command = self.BUILD_IMAGE
|
self.current_command = self.BUILD_IMAGE
|
||||||
else:
|
else:
|
||||||
self.current_command = self.CFG_PATH_LAYERS
|
self.current_command = self.CFG_PATH_LAYERS
|
||||||
|
self.server.runCommand(["resetCooker"])
|
||||||
self.server.runCommand(["reparseFiles"])
|
self.server.runCommand(["reparseFiles"])
|
||||||
elif self.current_command == self.BUILD_IMAGE:
|
elif self.current_command == self.BUILD_IMAGE:
|
||||||
self.building = "image"
|
|
||||||
if self.generating:
|
if self.generating:
|
||||||
self.emit("data-generated")
|
self.emit("data-generated")
|
||||||
self.generating = False
|
self.generating = False
|
||||||
bbpath = self.server.runCommand(["getVariable", "BBPATH"])
|
self.building = True
|
||||||
bbfiles = self.server.runCommand(["getVariable", "BBFILES"])
|
|
||||||
self.server.runCommand(["buildTargets", self.build_queue, "build"])
|
self.server.runCommand(["buildTargets", self.build_queue, "build"])
|
||||||
self.build_queue = []
|
self.build_queue = []
|
||||||
self.current_command = None
|
self.current_command = None
|
||||||
@@ -129,11 +147,14 @@ class HobHandler(gobject.GObject):
|
|||||||
|
|
||||||
# If we're running a build, use the RunningBuild event handler
|
# If we're running a build, use the RunningBuild event handler
|
||||||
if self.building:
|
if self.building:
|
||||||
|
self.current_phase = "building"
|
||||||
running_build.handle_event(event)
|
running_build.handle_event(event)
|
||||||
elif isinstance(event, bb.event.TargetsTreeGenerated):
|
elif isinstance(event, bb.event.TargetsTreeGenerated):
|
||||||
|
self.current_phase = "data generation"
|
||||||
if event._model:
|
if event._model:
|
||||||
self.model.populate(event._model)
|
self.model.populate(event._model)
|
||||||
elif isinstance(event, bb.event.ConfigFilesFound):
|
elif isinstance(event, bb.event.ConfigFilesFound):
|
||||||
|
self.current_phase = "configuration lookup"
|
||||||
var = event._variable
|
var = event._variable
|
||||||
if var == "distro":
|
if var == "distro":
|
||||||
distros = event._values
|
distros = event._values
|
||||||
@@ -148,9 +169,11 @@ class HobHandler(gobject.GObject):
|
|||||||
sdk_machines.sort()
|
sdk_machines.sort()
|
||||||
self.emit("sdk-machines-updated", sdk_machines)
|
self.emit("sdk-machines-updated", sdk_machines)
|
||||||
elif isinstance(event, bb.event.ConfigFilePathFound):
|
elif isinstance(event, bb.event.ConfigFilePathFound):
|
||||||
|
self.current_phase = "configuration lookup"
|
||||||
path = event._path
|
path = event._path
|
||||||
self.emit("config-found", path)
|
self.emit("config-found", path)
|
||||||
elif isinstance(event, bb.event.FilesMatchingFound):
|
elif isinstance(event, bb.event.FilesMatchingFound):
|
||||||
|
self.current_phase = "configuration lookup"
|
||||||
# FIXME: hard coding, should at least be a variable shared between
|
# FIXME: hard coding, should at least be a variable shared between
|
||||||
# here and the caller
|
# here and the caller
|
||||||
if event._pattern == "rootfs_":
|
if event._pattern == "rootfs_":
|
||||||
@@ -162,25 +185,37 @@ class HobHandler(gobject.GObject):
|
|||||||
formats.sort()
|
formats.sort()
|
||||||
self.emit("package-formats-found", formats)
|
self.emit("package-formats-found", formats)
|
||||||
elif isinstance(event, bb.command.CommandCompleted):
|
elif isinstance(event, bb.command.CommandCompleted):
|
||||||
|
self.current_phase = None
|
||||||
self.run_next_command()
|
self.run_next_command()
|
||||||
elif isinstance(event, bb.command.CommandFailed):
|
elif isinstance(event, bb.command.CommandFailed):
|
||||||
self.emit("error", event.error)
|
self.emit("command-failed", event.error)
|
||||||
elif isinstance(event, bb.event.CacheLoadStarted):
|
elif isinstance(event, bb.event.CacheLoadStarted):
|
||||||
|
self.current_phase = "cache loading"
|
||||||
bb.ui.crumbs.hobeventhandler.progress_total = event.total
|
bb.ui.crumbs.hobeventhandler.progress_total = event.total
|
||||||
pbar.set_text("Loading cache: %s/%s" % (0, bb.ui.crumbs.hobeventhandler.progress_total))
|
pbar.set_text("Loading cache: %s/%s" % (0, bb.ui.crumbs.hobeventhandler.progress_total))
|
||||||
elif isinstance(event, bb.event.CacheLoadProgress):
|
elif isinstance(event, bb.event.CacheLoadProgress):
|
||||||
|
self.current_phase = "cache loading"
|
||||||
pbar.set_text("Loading cache: %s/%s" % (event.current, bb.ui.crumbs.hobeventhandler.progress_total))
|
pbar.set_text("Loading cache: %s/%s" % (event.current, bb.ui.crumbs.hobeventhandler.progress_total))
|
||||||
elif isinstance(event, bb.event.CacheLoadCompleted):
|
elif isinstance(event, bb.event.CacheLoadCompleted):
|
||||||
pbar.set_text("Loading cache: %s/%s" % (bb.ui.crumbs.hobeventhandler.progress_total, bb.ui.crumbs.hobeventhandler.progress_total))
|
self.current_phase = None
|
||||||
|
pbar.set_text("Loading...")
|
||||||
elif isinstance(event, bb.event.ParseStarted):
|
elif isinstance(event, bb.event.ParseStarted):
|
||||||
|
self.current_phase = "recipe parsing"
|
||||||
if event.total == 0:
|
if event.total == 0:
|
||||||
return
|
return
|
||||||
bb.ui.crumbs.hobeventhandler.progress_total = event.total
|
bb.ui.crumbs.hobeventhandler.progress_total = event.total
|
||||||
pbar.set_text("Processing recipes: %s/%s" % (0, bb.ui.crumbs.hobeventhandler.progress_total))
|
pbar.set_text("Processing recipes: %s/%s" % (0, bb.ui.crumbs.hobeventhandler.progress_total))
|
||||||
elif isinstance(event, bb.event.ParseProgress):
|
elif isinstance(event, bb.event.ParseProgress):
|
||||||
|
self.current_phase = "recipe parsing"
|
||||||
pbar.set_text("Processing recipes: %s/%s" % (event.current, bb.ui.crumbs.hobeventhandler.progress_total))
|
pbar.set_text("Processing recipes: %s/%s" % (event.current, bb.ui.crumbs.hobeventhandler.progress_total))
|
||||||
elif isinstance(event, bb.event.ParseCompleted):
|
elif isinstance(event, bb.event.ParseCompleted):
|
||||||
|
self.current_phase = None
|
||||||
pbar.set_fraction(1.0)
|
pbar.set_fraction(1.0)
|
||||||
|
pbar.set_text("Loading...")
|
||||||
|
elif isinstance(event, logging.LogRecord):
|
||||||
|
format = bb.msg.BBLogFormatter("%(levelname)s: %(message)s")
|
||||||
|
if event.levelno >= format.CRITICAL:
|
||||||
|
self.emit("fatal-error", event.getMessage(), self.current_phase)
|
||||||
return
|
return
|
||||||
|
|
||||||
def event_handle_idle_func (self, eventHandler, running_build, pbar):
|
def event_handle_idle_func (self, eventHandler, running_build, pbar):
|
||||||
@@ -217,48 +252,43 @@ class HobHandler(gobject.GObject):
|
|||||||
pmake = "-j %s" % threads
|
pmake = "-j %s" % threads
|
||||||
self.server.runCommand(["setVariable", "BB_NUMBER_THREADS", pmake])
|
self.server.runCommand(["setVariable", "BB_NUMBER_THREADS", pmake])
|
||||||
|
|
||||||
def build_image(self, image, image_path, configurator):
|
def build_targets(self, tgts, configurator, build_type="image"):
|
||||||
|
self.build_type = build_type
|
||||||
targets = []
|
targets = []
|
||||||
targets.append(image)
|
nbbp = None
|
||||||
|
nbbf = None
|
||||||
|
targets.extend(tgts)
|
||||||
if self.build_toolchain and self.build_toolchain_headers:
|
if self.build_toolchain and self.build_toolchain_headers:
|
||||||
targets.append("meta-toolchain-sdk")
|
targets.append("meta-toolchain-sdk")
|
||||||
elif self.build_toolchain:
|
elif self.build_toolchain:
|
||||||
targets.append("meta-toolchain")
|
targets.append("meta-toolchain")
|
||||||
self.build_queue = targets
|
self.build_queue = targets
|
||||||
|
|
||||||
bbpath_ok = False
|
if not self.bbpath_ok:
|
||||||
bbpath = self.server.runCommand(["getVariable", "BBPATH"])
|
if self.image_dir in self.bbpath.split(":"):
|
||||||
if image_path in bbpath.split(":"):
|
self.bbpath_ok = True
|
||||||
bbpath_ok = True
|
else:
|
||||||
|
nbbp = self.image_dir
|
||||||
|
|
||||||
bbfiles_ok = False
|
if not self.bbfiles_ok:
|
||||||
bbfiles = self.server.runCommand(["getVariable", "BBFILES"]).split(" ")
|
|
||||||
for files in bbfiles:
|
|
||||||
import re
|
import re
|
||||||
pattern = "%s/\*.bb" % image_path
|
pattern = "%s/\*.bb" % self.image_dir
|
||||||
if re.match(pattern, files):
|
|
||||||
bbfiles_ok = True
|
|
||||||
|
|
||||||
if not bbpath_ok:
|
for files in self.bbfiles.split(" "):
|
||||||
nbbp = image_path
|
if re.match(pattern, files):
|
||||||
else:
|
self.bbfiles_ok = True
|
||||||
nbbp = None
|
|
||||||
|
|
||||||
if not bbfiles_ok:
|
if not self.bbfiles_ok:
|
||||||
nbbf = "%s/*.bb" % image_path
|
nbbf = "%s/*.bb" % self.image_dir
|
||||||
else:
|
|
||||||
nbbf = None
|
|
||||||
|
|
||||||
if not bbfiles_ok or not bbpath_ok:
|
if nbbp or nbbf:
|
||||||
configurator.insertTempBBPath(nbbp, nbbf)
|
configurator.insertTempBBPath(nbbp, nbbf)
|
||||||
|
self.bbpath_ok = True
|
||||||
|
self.bbfiles_ok = True
|
||||||
|
|
||||||
self.current_command = self.REPARSE_FILES
|
self.current_command = self.REPARSE_FILES
|
||||||
self.run_next_command()
|
self.run_next_command()
|
||||||
|
|
||||||
def build_packages(self, pkgs):
|
|
||||||
self.building = "packages"
|
|
||||||
self.server.runCommand(["buildTargets", pkgs, "build"])
|
|
||||||
|
|
||||||
def cancel_build(self, force=False):
|
def cancel_build(self, force=False):
|
||||||
if force:
|
if force:
|
||||||
# Force the cooker to stop as quickly as possible
|
# Force the cooker to stop as quickly as possible
|
||||||
@@ -279,39 +309,35 @@ class HobHandler(gobject.GObject):
|
|||||||
if self.build_toolchain_headers != enabled:
|
if self.build_toolchain_headers != enabled:
|
||||||
self.build_toolchain_headers = enabled
|
self.build_toolchain_headers = enabled
|
||||||
|
|
||||||
def queue_image_recipe_path(self, path):
|
|
||||||
self.build_queue.append(path)
|
|
||||||
|
|
||||||
def build_complete_cb(self, running_build):
|
|
||||||
if len(self.build_queue) > 0:
|
|
||||||
next = self.build_queue.pop(0)
|
|
||||||
if next.endswith('.bb'):
|
|
||||||
self.build_file(next)
|
|
||||||
self.building = 'image'
|
|
||||||
self.build_file(next)
|
|
||||||
else:
|
|
||||||
self.build_packages(next.split(" "))
|
|
||||||
else:
|
|
||||||
self.building = None
|
|
||||||
self.emit("build-complete")
|
|
||||||
|
|
||||||
def set_fstypes(self, fstypes):
|
def set_fstypes(self, fstypes):
|
||||||
self.server.runCommand(["setVariable", "IMAGE_FSTYPES", fstypes])
|
self.server.runCommand(["setVariable", "IMAGE_FSTYPES", fstypes])
|
||||||
|
|
||||||
def add_image_output_type(self, output_type):
|
def add_image_output_type(self, output_type):
|
||||||
if output_type not in self.image_output_types:
|
if output_type not in self.image_output_types:
|
||||||
self.image_output_types.append(output_type)
|
self.image_output_types.append(output_type)
|
||||||
fstypes = " ".join(self.image_output_types)
|
fstypes = " ".join(self.image_output_types).lstrip(" ")
|
||||||
self.set_fstypes(fstypes)
|
self.set_fstypes(fstypes)
|
||||||
return fstypes
|
return self.image_output_types
|
||||||
|
|
||||||
def remove_image_output_type(self, output_type):
|
def remove_image_output_type(self, output_type):
|
||||||
if output_type in self.image_output_types:
|
if output_type in self.image_output_types:
|
||||||
ind = self.image_output_types.index(output_type)
|
ind = self.image_output_types.index(output_type)
|
||||||
self.image_output_types.pop(ind)
|
self.image_output_types.pop(ind)
|
||||||
fstypes = " ".join(self.image_output_types)
|
fstypes = " ".join(self.image_output_types).lstrip(" ")
|
||||||
self.set_fstypes(fstypes)
|
self.set_fstypes(fstypes)
|
||||||
return fstypes
|
return self.image_output_types
|
||||||
|
|
||||||
def get_image_deploy_dir(self):
|
def get_image_deploy_dir(self):
|
||||||
return self.server.runCommand(["getVariable", "DEPLOY_DIR_IMAGE"])
|
return self.image_out_dir
|
||||||
|
|
||||||
|
def make_temp_dir(self):
|
||||||
|
bb.utils.mkdirhier(self.image_dir)
|
||||||
|
|
||||||
|
def remove_temp_dir(self):
|
||||||
|
bb.utils.remove(self.image_dir, True)
|
||||||
|
|
||||||
|
def get_temp_recipe_path(self, name):
|
||||||
|
timestamp = datetime.date.today().isoformat()
|
||||||
|
image_file = "hob-%s-variant-%s.bb" % (name, timestamp)
|
||||||
|
recipepath = os.path.join(self.image_dir, image_file)
|
||||||
|
return recipepath
|
||||||
|
|||||||
@@ -38,13 +38,14 @@ class HobPrefs(gtk.Dialog):
|
|||||||
else:
|
else:
|
||||||
self.selected_image_types = handler.remove_image_output_type(ot)
|
self.selected_image_types = handler.remove_image_output_type(ot)
|
||||||
|
|
||||||
self.configurator.setLocalConfVar('IMAGE_FSTYPES', "%s" % self.selected_image_types)
|
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()
|
||||||
if sdk_mach != self.curr_sdk_mach:
|
if sdk_mach != self.curr_sdk_mach:
|
||||||
self.curr_sdk_mach = sdk_mach
|
self.curr_sdk_mach = sdk_mach
|
||||||
self.configurator.setLocalConfVar('SDKMACHINE', sdk_mach)
|
self.configurator.setConfVar('SDKMACHINE', sdk_mach)
|
||||||
handler.set_sdk_machine(sdk_mach)
|
handler.set_sdk_machine(sdk_mach)
|
||||||
|
|
||||||
def update_sdk_machines(self, handler, sdk_machines):
|
def update_sdk_machines(self, handler, sdk_machines):
|
||||||
@@ -67,7 +68,7 @@ class HobPrefs(gtk.Dialog):
|
|||||||
distro = combo.get_active_text()
|
distro = combo.get_active_text()
|
||||||
if distro != self.curr_distro:
|
if distro != self.curr_distro:
|
||||||
self.curr_distro = distro
|
self.curr_distro = distro
|
||||||
self.configurator.setLocalConfVar('DISTRO', distro)
|
self.configurator.setConfVar('DISTRO', distro)
|
||||||
handler.set_distro(distro)
|
handler.set_distro(distro)
|
||||||
self.reload_required = True
|
self.reload_required = True
|
||||||
|
|
||||||
@@ -91,7 +92,7 @@ class HobPrefs(gtk.Dialog):
|
|||||||
package_format = combo.get_active_text()
|
package_format = combo.get_active_text()
|
||||||
if package_format != self.curr_package_format:
|
if package_format != self.curr_package_format:
|
||||||
self.curr_package_format = package_format
|
self.curr_package_format = package_format
|
||||||
self.configurator.setLocalConfVar('PACKAGE_CLASSES', 'package_%s' % package_format)
|
self.configurator.setConfVar('PACKAGE_CLASSES', 'package_%s' % package_format)
|
||||||
handler.set_package_format(package_format)
|
handler.set_package_format(package_format)
|
||||||
self.reload_required = True
|
self.reload_required = True
|
||||||
|
|
||||||
@@ -113,7 +114,7 @@ class HobPrefs(gtk.Dialog):
|
|||||||
|
|
||||||
def include_gplv3_cb(self, toggle):
|
def include_gplv3_cb(self, toggle):
|
||||||
excluded = toggle.get_active()
|
excluded = toggle.get_active()
|
||||||
orig_incompatible = self.configurator.getLocalConfVar('INCOMPATIBLE_LICENSE')
|
orig_incompatible = self.configurator.getConfVar('INCOMPATIBLE_LICENSE')
|
||||||
new_incompatible = ""
|
new_incompatible = ""
|
||||||
if excluded:
|
if excluded:
|
||||||
if not orig_incompatible:
|
if not orig_incompatible:
|
||||||
@@ -125,18 +126,18 @@ class HobPrefs(gtk.Dialog):
|
|||||||
|
|
||||||
if new_incompatible != orig_incompatible:
|
if new_incompatible != orig_incompatible:
|
||||||
self.handler.set_incompatible_license(new_incompatible)
|
self.handler.set_incompatible_license(new_incompatible)
|
||||||
self.configurator.setLocalConfVar('INCOMPATIBLE_LICENSE', new_incompatible)
|
self.configurator.setConfVar('INCOMPATIBLE_LICENSE', new_incompatible)
|
||||||
self.reload_required = True
|
self.reload_required = True
|
||||||
|
|
||||||
def change_bb_threads_cb(self, spinner):
|
def change_bb_threads_cb(self, spinner):
|
||||||
val = spinner.get_value_as_int()
|
val = spinner.get_value_as_int()
|
||||||
self.handler.set_bbthreads(val)
|
self.handler.set_bbthreads(val)
|
||||||
self.configurator.setLocalConfVar('BB_NUMBER_THREADS', val)
|
self.configurator.setConfVar('BB_NUMBER_THREADS', val)
|
||||||
|
|
||||||
def change_make_threads_cb(self, spinner):
|
def change_make_threads_cb(self, spinner):
|
||||||
val = spinner.get_value_as_int()
|
val = spinner.get_value_as_int()
|
||||||
self.handler.set_pmake(val)
|
self.handler.set_pmake(val)
|
||||||
self.configurator.setLocalConfVar('PARALLEL_MAKE', "-j %s" % val)
|
self.configurator.setConfVar('PARALLEL_MAKE', "-j %s" % val)
|
||||||
|
|
||||||
def toggle_toolchain_cb(self, check):
|
def toggle_toolchain_cb(self, check):
|
||||||
enabled = check.get_active()
|
enabled = check.get_active()
|
||||||
@@ -144,7 +145,7 @@ class HobPrefs(gtk.Dialog):
|
|||||||
if enabled:
|
if enabled:
|
||||||
toolchain = '1'
|
toolchain = '1'
|
||||||
self.handler.toggle_toolchain(enabled)
|
self.handler.toggle_toolchain(enabled)
|
||||||
self.configurator.setLocalConfVar('HOB_BUILD_TOOLCHAIN', toolchain)
|
self.configurator.setConfVar('HOB_BUILD_TOOLCHAIN', toolchain)
|
||||||
|
|
||||||
def toggle_headers_cb(self, check):
|
def toggle_headers_cb(self, check):
|
||||||
enabled = check.get_active()
|
enabled = check.get_active()
|
||||||
@@ -152,20 +153,21 @@ class HobPrefs(gtk.Dialog):
|
|||||||
if enabled:
|
if enabled:
|
||||||
headers = '1'
|
headers = '1'
|
||||||
self.handler.toggle_toolchain_headers(enabled)
|
self.handler.toggle_toolchain_headers(enabled)
|
||||||
self.configurator.setLocalConfVar('HOB_BUILD_TOOLCHAIN_HEADERS', headers)
|
self.configurator.setConfVar('HOB_BUILD_TOOLCHAIN_HEADERS', headers)
|
||||||
|
|
||||||
def set_parent_window(self, parent):
|
def set_parent_window(self, parent):
|
||||||
self.set_transient_for(parent)
|
self.set_transient_for(parent)
|
||||||
|
|
||||||
def write_changes(self):
|
def write_changes(self):
|
||||||
self.configurator.writeLocalConf()
|
self.configurator.writeConf()
|
||||||
|
|
||||||
def prefs_response_cb(self, dialog, response):
|
def prefs_response_cb(self, dialog, response):
|
||||||
if self.reload_required:
|
if self.reload_required:
|
||||||
glib.idle_add(self.handler.reload_data)
|
glib.idle_add(self.handler.reload_data)
|
||||||
|
self.reload_required = False
|
||||||
|
|
||||||
def __init__(self, configurator, handler, curr_sdk_mach, curr_distro, pclass,
|
def __init__(self, configurator, handler, curr_sdk_mach, curr_distro, pclass,
|
||||||
cpu_cnt, pmake, bbthread, selected_image_types, all_image_types,
|
pmake, bbthread, selected_image_types, all_image_types,
|
||||||
gplv3disabled, build_toolchain, build_toolchain_headers):
|
gplv3disabled, build_toolchain, build_toolchain_headers):
|
||||||
"""
|
"""
|
||||||
"""
|
"""
|
||||||
@@ -184,7 +186,6 @@ class HobPrefs(gtk.Dialog):
|
|||||||
self.curr_sdk_mach = curr_sdk_mach
|
self.curr_sdk_mach = curr_sdk_mach
|
||||||
self.curr_distro = curr_distro
|
self.curr_distro = curr_distro
|
||||||
self.curr_package_format = pclass
|
self.curr_package_format = pclass
|
||||||
self.cpu_cnt = cpu_cnt
|
|
||||||
self.pmake = pmake
|
self.pmake = pmake
|
||||||
self.bbthread = bbthread
|
self.bbthread = bbthread
|
||||||
self.selected_image_types = selected_image_types.split(" ")
|
self.selected_image_types = selected_image_types.split(" ")
|
||||||
@@ -282,7 +283,6 @@ class HobPrefs(gtk.Dialog):
|
|||||||
# set a high maximum as a value for upper bounds is required by the
|
# set a high maximum as a value for upper bounds is required by the
|
||||||
# gtk.Adjustment
|
# gtk.Adjustment
|
||||||
spin_max = 30 # seems like a high enough arbitrary number
|
spin_max = 30 # seems like a high enough arbitrary number
|
||||||
#spin_max = self.cpu_cnt * 3
|
|
||||||
hbox.pack_start(label, expand=False, fill=False, padding=6)
|
hbox.pack_start(label, expand=False, fill=False, padding=6)
|
||||||
bbadj = gtk.Adjustment(value=self.bbthread, lower=1, upper=spin_max, step_incr=1)
|
bbadj = gtk.Adjustment(value=self.bbthread, lower=1, upper=spin_max, step_incr=1)
|
||||||
bbspinner = gtk.SpinButton(adjustment=bbadj, climb_rate=1, digits=0)
|
bbspinner = gtk.SpinButton(adjustment=bbadj, climb_rate=1, digits=0)
|
||||||
@@ -327,9 +327,9 @@ class HobPrefs(gtk.Dialog):
|
|||||||
self.sdk_machine_combo.set_tooltip_text("Select the host architecture of the external machine")
|
self.sdk_machine_combo.set_tooltip_text("Select the host architecture of the external machine")
|
||||||
self.sdk_machine_combo.show()
|
self.sdk_machine_combo.show()
|
||||||
hbox.pack_start(self.sdk_machine_combo, expand=False, fill=False, padding=6)
|
hbox.pack_start(self.sdk_machine_combo, expand=False, fill=False, padding=6)
|
||||||
headerscheck = gtk.CheckButton("Include development headers with toolchain")
|
# headerscheck = gtk.CheckButton("Include development headers with toolchain")
|
||||||
headerscheck.show()
|
# headerscheck.show()
|
||||||
headerscheck.set_active(self.build_toolchain_headers)
|
# headerscheck.set_active(self.build_toolchain_headers)
|
||||||
headerscheck.connect("toggled", self.toggle_headers_cb)
|
# headerscheck.connect("toggled", self.toggle_headers_cb)
|
||||||
hbox.pack_start(headerscheck, expand=False, fill=False, padding=6)
|
# hbox.pack_start(headerscheck, expand=False, fill=False, padding=6)
|
||||||
self.connect("response", self.prefs_response_cb)
|
self.connect("response", self.prefs_response_cb)
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
import gobject
|
import gobject
|
||||||
import gtk
|
import gtk
|
||||||
from bb.ui.crumbs.configurator import Configurator
|
from bb.ui.crumbs.configurator import Configurator
|
||||||
|
from bb.ui.crumbs.hig import CrumbsDialog
|
||||||
|
|
||||||
class LayerEditor(gtk.Dialog):
|
class LayerEditor(gtk.Dialog):
|
||||||
"""
|
"""
|
||||||
@@ -117,6 +118,12 @@ class LayerEditor(gtk.Dialog):
|
|||||||
self.find_layer(self)
|
self.find_layer(self)
|
||||||
|
|
||||||
def find_layer(self, parent):
|
def find_layer(self, parent):
|
||||||
|
def conf_error(parent, lbl):
|
||||||
|
dialog = CrumbsDialog(parent, lbl)
|
||||||
|
dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
|
||||||
|
response = dialog.run()
|
||||||
|
dialog.destroy()
|
||||||
|
|
||||||
dialog = gtk.FileChooserDialog("Add new layer", parent,
|
dialog = gtk.FileChooserDialog("Add new layer", parent,
|
||||||
gtk.FILE_CHOOSER_ACTION_OPEN,
|
gtk.FILE_CHOOSER_ACTION_OPEN,
|
||||||
(gtk.STOCK_CANCEL, gtk.RESPONSE_NO,
|
(gtk.STOCK_CANCEL, gtk.RESPONSE_NO,
|
||||||
@@ -128,10 +135,19 @@ class LayerEditor(gtk.Dialog):
|
|||||||
path = dialog.get_filename()
|
path = dialog.get_filename()
|
||||||
dialog.destroy()
|
dialog.destroy()
|
||||||
|
|
||||||
|
lbl = "<b>Error</b>\nUnable to load layer <i>%s</i> because " % path
|
||||||
if response == gtk.RESPONSE_YES:
|
if response == gtk.RESPONSE_YES:
|
||||||
# FIXME: verify we've actually got a layer conf?
|
# FIXME: verify we've actually got a layer conf?
|
||||||
if path.endswith(".conf"):
|
if path.endswith("layer.conf"):
|
||||||
name, layerpath = self.configurator.addLayerConf(path)
|
name, layerpath = self.configurator.addLayerConf(path)
|
||||||
if name:
|
if name and layerpath:
|
||||||
self.newly_added[name] = layerpath
|
self.newly_added[name] = layerpath
|
||||||
self.layer_store.append([name, layerpath, True])
|
self.layer_store.append([name, layerpath, True])
|
||||||
|
return
|
||||||
|
elif name:
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
lbl += "there was a problem parsing the layer.conf."
|
||||||
|
else:
|
||||||
|
lbl += "it is not a layer.conf file."
|
||||||
|
conf_error(parent, lbl)
|
||||||
|
|||||||
@@ -63,9 +63,15 @@ class RunningBuild (gobject.GObject):
|
|||||||
pids_to_task = {}
|
pids_to_task = {}
|
||||||
tasks_to_iter = {}
|
tasks_to_iter = {}
|
||||||
|
|
||||||
def __init__ (self):
|
def __init__ (self, sequential=False):
|
||||||
gobject.GObject.__init__ (self)
|
gobject.GObject.__init__ (self)
|
||||||
self.model = RunningBuildModel()
|
self.model = RunningBuildModel()
|
||||||
|
self.sequential = sequential
|
||||||
|
|
||||||
|
def reset (self):
|
||||||
|
self.pids_to_task.clear()
|
||||||
|
self.tasks_to_iter.clear()
|
||||||
|
self.model.clear()
|
||||||
|
|
||||||
def handle_event (self, event, pbar=None):
|
def handle_event (self, event, pbar=None):
|
||||||
# Handle an event from the event queue, this may result in updating
|
# Handle an event from the event queue, this may result in updating
|
||||||
@@ -90,7 +96,14 @@ class RunningBuild (gobject.GObject):
|
|||||||
parent = self.tasks_to_iter[(package, task)]
|
parent = self.tasks_to_iter[(package, task)]
|
||||||
|
|
||||||
if(isinstance(event, logging.LogRecord)):
|
if(isinstance(event, logging.LogRecord)):
|
||||||
if (event.msg.startswith ("Running task")):
|
# FIXME: this is a hack! More info in Yocto #1433
|
||||||
|
# http://bugzilla.pokylinux.org/show_bug.cgi?id=1433, temporarily
|
||||||
|
# mask the error message as it's not informative for the user.
|
||||||
|
if event.msg.startswith("Execution of event handler 'run_buildstats' failed"):
|
||||||
|
return
|
||||||
|
|
||||||
|
if (event.levelno < logging.INFO or
|
||||||
|
event.msg.startswith("Running task")):
|
||||||
return # don't add these to the list
|
return # don't add these to the list
|
||||||
|
|
||||||
if event.levelno >= logging.ERROR:
|
if event.levelno >= logging.ERROR:
|
||||||
@@ -105,18 +118,18 @@ class RunningBuild (gobject.GObject):
|
|||||||
|
|
||||||
# if we know which package we belong to, we'll append onto its list.
|
# if we know which package we belong to, we'll append onto its list.
|
||||||
# otherwise, we'll jump to the top of the master list
|
# otherwise, we'll jump to the top of the master list
|
||||||
if parent:
|
if self.sequential or not parent:
|
||||||
tree_add = self.model.append
|
tree_add = self.model.append
|
||||||
else:
|
else:
|
||||||
tree_add = self.model.prepend
|
tree_add = self.model.prepend
|
||||||
tree_add(parent,
|
tree_add(parent,
|
||||||
(None,
|
(None,
|
||||||
package,
|
package,
|
||||||
task,
|
task,
|
||||||
event.getMessage(),
|
event.getMessage(),
|
||||||
icon,
|
icon,
|
||||||
color,
|
color,
|
||||||
0))
|
0))
|
||||||
|
|
||||||
elif isinstance(event, bb.build.TaskStarted):
|
elif isinstance(event, bb.build.TaskStarted):
|
||||||
(package, task) = (event._package, event._task)
|
(package, task) = (event._package, event._task)
|
||||||
@@ -130,13 +143,17 @@ class RunningBuild (gobject.GObject):
|
|||||||
if ((package, None) in self.tasks_to_iter):
|
if ((package, None) in self.tasks_to_iter):
|
||||||
parent = self.tasks_to_iter[(package, None)]
|
parent = self.tasks_to_iter[(package, None)]
|
||||||
else:
|
else:
|
||||||
parent = self.model.prepend(None, (None,
|
if self.sequential:
|
||||||
package,
|
add = self.model.append
|
||||||
None,
|
else:
|
||||||
"Package: %s" % (package),
|
add = self.model.prepend
|
||||||
None,
|
parent = add(None, (None,
|
||||||
Colors.OK,
|
package,
|
||||||
0))
|
None,
|
||||||
|
"Package: %s" % (package),
|
||||||
|
None,
|
||||||
|
Colors.OK,
|
||||||
|
0))
|
||||||
self.tasks_to_iter[(package, None)] = parent
|
self.tasks_to_iter[(package, None)] = parent
|
||||||
|
|
||||||
# Because this parent package now has an active child mark it as
|
# Because this parent package now has an active child mark it as
|
||||||
@@ -162,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)]
|
||||||
@@ -225,14 +246,20 @@ class RunningBuild (gobject.GObject):
|
|||||||
Colors.OK,
|
Colors.OK,
|
||||||
0))
|
0))
|
||||||
|
|
||||||
# Emit a generic "build-complete" signal for things wishing to
|
|
||||||
# handle when the build is finished
|
|
||||||
self.emit("build-complete")
|
|
||||||
# Emit the appropriate signal depending on the number of failures
|
# Emit the appropriate signal depending on the number of failures
|
||||||
if (failures >= 1):
|
if (failures >= 1):
|
||||||
self.emit ("build-failed")
|
self.emit ("build-failed")
|
||||||
else:
|
else:
|
||||||
self.emit ("build-succeeded")
|
self.emit ("build-succeeded")
|
||||||
|
# Emit a generic "build-complete" signal for things wishing to
|
||||||
|
# handle when the build is finished
|
||||||
|
self.emit("build-complete")
|
||||||
|
|
||||||
|
elif isinstance(event, bb.command.CommandFailed):
|
||||||
|
if event.error.startswith("Exited with"):
|
||||||
|
# If the command fails with an exit code we're done, emit the
|
||||||
|
# generic signal for the UI to notify the user
|
||||||
|
self.emit("build-complete")
|
||||||
|
|
||||||
elif isinstance(event, bb.event.CacheLoadStarted) and pbar:
|
elif isinstance(event, bb.event.CacheLoadStarted) and pbar:
|
||||||
pbar.set_title("Loading cache")
|
pbar.set_title("Loading cache")
|
||||||
@@ -242,7 +269,7 @@ class RunningBuild (gobject.GObject):
|
|||||||
pbar.update(event.current, self.progress_total)
|
pbar.update(event.current, self.progress_total)
|
||||||
elif isinstance(event, bb.event.CacheLoadCompleted) and pbar:
|
elif isinstance(event, bb.event.CacheLoadCompleted) and pbar:
|
||||||
pbar.update(self.progress_total, self.progress_total)
|
pbar.update(self.progress_total, self.progress_total)
|
||||||
|
pbar.hide()
|
||||||
elif isinstance(event, bb.event.ParseStarted) and pbar:
|
elif isinstance(event, bb.event.ParseStarted) and pbar:
|
||||||
if event.total == 0:
|
if event.total == 0:
|
||||||
return
|
return
|
||||||
@@ -272,8 +299,9 @@ class RunningBuildTreeView (gtk.TreeView):
|
|||||||
__gsignals__ = {
|
__gsignals__ = {
|
||||||
"button_press_event" : "override"
|
"button_press_event" : "override"
|
||||||
}
|
}
|
||||||
def __init__ (self):
|
def __init__ (self, readonly=False):
|
||||||
gtk.TreeView.__init__ (self)
|
gtk.TreeView.__init__ (self)
|
||||||
|
self.readonly = readonly
|
||||||
|
|
||||||
# The icon that indicates whether we're building or failed.
|
# The icon that indicates whether we're building or failed.
|
||||||
renderer = gtk.CellRendererPixbuf ()
|
renderer = gtk.CellRendererPixbuf ()
|
||||||
@@ -285,7 +313,7 @@ class RunningBuildTreeView (gtk.TreeView):
|
|||||||
self.message_renderer = gtk.CellRendererText ()
|
self.message_renderer = gtk.CellRendererText ()
|
||||||
self.message_column = gtk.TreeViewColumn ("Message", self.message_renderer, text=3)
|
self.message_column = gtk.TreeViewColumn ("Message", self.message_renderer, text=3)
|
||||||
self.message_column.add_attribute(self.message_renderer, 'background', 5)
|
self.message_column.add_attribute(self.message_renderer, 'background', 5)
|
||||||
self.message_renderer.set_property('editable', 5)
|
self.message_renderer.set_property('editable', (not self.readonly))
|
||||||
self.append_column (self.message_column)
|
self.append_column (self.message_column)
|
||||||
|
|
||||||
def do_button_press_event(self, event):
|
def do_button_press_event(self, event):
|
||||||
@@ -293,31 +321,49 @@ class RunningBuildTreeView (gtk.TreeView):
|
|||||||
|
|
||||||
if event.button == 3:
|
if event.button == 3:
|
||||||
selection = super(RunningBuildTreeView, self).get_selection()
|
selection = super(RunningBuildTreeView, self).get_selection()
|
||||||
(model, iter) = selection.get_selected()
|
(model, it) = selection.get_selected()
|
||||||
if iter is not None:
|
if it is not None:
|
||||||
can_paste = model.get(iter, model.COL_LOG)[0]
|
can_paste = model.get(it, model.COL_LOG)[0]
|
||||||
if can_paste == 'pastebin':
|
if can_paste == 'pastebin':
|
||||||
# build a simple menu with a pastebin option
|
# build a simple menu with a pastebin option
|
||||||
menu = gtk.Menu()
|
menu = gtk.Menu()
|
||||||
|
menuitem = gtk.MenuItem("Copy")
|
||||||
|
menu.append(menuitem)
|
||||||
|
menuitem.connect("activate", self.clipboard_handler, (model, it))
|
||||||
|
menuitem.show()
|
||||||
menuitem = gtk.MenuItem("Send log to pastebin")
|
menuitem = gtk.MenuItem("Send log to pastebin")
|
||||||
menu.append(menuitem)
|
menu.append(menuitem)
|
||||||
menuitem.connect("activate", self.pastebin_handler, (model, iter))
|
menuitem.connect("activate", self.pastebin_handler, (model, it))
|
||||||
menuitem.show()
|
menuitem.show()
|
||||||
menu.show()
|
menu.show()
|
||||||
menu.popup(None, None, None, event.button, event.time)
|
menu.popup(None, None, None, event.button, event.time)
|
||||||
|
|
||||||
|
def _add_to_clipboard(self, clipping):
|
||||||
|
"""
|
||||||
|
Add the contents of clipping to the system clipboard.
|
||||||
|
"""
|
||||||
|
clipboard = gtk.clipboard_get()
|
||||||
|
clipboard.set_text(clipping)
|
||||||
|
clipboard.store()
|
||||||
|
|
||||||
def pastebin_handler(self, widget, data):
|
def pastebin_handler(self, widget, data):
|
||||||
"""
|
"""
|
||||||
Send the log data to pastebin, then add the new paste url to the
|
Send the log data to pastebin, then add the new paste url to the
|
||||||
clipboard.
|
clipboard.
|
||||||
"""
|
"""
|
||||||
(model, iter) = data
|
(model, it) = data
|
||||||
paste_url = do_pastebin(model.get(iter, model.COL_MESSAGE)[0])
|
paste_url = do_pastebin(model.get(it, model.COL_MESSAGE)[0])
|
||||||
|
|
||||||
# @todo Provide visual feedback to the user that it is done and that
|
# @todo Provide visual feedback to the user that it is done and that
|
||||||
# it worked.
|
# it worked.
|
||||||
print paste_url
|
print paste_url
|
||||||
|
|
||||||
clipboard = gtk.clipboard_get()
|
self._add_to_clipboard(paste_url)
|
||||||
clipboard.set_text(paste_url)
|
|
||||||
clipboard.store()
|
def clipboard_handler(self, widget, data):
|
||||||
|
"""
|
||||||
|
"""
|
||||||
|
(model, it) = data
|
||||||
|
message = model.get(it, model.COL_MESSAGE)[0]
|
||||||
|
|
||||||
|
self._add_to_clipboard(message)
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class BuildRep(gobject.GObject):
|
|||||||
with open(pathname, 'r') as f:
|
with open(pathname, 'r') as f:
|
||||||
contents = f.readlines()
|
contents = f.readlines()
|
||||||
|
|
||||||
pkg_pattern = "^\s*(IMAGE_INSTALL)\s*([+=.?]+)\s*(\"\S*\")"
|
pkg_pattern = "^\s*(IMAGE_INSTALL)\s*([+=.?]+)\s*(\".*?\")"
|
||||||
img_pattern = "^\s*(require)\s+(\S+.bb)"
|
img_pattern = "^\s*(require)\s+(\S+.bb)"
|
||||||
|
|
||||||
for line in contents:
|
for line in contents:
|
||||||
@@ -89,7 +89,7 @@ class TaskListModel(gtk.ListStore):
|
|||||||
providing convenience functions to access gtk.TreeModel subclasses which
|
providing convenience functions to access gtk.TreeModel subclasses which
|
||||||
provide filtered views of the data.
|
provide filtered views of the data.
|
||||||
"""
|
"""
|
||||||
(COL_NAME, COL_DESC, COL_LIC, COL_GROUP, COL_DEPS, COL_BINB, COL_TYPE, COL_INC, COL_IMG, COL_PATH) = range(10)
|
(COL_NAME, COL_DESC, COL_LIC, COL_GROUP, COL_DEPS, COL_BINB, COL_TYPE, COL_INC, COL_IMG, COL_PATH, COL_PN) = range(11)
|
||||||
|
|
||||||
__gsignals__ = {
|
__gsignals__ = {
|
||||||
"tasklist-populated" : (gobject.SIGNAL_RUN_LAST,
|
"tasklist-populated" : (gobject.SIGNAL_RUN_LAST,
|
||||||
@@ -122,8 +122,17 @@ class TaskListModel(gtk.ListStore):
|
|||||||
gobject.TYPE_STRING,
|
gobject.TYPE_STRING,
|
||||||
gobject.TYPE_BOOLEAN,
|
gobject.TYPE_BOOLEAN,
|
||||||
gobject.TYPE_BOOLEAN,
|
gobject.TYPE_BOOLEAN,
|
||||||
|
gobject.TYPE_STRING,
|
||||||
gobject.TYPE_STRING)
|
gobject.TYPE_STRING)
|
||||||
|
|
||||||
|
"""
|
||||||
|
Helper method to determine whether name is a target pn
|
||||||
|
"""
|
||||||
|
def non_target_name(self, name):
|
||||||
|
if ('-native' in name) or ('-cross' in name) or name.startswith('virtual/'):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def contents_changed_cb(self, tree_model, path, it=None):
|
def contents_changed_cb(self, tree_model, path, it=None):
|
||||||
pkg_cnt = self.contents.iter_n_children(None)
|
pkg_cnt = self.contents.iter_n_children(None)
|
||||||
self.emit("contents-changed", pkg_cnt)
|
self.emit("contents-changed", pkg_cnt)
|
||||||
@@ -132,7 +141,7 @@ class TaskListModel(gtk.ListStore):
|
|||||||
if not model.get_value(it, self.COL_INC) or model.get_value(it, self.COL_TYPE) == 'image':
|
if not model.get_value(it, self.COL_INC) or model.get_value(it, self.COL_TYPE) == 'image':
|
||||||
return False
|
return False
|
||||||
name = model.get_value(it, self.COL_NAME)
|
name = model.get_value(it, self.COL_NAME)
|
||||||
if name.endswith('-native') or name.endswith('-cross'):
|
if self.non_target_name(name):
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
@@ -196,7 +205,7 @@ class TaskListModel(gtk.ListStore):
|
|||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
name = model.get_value(it, self.COL_NAME)
|
name = model.get_value(it, self.COL_NAME)
|
||||||
if name.count('-native') or name.count('cross'):
|
if self.non_target_name(name):
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@@ -226,28 +235,39 @@ class TaskListModel(gtk.ListStore):
|
|||||||
lic = event_model["pn"][item]["license"]
|
lic = event_model["pn"][item]["license"]
|
||||||
group = event_model["pn"][item]["section"]
|
group = event_model["pn"][item]["section"]
|
||||||
filename = event_model["pn"][item]["filename"]
|
filename = event_model["pn"][item]["filename"]
|
||||||
depends = event_model["depends"].get(item, "")
|
if ('task-' in name):
|
||||||
rdepends = event_model["rdepends-pn"].get(item, "")
|
|
||||||
if rdepends:
|
|
||||||
for rdep in rdepends:
|
|
||||||
if event_model["packages"].get(rdep, ""):
|
|
||||||
pn = event_model["packages"][rdep].get("pn", "")
|
|
||||||
if pn:
|
|
||||||
depends.append(pn)
|
|
||||||
|
|
||||||
self.squish(depends)
|
|
||||||
deps = " ".join(depends)
|
|
||||||
|
|
||||||
if name.count('task-') > 0:
|
|
||||||
atype = 'task'
|
atype = 'task'
|
||||||
elif name.count('-image-') > 0:
|
elif ('-image-' in name):
|
||||||
atype = 'image'
|
atype = 'image'
|
||||||
|
|
||||||
self.set(self.append(), self.COL_NAME, name, self.COL_DESC, summary,
|
# Create a combined list of build and runtime dependencies and
|
||||||
self.COL_LIC, lic, self.COL_GROUP, group,
|
# then remove any duplicate entries and any entries for -dev
|
||||||
self.COL_DEPS, deps, self.COL_BINB, "",
|
# packages
|
||||||
self.COL_TYPE, atype, self.COL_INC, False,
|
depends = event_model["depends"].get(item, [])
|
||||||
self.COL_IMG, False, self.COL_PATH, filename)
|
rdepends = event_model["rdepends-pn"].get(item, [])
|
||||||
|
packages = {}
|
||||||
|
for pkg in event_model["packages"]:
|
||||||
|
if event_model["packages"][pkg]["pn"] == name:
|
||||||
|
deps = []
|
||||||
|
deps.extend(depends)
|
||||||
|
deps.extend(event_model["rdepends-pkg"].get(pkg, []))
|
||||||
|
deps.extend(rdepends)
|
||||||
|
deps = self.squish(deps)
|
||||||
|
# rdepends-pn includes pn-dev
|
||||||
|
if ("%s-dev" % item) in deps:
|
||||||
|
deps.remove("%s-dev" % item)
|
||||||
|
# rdepends-on includes pn
|
||||||
|
if pkg in deps:
|
||||||
|
deps.remove(pkg)
|
||||||
|
packages[pkg] = deps
|
||||||
|
|
||||||
|
for p in packages:
|
||||||
|
self.set(self.append(), self.COL_NAME, p, self.COL_DESC, summary,
|
||||||
|
self.COL_LIC, lic, self.COL_GROUP, group,
|
||||||
|
self.COL_DEPS, " ".join(packages[p]), self.COL_BINB, "",
|
||||||
|
self.COL_TYPE, atype, self.COL_INC, False,
|
||||||
|
self.COL_IMG, False, self.COL_PATH, filename,
|
||||||
|
self.COL_PN, item)
|
||||||
|
|
||||||
self.emit("tasklist-populated")
|
self.emit("tasklist-populated")
|
||||||
|
|
||||||
@@ -315,9 +335,14 @@ class TaskListModel(gtk.ListStore):
|
|||||||
"""
|
"""
|
||||||
def mark(self, opath):
|
def mark(self, opath):
|
||||||
usersel = {}
|
usersel = {}
|
||||||
it = self.get_iter_first()
|
removed = []
|
||||||
name = self[opath][self.COL_NAME]
|
|
||||||
|
|
||||||
|
it = self.get_iter_first()
|
||||||
|
# The name of the item we're removing, so that we can use it to find
|
||||||
|
# other items which either depend on it, or were brought in by it
|
||||||
|
marked_name = self[opath][self.COL_NAME]
|
||||||
|
|
||||||
|
# Remove the passed item
|
||||||
self.remove_item_path(opath)
|
self.remove_item_path(opath)
|
||||||
|
|
||||||
# Remove all dependent packages, update binb
|
# Remove all dependent packages, update binb
|
||||||
@@ -327,9 +352,9 @@ class TaskListModel(gtk.ListStore):
|
|||||||
|
|
||||||
inc = self[path][self.COL_INC]
|
inc = self[path][self.COL_INC]
|
||||||
deps = self[path][self.COL_DEPS]
|
deps = self[path][self.COL_DEPS]
|
||||||
binb = self[path][self.COL_BINB]
|
binb = self[path][self.COL_BINB].split(', ')
|
||||||
itype = self[path][self.COL_TYPE]
|
itype = self[path][self.COL_TYPE]
|
||||||
iname = self[path][self.COL_NAME]
|
itname = self[path][self.COL_NAME]
|
||||||
|
|
||||||
# We ignore anything that isn't a package
|
# We ignore anything that isn't a package
|
||||||
if not itype == "package":
|
if not itype == "package":
|
||||||
@@ -339,17 +364,22 @@ class TaskListModel(gtk.ListStore):
|
|||||||
# we should keep it and its dependencies, the easiest way to do so
|
# we should keep it and its dependencies, the easiest way to do so
|
||||||
# is to save its name and re-mark it for inclusion once dependency
|
# is to save its name and re-mark it for inclusion once dependency
|
||||||
# processing is complete
|
# processing is complete
|
||||||
if binb == "User Selected":
|
if "User Selected" in binb:
|
||||||
usersel[iname] = self[path][self.COL_IMG]
|
usersel[itname] = self[path][self.COL_IMG]
|
||||||
|
|
||||||
|
# If the iterated item is included and depends on the removed
|
||||||
|
# item it should also be removed.
|
||||||
# FIXME: need to ensure partial name matching doesn't happen
|
# FIXME: need to ensure partial name matching doesn't happen
|
||||||
if inc and deps.count(name):
|
if inc and marked_name in deps and itname not in removed:
|
||||||
# found a dependency, remove it
|
# found a dependency, remove it
|
||||||
|
removed.append(itname)
|
||||||
self.mark(path)
|
self.mark(path)
|
||||||
|
|
||||||
if inc and binb.count(name):
|
# If the iterated item was brought in by the removed (passed) item
|
||||||
bib = self.find_alt_dependency(name)
|
# try and find an alternative dependee and update the binb column
|
||||||
self[path][self.COL_BINB] = bib
|
if inc and marked_name in binb:
|
||||||
|
binb.remove(marked_name)
|
||||||
|
self[path][self.COL_BINB] = ', '.join(binb).lstrip(', ')
|
||||||
|
|
||||||
# Re-add any removed user selected items
|
# Re-add any removed user selected items
|
||||||
for u in usersel:
|
for u in usersel:
|
||||||
@@ -387,85 +417,66 @@ class TaskListModel(gtk.ListStore):
|
|||||||
it = self.contents.iter_next(it)
|
it = self.contents.iter_next(it)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Find the name of an item in the image contents which depends on the item
|
Check whether the item at item_path is included or not
|
||||||
name.
|
|
||||||
Returns either an item name (str) or None
|
|
||||||
"""
|
"""
|
||||||
def find_alt_dependency(self, name):
|
def contents_includes_path(self, item_path):
|
||||||
it = self.contents.get_iter_first()
|
return self[item_path][self.COL_INC]
|
||||||
while it:
|
|
||||||
# iterate all items in the contents model
|
|
||||||
path = self.contents.get_path(it)
|
|
||||||
deps = self.contents[path][self.COL_DEPS]
|
|
||||||
itname = self.contents[path][self.COL_NAME]
|
|
||||||
inc = self.contents[path][self.COL_INC]
|
|
||||||
if itname != name and inc and deps.count(name) > 0:
|
|
||||||
# if this item depends on the item, return this items name
|
|
||||||
return itname
|
|
||||||
it = self.contents.iter_next(it)
|
|
||||||
return ""
|
|
||||||
|
|
||||||
"""
|
|
||||||
Check the self.contents gtk.TreeModel for an item
|
|
||||||
where COL_NAME matches item_name
|
|
||||||
Returns True if a match is found, False otherwise
|
|
||||||
"""
|
|
||||||
def contents_includes_name(self, item_name):
|
|
||||||
it = self.contents.get_iter_first()
|
|
||||||
while it:
|
|
||||||
path = self.contents.get_path(it)
|
|
||||||
if self.contents[path][self.COL_NAME] == item_name:
|
|
||||||
return True
|
|
||||||
it = self.contents.iter_next(it)
|
|
||||||
return False
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Add this item, and any of its dependencies, to the image contents
|
Add this item, and any of its dependencies, to the image contents
|
||||||
"""
|
"""
|
||||||
def include_item(self, item_path, binb="", image_contents=False):
|
def include_item(self, item_path, binb="", image_contents=False):
|
||||||
name = self[item_path][self.COL_NAME]
|
item_name = self[item_path][self.COL_NAME]
|
||||||
deps = self[item_path][self.COL_DEPS]
|
item_deps = self[item_path][self.COL_DEPS]
|
||||||
cur_inc = self[item_path][self.COL_INC]
|
|
||||||
if not cur_inc:
|
self[item_path][self.COL_INC] = True
|
||||||
self[item_path][self.COL_INC] = True
|
|
||||||
self[item_path][self.COL_BINB] = binb
|
item_bin = self[item_path][self.COL_BINB].split(', ')
|
||||||
|
if binb and not binb in item_bin:
|
||||||
|
item_bin.append(binb)
|
||||||
|
self[item_path][self.COL_BINB] = ', '.join(item_bin).lstrip(', ')
|
||||||
|
|
||||||
# We want to do some magic with things which are brought in by the
|
# We want to do some magic with things which are brought in by the
|
||||||
# base image so tag them as so
|
# base image so tag them as so
|
||||||
if image_contents:
|
if image_contents:
|
||||||
self[item_path][self.COL_IMG] = True
|
self[item_path][self.COL_IMG] = True
|
||||||
if self[item_path][self.COL_TYPE] == 'image':
|
if self[item_path][self.COL_TYPE] == 'image':
|
||||||
self.selected_image = name
|
self.selected_image = item_name
|
||||||
|
|
||||||
if deps:
|
if item_deps:
|
||||||
# add all of the deps and set their binb to this item
|
# Ensure all of the items deps are included and, where appropriate,
|
||||||
for dep in deps.split(" "):
|
# add this item to their COL_BINB
|
||||||
|
for dep in item_deps.split(" "):
|
||||||
# If the contents model doesn't already contain dep, add it
|
# If the contents model doesn't already contain dep, add it
|
||||||
# We only care to show things which will end up in the
|
dep_path = self.find_path_for_item(dep)
|
||||||
# resultant image, so filter cross and native recipes
|
if not dep_path:
|
||||||
dep_included = self.contents_includes_name(dep)
|
continue
|
||||||
path = self.find_path_for_item(dep)
|
dep_included = self.contents_includes_path(dep_path)
|
||||||
if not dep_included and not dep.endswith("-native") and not dep.endswith("-cross"):
|
|
||||||
if path:
|
if dep_included and not dep in item_bin:
|
||||||
self.include_item(path, name, image_contents)
|
# don't set the COL_BINB to this item if the target is an
|
||||||
else:
|
# item in our own COL_BINB
|
||||||
pass
|
dep_bin = self[dep_path][self.COL_BINB].split(', ')
|
||||||
# Set brought in by for any no longer orphan packages
|
if not item_name in dep_bin:
|
||||||
elif dep_included and path:
|
dep_bin.append(item_name)
|
||||||
if not self[path][self.COL_BINB]:
|
self[dep_path][self.COL_BINB] = ', '.join(dep_bin).lstrip(', ')
|
||||||
self[path][self.COL_BINB] = name
|
elif not dep_included:
|
||||||
|
self.include_item(dep_path, binb=item_name, image_contents=image_contents)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Find the model path for the item_name
|
Find the model path for the item_name
|
||||||
Returns the path in the model or None
|
Returns the path in the model or None
|
||||||
"""
|
"""
|
||||||
def find_path_for_item(self, item_name):
|
def find_path_for_item(self, item_name):
|
||||||
|
# We don't include virtual/* or *-native items in the model so save a
|
||||||
|
# heavy iteration loop by exiting early for these items
|
||||||
|
if self.non_target_name(item_name):
|
||||||
|
return None
|
||||||
|
|
||||||
it = self.get_iter_first()
|
it = self.get_iter_first()
|
||||||
path = None
|
|
||||||
while it:
|
while it:
|
||||||
path = self.get_path(it)
|
if (self.get_value(it, self.COL_NAME) == item_name):
|
||||||
if (self[path][self.COL_NAME] == item_name):
|
return self.get_path(it)
|
||||||
return path
|
|
||||||
else:
|
else:
|
||||||
it = self.iter_next(it)
|
it = self.iter_next(it)
|
||||||
return None
|
return None
|
||||||
@@ -505,7 +516,7 @@ class TaskListModel(gtk.ListStore):
|
|||||||
|
|
||||||
it = self.contents.get_iter_first()
|
it = self.contents.get_iter_first()
|
||||||
while it:
|
while it:
|
||||||
sel = self.contents.get_value(it, self.COL_BINB) == "User Selected"
|
sel = "User Selected" in self.contents.get_value(it, self.COL_BINB)
|
||||||
name = self.contents.get_value(it, self.COL_NAME)
|
name = self.contents.get_value(it, self.COL_NAME)
|
||||||
allpkgs.append(name)
|
allpkgs.append(name)
|
||||||
if sel:
|
if sel:
|
||||||
@@ -513,6 +524,20 @@ class TaskListModel(gtk.ListStore):
|
|||||||
it = self.contents.iter_next(it)
|
it = self.contents.iter_next(it)
|
||||||
return userpkgs, allpkgs
|
return userpkgs, allpkgs
|
||||||
|
|
||||||
|
"""
|
||||||
|
Return a squished (uniquified) list of the PN's of all selected items
|
||||||
|
"""
|
||||||
|
def get_selected_pn(self):
|
||||||
|
pns = []
|
||||||
|
|
||||||
|
it = self.contents.get_iter_first()
|
||||||
|
while it:
|
||||||
|
if self.contents.get_value(it, self.COL_BINB):
|
||||||
|
pns.append(self.contents.get_value(it, self.COL_PN))
|
||||||
|
it = self.contents.iter_next(it)
|
||||||
|
|
||||||
|
return self.squish(pns)
|
||||||
|
|
||||||
def image_contents_removed(self):
|
def image_contents_removed(self):
|
||||||
it = self.get_iter_first()
|
it = self.get_iter_first()
|
||||||
while it:
|
while it:
|
||||||
@@ -547,7 +572,7 @@ class TaskListModel(gtk.ListStore):
|
|||||||
if not itype == 'package':
|
if not itype == 'package':
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if deps.count(pn) != 0:
|
if pn in deps:
|
||||||
revdeps.append(name)
|
revdeps.append(name)
|
||||||
|
|
||||||
if pn in revdeps:
|
if pn in revdeps:
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class MainWindow (gtk.Window):
|
|||||||
self.set_icon_name("applications-development")
|
self.set_icon_name("applications-development")
|
||||||
self.set_default_size(1000, 650)
|
self.set_default_size(1000, 650)
|
||||||
|
|
||||||
self.build = RunningBuild()
|
self.build = RunningBuild(sequential=True)
|
||||||
self.build.connect("build-failed", self.running_build_failed_cb)
|
self.build.connect("build-failed", self.running_build_failed_cb)
|
||||||
self.build.connect("build-succeeded", self.running_build_succeeded_cb)
|
self.build.connect("build-succeeded", self.running_build_succeeded_cb)
|
||||||
self.build.connect("build-started", self.build_started_cb)
|
self.build.connect("build-started", self.build_started_cb)
|
||||||
@@ -110,6 +110,28 @@ class MainWindow (gtk.Window):
|
|||||||
rep = self.model.get_build_rep()
|
rep = self.model.get_build_rep()
|
||||||
rep.writeRecipe(self.save_path, self.model)
|
rep.writeRecipe(self.save_path, self.model)
|
||||||
|
|
||||||
|
# Prevent the busy cursor being shown after hob exits if quit is called
|
||||||
|
# whilst the busy cursor is set
|
||||||
|
self.set_busy_cursor(False)
|
||||||
|
|
||||||
|
self.handler.remove_temp_dir()
|
||||||
|
|
||||||
|
gtk.main_quit()
|
||||||
|
|
||||||
|
"""
|
||||||
|
In the case of a fatal error give the user as much information as possible
|
||||||
|
and then exit.
|
||||||
|
"""
|
||||||
|
def fatal_error_cb(self, handler, errormsg, phase):
|
||||||
|
lbl = "<b>Error!</b>\nThere was an unrecoverable error during the"
|
||||||
|
lbl = lbl + " <i>%s</i> phase of BitBake. This must be" % phase
|
||||||
|
lbl = lbl + " rectified before the GUI will function. The error"
|
||||||
|
lbl = lbl + " message which which caused this is:\n\n\"%s\"" % errormsg
|
||||||
|
dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_ERROR)
|
||||||
|
dialog.add_button("Exit", gtk.RESPONSE_OK)
|
||||||
|
response = dialog.run()
|
||||||
|
dialog.destroy()
|
||||||
|
self.set_busy_cursor(False)
|
||||||
gtk.main_quit()
|
gtk.main_quit()
|
||||||
|
|
||||||
def scroll_tv_cb(self, model, path, it, view):
|
def scroll_tv_cb(self, model, path, it, view):
|
||||||
@@ -122,6 +144,7 @@ class MainWindow (gtk.Window):
|
|||||||
self.build_succeeded = False
|
self.build_succeeded = False
|
||||||
|
|
||||||
def image_changed_string_cb(self, model, new_image):
|
def image_changed_string_cb(self, model, new_image):
|
||||||
|
self.selected_image = new_image
|
||||||
# disconnect the image combo's signal handler
|
# disconnect the image combo's signal handler
|
||||||
if self.image_combo_id:
|
if self.image_combo_id:
|
||||||
self.image_combo.disconnect(self.image_combo_id)
|
self.image_combo.disconnect(self.image_combo_id)
|
||||||
@@ -136,7 +159,8 @@ class MainWindow (gtk.Window):
|
|||||||
it = self.model.images.iter_next(it)
|
it = self.model.images.iter_next(it)
|
||||||
cnt = cnt + 1
|
cnt = cnt + 1
|
||||||
# Reconnect the signal handler
|
# Reconnect the signal handler
|
||||||
self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb)
|
if not self.image_combo_id:
|
||||||
|
self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb)
|
||||||
|
|
||||||
def image_changed_cb(self, combo):
|
def image_changed_cb(self, combo):
|
||||||
model = self.image_combo.get_model()
|
model = self.image_combo.get_model()
|
||||||
@@ -151,6 +175,7 @@ class MainWindow (gtk.Window):
|
|||||||
self.toggle_package(path, model, image=True)
|
self.toggle_package(path, model, image=True)
|
||||||
if len(userp):
|
if len(userp):
|
||||||
self.model.set_selected_packages(userp)
|
self.model.set_selected_packages(userp)
|
||||||
|
self.selected_image = model[path][self.model.COL_NAME]
|
||||||
|
|
||||||
def reload_triggered_cb(self, handler, image, packages):
|
def reload_triggered_cb(self, handler, image, packages):
|
||||||
if image:
|
if image:
|
||||||
@@ -160,13 +185,6 @@ class MainWindow (gtk.Window):
|
|||||||
|
|
||||||
def data_generated(self, handler):
|
def data_generated(self, handler):
|
||||||
self.generating = False
|
self.generating = False
|
||||||
self.image_combo.set_model(self.model.images_model())
|
|
||||||
# Without this the image combo is incorrectly sized on first load of the GUI
|
|
||||||
self.image_combo.set_active(0)
|
|
||||||
self.image_combo.set_active(-1)
|
|
||||||
|
|
||||||
if not self.image_combo_id:
|
|
||||||
self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb)
|
|
||||||
self.enable_widgets()
|
self.enable_widgets()
|
||||||
|
|
||||||
def machine_combo_changed_cb(self, combo, handler):
|
def machine_combo_changed_cb(self, combo, handler):
|
||||||
@@ -175,8 +193,8 @@ class MainWindow (gtk.Window):
|
|||||||
self.curr_mach = mach
|
self.curr_mach = mach
|
||||||
# Flush this straight to the file as MACHINE is changed
|
# Flush this straight to the file as MACHINE is changed
|
||||||
# independently of other 'Preferences'
|
# independently of other 'Preferences'
|
||||||
self.configurator.setLocalConfVar('MACHINE', mach)
|
self.configurator.setConfVar('MACHINE', mach)
|
||||||
self.configurator.writeLocalConf()
|
self.configurator.writeConf()
|
||||||
handler.set_machine(mach)
|
handler.set_machine(mach)
|
||||||
handler.reload_data()
|
handler.reload_data()
|
||||||
|
|
||||||
@@ -218,7 +236,6 @@ class MainWindow (gtk.Window):
|
|||||||
|
|
||||||
def busy_idle_func(self):
|
def busy_idle_func(self):
|
||||||
if self.generating:
|
if self.generating:
|
||||||
self.progress.set_text("Loading...")
|
|
||||||
self.progress.pulse()
|
self.progress.pulse()
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
@@ -231,12 +248,13 @@ class MainWindow (gtk.Window):
|
|||||||
|
|
||||||
def busy(self, handler):
|
def busy(self, handler):
|
||||||
self.generating = True
|
self.generating = True
|
||||||
|
self.progress.set_text("Loading...")
|
||||||
self.set_busy_cursor()
|
self.set_busy_cursor()
|
||||||
if self.image_combo_id:
|
if self.image_combo_id:
|
||||||
self.image_combo.disconnect(self.image_combo_id)
|
self.image_combo.disconnect(self.image_combo_id)
|
||||||
self.image_combo_id = None
|
self.image_combo_id = None
|
||||||
self.progress.pulse()
|
self.progress.pulse()
|
||||||
gobject.timeout_add (200, self.busy_idle_func)
|
gobject.timeout_add (100, self.busy_idle_func)
|
||||||
self.disable_widgets()
|
self.disable_widgets()
|
||||||
|
|
||||||
def enable_widgets(self):
|
def enable_widgets(self):
|
||||||
@@ -263,6 +281,14 @@ class MainWindow (gtk.Window):
|
|||||||
pkgsaz_model.set_default_sort_func(None)
|
pkgsaz_model.set_default_sort_func(None)
|
||||||
self.pkgsaz_tree.set_model(pkgsaz_model)
|
self.pkgsaz_tree.set_model(pkgsaz_model)
|
||||||
|
|
||||||
|
self.image_combo.set_model(self.model.images_model())
|
||||||
|
# Without this the image combo is incorrectly sized on first load of the GUI
|
||||||
|
self.image_combo.set_active(0)
|
||||||
|
self.image_combo.set_active(-1)
|
||||||
|
|
||||||
|
if not self.image_combo_id:
|
||||||
|
self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb)
|
||||||
|
|
||||||
# We want the contents to be alphabetised so create a TreeModelSort to
|
# We want the contents to be alphabetised so create a TreeModelSort to
|
||||||
# use in the view
|
# use in the view
|
||||||
contents_model = gtk.TreeModelSort(self.model.contents_model())
|
contents_model = gtk.TreeModelSort(self.model.contents_model())
|
||||||
@@ -278,13 +304,11 @@ class MainWindow (gtk.Window):
|
|||||||
self.image_combo.disconnect(self.image_combo_id)
|
self.image_combo.disconnect(self.image_combo_id)
|
||||||
self.image_combo_id = None
|
self.image_combo_id = None
|
||||||
self.model.set_selected_image(self.selected_image)
|
self.model.set_selected_image(self.selected_image)
|
||||||
self.selected_image = None
|
|
||||||
if not self.image_combo_id:
|
if not self.image_combo_id:
|
||||||
self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb)
|
self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb)
|
||||||
|
|
||||||
if self.selected_packages:
|
if self.selected_packages:
|
||||||
self.model.set_selected_packages(self.selected_packages)
|
self.model.set_selected_packages(self.selected_packages)
|
||||||
self.selected_packages = None
|
|
||||||
|
|
||||||
def reset_clicked_cb(self, button):
|
def reset_clicked_cb(self, button):
|
||||||
lbl = "<b>Reset your selections?</b>\n\nAny new changes you have made will be lost"
|
lbl = "<b>Reset your selections?</b>\n\nAny new changes you have made will be lost"
|
||||||
@@ -296,14 +320,17 @@ class MainWindow (gtk.Window):
|
|||||||
if response == gtk.RESPONSE_OK:
|
if response == gtk.RESPONSE_OK:
|
||||||
self.reset_build()
|
self.reset_build()
|
||||||
self.search.set_text("")
|
self.search.set_text("")
|
||||||
|
self.selected_image = None
|
||||||
return
|
return
|
||||||
|
|
||||||
def reset_build(self):
|
def reset_build(self):
|
||||||
self.image_combo.disconnect(self.image_combo_id)
|
if self.image_combo_id:
|
||||||
self.image_combo_id = None
|
self.image_combo.disconnect(self.image_combo_id)
|
||||||
|
self.image_combo_id = None
|
||||||
self.image_combo.set_active(-1)
|
self.image_combo.set_active(-1)
|
||||||
self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb)
|
|
||||||
self.model.reset()
|
self.model.reset()
|
||||||
|
if not self.image_combo_id:
|
||||||
|
self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb)
|
||||||
|
|
||||||
def layers_cb(self, action):
|
def layers_cb(self, action):
|
||||||
resp = self.layers.run()
|
resp = self.layers.run()
|
||||||
@@ -312,6 +339,7 @@ class MainWindow (gtk.Window):
|
|||||||
|
|
||||||
def add_layer_cb(self, action):
|
def add_layer_cb(self, action):
|
||||||
self.layers.find_layer(self)
|
self.layers.find_layer(self)
|
||||||
|
self.layers.save_current_layers()
|
||||||
|
|
||||||
def preferences_cb(self, action):
|
def preferences_cb(self, action):
|
||||||
resp = self.prefs.run()
|
resp = self.prefs.run()
|
||||||
@@ -368,17 +396,31 @@ class MainWindow (gtk.Window):
|
|||||||
gtk.RESPONSE_OK))
|
gtk.RESPONSE_OK))
|
||||||
response = chooser.run()
|
response = chooser.run()
|
||||||
rep = BuildRep(None, None, None)
|
rep = BuildRep(None, None, None)
|
||||||
|
recipe = chooser.get_filename()
|
||||||
if response == gtk.RESPONSE_OK:
|
if response == gtk.RESPONSE_OK:
|
||||||
rep.loadRecipe(chooser.get_filename())
|
rep.loadRecipe(recipe)
|
||||||
|
self.save_path = recipe
|
||||||
|
self.model.load_image_rep(rep)
|
||||||
|
self.dirty = False
|
||||||
chooser.destroy()
|
chooser.destroy()
|
||||||
self.model.load_image_rep(rep)
|
|
||||||
self.dirty = False
|
|
||||||
|
|
||||||
def bake_clicked_cb(self, button):
|
def bake_clicked_cb(self, button):
|
||||||
build_image = True
|
build_image = True
|
||||||
|
|
||||||
rep = self.model.get_build_rep()
|
rep = self.model.get_build_rep()
|
||||||
if not rep.base_image:
|
|
||||||
|
# If no base image and no user selected packages don't build anything
|
||||||
|
if not self.selected_image and not len(rep.userpkgs):
|
||||||
|
lbl = "<b>No selections made</b>\nYou have not made any selections"
|
||||||
|
lbl = lbl + " so there isn't anything to bake at this time."
|
||||||
|
dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
|
||||||
|
dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
|
||||||
|
dialog.run()
|
||||||
|
dialog.destroy()
|
||||||
|
return
|
||||||
|
# Else if no base image, ask whether to just build packages or whether
|
||||||
|
# to build a rootfs with the selected packages in
|
||||||
|
elif not self.selected_image:
|
||||||
lbl = "<b>Build empty image or only packages?</b>\nA base image"
|
lbl = "<b>Build empty image or only packages?</b>\nA base image"
|
||||||
lbl = lbl + " has not been selected.\n\'Empty image' will build"
|
lbl = lbl + " has not been selected.\n\'Empty image' will build"
|
||||||
lbl = lbl + " an image with only the selected packages as its"
|
lbl = lbl + " an image with only the selected packages as its"
|
||||||
@@ -397,14 +439,29 @@ class MainWindow (gtk.Window):
|
|||||||
elif response == gtk.RESPONSE_OK:
|
elif response == gtk.RESPONSE_OK:
|
||||||
rep.base_image = "empty"
|
rep.base_image = "empty"
|
||||||
|
|
||||||
if build_image:
|
# Ensure at least one value is set in IMAGE_FSTYPES.
|
||||||
import tempfile, datetime
|
have_selected_fstype = False
|
||||||
|
if (len(self.prefs.selected_image_types) and
|
||||||
|
len(self.prefs.selected_image_types[0])):
|
||||||
|
have_selected_fstype = True
|
||||||
|
|
||||||
image_name = "hob-%s-variant-%s" % (rep.base_image, datetime.date.today().isoformat())
|
if build_image and not have_selected_fstype:
|
||||||
image_file = "%s.bb" % (image_name)
|
lbl = "<b>No image output type selected</b>\nThere is no image output"
|
||||||
image_dir = os.path.join(tempfile.gettempdir(), 'hob-images')
|
lbl = lbl + " selected for the build. Please set an output image type"
|
||||||
bb.utils.mkdirhier(image_dir)
|
lbl = lbl + " in the preferences (Edit -> Preferences)."
|
||||||
recipepath = os.path.join(image_dir, image_file)
|
dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
|
||||||
|
dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
|
||||||
|
dialog.run()
|
||||||
|
dialog.destroy()
|
||||||
|
return
|
||||||
|
elif build_image:
|
||||||
|
self.handler.make_temp_dir()
|
||||||
|
recipepath = self.handler.get_temp_recipe_path(rep.base_image)
|
||||||
|
image_name = recipepath.rstrip(".bb")
|
||||||
|
path, sep, image_name = image_name.rpartition("/")
|
||||||
|
|
||||||
|
image = []
|
||||||
|
image.append(image_name)
|
||||||
|
|
||||||
rep.writeRecipe(recipepath, self.model)
|
rep.writeRecipe(recipepath, self.model)
|
||||||
# In the case where we saved the file for the purpose of building
|
# In the case where we saved the file for the purpose of building
|
||||||
@@ -413,29 +470,45 @@ class MainWindow (gtk.Window):
|
|||||||
if not self.save_path:
|
if not self.save_path:
|
||||||
self.files_to_clean.append(recipepath)
|
self.files_to_clean.append(recipepath)
|
||||||
|
|
||||||
self.handler.build_image(image_name, image_dir, self.configurator)
|
self.handler.build_targets(image, self.configurator)
|
||||||
else:
|
else:
|
||||||
self.handler.build_packages(rep.allpkgs.split(" "))
|
self.handler.build_targets(self.model.get_selected_pn(), self.configurator, "packages")
|
||||||
|
|
||||||
|
# Disable parts of the menu which shouldn't be used whilst building
|
||||||
|
self.set_menus_sensitive(False)
|
||||||
self.nb.set_current_page(1)
|
self.nb.set_current_page(1)
|
||||||
|
|
||||||
|
def set_menus_sensitive(self, sensitive):
|
||||||
|
self.add_layers_action.set_sensitive(sensitive)
|
||||||
|
self.layers_action.set_sensitive(sensitive)
|
||||||
|
self.prefs_action.set_sensitive(sensitive)
|
||||||
|
self.open_action.set_sensitive(sensitive)
|
||||||
|
|
||||||
def back_button_clicked_cb(self, button):
|
def back_button_clicked_cb(self, button):
|
||||||
self.toggle_createview()
|
self.toggle_createview()
|
||||||
|
|
||||||
def toggle_createview(self):
|
def toggle_createview(self):
|
||||||
self.build.model.clear()
|
self.set_menus_sensitive(True)
|
||||||
|
self.build.reset()
|
||||||
self.nb.set_current_page(0)
|
self.nb.set_current_page(0)
|
||||||
|
|
||||||
def build_complete_cb(self, running_build):
|
def build_complete_cb(self, running_build):
|
||||||
|
# Have the handler process BB events again
|
||||||
|
self.handler.building = False
|
||||||
self.stopping = False
|
self.stopping = False
|
||||||
self.back.connect("clicked", self.back_button_clicked_cb)
|
self.back.connect("clicked", self.back_button_clicked_cb)
|
||||||
self.back.set_sensitive(True)
|
self.back.set_sensitive(True)
|
||||||
self.cancel.set_sensitive(False)
|
self.cancel.set_sensitive(False)
|
||||||
for f in self.files_to_clean:
|
for f in self.files_to_clean:
|
||||||
os.remove(f)
|
try:
|
||||||
|
os.remove(f)
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
self.files_to_clean.remove(f)
|
||||||
|
self.files_to_clean = []
|
||||||
|
|
||||||
lbl = "<b>Build completed</b>\n\nClick 'Edit Image' to start another build or 'View Messages' to view the messages output during the build."
|
lbl = "<b>Build completed</b>\n\nClick 'Edit Image' to start another build or 'View Messages' to view the messages output during the build."
|
||||||
if self.handler.building == "image" and self.build_succeeded:
|
if self.handler.build_type == "image" and self.build_succeeded:
|
||||||
deploy = self.handler.get_image_deploy_dir()
|
deploy = self.handler.get_image_deploy_dir()
|
||||||
lbl = lbl + "\n<a href=\"file://%s\" title=\"%s\">Browse folder of built images</a>." % (deploy, deploy)
|
lbl = lbl + "\n<a href=\"file://%s\" title=\"%s\">Browse folder of built images</a>." % (deploy, deploy)
|
||||||
|
|
||||||
@@ -481,14 +554,17 @@ class MainWindow (gtk.Window):
|
|||||||
"""
|
"""
|
||||||
# Whether the item is currently included
|
# Whether the item is currently included
|
||||||
inc = self.model[opath][self.model.COL_INC]
|
inc = self.model[opath][self.model.COL_INC]
|
||||||
|
# FIXME: due to inpredictability of the removal of packages we are
|
||||||
|
# temporarily disabling this feature
|
||||||
# If the item is already included, mark it for removal then
|
# If the item is already included, mark it for removal then
|
||||||
# the sweep_up() method finds affected items and marks them
|
# the sweep_up() method finds affected items and marks them
|
||||||
# appropriately
|
# appropriately
|
||||||
if inc:
|
# if inc:
|
||||||
self.model.mark(opath)
|
# self.model.mark(opath)
|
||||||
self.model.sweep_up()
|
# self.model.sweep_up()
|
||||||
# If the item isn't included, mark it for inclusion
|
# # If the item isn't included, mark it for inclusion
|
||||||
else:
|
# else:
|
||||||
|
if not inc:
|
||||||
self.model.include_item(item_path=opath,
|
self.model.include_item(item_path=opath,
|
||||||
binb="User Selected",
|
binb="User Selected",
|
||||||
image_contents=image)
|
image_contents=image)
|
||||||
@@ -500,19 +576,22 @@ class MainWindow (gtk.Window):
|
|||||||
inc = model[path][self.model.COL_INC]
|
inc = model[path][self.model.COL_INC]
|
||||||
# Warn user before removing included packages
|
# Warn user before removing included packages
|
||||||
if inc:
|
if inc:
|
||||||
pn = model[path][self.model.COL_NAME]
|
# FIXME: due to inpredictability of the removal of packages we are
|
||||||
revdeps = self.model.find_reverse_depends(pn)
|
# temporarily disabling this feature
|
||||||
if len(revdeps):
|
return
|
||||||
lbl = "<b>Remove %s?</b>\n\nThis action cannot be undone and all packages which depend on this will be removed\nPackages which depend on %s include %s." % (pn, pn, ", ".join(revdeps).rstrip(","))
|
# pn = model[path][self.model.COL_NAME]
|
||||||
else:
|
# revdeps = self.model.find_reverse_depends(pn)
|
||||||
lbl = "<b>Remove %s?</b>\n\nThis action cannot be undone." % pn
|
# if len(revdeps):
|
||||||
dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
|
# lbl = "<b>Remove %s?</b>\n\nThis action cannot be undone and all packages which depend on this will be removed\nPackages which depend on %s include %s." % (pn, pn, ", ".join(revdeps).rstrip(","))
|
||||||
dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
|
# else:
|
||||||
dialog.add_button("Remove", gtk.RESPONSE_OK)
|
# lbl = "<b>Remove %s?</b>\n\nThis action cannot be undone." % pn
|
||||||
response = dialog.run()
|
# dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
|
||||||
dialog.destroy()
|
# dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
|
||||||
if response == gtk.RESPONSE_CANCEL:
|
# dialog.add_button("Remove", gtk.RESPONSE_OK)
|
||||||
return
|
# response = dialog.run()
|
||||||
|
# dialog.destroy()
|
||||||
|
# if response == gtk.RESPONSE_CANCEL:
|
||||||
|
# return
|
||||||
|
|
||||||
self.set_busy_cursor()
|
self.set_busy_cursor()
|
||||||
# Convert path to path in original model
|
# Convert path to path in original model
|
||||||
@@ -711,7 +790,7 @@ class MainWindow (gtk.Window):
|
|||||||
vbox = gtk.VBox(False, 12)
|
vbox = gtk.VBox(False, 12)
|
||||||
vbox.set_border_width(6)
|
vbox.set_border_width(6)
|
||||||
vbox.show()
|
vbox.show()
|
||||||
build_tv = RunningBuildTreeView()
|
build_tv = RunningBuildTreeView(readonly=True)
|
||||||
build_tv.show()
|
build_tv.show()
|
||||||
build_tv.set_model(self.build.model)
|
build_tv.set_model(self.build.model)
|
||||||
self.build.model.connect("row-inserted", self.scroll_tv_cb, build_tv)
|
self.build.model.connect("row-inserted", self.scroll_tv_cb, build_tv)
|
||||||
@@ -762,18 +841,27 @@ class MainWindow (gtk.Window):
|
|||||||
|
|
||||||
actions = gtk.ActionGroup('ImageCreator')
|
actions = gtk.ActionGroup('ImageCreator')
|
||||||
self.actions = actions
|
self.actions = actions
|
||||||
actions.add_actions([('Quit', gtk.STOCK_QUIT, None, None,
|
actions.add_actions([('Quit', gtk.STOCK_QUIT, None, None, None, self.menu_quit,),
|
||||||
None, self.menu_quit,),
|
|
||||||
('File', None, '_File'),
|
('File', None, '_File'),
|
||||||
('Save', gtk.STOCK_SAVE, None, None, None, self.save_cb),
|
('Save', gtk.STOCK_SAVE, None, None, None, self.save_cb),
|
||||||
('Save As', gtk.STOCK_SAVE_AS, None, None, None, self.save_as_cb),
|
('Save As', gtk.STOCK_SAVE_AS, None, None, None, self.save_as_cb),
|
||||||
('Open', gtk.STOCK_OPEN, None, None, None, self.open_cb),
|
|
||||||
('AddLayer', None, 'Add Layer', None, None, self.add_layer_cb),
|
|
||||||
('Edit', None, '_Edit'),
|
('Edit', None, '_Edit'),
|
||||||
('Help', None, '_Help'),
|
('Help', None, '_Help'),
|
||||||
('Layers', None, 'Layers', None, None, self.layers_cb),
|
|
||||||
('Preferences', gtk.STOCK_PREFERENCES, None, None, None, self.preferences_cb),
|
|
||||||
('About', gtk.STOCK_ABOUT, None, None, None, self.about_cb)])
|
('About', gtk.STOCK_ABOUT, None, None, None, self.about_cb)])
|
||||||
|
|
||||||
|
self.add_layers_action = gtk.Action('AddLayer', 'Add Layer', None, None)
|
||||||
|
self.add_layers_action.connect("activate", self.add_layer_cb)
|
||||||
|
self.actions.add_action(self.add_layers_action)
|
||||||
|
self.layers_action = gtk.Action('Layers', 'Layers', None, None)
|
||||||
|
self.layers_action.connect("activate", self.layers_cb)
|
||||||
|
self.actions.add_action(self.layers_action)
|
||||||
|
self.prefs_action = gtk.Action('Preferences', 'Preferences', None, None)
|
||||||
|
self.prefs_action.connect("activate", self.preferences_cb)
|
||||||
|
self.actions.add_action(self.prefs_action)
|
||||||
|
self.open_action = gtk.Action('Open', 'Open', None, None)
|
||||||
|
self.open_action.connect("activate", self.open_cb)
|
||||||
|
self.actions.add_action(self.open_action)
|
||||||
|
|
||||||
uimanager.insert_action_group(actions, 0)
|
uimanager.insert_action_group(actions, 0)
|
||||||
uimanager.add_ui_from_string(menu_items)
|
uimanager.add_ui_from_string(menu_items)
|
||||||
|
|
||||||
@@ -781,6 +869,14 @@ class MainWindow (gtk.Window):
|
|||||||
menubar.show_all()
|
menubar.show_all()
|
||||||
|
|
||||||
return menubar
|
return menubar
|
||||||
|
|
||||||
|
def info_button_clicked_cb(self, button):
|
||||||
|
info = "We cannot accurately predict the image contents before they are built so instead a best"
|
||||||
|
info = info + " attempt at estimating what the image will contain is listed."
|
||||||
|
dialog = CrumbsDialog(self, info, gtk.STOCK_DIALOG_INFO)
|
||||||
|
dialog.add_buttons(gtk.STOCK_CLOSE, gtk.RESPONSE_OK)
|
||||||
|
resp = dialog.run()
|
||||||
|
dialog.destroy()
|
||||||
|
|
||||||
def create_build_gui(self):
|
def create_build_gui(self):
|
||||||
vbox = gtk.VBox(False, 12)
|
vbox = gtk.VBox(False, 12)
|
||||||
@@ -824,11 +920,19 @@ class MainWindow (gtk.Window):
|
|||||||
ins.set_current_page(0)
|
ins.set_current_page(0)
|
||||||
ins.show_all()
|
ins.show_all()
|
||||||
|
|
||||||
label = gtk.Label("Image contents:")
|
hbox = gtk.HBox(False, 1)
|
||||||
|
hbox.show()
|
||||||
|
label = gtk.Label("Estimated image contents:")
|
||||||
self.model.connect("contents-changed", self.update_package_count_cb, label)
|
self.model.connect("contents-changed", self.update_package_count_cb, label)
|
||||||
label.set_property("xalign", 0.00)
|
label.set_property("xalign", 0.00)
|
||||||
label.show()
|
label.show()
|
||||||
vbox.pack_start(label, expand=False, fill=False, padding=6)
|
hbox.pack_start(label, expand=False, fill=False, padding=6)
|
||||||
|
info = gtk.Button("?")
|
||||||
|
info.set_tooltip_text("What does this mean?")
|
||||||
|
info.show()
|
||||||
|
info.connect("clicked", self.info_button_clicked_cb)
|
||||||
|
hbox.pack_start(info, expand=False, fill=False, padding=6)
|
||||||
|
vbox.pack_start(hbox, expand=False, fill=False, padding=6)
|
||||||
con = self.contents()
|
con = self.contents()
|
||||||
con.show()
|
con.show()
|
||||||
vbox.pack_start(con, expand=True, fill=True)
|
vbox.pack_start(con, expand=True, fill=True)
|
||||||
@@ -850,7 +954,7 @@ class MainWindow (gtk.Window):
|
|||||||
return vbox
|
return vbox
|
||||||
|
|
||||||
def update_package_count_cb(self, model, count, label):
|
def update_package_count_cb(self, model, count, label):
|
||||||
lbl = "Image contents (%s packages):" % count
|
lbl = "Estimated image contents (%s packages):" % count
|
||||||
label.set_text(lbl)
|
label.set_text(lbl)
|
||||||
|
|
||||||
def contents(self):
|
def contents(self):
|
||||||
@@ -892,11 +996,29 @@ class MainWindow (gtk.Window):
|
|||||||
return scroll
|
return scroll
|
||||||
|
|
||||||
def main (server, eventHandler):
|
def main (server, eventHandler):
|
||||||
import multiprocessing
|
|
||||||
cpu_cnt = multiprocessing.cpu_count()
|
|
||||||
|
|
||||||
gobject.threads_init()
|
gobject.threads_init()
|
||||||
|
|
||||||
|
# NOTE: For now we require that the user run with pre and post files to
|
||||||
|
# read and store configuration set in the GUI.
|
||||||
|
# We hope to adjust this long term as tracked in Yocto Bugzilla #1441
|
||||||
|
# http://bugzilla.pokylinux.org/show_bug.cgi?id=1441
|
||||||
|
reqfiles = 0
|
||||||
|
dep_files = server.runCommand(["getVariable", "__depends"]) or set()
|
||||||
|
dep_files.union(server.runCommand(["getVariable", "__base_depends"]) or set())
|
||||||
|
for f in dep_files:
|
||||||
|
if f[0].endswith("hob-pre.conf"):
|
||||||
|
reqfiles = reqfiles + 1
|
||||||
|
elif f[0].endswith("hob-post.conf"):
|
||||||
|
reqfiles = reqfiles + 1
|
||||||
|
if reqfiles == 2:
|
||||||
|
break
|
||||||
|
if reqfiles < 2:
|
||||||
|
print("""The hob UI requires a pre file named hob-pre.conf and a post
|
||||||
|
file named hob-post.conf to store and read its configuration from. Please run
|
||||||
|
hob with these files, i.e.\n
|
||||||
|
\bitbake -u hob -r conf/hob-pre.conf -R conf/hob-post.conf""")
|
||||||
|
return
|
||||||
|
|
||||||
taskmodel = TaskListModel()
|
taskmodel = TaskListModel()
|
||||||
configurator = Configurator()
|
configurator = Configurator()
|
||||||
handler = HobHandler(taskmodel, server)
|
handler = HobHandler(taskmodel, server)
|
||||||
@@ -907,16 +1029,16 @@ def main (server, eventHandler):
|
|||||||
if not sdk_mach:
|
if not sdk_mach:
|
||||||
sdk_mach = server.runCommand(["getVariable", "SDK_ARCH"])
|
sdk_mach = server.runCommand(["getVariable", "SDK_ARCH"])
|
||||||
distro = server.runCommand(["getVariable", "DISTRO"])
|
distro = server.runCommand(["getVariable", "DISTRO"])
|
||||||
|
if not distro:
|
||||||
|
distro = "defaultsetup"
|
||||||
bbthread = server.runCommand(["getVariable", "BB_NUMBER_THREADS"])
|
bbthread = server.runCommand(["getVariable", "BB_NUMBER_THREADS"])
|
||||||
if not bbthread:
|
if not bbthread:
|
||||||
bbthread = cpu_cnt
|
bbthread = 1
|
||||||
handler.set_bbthreads(cpu_cnt)
|
|
||||||
else:
|
else:
|
||||||
bbthread = int(bbthread)
|
bbthread = int(bbthread)
|
||||||
pmake = server.runCommand(["getVariable", "PARALLEL_MAKE"])
|
pmake = server.runCommand(["getVariable", "PARALLEL_MAKE"])
|
||||||
if not pmake:
|
if not pmake:
|
||||||
pmake = cpu_cnt
|
pmake = 1
|
||||||
handler.set_pmake(cpu_cnt)
|
|
||||||
else:
|
else:
|
||||||
# The PARALLEL_MAKE variable will be of the format: "-j 3" and we only
|
# The PARALLEL_MAKE variable will be of the format: "-j 3" and we only
|
||||||
# want a number for the spinner, so strip everything from the variable
|
# want a number for the spinner, so strip everything from the variable
|
||||||
@@ -934,13 +1056,15 @@ def main (server, eventHandler):
|
|||||||
|
|
||||||
incompatible = server.runCommand(["getVariable", "INCOMPATIBLE_LICENSE"])
|
incompatible = server.runCommand(["getVariable", "INCOMPATIBLE_LICENSE"])
|
||||||
gplv3disabled = False
|
gplv3disabled = False
|
||||||
if incompatible and incompatible.lower().find("gplv3"):
|
if incompatible and incompatible.lower().find("gplv3") != -1:
|
||||||
gplv3disabled = True
|
gplv3disabled = True
|
||||||
|
|
||||||
build_toolchain = bool(server.runCommand(["getVariable", "HOB_BUILD_TOOLCHAIN"]))
|
build_toolchain = bool(server.runCommand(["getVariable", "HOB_BUILD_TOOLCHAIN"]))
|
||||||
|
handler.toggle_toolchain(build_toolchain)
|
||||||
build_headers = bool(server.runCommand(["getVariable", "HOB_BUILD_TOOLCHAIN_HEADERS"]))
|
build_headers = bool(server.runCommand(["getVariable", "HOB_BUILD_TOOLCHAIN_HEADERS"]))
|
||||||
|
handler.toggle_toolchain_headers(build_headers)
|
||||||
|
|
||||||
prefs = HobPrefs(configurator, handler, sdk_mach, distro, pclass, cpu_cnt,
|
prefs = HobPrefs(configurator, handler, sdk_mach, distro, pclass,
|
||||||
pmake, bbthread, selected_image_types, all_image_types,
|
pmake, bbthread, selected_image_types, all_image_types,
|
||||||
gplv3disabled, build_toolchain, build_headers)
|
gplv3disabled, build_toolchain, build_headers)
|
||||||
layers = LayerEditor(configurator, None)
|
layers = LayerEditor(configurator, None)
|
||||||
@@ -958,6 +1082,7 @@ def main (server, eventHandler):
|
|||||||
configurator.connect("layers-loaded", layers.load_current_layers)
|
configurator.connect("layers-loaded", layers.load_current_layers)
|
||||||
configurator.connect("layers-changed", handler.reload_data)
|
configurator.connect("layers-changed", handler.reload_data)
|
||||||
handler.connect("config-found", configurator.configFound)
|
handler.connect("config-found", configurator.configFound)
|
||||||
|
handler.connect("fatal-error", window.fatal_error_cb)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# kick the while thing off
|
# kick the while thing off
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ def main(server, eventHandler):
|
|||||||
|
|
||||||
console = logging.StreamHandler(sys.stdout)
|
console = logging.StreamHandler(sys.stdout)
|
||||||
format = bb.msg.BBLogFormatter("%(levelname)s: %(message)s")
|
format = bb.msg.BBLogFormatter("%(levelname)s: %(message)s")
|
||||||
|
bb.msg.addDefaultlogFilter(console)
|
||||||
console.setFormatter(format)
|
console.setFormatter(format)
|
||||||
logger.addHandler(console)
|
logger.addHandler(console)
|
||||||
|
|
||||||
@@ -120,8 +121,8 @@ def main(server, eventHandler):
|
|||||||
# For "normal" logging conditions, don't show note logs from tasks
|
# For "normal" logging conditions, don't show note logs from tasks
|
||||||
# but do show them if the user has changed the default log level to
|
# but do show them if the user has changed the default log level to
|
||||||
# include verbose/debug messages
|
# include verbose/debug messages
|
||||||
if logger.getEffectiveLevel() > format.VERBOSE:
|
#if logger.getEffectiveLevel() > format.VERBOSE:
|
||||||
if event.taskpid != 0 and event.levelno <= format.NOTE:
|
if event.taskpid != 0 and event.levelno <= format.NOTE:
|
||||||
continue
|
continue
|
||||||
logger.handle(event)
|
logger.handle(event)
|
||||||
continue
|
continue
|
||||||
@@ -188,7 +189,8 @@ def main(server, eventHandler):
|
|||||||
logger.error("Command execution failed: %s", event.error)
|
logger.error("Command execution failed: %s", event.error)
|
||||||
break
|
break
|
||||||
if isinstance(event, bb.command.CommandExit):
|
if isinstance(event, bb.command.CommandExit):
|
||||||
return_value = event.exitcode
|
if not return_value:
|
||||||
|
return_value = event.exitcode
|
||||||
continue
|
continue
|
||||||
if isinstance(event, bb.cooker.CookerExit):
|
if isinstance(event, bb.cooker.CookerExit):
|
||||||
break
|
break
|
||||||
@@ -199,6 +201,7 @@ def main(server, eventHandler):
|
|||||||
logger.info("consider defining a PREFERRED_PROVIDER entry to match %s", event._item)
|
logger.info("consider defining a PREFERRED_PROVIDER entry to match %s", event._item)
|
||||||
continue
|
continue
|
||||||
if isinstance(event, bb.event.NoProvider):
|
if isinstance(event, bb.event.NoProvider):
|
||||||
|
return_value = 1
|
||||||
if event._runtime:
|
if event._runtime:
|
||||||
r = "R"
|
r = "R"
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ class NCursesUI:
|
|||||||
# if isinstance(event, bb.build.TaskFailed):
|
# if isinstance(event, bb.build.TaskFailed):
|
||||||
# if event.logfile:
|
# if event.logfile:
|
||||||
# if data.getVar("BBINCLUDELOGS", d):
|
# if data.getVar("BBINCLUDELOGS", d):
|
||||||
# bb.msg.error(bb.msg.domain.Build, "log data follows (%s)" % logfile)
|
# bb.error("log data follows (%s)" % logfile)
|
||||||
# number_of_lines = data.getVar("BBINCLUDELOGS_LINES", d)
|
# number_of_lines = data.getVar("BBINCLUDELOGS_LINES", d)
|
||||||
# if number_of_lines:
|
# if number_of_lines:
|
||||||
# os.system('tail -n%s %s' % (number_of_lines, logfile))
|
# os.system('tail -n%s %s' % (number_of_lines, logfile))
|
||||||
@@ -297,7 +297,7 @@ class NCursesUI:
|
|||||||
# print '| %s' % l
|
# print '| %s' % l
|
||||||
# f.close()
|
# f.close()
|
||||||
# else:
|
# else:
|
||||||
# bb.msg.error(bb.msg.domain.Build, "see log in %s" % logfile)
|
# bb.error("see log in %s" % logfile)
|
||||||
|
|
||||||
if isinstance(event, bb.command.CommandCompleted):
|
if isinstance(event, bb.command.CommandCompleted):
|
||||||
# stop so the user can see the result of the build, but
|
# stop so the user can see the result of the build, but
|
||||||
|
|||||||
@@ -443,7 +443,7 @@ def lockfile(name, shared=False, retry=True):
|
|||||||
return lf
|
return lf
|
||||||
lf.close()
|
lf.close()
|
||||||
except Exception:
|
except Exception:
|
||||||
continue
|
pass
|
||||||
if not retry:
|
if not retry:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@@ -505,7 +505,6 @@ def preserved_envvars_exported():
|
|||||||
'SHELL',
|
'SHELL',
|
||||||
'TERM',
|
'TERM',
|
||||||
'USER',
|
'USER',
|
||||||
'USERNAME',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
def preserved_envvars_exported_interactive():
|
def preserved_envvars_exported_interactive():
|
||||||
@@ -565,18 +564,27 @@ def create_interactive_env(d):
|
|||||||
for k in preserved_envvars_exported_interactive():
|
for k in preserved_envvars_exported_interactive():
|
||||||
os.setenv(k, bb.data.getVar(k, d, True))
|
os.setenv(k, bb.data.getVar(k, d, True))
|
||||||
|
|
||||||
|
def approved_variables():
|
||||||
|
"""
|
||||||
|
Determine and return the list of whitelisted variables which are approved
|
||||||
|
to remain in the envrionment.
|
||||||
|
"""
|
||||||
|
approved = []
|
||||||
|
if 'BB_ENV_WHITELIST' in os.environ:
|
||||||
|
approved = os.environ['BB_ENV_WHITELIST'].split()
|
||||||
|
else:
|
||||||
|
approved = preserved_envvars()
|
||||||
|
if 'BB_ENV_EXTRAWHITE' in os.environ:
|
||||||
|
approved.extend(os.environ['BB_ENV_EXTRAWHITE'].split())
|
||||||
|
return approved
|
||||||
|
|
||||||
def clean_environment():
|
def clean_environment():
|
||||||
"""
|
"""
|
||||||
Clean up any spurious environment variables. This will remove any
|
Clean up any spurious environment variables. This will remove any
|
||||||
variables the user hasn't chose to preserve.
|
variables the user hasn't chosen to preserve.
|
||||||
"""
|
"""
|
||||||
if 'BB_PRESERVE_ENV' not in os.environ:
|
if 'BB_PRESERVE_ENV' not in os.environ:
|
||||||
if 'BB_ENV_WHITELIST' in os.environ:
|
good_vars = approved_variables()
|
||||||
good_vars = os.environ['BB_ENV_WHITELIST'].split()
|
|
||||||
else:
|
|
||||||
good_vars = preserved_envvars()
|
|
||||||
if 'BB_ENV_EXTRAWHITE' in os.environ:
|
|
||||||
good_vars.extend(os.environ['BB_ENV_EXTRAWHITE'].split())
|
|
||||||
filter_environment(good_vars)
|
filter_environment(good_vars)
|
||||||
|
|
||||||
def empty_environment():
|
def empty_environment():
|
||||||
@@ -830,21 +838,6 @@ def which(path, item, direction = 0):
|
|||||||
|
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
def init_logger(logger, verbose, debug, debug_domains):
|
|
||||||
"""
|
|
||||||
Set verbosity and debug levels in the logger
|
|
||||||
"""
|
|
||||||
|
|
||||||
if debug:
|
|
||||||
bb.msg.set_debug_level(debug)
|
|
||||||
elif verbose:
|
|
||||||
bb.msg.set_verbose(True)
|
|
||||||
else:
|
|
||||||
bb.msg.set_debug_level(0)
|
|
||||||
|
|
||||||
if debug_domains:
|
|
||||||
bb.msg.set_debug_domains(debug_domains)
|
|
||||||
|
|
||||||
def to_boolean(string, default=None):
|
def to_boolean(string, default=None):
|
||||||
if not string:
|
if not string:
|
||||||
return default
|
return default
|
||||||
|
|||||||
@@ -1,41 +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'
|
||||||
# You must invoke the Makefile with the DOC and VER arguments.
|
# 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
|
||||||
|
# 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.
|
||||||
|
# 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 VER=1.1
|
# make DOC=bsp-guide
|
||||||
# make DOC=yocto-project-qs VER=1.1
|
# make DOC=yocto-project-qs
|
||||||
# make pdf DOC=yocto-project-qs VER=1.1
|
# 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 for
|
# The first example generates the HTML and PDF versions of the BSP Guide.
|
||||||
# the Yocto Project 1.1 Release. The second example generates the HTML version
|
# The second example generates the HTML version only of the Quick Start. Note that
|
||||||
# of the Quick Start. The third example generates an error because you cannot
|
# the Quick Start only has an HTML version available. The third example generates
|
||||||
# generate a PDF version of the Quick Start.
|
# 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.2 version of both the PDF and HTML versions of
|
||||||
|
# the BSP Guide. The second example publishes the 1.2 version of both the PDF and
|
||||||
|
# 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)
|
||||||
@@ -59,7 +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/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/kernel-example-repos-edison.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
|
||||||
|
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
|
||||||
@@ -84,7 +129,7 @@ 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 = poky-ref-manual.html style.css figures/poky-title.png figures/ss-sato.png
|
TARFILES = poky-ref-manual.html style.css figures/poky-title.png
|
||||||
MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
|
MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
|
||||||
FIGURES = figures
|
FIGURES = figures
|
||||||
STYLESHEET = $(DOC)/*.css
|
STYLESHEET = $(DOC)/*.css
|
||||||
|
|||||||
@@ -3,30 +3,32 @@
|
|||||||
|
|
||||||
<chapter id='using-the-command-line'>
|
<chapter id='using-the-command-line'>
|
||||||
<title>Using the Command Line</title>
|
<title>Using the Command Line</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Recall that earlier we talked about how to use an existing toolchain
|
Recall that earlier the manual discussed how to use an existing toolchain
|
||||||
tarball that had been installed into <filename>/opt/poky</filename>,
|
tarball that had been installed into <filename>/opt/poky</filename>,
|
||||||
which is outside of the Yocto Project build tree
|
which is outside of the Yocto Project build tree
|
||||||
(see <xref linkend='using-an-existing-toolchain-tarball'>
|
(see the section "<link linkend='using-an-existing-toolchain-tarball'>Using an Existing
|
||||||
“Using an Existing Toolchain Tarball”)</xref>.
|
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
|
||||||
test results for tests that need target hardware on which to run.
|
test results for tests that need target hardware on which to run.
|
||||||
These conditions allow you to easily use the toolchain outside of the
|
These conditions allow you to easily use the toolchain outside of the
|
||||||
Yocto Project build environment on both autotools-based projects and
|
Yocto Project build environment on both autotools-based projects and
|
||||||
makefile-based projects.
|
Makefile-based projects.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='autotools-based-projects'>
|
<section id='autotools-based-projects'>
|
||||||
<title>Autotools-Based Projects</title>
|
<title>Autotools-Based Projects</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
For an autotools-based project you can use the cross-toolchain by just
|
For an Autotools-based project, you can use the cross-toolchain by just
|
||||||
passing the appropriate host option to <filename>configure.sh</filename>.
|
passing the appropriate host option to <filename>configure.sh</filename>.
|
||||||
The host option you use is derived from the name of the environment setup
|
The host option you use is derived from the name of the environment setup
|
||||||
script in <filename>/opt/poky</filename> resulting from unpacking the
|
script in <filename>/opt/poky</filename> resulting from unpacking the
|
||||||
@@ -37,26 +39,42 @@
|
|||||||
<filename>environment-setup-armv5te-poky-linux-gnueabi</filename>.
|
<filename>environment-setup-armv5te-poky-linux-gnueabi</filename>.
|
||||||
Thus, the following command works:
|
Thus, the following command works:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ configure ‐‐host-armv5te-poky-linux-gnueabi ‐‐with-libtool-sysroot=<sysroot-dir>
|
$ configure --host=armv5te-poky-linux-gnueabi \
|
||||||
|
--with-libtool-sysroot=<sysroot-dir>
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
This single command updates your project and rebuilds it using the appropriate
|
This single command updates your project and rebuilds it using the appropriate
|
||||||
cross-toolchain tools.
|
cross-toolchain tools.
|
||||||
</para>
|
</para>
|
||||||
|
<note>
|
||||||
|
If <filename>configure</filename> script results in problems recognizing the
|
||||||
|
<filename>--with-libtool-sysroot=<sysroot-dir></filename> option,
|
||||||
|
regenerate the script to enable the support by doing the following and then
|
||||||
|
re-running the script:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ libtoolize --automake
|
||||||
|
$ aclocal -I ${OECORE_NATIVE_SYSROOT}/usr/share/aclocal \
|
||||||
|
[-I <dir_containing_your_project-specific_m4_macros>]
|
||||||
|
$ autoconf
|
||||||
|
$ autoheader
|
||||||
|
$ automake -a
|
||||||
|
</literallayout>
|
||||||
|
</note>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='makefile-based-projects'>
|
<section id='makefile-based-projects'>
|
||||||
<title>Makefile-Based Projects</title>
|
<title>Makefile-Based Projects</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
For a makefile-based project you use the cross-toolchain by making sure
|
For a Makefile-based project, you use the cross-toolchain by making sure
|
||||||
the tools are used.
|
the tools are used.
|
||||||
You can do this as follows:
|
You can do this as follows:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
CC=arm-poky-linux-gnueabi-gcc
|
CC=arm-poky-linux-gnueabi-gcc
|
||||||
LD=arm-poky-linux-gnueabi-ld
|
LD=arm-poky-linux-gnueabi-ld
|
||||||
CFLAGS=”${CFLAGS} ‐‐sysroot=<sysroot-dir>”
|
CFLAGS=”${CFLAGS} --sysroot=<sysroot-dir>”
|
||||||
CXXFLAGS=”${CXXFLAGS} ‐‐sysroot=<sysroot-dir>”
|
CXXFLAGS=”${CXXFLAGS} --sysroot=<sysroot-dir>”
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -3,17 +3,18 @@
|
|||||||
|
|
||||||
<chapter id='adt-eclipse'>
|
<chapter id='adt-eclipse'>
|
||||||
<title>Working Within Eclipse</title>
|
<title>Working Within Eclipse</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The Eclipse IDE is a popular development environment and it fully supports
|
The Eclipse IDE is a popular development environment and it fully supports
|
||||||
development using Yocto Project.
|
development using Yocto Project.
|
||||||
When you install and configure the Eclipse Yocto Project Plug-in into
|
When you install and configure the Eclipse Yocto Project Plug-in into
|
||||||
the Eclipse IDE you maximize your Yocto Project design experience.
|
the Eclipse IDE, you maximize your Yocto Project design experience.
|
||||||
Installing and configuring the Plug-in results in an environment that
|
Installing and configuring the Plug-in results in an environment that
|
||||||
has extensions specifically designed to let you more easily develop software.
|
has extensions specifically designed to let you more easily develop software.
|
||||||
These extensions allow for cross-compilation and deployment and execution of
|
These extensions allow for cross-compilation, deployment, and execution of
|
||||||
your output into a QEMU emulation session.
|
your output into a QEMU emulation session.
|
||||||
You can also perform cross-debugging and profiling.
|
You can also perform cross-debugging and profiling.
|
||||||
The environment also has a suite of tools that allows you to perform
|
The environment also supports a suite of tools that allows you to perform
|
||||||
remote profiling, tracing, collection of power data, collection of
|
remote profiling, tracing, collection of power data, collection of
|
||||||
latency data, and collection of performance data.
|
latency data, and collection of performance data.
|
||||||
</para>
|
</para>
|
||||||
@@ -24,221 +25,382 @@
|
|||||||
|
|
||||||
<section id='setting-up-the-eclipse-ide'>
|
<section id='setting-up-the-eclipse-ide'>
|
||||||
<title>Setting Up the Eclipse IDE</title>
|
<title>Setting Up the Eclipse IDE</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To develop within the Eclipse IDE you need to do the following:
|
To develop within the Eclipse IDE, you need to do the following:
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para>Be sure the optimal version of Eclipse IDE
|
<listitem><para>Install the optimal version of the Eclipse IDE.</para></listitem>
|
||||||
is installed.</para></listitem>
|
<listitem><para>Configure the Eclipse IDE.</para></listitem>
|
||||||
<listitem><para>Install Eclipse plug-in requirements prior to installing
|
<listitem><para>Install the Eclipse Yocto Plug-in.</para></listitem>
|
||||||
the Eclipse Yocto Plug-in.</para></listitem>
|
|
||||||
<listitem><para>Configure the Eclipse Yocto Plug-in.</para></listitem>
|
<listitem><para>Configure the Eclipse Yocto Plug-in.</para></listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='installing-eclipse-ide'>
|
<section id='installing-eclipse-ide'>
|
||||||
<title>Installing Eclipse IDE</title>
|
<title>Installing the Eclipse IDE</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
It is recommended that you have the Indigo 3.7 version of the
|
It is recommended that you have the Indigo 3.7 version of the
|
||||||
Eclipse IDE installed on your development system.
|
Eclipse IDE installed on your development system.
|
||||||
If you don’t have this version you can find it at
|
If you don’t have this version, you can find it at
|
||||||
<ulink url='http://www.eclipse.org/downloads'></ulink>.
|
<ulink url='http://www.eclipse.org/downloads'></ulink>.
|
||||||
From that site, choose the Eclipse Classic version.
|
From that site, choose the Eclipse Classic version particular to your development
|
||||||
|
host.
|
||||||
This version contains the Eclipse Platform, the Java Development
|
This version contains the Eclipse Platform, the Java Development
|
||||||
Tools (JDT), and the Plug-in Development Environment.
|
Tools (JDT), and the Plug-in Development Environment.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<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 and complete the installation.
|
directory.
|
||||||
|
For example, the following commands unpack and install the Eclipse IDE
|
||||||
|
tarball found in the <filename>Downloads</filename> area
|
||||||
|
into a clean directory using the default name <filename>eclipse</filename>:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ cd ~
|
||||||
|
$ tar -xzvf ~/Downloads/eclipse-SDK-3.7.1-linux-gtk-x86_64.tar.gz
|
||||||
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
One issue exists that you need to be aware of regarding the Java
|
One issue exists that you need to be aware of regarding the Java
|
||||||
Virtual machine’s garbage collection (GC) process.
|
Virtual machine’s garbage collection (GC) process.
|
||||||
The GC process does not clean up the permanent generation
|
The GC process does not clean up the permanent generation
|
||||||
space (PermGen).
|
space (PermGen).
|
||||||
This space stores meta-data descriptions of classes.
|
This space stores metadata descriptions of classes.
|
||||||
The default value is set too small and it could trigger an
|
The default value is set too small and it could trigger an
|
||||||
out-of-memory error such as the following:
|
out-of-memory error such as the following:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
Java.lang.OutOfMemoryError: PermGen space
|
Java.lang.OutOfMemoryError: PermGen space
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This error causes the application to hang.
|
This error causes the application to hang.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To fix this issue you can use the ‐‐vmargs option when you start
|
To fix this issue, you can use the <filename>--vmargs</filename>
|
||||||
Eclipse to increase the size of the permanent generation space:
|
option when you start Eclipse to increase the size of the permanent generation space:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
eclipse ‐‐vmargs ‐‐XX:PermSize=256M
|
eclipse --vmargs --XX:PermSize=256M
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='installing-required-plug-ins-and-the-eclipse-yocto-plug-in'>
|
<section id='configuring-the-eclipse-ide'>
|
||||||
<title>Installing Required Plug-ins and the Eclipse Yocto Plug-in</title>
|
<title>Configuring the Eclipse IDE</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Before installing the Yocto Plug-in you need to be sure that the
|
Before installing and configuring the Eclipse Yocto Plug-in, you need to configure
|
||||||
CDT 8.0, RSE 3.2, and Autotools plug-ins are all installed in the
|
the Eclipse IDE.
|
||||||
following order.
|
Follow these general steps to configure Eclipse:
|
||||||
After installing these three plug-ins, you can install the
|
|
||||||
Eclipse Yocto Plug-in.
|
|
||||||
Use the following URLs for the plug-ins:
|
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para><emphasis>CDT 8.0</emphasis> –
|
<listitem><para>Start the Eclipse IDE.</para></listitem>
|
||||||
<ulink url='http://download.eclipse.org/tools/cdt/releases/indigo/'></ulink>:
|
<listitem><para>Make sure you are in your Workbench and select
|
||||||
For CDT main features select the checkbox so you get all items.
|
"Install New Software" from the "Help" pull-down menu.
|
||||||
For CDT optional features expand the selections and check
|
</para></listitem>
|
||||||
“C/C++ Remote Launch”.</para></listitem>
|
<listitem><para>Select <filename>indigo - http://download.eclipse.org/releases/indigo</filename>
|
||||||
<listitem><para><emphasis>RSE 3.2</emphasis> –
|
from the "Work with:" pull-down menu.</para></listitem>
|
||||||
<ulink url='http://download.eclipse.org/tm/updates/3.2'></ulink>:
|
<listitem><para>Expand the box next to <filename>Programming Languages</filename>
|
||||||
Check the box next to “TM and RSE Main Features” so you select all
|
and select the <filename>Autotools Support for CDT (incubation)</filename>
|
||||||
those items.
|
and <filename>C/C++ Development Tools</filename> boxes.</para></listitem>
|
||||||
Note that all items in the main features depend on 3.2.1 version.
|
<listitem><para>Complete the installation and restart the Eclipse IDE.</para></listitem>
|
||||||
Expand the items under “TM and RSE Uncategorized 3.2.1” and
|
<listitem><para>After the Eclipse IDE restarts and from the Workbench, select
|
||||||
select the following: “Remote System Explorer End-User Runtime”,
|
"Install New Software" from the "Help" pull-down menu.</para></listitem>
|
||||||
“Remote System Explorer Extended SDK”, “Remote System Explorer User Actions”,
|
<listitem><para>Click the
|
||||||
“RSE Core”, “RSE Terminals UI”, and “Target Management Terminal”.</para></listitem>
|
"Available Software Sites" link.</para></listitem>
|
||||||
<listitem><para><emphasis>Autotools</emphasis> –
|
<listitem><para>Check the box next to
|
||||||
<ulink url='http://download.eclipse.org/technology/linuxtools/update/'></ulink>:
|
<filename>http://download.eclipse.org/tm/updates/3.3</filename>
|
||||||
Expand the items under “Linux Tools” and select “Autotools support for
|
and click "OK".</para></listitem>
|
||||||
CDT (Incubation)”.</para></listitem>
|
<listitem><para>Select <filename>http://download.eclipse.org/tm/updates/3.3</filename>
|
||||||
<listitem><para><emphasis>Yocto Plug-in</emphasis> –
|
from the "Work with:" pull-down menu.</para></listitem>
|
||||||
<ulink url='http://www.yoctoproject.org/downloads/eclipse-plugin/1.0'></ulink>:
|
<listitem><para>Check the box next to <filename>TM and RSE Main Features</filename>.
|
||||||
Check the box next to “Development tools & SDKs for Yocto Linux”
|
</para></listitem>
|
||||||
to select all the items.</para></listitem>
|
<listitem><para>Expand the box next to <filename>TM and RSE Optional Add-ons</filename>
|
||||||
</orderedlist>
|
and select every item except <filename>RSE Unit Tests</filename> and
|
||||||
</para>
|
<filename>RSE WinCE Services (incubation)</filename>.</para></listitem>
|
||||||
<para>
|
<listitem><para>Complete the installation and restart the Eclipse IDE.</para></listitem>
|
||||||
Follow these general steps to install a plug-in:
|
<listitem><para>If necessary, select
|
||||||
<orderedlist>
|
"Install New Software" from the "Help" pull-down menu so you can click the
|
||||||
<listitem><para>From within the Eclipse IDE select the
|
"Available Software Sites" link again.</para></listitem>
|
||||||
“Install New Software” item from the “Help” menu.</para></listitem>
|
<listitem><para>After clicking "Available Software Sites", check the box next to
|
||||||
<listitem><para>Click “Add…” in the “Work with:” area.</para></listitem>
|
<filename>http://download.eclipse.org/tools/cdt/releases/indigo</filename>
|
||||||
<listitem><para>Enter the URL for the repository and leave the “Name”
|
and click "OK".</para></listitem>
|
||||||
field blank.</para></listitem>
|
<listitem><para>Select <filename>http://download.eclipse.org/tools/cdt/releases/indigo</filename>
|
||||||
<listitem><para>Check the boxes next to the software you need to
|
from the "Work with:" pull-down menu.</para></listitem>
|
||||||
install and then complete the installation.
|
<listitem><para>Check the box next to <filename>CDT Main Features</filename>.
|
||||||
For information on the specific software packages you need to include,
|
</para></listitem>
|
||||||
see the previous list.</para></listitem>
|
<listitem><para>Expand the box next to <filename>CDT Optional Features</filename>
|
||||||
|
and select <filename>C/C++ Remote Launch</filename> and
|
||||||
|
<filename>Target Communication Framework (incubation)</filename>.</para></listitem>
|
||||||
|
<listitem><para>Complete the installation and restart the Eclipse IDE.</para></listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='configuring-the-plug-in'>
|
<section id='installing-the-eclipse-yocto-plug-in'>
|
||||||
<title>Configuring the Plug-in</title>
|
<title>Installing or Accessing the Eclipse Yocto Plug-in</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Configuring the Eclipse Yocto Plug-in involves choosing the Cross
|
You can install the Eclipse Yocto Plug-in into the Eclipse application
|
||||||
Compiler Options, selecting the Target Architecture, and choosing
|
one of two ways: using the Eclipse IDE and installing the plug-in as new software, or
|
||||||
the Target Options.
|
using a built zip file.
|
||||||
These settings are the default settings for all projects.
|
If you don't want to permanently install the plug-in but just want to try it out
|
||||||
You do have opportunities to change them later if you choose to when
|
within the Eclipse environment, you can import the plug-in project from the
|
||||||
you configure the project.
|
Yocto Project source repositories.
|
||||||
See “Configuring the Cross Toolchain” section later in the manual.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<section id='new-software'>
|
||||||
|
<title>Installing the Plug-in as New Software</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
To install the Eclipse Yocto Plug-in as new software directly into the Eclipse IDE,
|
||||||
|
follow these steps:
|
||||||
|
<orderedlist>
|
||||||
|
<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>Click "Add..." in the "Work with:" area.</para></listitem>
|
||||||
|
<listitem><para>Enter
|
||||||
|
<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>
|
||||||
|
<listitem><para>Click "OK" to have the entry added to the "Work with:"
|
||||||
|
drop-down list.</para></listitem>
|
||||||
|
<listitem><para>Select the entry for the plug-in from the "Work with:" drop-down
|
||||||
|
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
|
||||||
|
then restart the Eclipse IDE to finish the installation of the plug-in.
|
||||||
|
</para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='zip-file-method'>
|
||||||
|
<title>Installing the Plug-in from a Zip File</title>
|
||||||
|
<para>
|
||||||
|
To install the Eclipse Yocto Plug-in by building and installing a plug-in
|
||||||
|
zip file, 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>Locate the <filename>build.sh</filename> script in the
|
||||||
|
Git repository you created in the previous step.
|
||||||
|
The script is located in the <filename>scripts</filename>.</para></listitem>
|
||||||
|
<listitem><para>Be sure to set and export the <filename>ECLIPSE_HOME</filename> environment
|
||||||
|
variable to the top-level directory in which you installed the Indigo
|
||||||
|
version of Eclipse.
|
||||||
|
For example, if your Eclipse directory is <filename>$HOME/eclipse</filename>,
|
||||||
|
use the following:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ export ECLIPSE_HOME=$HOME/eclipse
|
||||||
|
</literallayout></para></listitem>
|
||||||
|
<listitem><para>Run the <filename>build.sh</filename> script and provide the
|
||||||
|
name of the Git branch along with the Yocto Project release you are
|
||||||
|
using.
|
||||||
|
Here is an example that uses the <filename>master</filename> Git repository
|
||||||
|
and the <filename>1.1.1</filename> release:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ scripts/build.sh master 1.1.1
|
||||||
|
</literallayout>
|
||||||
|
After running the script, the file
|
||||||
|
<filename>org.yocto.sdk-<release>-<date>-archive.zip</filename>
|
||||||
|
is in the current directory.</para></listitem>
|
||||||
|
<listitem><para>If necessary, start the Eclipse IDE and be sure you are in the
|
||||||
|
Workbench.</para></listitem>
|
||||||
|
<listitem><para>Select "Install New Software" from the "Help" pull-down menu.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>Click "Add".</para></listitem>
|
||||||
|
<listitem><para>Provide anything you want in the "Name" field.</para></listitem>
|
||||||
|
<listitem><para>Click "Archive" and browse to the ZIP file you built
|
||||||
|
in step four.
|
||||||
|
This ZIP file should not be "unzipped", and must be the
|
||||||
|
<filename>*archive.zip</filename> file created by running the
|
||||||
|
<filename>build.sh</filename> script.</para></listitem>
|
||||||
|
<listitem><para>Check the box next to the new entry in the installation window and complete
|
||||||
|
the installation.</para></listitem>
|
||||||
|
<listitem><para>Restart the Eclipse IDE if necessary.</para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
At this point you should be able to configure the Eclipse Yocto Plug-in as described in the
|
||||||
|
"<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>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='configuring-the-eclipse-yocto-plug-in'>
|
||||||
|
<title>Configuring the Eclipse Yocto Plug-in</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Configuring the Eclipse Yocto Plug-in involves setting the Cross
|
||||||
|
Compiler options and the Target options.
|
||||||
|
The configurations you choose become the default settings for all projects.
|
||||||
|
You do have opportunities to change them later when
|
||||||
|
you configure the project (see the following section).
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To start, you need to do the following from within the Eclipse IDE:
|
To start, you need to do the following from within the Eclipse IDE:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>Choose Windows -> Preferences to display
|
<listitem><para>Choose <filename>Windows -> Preferences</filename> to display
|
||||||
the Preferences Dialog</para></listitem>
|
the <filename>Preferences</filename> Dialog</para></listitem>
|
||||||
<listitem><para>Click “Yocto SDK”</para></listitem>
|
<listitem><para>Click <filename>Yocto ADT</filename></para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='configuring-the-cross-compiler-options'>
|
<section id='configuring-the-cross-compiler-options'>
|
||||||
<title>Configuring the Cross-Compiler Options</title>
|
<title>Configuring the Cross-Compiler Options</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Choose between ‘Stand-alone Prebuilt Toolchain’ and ‘Build System Derived Toolchain’ for Cross
|
To configure the Cross Compiler Options, you must select the type of toolchain,
|
||||||
Compiler Options.
|
point to the toolchain, specify the sysroot location, and select the target architecture.
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><emphasis>Stand-alone Prebuilt Toolchain</emphasis> – Select this mode
|
<listitem><para><emphasis>Selecting the Toolchain Type:</emphasis>
|
||||||
when you are not concerned with building a target image or you do not have
|
Choose between <filename>Standalone pre-built toolchain</filename>
|
||||||
a Yocto Project build tree on your development system.
|
and <filename>Build system derived toolchain</filename> for Cross
|
||||||
For example, suppose you are an application developer and do not
|
Compiler Options.
|
||||||
need to build a target image.
|
<itemizedlist>
|
||||||
Instead, you just want to use an architecture-specific toolchain on an
|
<listitem><para><emphasis>
|
||||||
existing kernel and target root filesystem.
|
<filename>Standalone Pre-built Toolchain:</filename></emphasis>
|
||||||
When you use Stand-alone Prebuilt Toolchain you are using the toolchain installed
|
Select this mode when you are using a stand-alone cross-toolchain.
|
||||||
in the <filename>/opt/poky</filename> directory.</para></listitem>
|
For example, suppose you are an application developer and do not
|
||||||
<listitem><para><emphasis>Build System Derived Toolchain</emphasis> – Select this mode
|
need to build a target image.
|
||||||
if you are building images for target hardware or your
|
Instead, you just want to use an architecture-specific toolchain on an
|
||||||
development environment already has a Yocto Project build tree.
|
existing kernel and target root filesystem.
|
||||||
In this case you likely already have a Yocto Project build tree installed on
|
</para></listitem>
|
||||||
your system or you (or someone else) will be building one.
|
<listitem><para><emphasis>
|
||||||
When you select Build System Derived Toolchain you are using the toolchain bundled
|
<filename>Build System Derived Toolchain:</filename></emphasis>
|
||||||
inside the Yocto Project build tree.
|
Select this mode if the cross-toolchain has been installed and built
|
||||||
If you use this mode you must also supply the Yocto Project build directory
|
as part of the Yocto Project build tree.
|
||||||
in the Preferences Dialog.</para></listitem>
|
When you select <filename>Build system derived toolchain</filename>,
|
||||||
|
you are using the toolchain bundled
|
||||||
|
inside the Yocto Project build tree.
|
||||||
|
</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>Point to the Toolchain:</emphasis>
|
||||||
|
If you are using a stand-alone pre-built toolchain, you should be pointing to the
|
||||||
|
<filename>/opt/poky/1.1.1</filename> directory.
|
||||||
|
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
|
||||||
|
and Running the ADT Installer Script</link>" and
|
||||||
|
"<link linkend='using-an-existing-toolchain-tarball'>Using a Cross-Toolchain
|
||||||
|
Tarball</link>" describe two ways to install
|
||||||
|
a stand-alone cross-toolchain in the
|
||||||
|
<filename>/opt/poky</filename> directory.
|
||||||
|
<note>It is possible to install a stand-alone cross-toolchain in a directory
|
||||||
|
other than <filename>/opt/poky</filename>.
|
||||||
|
However, doing so is discouraged.</note></para>
|
||||||
|
<para>If you are using a system-derived toolchain, the path you provide
|
||||||
|
for the <filename>Toolchain Root Location</filename>
|
||||||
|
field is the Yocto Project's build directory.
|
||||||
|
See section "<link linkend='using-the-toolchain-from-within-the-build-tree'>Using
|
||||||
|
BitBake and the Yocto Project Build Tree</link>" for
|
||||||
|
information on how to install the toolchain into the Yocto
|
||||||
|
Project build tree.</para></listitem>
|
||||||
|
<listitem><para><emphasis>Specify the Sysroot Location:</emphasis>
|
||||||
|
This location is where the root filesystem for the
|
||||||
|
target hardware is created on the development system by the ADT Installer.
|
||||||
|
The QEMU user-space tools, the
|
||||||
|
NFS boot process, and the cross-toolchain all use the sysroot location.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>Select the Target Architecture:</emphasis>
|
||||||
|
The target architecture is the type of hardware you are
|
||||||
|
going to use or emulate.
|
||||||
|
Use the pull-down <filename>Target Architecture</filename> menu to make
|
||||||
|
your selection.
|
||||||
|
The pull-down menu should have the supported architectures.
|
||||||
|
If the architecture you need is not listed in the menu, you
|
||||||
|
will need to build the image.
|
||||||
|
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
|
||||||
|
of The Yocto Project Quick Start for more information.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='configuring-the-sysroot'>
|
<section id='configuring-the-target-options'>
|
||||||
<title>Configuring the Sysroot</title>
|
<title>Configuring the Target Options</title>
|
||||||
<para>
|
|
||||||
Specify the sysroot location, which is where the root filesystem for the
|
|
||||||
target hardware is created on the development system by the ADT Installer.
|
|
||||||
The QEMU user-space tools, the
|
|
||||||
NFS boot process and the cross-toolchain all use the sysroot location
|
|
||||||
regardless of wheather you select (Stand-alone Prebuilt Toolchain or Build System Derived Toolchain).
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='selecting-the-target-architecture'>
|
|
||||||
<title>Selecting the Target Architecture</title>
|
|
||||||
<para>
|
|
||||||
Use the pull-down Target Architecture menu and select the
|
|
||||||
target architecture.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
The Target Architecture is the type of hardware you are
|
|
||||||
going to use or emulate.
|
|
||||||
This pull-down menu should have the supported architectures.
|
|
||||||
If the architecture you need is not listed in the menu then you
|
|
||||||
will need to re-visit
|
|
||||||
<xref linkend='adt-prepare'>
|
|
||||||
“Preparing to Use the Application Development Toolkit (ADT)”</xref>
|
|
||||||
section earlier in this document.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='choosing-the-target-options'>
|
|
||||||
<title>Choosing the Target Options</title>
|
|
||||||
<para>
|
<para>
|
||||||
You can choose to emulate hardware using the QEMU emulator, or you
|
You can choose to emulate hardware using the QEMU emulator, or you
|
||||||
can choose to use actual hardware.
|
can choose to run your image on actual hardware.
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><emphasis>External HW</emphasis> – Select this option
|
<listitem><para><emphasis><filename>QEMU:</filename></emphasis> Select this option if
|
||||||
if you will be using actual hardware.</para></listitem>
|
you will be using the QEMU emulator.
|
||||||
<listitem><para><emphasis>QEMU</emphasis> – Select this option if
|
If you are using the emulator, you also need to locate the kernel
|
||||||
you will be using the QEMU emulator.
|
and specify any custom options.</para>
|
||||||
If you are using the emulator you also need to locate the Kernel
|
<para>If you selected <filename>Build system derived toolchain</filename>,
|
||||||
and specify any custom options.</para>
|
the target kernel you built will be located in the
|
||||||
<para>If you select Build System Derived Toolchain the target kernel you built
|
Yocto Project build tree in <filename>tmp/deploy/images</filename> directory.
|
||||||
will be located in the
|
If you selected <filename>Standalone pre-built toolchain</filename>, the
|
||||||
Yocto Project build tree in <filename>tmp/deploy/images</filename> directory.
|
pre-built image you downloaded is located
|
||||||
If you select Stand-alone Prebuilt Toolchain the pre-built kernel you downloaded is located
|
in the directory you specified when you downloaded the image.</para>
|
||||||
in the directory you specified when you downloaded the image.</para>
|
<para>Most custom options are for advanced QEMU users to further
|
||||||
<para>Most custom options are for advanced QEMU users to further
|
customize their QEMU instance.
|
||||||
customize their QEMU instance.
|
These options are specified between paired angled brackets.
|
||||||
These options are specified between paired angled brackets.
|
Some options must be specified outside the brackets.
|
||||||
Some options must be specified outside the brackets.
|
In particular, the options <filename>serial</filename>,
|
||||||
In particular, the options <filename>serial</filename>,
|
<filename>nographic</filename>, and <filename>kvm</filename> must all
|
||||||
<filename>nographic</filename>, and <filename>kvm</filename> must all
|
be outside the brackets.
|
||||||
be outside the brackets.
|
Use the <filename>man qemu</filename> command to get help on all the options
|
||||||
Use the <filename>man qemu</filename> command to get help on all the options
|
and their use.
|
||||||
and their use.
|
The following is an example:
|
||||||
The following is an example:
|
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
serial ‘<-m 256 -full-screen>’
|
serial ‘<-m 256 -full-screen>’
|
||||||
</literallayout>
|
</literallayout></para>
|
||||||
</para>
|
<para>
|
||||||
<para>
|
Regardless of the mode, Sysroot is already defined as part of the
|
||||||
Regardless of the mode, Sysroot is already defined in the “Sysroot”
|
Cross Compiler Options configuration in the
|
||||||
field.</para></listitem>
|
<filename>Sysroot Location:</filename> field.</para></listitem>
|
||||||
|
<listitem><para><emphasis><filename>External HW:</filename></emphasis> Select this option
|
||||||
|
if you will be using actual hardware.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Click the “OK” button to save your plug-in configurations.
|
Click the <filename>OK</filename> button to save your plug-in configurations.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
@@ -246,127 +408,141 @@
|
|||||||
|
|
||||||
<section id='creating-the-project'>
|
<section id='creating-the-project'>
|
||||||
<title>Creating the Project</title>
|
<title>Creating the Project</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can create two types of projects: Autotools-based, or Makefile-based.
|
You can create two types of projects: Autotools-based, or Makefile-based.
|
||||||
This section describes how to create autotools-based projects from within
|
This section describes how to create Autotools-based projects from within
|
||||||
the Eclipse IDE.
|
the Eclipse IDE.
|
||||||
For information on creating projects in a terminal window see
|
For information on creating Makefile-based projects in a terminal window, see the section
|
||||||
<xref linkend='using-the-command-line'> “Using the Command Line”</xref>
|
"<link linkend='using-the-command-line'>Using the Command Line</link>".
|
||||||
section.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To create a project based on a Yocto template and then display the source code,
|
To create a project based on a Yocto template and then display the source code,
|
||||||
follow these steps:
|
follow these steps:
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para>Select File -> New -> Project.</para></listitem>
|
<listitem><para>Select <filename>File -> New -> Project</filename>.</para></listitem>
|
||||||
<listitem><para>Double click “CC++”.</para></listitem>
|
<listitem><para>Double click <filename>CC++</filename>.</para></listitem>
|
||||||
<listitem><para>Double click “C Project” to create the project.</para></listitem>
|
<listitem><para>Double click <filename>C Project</filename> to create the project.</para></listitem>
|
||||||
<listitem><para>Double click “Yocto SDK Project”.</para></listitem>
|
<listitem><para>Expand <filename>Yocto ADT Project</filename>.</para></listitem>
|
||||||
<listitem><para>Select “Hello World ANSI C Autotools Project”.
|
<listitem><para>Select <filename>Hello World ANSI C Autotools Project</filename>.
|
||||||
This is an Autotools-based project based on a Yocto Project template.</para></listitem>
|
This is an Autotools-based project based on a Yocto Project template.</para></listitem>
|
||||||
<listitem><para>Put a name in the “Project name:” field.</para></listitem>
|
<listitem><para>Put a name in the <filename>Project name:</filename> field.
|
||||||
<listitem><para>Click “Next”.</para></listitem>
|
Do not use hyphens as part of the name.</para></listitem>
|
||||||
<listitem><para>Add information in the “Author” field.</para></listitem>
|
<listitem><para>Click <filename>Next</filename>.</para></listitem>
|
||||||
<listitem><para>Use “GNU General Public License v2.0” for the License.</para></listitem>
|
<listitem><para>Add information in the <filename>Author</filename> and
|
||||||
<listitem><para>Click “Finish”.</para></listitem>
|
<filename>Copyright notice</filename> fields.</para></listitem>
|
||||||
<listitem><para>Answer ‘Yes” to the open perspective prompt.</para></listitem>
|
<listitem><para>Be sure the <filename>License</filename> field is correct.</para></listitem>
|
||||||
<listitem><para>In the Project Explorer expand your project.</para></listitem>
|
<listitem><para>Click <filename>Finish</filename>.</para></listitem>
|
||||||
<listitem><para>Expand ‘src’.</para></listitem>
|
<listitem><para>If the "open perspective" prompt appears, click "Yes" so that you
|
||||||
<listitem><para>Double click on your source file and the code appears
|
in the C/C++ perspective.</para></listitem>
|
||||||
in the window.
|
<listitem><para>The left-hand navigation pane shows your project.
|
||||||
This is the template.</para></listitem>
|
You can display your source by double clicking the project's source file.
|
||||||
|
</para></listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='configuring-the-cross-toolchains'>
|
<section id='configuring-the-cross-toolchains'>
|
||||||
<title>Configuring the Cross-Toolchains</title>
|
<title>Configuring the Cross-Toolchains</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The previous section, <xref linkend='configuring-the-cross-compiler-options'>
|
The earlier section, "<link linkend='configuring-the-eclipse-yocto-plug-in'>Configuring
|
||||||
“Configuring the Cross-Compiler Options”</xref>, set up the default project
|
the Eclipse Yocto Plug-in</link>", sets up the default project
|
||||||
configurations.
|
configurations.
|
||||||
You can change these settings for a given project by following these steps:
|
You can override these settings for a given project by following these steps:
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para>Select Project -> Invoke Yocto Tools -> Reconfigure Yocto.
|
<listitem><para>Select <filename>Project -> Change Yocto Project Settings</filename>:
|
||||||
This brings up the project's Yocto Settings Dialog.
|
This selection brings up the <filename>Project Yocto Settings</filename> Dialog
|
||||||
Settings are inherited from the default project configuration.
|
and allows you to make changes specific to an individual project.
|
||||||
The information in this dialogue is identical to that chosen earlier
|
</para>
|
||||||
for the Cross Compiler Option (Stand-alone Prebuilt Toolchain or Build System Derived Toolchain),
|
<para>By default, the Cross Compiler Options and Target Options for a project
|
||||||
the Target Architecture, and the Target Options.
|
are inherited from settings you provide using the <filename>Preferences</filename>
|
||||||
The settings are inherited from the Yocto Plug-in configuration performed
|
Dialog as described earlier
|
||||||
after installing the plug-in.</para></listitem>
|
in the "<link linkend='configuring-the-eclipse-yocto-plug-in'>Configuring the Eclipse
|
||||||
<listitem><para>Select Project -> Reconfigure Project.
|
Yocto Plug-in</link>" section.
|
||||||
This runs the <filename>autogen.sh</filename> in the workspace for your project.
|
The <filename>Project Yocto Settings</filename>
|
||||||
The script runs <filename>libtoolize</filename>, <filename>aclocal</filename>,
|
Dialog allows you to override those default settings
|
||||||
<filename>autoconf</filename>, <filename>autoheader</filename>,
|
for a given project.</para></listitem>
|
||||||
<filename>automake ‐‐a</filename>, and
|
<listitem><para>Make your configurations for the project and click "OK".</para></listitem>
|
||||||
<filename>./configure</filename>.</para></listitem>
|
<listitem><para>Select <filename>Project -> Reconfigure Project</filename>:
|
||||||
|
This selection reconfigures the project by running
|
||||||
|
<filename>autogen.sh</filename> in the workspace for your project.
|
||||||
|
The script also runs <filename>libtoolize</filename>, <filename>aclocal</filename>,
|
||||||
|
<filename>autoconf</filename>, <filename>autoheader</filename>,
|
||||||
|
<filename>automake --a</filename>, and
|
||||||
|
<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>
|
||||||
|
|
||||||
<section id='building-the-project'>
|
<section id='building-the-project'>
|
||||||
<title>Building the Project</title>
|
<title>Building the Project</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To build the project, select Project -> Build Project.
|
To build the project, select <filename>Project -> Build Project</filename>.
|
||||||
The console should update and you can note the cross-compiler you are using.
|
The console should update and you can note the cross-compiler you are using.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='starting-qemu-in-user-space-nfs-mode'>
|
<section id='starting-qemu-in-user-space-nfs-mode'>
|
||||||
<title>Starting QEMU in User Space NFS Mode</title>
|
<title>Starting QEMU in User Space NFS Mode</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To start the QEMU emulator from within Eclipse, follow these steps:
|
To start the QEMU emulator from within Eclipse, follow these steps:
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para>Select Run -> External Tools -> External Tools Configurations...
|
<listitem><para>Expose the <filename>Run -> External Tools</filename> menu.
|
||||||
This selection brings up the External Tools Configurations Dialogue.</para></listitem>
|
Your image should appear as a selectable menu item.
|
||||||
<listitem><para>Go to the left navigation area and expand ‘Program’.
|
</para></listitem>
|
||||||
You should find the image listed.
|
<listitem><para>Select your image from the menu to launch the
|
||||||
For example, qemu-x86_64-poky-linux.</para></listitem>
|
emulator in a new window.</para></listitem>
|
||||||
<listitem><para>Click on the image.
|
<listitem><para>If needed, enter your host root password in the shell window at the prompt.
|
||||||
This brings up a new environment in the main area of the External
|
This sets up a <filename>Tap 0</filename> connection needed for running in user-space
|
||||||
Tools Configurations Dialogue.
|
NFS mode.</para></listitem>
|
||||||
The Main tab is selected.</para></listitem>
|
|
||||||
<listitem><para>Click “Run” next.
|
|
||||||
This brings up a shell window.</para></listitem>
|
|
||||||
<listitem><para>Enter your host root password in the shell window at the prompt.
|
|
||||||
This sets up a Tap 0 connection needed for running in user-space NFS mode.</para></listitem>
|
|
||||||
<listitem><para>Wait for QEMU to launch.</para></listitem>
|
<listitem><para>Wait for QEMU to launch.</para></listitem>
|
||||||
<listitem><para>Once QEMU launches you need to determine the IP Address
|
<listitem><para>Once QEMU launches, you can begin operating within that
|
||||||
for the user-space NFS.
|
environment.
|
||||||
You can do that by going to a terminal in the QEMU and entering the
|
For example, you could determine the IP Address
|
||||||
<filename>ipconfig</filename> command.</para></listitem>
|
for the user-space NFS by using the <filename>ifconfig</filename> command.
|
||||||
|
</para></listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='deploying-and-debugging-the-application'>
|
<section id='deploying-and-debugging-the-application'>
|
||||||
<title>Deploying and Debugging the Application</title>
|
<title>Deploying and Debugging the Application</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Once QEMU is running 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 Run -> Debug Configurations...</para></listitem>
|
<listitem><para>Select <filename>Run -> Debug Configurations...</filename></para></listitem>
|
||||||
<listitem><para>In the left area expand “C/C++Remote Application”.</para></listitem>
|
<listitem><para>In the left area, expand <filename>C/C++Remote Application</filename>.</para></listitem>
|
||||||
<listitem><para>Locate your project and select it to bring up a new
|
<listitem><para>Locate your project and select it to bring up a new
|
||||||
tabbed view in the Debug Configurations dialogue.</para></listitem>
|
tabbed view in the <filename>Debug Configurations</filename> Dialog.</para></listitem>
|
||||||
<listitem><para>Enter the absolute path into which you want to deploy
|
<listitem><para>Enter the absolute path into which you want to deploy
|
||||||
the application.
|
the application.
|
||||||
Use the Remote Absolute File Path for C/C++Application:.
|
Use the <filename>Remote Absolute File Path for C/C++Application:</filename> field.
|
||||||
For example, enter <filename>/usr/bin/<programname></filename>.</para></listitem>
|
For example, enter <filename>/usr/bin/<programname></filename>.</para></listitem>
|
||||||
<listitem><para>Click on the Debugger tab to see the cross-tool debugger
|
<listitem><para>Click on the <filename>Debugger</filename> tab to see the cross-tool debugger
|
||||||
you are using.</para></listitem>
|
you are using.</para></listitem>
|
||||||
|
<listitem><para>Click on the <filename>Main</filename> tab.</para></listitem>
|
||||||
<listitem><para>Create a new connection to the QEMU instance
|
<listitem><para>Create a new connection to the QEMU instance
|
||||||
by clicking on “new”.</para></listitem>
|
by clicking on <filename>new</filename>.</para></listitem>
|
||||||
<listitem><para>Select “TCF, which means Target Communication Framework.</para></listitem>
|
<listitem><para>Select <filename>TCF</filename>, which means Target Communication
|
||||||
<listitem><para>Click “Next”.</para></listitem>
|
Framework.</para></listitem>
|
||||||
<listitem><para>Clear out the “host name” field and enter the IP Address
|
<listitem><para>Click <filename>Next</filename>.</para></listitem>
|
||||||
determined earlier.</para></listitem>
|
<listitem><para>Clear out the <filename>host name</filename> field and enter the IP Address
|
||||||
<listitem><para>Click Finish to close the new connections dialogue.</para></listitem>
|
determined earlier.</para></listitem>
|
||||||
<listitem><para>Use the drop-down menu now in the “Connection” field and pick
|
<listitem><para>Click <filename>Finish</filename> to close the
|
||||||
the IP Address you entered.</para></listitem>
|
<filename>New Connections</filename> Dialog.</para></listitem>
|
||||||
<listitem><para>Click “Debug” to bring up a login screen and login.</para></listitem>
|
<listitem><para>Use the drop-down menu now in the <filename>Connection</filename> field and pick
|
||||||
|
the IP Address you entered.</para></listitem>
|
||||||
|
<listitem><para>Click <filename>Debug</filename> to bring up a login screen
|
||||||
|
and login.</para></listitem>
|
||||||
<listitem><para>Accept the debug perspective.</para></listitem>
|
<listitem><para>Accept the debug perspective.</para></listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</para>
|
</para>
|
||||||
@@ -374,58 +550,68 @@
|
|||||||
|
|
||||||
<section id='running-user-space-tools'>
|
<section id='running-user-space-tools'>
|
||||||
<title>Running User-Space Tools</title>
|
<title>Running User-Space Tools</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
As mentioned earlier in the manual several tools exist that enhance
|
As mentioned earlier in the manual, several tools exist that enhance
|
||||||
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 Yocto Eclipse
|
You can run these user-space tools from within the Eclipse IDE through the
|
||||||
Plug-in through the Window -> YoctoTools menu.
|
<filename>YoctoTools</filename> menu.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Once you pick a tool you need to configure it for the remote target.
|
Once you pick a tool, you need to configure it for the remote target.
|
||||||
Every tool needs to have the connection configured.
|
Every tool needs to have the connection configured.
|
||||||
You must select an existing TCF-based RSE connection to the remote target.
|
You must select an existing TCF-based RSE connection to the remote target.
|
||||||
If one does not exist, click "New" to create one.
|
If one does not exist, click <filename>New</filename> to create one.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Here are some specifics about the remote tools:
|
Here are some specifics about the remote tools:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><emphasis>OProfile:</emphasis> Selecting this tool causes
|
<listitem><para><emphasis><filename>OProfile</filename>:</emphasis> Selecting this tool causes
|
||||||
the oprofile-server on the remote target to launch on the local host machine.
|
the <filename>oprofile-server</filename> on the remote target to launch on
|
||||||
The oprofile-viewer must be installed on the local host machine and the
|
the local host machine.
|
||||||
oprofile-server must be installed on the remote target, respectively, in order
|
The <filename>oprofile-viewer</filename> must be installed on the local host machine and the
|
||||||
to use.
|
<filename>oprofile-server</filename> must be installed on the remote target,
|
||||||
You can locate both the viewer and server from
|
respectively, in order to use.
|
||||||
<ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/oprofileui/'></ulink>.
|
You must compile and install the <filename>oprofile-viewer</filename> from the source code
|
||||||
You need to compile and install the oprofile-viewer from the source code
|
on your local host machine.
|
||||||
on your local host machine.
|
Furthermore, in order to convert the target's sample format data into a form that the
|
||||||
The oprofile-server is installed by default in the image.</para></listitem>
|
host can use, you must have <filename>oprofile</filename> version 0.9.4 or
|
||||||
<listitem><para><emphasis>Lttng-ust:</emphasis> Selecting this tool runs
|
greater installed on the host.</para>
|
||||||
<filename>usttrace</filename> on the remote target, transfers the output data back to the
|
<para>You can locate both the viewer and server from
|
||||||
local host machine and uses <filename>lttv-gui</filename> to graphically display the output.
|
<ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/oprofileui/'></ulink>.
|
||||||
The <filename>lttv-gui</filename> must be installed on the local host machine to use this tool.
|
<note>The <filename>oprofile-server</filename> is installed by default on
|
||||||
For information on how to use <filename>lttng</filename> to trace an application, see
|
the <filename>core-image-sato-sdk</filename> image.</note></para></listitem>
|
||||||
<ulink url='http://lttng.org/files/ust/manual/ust.html'></ulink>.</para>
|
<listitem><para><emphasis><filename>Lttng-ust</filename>:</emphasis> Selecting this tool runs
|
||||||
<para>For "Application" you must supply the absolute path name of the
|
<filename>usttrace</filename> on the remote target, transfers the output data back to the
|
||||||
application to be traced by user mode lttng.
|
local host machine, and uses <filename>lttv-gui</filename> to graphically display the output.
|
||||||
For example, typing <filename>/path/to/foo</filename> triggers
|
The <filename>lttv-gui</filename> must be installed on the local host machine to use this tool.
|
||||||
<filename>usttrace /path/to/foo</filename> on the remote target to trace the
|
For information on how to use <filename>lttng</filename> to trace an application, see
|
||||||
program <filename>/path/to/foo</filename>.</para>
|
<ulink url='http://lttng.org/files/ust/manual/ust.html'></ulink>.</para>
|
||||||
<para>"Argument" is passed to <filename>usttrace</filename>
|
<para>For <filename>Application</filename>, you must supply the absolute path name of the
|
||||||
running on the remote target.</para></listitem>
|
application to be traced by user mode <filename>lttng</filename>.
|
||||||
<listitem><para><emphasis>PowerTOP:</emphasis> Selecting this tool runs
|
For example, typing <filename>/path/to/foo</filename> triggers
|
||||||
"PowerTOP" on the remote target machine and displays the results in a
|
<filename>usttrace /path/to/foo</filename> on the remote target to trace the
|
||||||
new view called "powertop".</para>
|
program <filename>/path/to/foo</filename>.</para>
|
||||||
<para>"Time to gather data(sec):" is the time passed in seconds before data
|
<para><filename>Argument</filename> is passed to <filename>usttrace</filename>
|
||||||
is gathered from the remote target for analysis.</para>
|
running on the remote target.</para></listitem>
|
||||||
<para>"show pids in wakeups list:" corresponds to the <filename>-p</filename> argument
|
<listitem><para><emphasis><filename>PowerTOP</filename>:</emphasis> Selecting this tool runs
|
||||||
passed to <filename>powertop</filename>.</para></listitem>
|
<filename>powertop</filename> on the remote target machine and displays the results in a
|
||||||
<listitem><para><emphasis>LatencyTOP and Perf:</emphasis> "LatencyTOP"
|
new view called <filename>powertop</filename>.</para>
|
||||||
identifies system latency, while <filename>perf</filename> monitors the system's
|
<para><filename>Time to gather data(sec):</filename> is the time passed in seconds before data
|
||||||
performance counter registers.
|
is gathered from the remote target for analysis.</para>
|
||||||
Selecting either of these tools causes an RSE terminal view to appear
|
<para><filename>show pids in wakeups list:</filename> corresponds to the
|
||||||
from which you can run the tools.
|
<filename>-p</filename> argument
|
||||||
Both tools refresh the entire screen to display results while they run.</para></listitem>
|
passed to <filename>powertop</filename>.</para></listitem>
|
||||||
|
<listitem><para><emphasis><filename>LatencyTOP and Perf</filename>:</emphasis>
|
||||||
|
<filename>latencytop</filename> identifies system latency, while
|
||||||
|
<filename>perf</filename> monitors the system's
|
||||||
|
performance counter registers.
|
||||||
|
Selecting either of these tools causes an RSE terminal view to appear
|
||||||
|
from which you can run the tools.
|
||||||
|
Both tools refresh the entire screen to display results while they run.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -13,29 +13,41 @@
|
|||||||
|
|
||||||
<section id='book-intro'>
|
<section id='book-intro'>
|
||||||
<title>Introducing the Application Development Toolkit (ADT)</title>
|
<title>Introducing the Application Development Toolkit (ADT)</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Fundamentally, the ADT consists of an architecture-specific cross-toolchain and
|
Fundamentally, the ADT consists of an architecture-specific cross-toolchain and
|
||||||
a matching sysroot that are both built by the Poky build system.
|
a matching sysroot that are both built by the Yocto Project build system Poky.
|
||||||
The toolchain and sysroot are based on a metadata configuration and extensions,
|
The toolchain and sysroot are based on a metadata configuration and extensions,
|
||||||
which allows you to cross develop for the target on the host machine.
|
which allows you to cross-develop on the host machine for the target.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Additionally, to provide an effective development platform, the Yocto Project
|
Additionally, to provide an effective development platform, the Yocto Project
|
||||||
makes available and suggests other tools you can use with the ADT.
|
makes available and suggests other tools you can use with the ADT.
|
||||||
These other tools include the Eclipse IDE Yocto Plug-in, an emulator (QEMU),
|
These other tools include the Eclipse IDE Yocto Plug-in, an emulator (QEMU),
|
||||||
and various user-space tools that greatly enhance your development experience.
|
and various user-space tools that greatly enhance your development experience.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The resulting combination of the architecture-specific cross-toolchain and sysroot
|
The resulting combination of the architecture-specific cross-toolchain and sysroot
|
||||||
along with these additional tools yields a custom-built, cross-development platform
|
along with these additional tools yields a custom-built, cross-development platform
|
||||||
for a user-targeted product.
|
for a user-targeted product.
|
||||||
</para>
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='adt-components'>
|
||||||
|
<title>ADT Components</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This section provides a brief description of what comprises the ADT.
|
||||||
|
</para>
|
||||||
|
|
||||||
<section id='the-cross-toolchain'>
|
<section id='the-cross-toolchain'>
|
||||||
<title>The Cross-Toolchain</title>
|
<title>The Cross-Toolchain</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The cross-toolchain consists of a cross-compiler, cross-linker, and cross-debugger
|
The cross-toolchain consists of a cross-compiler, cross-linker, and cross-debugger
|
||||||
that are used to develop for targeted hardware.
|
that are used to develop user-space applications for targeted hardware.
|
||||||
This toolchain is created either by running the ADT Installer script or
|
This toolchain is created either by running the ADT Installer script or
|
||||||
through a Yocto Project build tree that is based on your metadata
|
through a Yocto Project build tree that is based on your metadata
|
||||||
configuration or extension for your targeted device.
|
configuration or extension for your targeted device.
|
||||||
@@ -45,80 +57,76 @@
|
|||||||
|
|
||||||
<section id='sysroot'>
|
<section id='sysroot'>
|
||||||
<title>Sysroot</title>
|
<title>Sysroot</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The matching target sysroot contains needed headers and libraries for generating
|
The matching target sysroot contains needed headers and libraries for generating
|
||||||
binaries that run on the target architecture.
|
binaries that run on the target architecture.
|
||||||
The sysroot is based on the target root filesystem image that is built by
|
The sysroot is based on the target root filesystem image that is built by
|
||||||
Poky and uses the same metadata configuration used to build the cross-toolchain.
|
the Yocto Project's build system Poky and uses the same metadata configuration
|
||||||
|
used to build the cross-toolchain.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='the-qemu-emulator'>
|
<section id='the-qemu-emulator'>
|
||||||
<title>The QEMU Emulator</title>
|
<title>The QEMU Emulator</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The QEMU emulator allows you to simulate your hardware while running your
|
The QEMU emulator allows you to simulate your hardware while running your
|
||||||
application or image.
|
application or image.
|
||||||
QEMU is made available a number of ways:
|
QEMU is made available a number of ways:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>If you use the ADT Installer script to install ADT you can
|
<listitem><para>If you use the ADT Installer script to install ADT, you can
|
||||||
specify whether or not to install QEMU.</para></listitem>
|
specify whether or not to install QEMU.</para></listitem>
|
||||||
<listitem><para>If you have downloaded a Yocto Project release and unpacked
|
<listitem><para>If you have downloaded a Yocto Project release and unpacked
|
||||||
it to create a Yocto Project source directory followed by sourcing
|
it to create a Yocto Project file structure and you have sourced
|
||||||
the Yocto Project environment setup script, QEMU is installed and automatically
|
the Yocto Project environment setup script, QEMU is installed and automatically
|
||||||
available.</para></listitem>
|
available.</para></listitem>
|
||||||
<listitem><para>If you have installed the cross-toolchain
|
<listitem><para>If you have installed the cross-toolchain
|
||||||
tarball followed by sourcing the toolchain's setup environment script, QEMU
|
tarball and you have sourcing the toolchain's setup environment script, QEMU
|
||||||
is installed and automatically available.</para></listitem>
|
is also installed and automatically available.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='user-space-tools'>
|
<section id='user-space-tools'>
|
||||||
<title>User-Space Tools</title>
|
<title>User-Space Tools</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
User-space tools are included as part of the distribution.
|
User-space tools are included as part of the distribution.
|
||||||
You will find these tools helpful during development.
|
You will find these tools helpful during development.
|
||||||
The tools include LatencyTOP, PowerTOP, OProfile, Perf, SystemTap, and Lttng-ust.
|
The tools include LatencyTOP, PowerTOP, OProfile, Perf, SystemTap, and Lttng-ust.
|
||||||
These tools are common development tools for the Linux platform.
|
These tools are common development tools for the Linux platform.
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><emphasis>LatencyTOP</emphasis> – LatencyTOP focuses on latency
|
<listitem><para><emphasis>LatencyTOP:</emphasis> LatencyTOP focuses on latency
|
||||||
that causes skips in audio,
|
that causes skips in audio,
|
||||||
stutters in your desktop experience, or situations that overload your server
|
stutters in your desktop experience, or situations that overload your server
|
||||||
even when you have plenty of CPU power left.
|
even when you have plenty of CPU power left.
|
||||||
You can find out more about LatencyTOP at
|
You can find out more about LatencyTOP at
|
||||||
<ulink url='http://www.latencytop.org/'></ulink>.
|
<ulink url='http://www.latencytop.org/'></ulink>.</para></listitem>
|
||||||
</para></listitem>
|
<listitem><para><emphasis>PowerTOP:</emphasis> Helps you determine what
|
||||||
<listitem><para><emphasis>PowerTOP</emphasis> – Helps you determine what
|
software is using the most power.
|
||||||
software is using the most power.
|
You can find out more about PowerTOP at
|
||||||
You can find out more about PowerTOP at
|
<ulink url='http://www.linuxpowertop.org/'></ulink>.</para></listitem>
|
||||||
<ulink url='http://www.linuxpowertop.org/'></ulink>.
|
<listitem><para><emphasis>OProfile:</emphasis> A system-wide profiler for Linux
|
||||||
</para></listitem>
|
systems that is capable of profiling all running code at low overhead.
|
||||||
<listitem><para><emphasis>OProfile</emphasis> – A system-wide profiler for Linux
|
You can find out more about OProfile at
|
||||||
systems that is capable
|
<ulink url='http://oprofile.sourceforge.net/about/'></ulink>.</para></listitem>
|
||||||
of profiling all running code at low overhead.
|
<listitem><para><emphasis>Perf:</emphasis> Performance counters for Linux used
|
||||||
You can find out more about OProfile at
|
to keep track of certain types of hardware and software events.
|
||||||
<ulink url='http://oprofile.sourceforge.net/about/'></ulink>.
|
For more information on these types of counters see
|
||||||
</para></listitem>
|
<ulink url='https://perf.wiki.kernel.org/'></ulink> and click
|
||||||
<listitem><para><emphasis>Perf</emphasis> – Performance counters for Linux used
|
on “Perf tools.”</para></listitem>
|
||||||
to keep track of certain
|
<listitem><para><emphasis>SystemTap:</emphasis> A free software infrastructure
|
||||||
types of hardware and software events.
|
that simplifies information gathering about a running Linux system.
|
||||||
For more information on these types of counters see
|
This information helps you diagnose performance or functional problems.
|
||||||
<ulink url='https://perf.wiki.kernel.org/index.php'></ulink> and click
|
SystemTap is not available as a user-space tool through the Yocto Eclipse IDE Plug-in.
|
||||||
on “Perf tools.”
|
See <ulink url='http://sourceware.org/systemtap'></ulink> for more information
|
||||||
</para></listitem>
|
on SystemTap.</para></listitem>
|
||||||
<listitem><para><emphasis>SystemTap</emphasis> – A free software infrastructure
|
<listitem><para><emphasis>Lttng-ust:</emphasis> A User-space Tracer designed to
|
||||||
that simplifies
|
provide detailed information on user-space activity.
|
||||||
information gathering about a running Linux system.
|
See <ulink url='http://lttng.org/ust'></ulink> for more information on Lttng-ust.
|
||||||
This information helps you diagnose performance or functional problems.
|
</para></listitem>
|
||||||
SystemTap is not available as a user-space tool through the Yocto Eclipse IDE Plug-in.
|
</itemizedlist>
|
||||||
See <ulink url='http://sourceware.org/systemtap'></ulink> for more information
|
|
||||||
on SystemTap.
|
|
||||||
</para></listitem>
|
|
||||||
<listitem><para><emphasis>Lttng-ust</emphasis> – A User-space Tracer designed to
|
|
||||||
provide detailed information on user-space activity.
|
|
||||||
See <ulink url='http://lttng.org/ust'></ulink> for more information on Lttng-ust.
|
|
||||||
</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
</imageobject>
|
</imageobject>
|
||||||
</mediaobject>
|
</mediaobject>
|
||||||
|
|
||||||
<title></title>
|
<title></title>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
@@ -31,17 +31,27 @@
|
|||||||
<revision>
|
<revision>
|
||||||
<revnumber>1.0</revnumber>
|
<revnumber>1.0</revnumber>
|
||||||
<date>6 April 2011</date>
|
<date>6 April 2011</date>
|
||||||
<revremark>Initial Document released with Yocto Project 1.0 on 6 April 2011.</revremark>
|
<revremark>Released with the Yocto Project 1.0 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>1.0.1</revnumber>
|
<revnumber>1.0.1</revnumber>
|
||||||
<date>23 May 2011</date>
|
<date>23 May 2011</date>
|
||||||
<revremark>Released with Yocto Project 1.0.1 on 23 May 2011.</revremark>
|
<revremark>Released with the Yocto Project 1.0.1 Release.</revremark>
|
||||||
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.1</revnumber>
|
||||||
|
<date>6 October 2011</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.1 Release.</revremark>
|
||||||
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.1.1</revnumber>
|
||||||
|
<date>15 March 2012</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.1.1 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>2010-2011</year>
|
<year>2010-2012</year>
|
||||||
<holder>Linux Foundation</holder>
|
<holder>Linux Foundation</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
|
|
||||||
@@ -50,6 +60,15 @@
|
|||||||
Permission is granted to copy, distribute and/or modify this document under
|
Permission is granted to copy, distribute and/or modify this document under
|
||||||
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England & Wales</ulink> as published by Creative Commons.
|
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England & Wales</ulink> as published by Creative Commons.
|
||||||
</para>
|
</para>
|
||||||
|
<note>
|
||||||
|
Due to production processes, there could be differences between the Yocto Project
|
||||||
|
documentation bundled in the release tarball and the
|
||||||
|
<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
|
||||||
|
the <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink> website.
|
||||||
|
For the latest version of this manual, see the manual on the website.
|
||||||
|
</note>
|
||||||
|
|
||||||
</legalnotice>
|
</legalnotice>
|
||||||
|
|
||||||
</bookinfo>
|
</bookinfo>
|
||||||
|
|||||||
@@ -3,44 +3,47 @@
|
|||||||
|
|
||||||
<chapter id='adt-package'>
|
<chapter id='adt-package'>
|
||||||
<title>Optionally Customizing the Development Packages Installation</title>
|
<title>Optionally Customizing the Development Packages Installation</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Because the Yocto Project is suited for embedded Linux development it is
|
Because the Yocto Project is suited for embedded Linux development, it is
|
||||||
likely that you will need to customize your development packages installation.
|
likely that you will need to customize your development packages installation.
|
||||||
For example, if you are developing a minimal image then you might not need
|
For example, if you are developing a minimal image, then you might not need
|
||||||
certain packages (e.g. graphics support packages).
|
certain packages (e.g. graphics support packages).
|
||||||
Thus, you would like to be able to remove those packages from your target sysroot.
|
Thus, you would like to be able to remove those packages from your target sysroot.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='package-management-systems'>
|
<section id='package-management-systems'>
|
||||||
<title>Package Management Systems</title>
|
<title>Package Management Systems</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The Yocto Project supports the generation of sysroot files using
|
The Yocto Project supports the generation of sysroot files using
|
||||||
three different Package Management Systems (PMS):
|
three different Package Management Systems (PMS):
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><emphasis>OPKG</emphasis> – A less well known PMS whose use
|
<listitem><para><emphasis>OPKG:</emphasis> A less well known PMS whose use
|
||||||
originated in the OpenEmbedded and OpenWrt embedded Linux projects.
|
originated in the OpenEmbedded and OpenWrt embedded Linux projects.
|
||||||
This PMS works with files packaged in an <filename>.ipk</filename> format.
|
This PMS works with files packaged in an <filename>.ipk</filename> format.
|
||||||
See <ulink url='http://en.wikipedia.org/wiki/Opkg'></ulink> for more
|
See <ulink url='http://en.wikipedia.org/wiki/Opkg'></ulink> for more
|
||||||
information about OPKG.</para></listitem>
|
information about OPKG.</para></listitem>
|
||||||
<listitem><para><emphasis>RPM</emphasis> – A more widely known PMS intended for GNU/Linux
|
<listitem><para><emphasis>RPM:</emphasis> A more widely known PMS intended for GNU/Linux
|
||||||
distributions.
|
distributions.
|
||||||
This PMS works with files packaged in an <filename>.rms</filename> format.
|
This PMS works with files packaged in an <filename>.rms</filename> format.
|
||||||
The Yocto Project currently installs through this PMS by default.
|
The Yocto Project currently installs through this PMS by default.
|
||||||
See <ulink url='http://en.wikipedia.org/wiki/RPM_Package_Manager'></ulink>
|
See <ulink url='http://en.wikipedia.org/wiki/RPM_Package_Manager'></ulink>
|
||||||
for more information about RPM.</para></listitem>
|
for more information about RPM.</para></listitem>
|
||||||
<listitem><para><emphasis>Debian</emphasis> – The PMS for Debian-based systems
|
<listitem><para><emphasis>Debian:</emphasis> The PMS for Debian-based systems
|
||||||
is built on many PMS tools.
|
is built on many PMS tools.
|
||||||
The lower-level PMS tool <filename>dpkg</filename> forms the base of the Debian PMS.
|
The lower-level PMS tool <filename>dpkg</filename> forms the base of the Debian PMS.
|
||||||
For information on dpkg see
|
For information on dpkg see
|
||||||
<ulink url='http://en.wikipedia.org/wiki/Dpkg'></ulink>.</para></listitem>
|
<ulink url='http://en.wikipedia.org/wiki/Dpkg'></ulink>.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='configuring-the-pms'>
|
<section id='configuring-the-pms'>
|
||||||
<title>Configuring the PMS</title>
|
<title>Configuring the PMS</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Whichever PMS you are using you need to be sure that the
|
Whichever PMS you are using, you need to be sure that the
|
||||||
<filename>PACKAGE_CLASSES</filename> variable in the <filename>conf/local.conf</filename>
|
<filename>PACKAGE_CLASSES</filename> variable in the <filename>conf/local.conf</filename>
|
||||||
file is set to reflect that system.
|
file is set to reflect that system.
|
||||||
The first value you choose for the variable specifies the package file format for the root
|
The first value you choose for the variable specifies the package file format for the root
|
||||||
@@ -48,31 +51,43 @@
|
|||||||
Additional values specify additional formats for convenience or testing.
|
Additional values specify additional formats for convenience or testing.
|
||||||
See the configuration file for details.
|
See the configuration file for details.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<note>
|
||||||
|
For build performance information related to the PMS, see
|
||||||
|
<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.
|
||||||
|
</note>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
As an example, consider a scenario where you are using OPKG and you want to add
|
As an example, consider a scenario where you are using OPKG and you want to add
|
||||||
the <filename>libglade</filename> package to the target sysroot.
|
the <filename>libglade</filename> package to the target sysroot.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
First, you should generate the ipk file for the <filename>libglade</filename> package and add it
|
First, you should generate the <filename>ipk</filename> file for the
|
||||||
into a working opkg repository.
|
<filename>libglade</filename> package and add it
|
||||||
|
into a working <filename>opkg</filename> repository.
|
||||||
Use these commands:
|
Use these commands:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ bitbake libglade
|
$ bitbake libglade
|
||||||
$ bitbake package-index
|
$ bitbake package-index
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Next, source the environment setup script found in the Yocto Project source directory.
|
Next, source the environment setup script found in the Yocto Project files.
|
||||||
Follow that by setting up the installation destination to point to your
|
Follow that by setting up the installation destination to point to your
|
||||||
sysroot as <filename><sysroot_dir></filename>.
|
sysroot as <filename><sysroot_dir></filename>.
|
||||||
Finally, have an opkg configuration file <filename><conf_file></filename>
|
Finally, have an OPKG configuration file <filename><conf_file></filename>
|
||||||
that corresponds to the opkg repository you have just created.
|
that corresponds to the <filename>opkg</filename> repository you have just created.
|
||||||
The following command forms should now work:
|
The following command forms should now work:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ opkg-cl –f <conf_file> -o <sysroot-dir> update
|
$ opkg-cl –f <conf_file> -o <sysroot_dir> update
|
||||||
$ opkg-cl –f <cconf_file>> -o <sysroot-dir> --force-overwrite install libglade
|
$ opkg-cl –f <cconf_file> -o <sysroot_dir> \
|
||||||
$ opkg-cl –f <cconf_file> -o <sysroot-dir> --force-overwrite install libglade-dbg
|
--force-overwrite install libglade
|
||||||
$ opkg-cl –f <conf_file> -o <sysroot-dir> --force-overwrite install libglade-dev
|
$ opkg-cl –f <cconf_file> -o <sysroot_dir> \
|
||||||
|
--force-overwrite install libglade-dbg
|
||||||
|
$ opkg-cl –f <conf_file> -o <sysroot_dir> \
|
||||||
|
--force-overwrite install libglade-dev
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -6,43 +6,10 @@
|
|||||||
<title>Preparing to Use the Application Development Toolkit (ADT)</title>
|
<title>Preparing to Use the Application Development Toolkit (ADT)</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
In order to use the ADT you must install it, source a script to set up the
|
In order to use the ADT, you must install it, <filename>source</filename> a script to set up the
|
||||||
environment, and be sure the kernel and filesystem image specific to the target architecture
|
environment, and be sure both the kernel and filesystem image specific to the target architecture
|
||||||
exists.
|
exist.
|
||||||
</para>
|
This chapter describes how to be sure you meet the ADT requirements.
|
||||||
|
|
||||||
<para>
|
|
||||||
This section describes how to be sure you meet these requirements.
|
|
||||||
Througout this section two important terms are used:
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem><para><emphasis>Yocto Project Source Tree:</emphasis>
|
|
||||||
This term refers to the directory structure created as a result of downloading
|
|
||||||
and unpacking a Yocto Project release tarball.
|
|
||||||
The Yocto Project source tree contains BitBake, Documentation, Meta-data and
|
|
||||||
other files.
|
|
||||||
The name of the top-level directory of the Yocto Project source tree
|
|
||||||
is derived from the Yocto Project release tarball.
|
|
||||||
For example, downloading and unpacking <filename>poky-bernard-5.0.1.tar.bz2</filename>
|
|
||||||
results in a Yocto Project source tree whose Yocto Project source directory is named
|
|
||||||
<filename>poky-bernard-5.0.1</filename>.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Yocto Project Build Tree:</emphasis>
|
|
||||||
This term refers to the area where you run your builds.
|
|
||||||
The area is created when you source the Yocto Project setup environment script
|
|
||||||
that is found in the Yocto Project source directory
|
|
||||||
(e.g. <filename>poky-init-build-env</filename>).
|
|
||||||
You can create the Yocto Project build tree anywhere you want on your
|
|
||||||
development system.
|
|
||||||
Here is an example that creates the tree in <filename>mybuilds</filename>
|
|
||||||
and names the Yocto Project build directory <filename>YP-5.0.1</filename>:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
$ source poky-bernard-5.0.1/poky-init-build-env $HOME/mybuilds/YP-5.0.1
|
|
||||||
</literallayout>
|
|
||||||
If you don't specifically name the build directory then BitBake creates it
|
|
||||||
in the current directory and uses the name <filename>build</filename>.
|
|
||||||
Also, if you supply an existing directory then BitBake uses that
|
|
||||||
directory as the Yocto Project build directory and populates the build tree
|
|
||||||
beneath it.</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='installing-the-adt'>
|
<section id='installing-the-adt'>
|
||||||
@@ -50,28 +17,28 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The following list describes how you can install the ADT, which includes the cross-toolchain.
|
The following list describes how you can install the ADT, which includes the cross-toolchain.
|
||||||
Regardless of the installation you choose, however, you must source the cross-toolchain
|
Regardless of the installation you choose, you must <filename>source</filename> the cross-toolchain
|
||||||
environment setup script before you use the toolchain.
|
environment setup script before you use the toolchain.
|
||||||
See the <xref linkend='setting-up-the-environment'>“Setting Up the Environment”</xref>
|
See the "<link linkend='setting-up-the-cross-development-environment'>Setting Up the
|
||||||
|
Cross-Development Environment</link>"
|
||||||
section for more information.
|
section for more information.
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><emphasis>Use the ADT Installer Script:</emphasis>
|
<listitem><para><emphasis>Use the ADT Installer Script:</emphasis>
|
||||||
This method is the recommended way to install the ADT because it
|
This method is the recommended way to install the ADT because it
|
||||||
automates much of the process for you.
|
automates much of the process for you.
|
||||||
For example, you can configure the installation to install the QEMU emulator
|
For example, you can configure the installation to install the QEMU emulator
|
||||||
and the user-space NFS, specify which root filesystem profiles to download,
|
and the user-space NFS, specify which root filesystem profiles to download,
|
||||||
and define the target sysroot location.
|
and define the target sysroot location.</para></listitem>
|
||||||
</para></listitem>
|
|
||||||
<listitem><para><emphasis>Use an Existing Toolchain Tarball:</emphasis>
|
<listitem><para><emphasis>Use an Existing Toolchain Tarball:</emphasis>
|
||||||
Using this method you select and download an architecture-specific
|
Using this method, you select and download an architecture-specific
|
||||||
toolchain tarball and then hand-install the toolchain.
|
toolchain tarball and then hand-install the toolchain.
|
||||||
If you use this method you just get the cross-toolchain and QEMU - you do not
|
If you use this method, you just get the cross-toolchain and QEMU - you do not
|
||||||
get any of the other mentioned benefits had you run the ADT Installer script.</para></listitem>
|
get any of the other mentioned benefits had you run the ADT Installer script.</para></listitem>
|
||||||
<listitem><para><emphasis>Use the Toolchain from Within a Yocto Project Build Tree:</emphasis>
|
<listitem><para><emphasis>Use the Toolchain from within a Yocto Project Build Tree:</emphasis>
|
||||||
If you already have a Yocto Project build tree you can install the cross-toolchain
|
If you already have a Yocto Project build tree, you can build the cross-toolchain
|
||||||
using that tree.
|
within tree.
|
||||||
However, like the previous method mentioned, you only get the cross-toolchain and QEMU - you
|
However, like the previous method mentioned, you only get the cross-toolchain and QEMU - you
|
||||||
do not get any of the other benefits without taking separate steps.</para></listitem>
|
do not get any of the other benefits without taking separate steps.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -79,7 +46,7 @@
|
|||||||
<title>Using the ADT Installer</title>
|
<title>Using the ADT Installer</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To run the ADT Installer you need to first get the ADT Installer tarball and then run the ADT
|
To run the ADT Installer, you need to first get the ADT Installer tarball and then run the ADT
|
||||||
Installer Script.
|
Installer Script.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -88,125 +55,136 @@
|
|||||||
|
|
||||||
<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://autobuilder.yoctoproject.org/downloads/yocto-1.0/adt-installer/'></ulink>.
|
<ulink url='http://downloads.yoctoproject.org/releases'>Index of Releases</ulink>, specifically
|
||||||
Or, you can use BitBake to generate the tarball inside the existing Yocto Project build tree.
|
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
|
||||||
|
build tree.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you use BitBake to generate the ADT Installer tarball, you must
|
If you use BitBake to generate the ADT Installer tarball, you must
|
||||||
source the Yocto Project environment setup script located in the Yocto Project
|
<filename>source</filename> the Yocto Project environment setup script
|
||||||
source directory before running the BitBake command that creates the tarball.
|
(<filename>oe-init-build-env</filename>) located
|
||||||
|
in the Yocto Project file structure before running the <filename>bitbake</filename>
|
||||||
|
command that creates the tarball.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The following example commands download the Yocto Project release tarball, create the Yocto
|
The following example commands download the Yocto Project release tarball, set up the Yocto
|
||||||
Project source tree, set up the environment while also creating the Yocto Project build tree,
|
Project files structure, set up the environment while also creating the
|
||||||
and finally run the BitBake command that results in the tarball
|
default Yocto Project build tree,
|
||||||
|
and run the <filename>bitbake</filename> command that results in the tarball
|
||||||
<filename>~/yocto-project/build/tmp/deploy/sdk/adt_installer.tar.bz2</filename>:
|
<filename>~/yocto-project/build/tmp/deploy/sdk/adt_installer.tar.bz2</filename>:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ cd ~
|
$ cd ~
|
||||||
$ mkdir yocto-project
|
$ mkdir yocto-project
|
||||||
$ cd yocto-project
|
$ cd yocto-project
|
||||||
$ wget http://www.yoctoproject.org/downloads/poky/poky-bernard-5.0.1.tar.bz2
|
$ wget http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/poky-edison-6.0.1.tar.bz2
|
||||||
$ tar xjf poky-bernard-5.0.1.tar.bz2
|
$ tar xjf poky-edison-6.0.1.tar.bz2
|
||||||
$ source poky-bernard-5.0.1/poky-init-build-env poky-5.0.1-build
|
$ source poky-edison-6.0.1/oe-init-build-env
|
||||||
$ bitbake adt-installer
|
$ bitbake adt-installer
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='configuring-and-running-the-adt-installer-script'>
|
<section id='configuring-and-running-the-adt-installer-script'>
|
||||||
<title>Configuring and Running the ADT Installer Script</title>
|
<title>Configuring and Running the ADT Installer Script</title>
|
||||||
|
|
||||||
<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 and its configuration file.
|
which contains the ADT Installer script (<filename>adt_installer</filename>)
|
||||||
|
and its configuration file (<filename>adt_installer.conf</filename>).
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Before you run the script, however, you should examine the ADT Installer configuration
|
Before you run the script, however, you should examine the ADT Installer configuration
|
||||||
file (<filename>adt_installer</filename>) and be sure you are going to get what you want.
|
file and be sure you are going to get what you want.
|
||||||
Your configurations determine which kernel and filesystem image are downloaded.
|
Your configurations determine which kernel and filesystem image are downloaded.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The following list describes the configurations you can define for the ADT Installer.
|
The following list describes the configurations you can define for the ADT Installer.
|
||||||
For configuration values and restrictions see the comments in
|
For configuration values and restrictions, see the comments in
|
||||||
the <filename>adt-installer.conf</filename> file:
|
the <filename>adt-installer.conf</filename> file:
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><filename>YOCTOADT_IPKG_REPO</filename> – This area
|
<listitem><para><filename>YOCTOADT_REPO</filename>: This area
|
||||||
includes the IPKG-based packages and the root filesystem upon which
|
includes the IPKG-based packages and the root filesystem upon which
|
||||||
the installation is based.
|
the installation is based.
|
||||||
If you want to set up your own IPKG repository pointed to by
|
If you want to set up your own IPKG repository pointed to by
|
||||||
<filename>YOCTOADT_IPKG_REPO</filename>, you need to be sure that the
|
<filename>YOCTOADT_REPO</filename>, you need to be sure that the
|
||||||
directory structure follows the same layout as the reference directory
|
directory structure follows the same layout as the reference directory
|
||||||
set up at <ulink url='http://adtrepo.yoctoproject.org'></ulink>.
|
set up at <ulink url='http://adtrepo.yoctoproject.org'></ulink>.
|
||||||
Also, your repository needs to be accessible through HTTP.
|
Also, your repository needs to be accessible through HTTP.</para></listitem>
|
||||||
</para></listitem>
|
<listitem><para><filename>YOCTOADT_TARGETS</filename>: The machine
|
||||||
<listitem><para><filename>YOCTOADT-TARGETS</filename> – The machine
|
target architectures for which you want to set up cross-development
|
||||||
target architectures for which you want to set up cross-development
|
environments.</para></listitem>
|
||||||
environments.
|
<listitem><para><filename>YOCTOADT_QEMU</filename>: Indicates whether
|
||||||
</para></listitem>
|
or not to install the emulator QEMU.</para></listitem>
|
||||||
<listitem><para><filename>YOCTOADT_QEMU</filename> – Indicates whether
|
<listitem><para><filename>YOCTOADT_NFS_UTIL</filename>: Indicates whether
|
||||||
or not to install the emulator QEMU.
|
or not to install user-mode NFS.
|
||||||
</para></listitem>
|
If you plan to use the Yocto Eclipse IDE plug-in against QEMU,
|
||||||
<listitem><para><filename>YOCTOADT_NFS_UTIL</filename> – Indicates whether
|
you should install NFS.
|
||||||
or not to install user-mode NFS.
|
<note>To boot QEMU images using our userspace NFS server, you need
|
||||||
If you plan to use the Yocto Eclipse IDE plug-in against QEMU,
|
to be running <filename>portmap</filename> or <filename>rpcbind</filename>.
|
||||||
you should install NFS.
|
If you are running <filename>rpcbind</filename>, you will also need to add the
|
||||||
<note>
|
<filename>-i</filename> option when <filename>rpcbind</filename> starts up.
|
||||||
To boot QEMU images using our userspace NFS server, you need
|
Please make sure you understand the security implications of doing this.
|
||||||
to be running portmap or rpcbind.
|
You might also have to modify your firewall settings to allow
|
||||||
If you are running rpcbind, you will also need to add the -i
|
NFS booting to work.</note></para></listitem>
|
||||||
option when rpcbind starts up.
|
<listitem><para><filename>YOCTOADT_ROOTFS_<arch></filename>: The root
|
||||||
Please make sure you understand the security implications of doing this.
|
filesystem images you want to download from the
|
||||||
Your firewall settings may also have to be modified to allow
|
<filename>YOCTOADT_IPKG_REPO</filename> repository.</para></listitem>
|
||||||
NFS booting to work.
|
<listitem><para><filename>YOCTOADT_TARGET_SYSROOT_IMAGE_<arch></filename>: The
|
||||||
</note>
|
particular root filesystem used to extract and create the target sysroot.
|
||||||
</para></listitem>
|
The value of this variable must have been specified with
|
||||||
<listitem><para><filename>YOCTOADT_ROOTFS_<arch></filename> - The root
|
<filename>YOCTOADT_ROOTFS_<arch></filename>.
|
||||||
filesystem images you want to download from the <filename>YOCTOADT_IPKG_REPO</filename>
|
For example, if you downloaded both <filename>minimal</filename> and
|
||||||
repository.
|
<filename>sato-sdk</filename> images by setting
|
||||||
</para></listitem>
|
<filename>YOCTOADT_ROOTFS_<arch></filename>
|
||||||
<listitem><para><filename>YOCTOADT_TARGET_SYSROOT_IMAGE_<arch></filename> - The
|
to "minimal sato-sdk", then <filename>YOCTOADT_ROOTFS_<arch></filename>
|
||||||
particular root filesystem used to extract and create the target sysroot.
|
must be set to either <filename>minimal</filename> or
|
||||||
The value of this variable must have been specified with
|
<filename>sato-sdk</filename>.</para></listitem>
|
||||||
<filename>YOCTOADT_ROOTFS_<arch></filename>.
|
<listitem><para><filename>YOCTOADT_TARGET_SYSROOT_LOC_<arch></filename>: The
|
||||||
For example, if you downloaded both <filename>minimal</filename> and
|
location on the development host where the target sysroot is created.
|
||||||
<filename>sato-sdk</filename> images by setting <filename>YOCTOADT_ROOTFS_<arch></filename>
|
</para></listitem>
|
||||||
to "minimal sato-sdk", then <filename>YOCTOADT_ROOTFS_<arch></filename>
|
|
||||||
must be set to either "minimal" or "sato-sdk".
|
|
||||||
</para></listitem>
|
|
||||||
<listitem><para><filename>YOCTOADT_TARGET_SYSROOT_LOC_<arch></filename> - The
|
|
||||||
location on the development host where the target sysroot will be created.
|
|
||||||
</para></listitem>
|
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<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/yocto-project-qs/yocto-project-qs.html'>
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#packages'>Packages</ulink>"
|
||||||
Yocto Project Quick Start</ulink> then you will have libtool installed.
|
section of
|
||||||
|
<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.
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Once the installer begins to run you are asked whether you want to run in
|
Once the installer begins to run, you are asked whether you want to run in
|
||||||
interactive or silent mode.
|
interactive or silent mode.
|
||||||
If you want to closely monitor the installation then choose “I” for interactive
|
If you want to closely monitor the installation, choose “I” for interactive
|
||||||
mode rather than “S” for silent mode.
|
mode rather than “S” for silent mode.
|
||||||
Follow the prompts from the script to complete the installation.
|
Follow the prompts from the script to complete the installation.
|
||||||
</para>
|
</para>
|
||||||
@@ -214,140 +192,263 @@
|
|||||||
<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/$SDKVERSION</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
|
||||||
also in your configuration file.
|
also in your configuration file.
|
||||||
</para>
|
</para>
|
||||||
|
</section>
|
||||||
</section>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='using-an-existing-toolchain-tarball'>
|
<section id='using-an-existing-toolchain-tarball'>
|
||||||
<title>Using a Cross-Toolchain Tarball</title>
|
<title>Using a Cross-Toolchain Tarball</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you want to simply install the cross-toolchain by hand you can do so by using an existing
|
If you want to simply install the cross-toolchain by hand, you can do so by using an existing
|
||||||
cross-toolchain tarball.
|
cross-toolchain tarball.
|
||||||
If you install the cross-toolchain by hand you will have to set up the target sysroot separately.
|
If you use this method to install the cross-toolchain and you still need to install the target
|
||||||
|
sysroot, you will have to install sysroot separately.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Follow these steps:
|
Follow these steps:
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para>Go to
|
<listitem><para>Go to
|
||||||
<ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.0/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. 'i686' for 32-bit machines or 'x86_64' for 64-bit machines).</para>
|
(i.e. <filename>i686</filename> for 32-bit machines or
|
||||||
</listitem>
|
<filename>x86_64</filename> for 64-bit machines).</para></listitem>
|
||||||
<listitem><para>Go into that folder and download the toolchain tarball whose name
|
<listitem><para>Go into that folder and download the toolchain tarball whose name
|
||||||
includes the appropriate target architecture.
|
includes the appropriate target architecture.
|
||||||
For example, if your host development system is an Intel-based 64-bit system and
|
For example, if your host development system is an Intel-based 64-bit system and
|
||||||
you are going to use your cross-toolchain for an arm 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'>
|
||||||
yocto-eglibc-x86_64-arm-toolchain-gmae-1.0.tar.bz2
|
poky-eglibc-x86_64-i586-toolchain-1.1.1.tar.bz2
|
||||||
</literallayout>
|
</literallayout>
|
||||||
<note>
|
<note><para>As an alternative to steps one and two, you can build the toolchain tarball
|
||||||
Alternatively you can build the toolchain tarball if you have a Yocto Project build tree.
|
if you have a Yocto Project build tree.
|
||||||
Use the <filename>bitbake meta-toolchain</filename> command after you have
|
If you need GMAE, you should use the <filename>bitbake meta-toolchain-gmae</filename>
|
||||||
sourced the <filename>poky-build-init script</filename> located in the Yocto Project
|
command.
|
||||||
source directory.
|
The resulting tarball will support such development.
|
||||||
When the <filename>bitbake</filename> command completes the toolchain tarball will
|
However, if you are not concerned with GMAE,
|
||||||
be in <filename>tmp/deploy/sdk</filename> in the Yocto Project build tree.
|
you can generate the tarball using <filename>bitbake meta-toolchain</filename>.</para>
|
||||||
</note></para></listitem>
|
<para>Use the appropriate <filename>bitbake</filename> command only after you have
|
||||||
<listitem><para>Make sure you are in the root directory and then expand
|
sourced the <filename>oe-build-init-env</filename> script located in the Yocto
|
||||||
the tarball.
|
Project files.
|
||||||
The tarball expands into <filename>/opt/poky/$SDKVERSION</filename>.
|
When the <filename>bitbake</filename> command completes, the tarball will
|
||||||
Once the tarball in unpacked the cross-toolchain is installed.
|
be in <filename>tmp/deploy/sdk</filename> in the Yocto Project build tree.
|
||||||
You will notice environment setup files for the cross-toolchain in the directory.
|
</para></note></para></listitem>
|
||||||
</para></listitem>
|
<listitem><para>Make sure you are in the root directory with root privileges and then expand
|
||||||
|
the tarball.
|
||||||
|
The tarball expands into <filename>/opt/poky/1.1.1</filename>.
|
||||||
|
Once the tarball is expanded, the cross-toolchain is installed.
|
||||||
|
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>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='using-the-toolchain-from-within-the-build-tree'>
|
<section id='using-the-toolchain-from-within-the-build-tree'>
|
||||||
<title>Using BitBake and the Yocto Project Build Tree</title>
|
<title>Using BitBake and the Yocto Project Build Tree</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
A final way of installing just the cross-toolchain is to use BitBake within an existing
|
A final way of installing just the cross-toolchain is to use BitBake to build the
|
||||||
Yocto Project build tree.
|
toolchain within an existing Yocto Project build tree.
|
||||||
Follow these steps:
|
This method does not install the toolchain into the <filename>/opt</filename> directory.
|
||||||
|
As with the previous method, if you need to install the target sysroot, you must
|
||||||
|
do this separately.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Follow these steps to build and install the toolchain into the build tree:
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para>Source the environment setup script located in the Yocto Project
|
<listitem><para>Source the environment setup script
|
||||||
source directory.
|
<filename>oe-init-build-env</filename> located in the Yocto Project
|
||||||
The script has the string <filename>init-build-env</filename>
|
files.</para></listitem>
|
||||||
as part of the name.</para></listitem>
|
<listitem><para>At this point, you should be sure that the
|
||||||
<listitem><para>At this point you should be sure that the
|
<filename>MACHINE</filename> variable
|
||||||
<filename>MACHINE</filename> variable
|
in the <filename>local.conf</filename> file found in the
|
||||||
in the <filename>local.conf</filename> file is set for the target architecture.
|
<filename>conf</filename> directory of the Yocto Project build directory
|
||||||
You can find the <filename>local.conf</filename> file in the Yocto Project source
|
is set for the target architecture.
|
||||||
directory.
|
Comments within the <filename>local.conf</filename> file list the values you
|
||||||
Comments within the <filename>local.conf</filename> file list the values you
|
can use for the <filename>MACHINE</filename> variable.
|
||||||
can use for the <filename>MACHINE</filename> variable.
|
<note>You can populate the build tree with the cross-toolchains for more
|
||||||
<note>You can populate the build tree with the cross-toolchains for more
|
than a single architecture.
|
||||||
than a single architecture.
|
You just need to edit the <filename>MACHINE</filename> variable in the
|
||||||
You just need to edit the <filename>MACHINE</filename> variable in the
|
<filename>local.conf</filename> file and re-run the BitBake
|
||||||
<filename>local.conf</filename> file and re-run the BitBake 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 you change your working directory after you source the environment
|
<note>If you change out of your working directory after you
|
||||||
setup script and before you run the BitBake command the command will not work.
|
<filename>source</filename> the environment setup script and before you run
|
||||||
Be sure to run the BitBake command immediately after checking or editing the
|
the <filename>bitbake</filename> command, the command might not work.
|
||||||
<filename>local.conf</filename> but without changing your working directory.</note>
|
Be sure to run the <filename>bitbake</filename> command immediately
|
||||||
Once BitBake finishes, the cross-toolchain is installed.
|
after checking or editing the <filename>local.conf</filename> but without
|
||||||
You will notice environment setup files for the cross-toolchain in the
|
changing out of your working directory.</note>
|
||||||
Yocto Project build tree in the <filename>tmp</filename> directory.
|
Once the <filename>bitbake</filename> command finishes,
|
||||||
Setup script filenames contain the strings <filename>environment-setup</filename>.
|
the tarball for the cross-toolchain is generated within the Yocto Project build tree.
|
||||||
</para></listitem>
|
You will notice environment setup files for the cross-toolchain in the
|
||||||
|
Yocto Project build tree in the <filename>tmp</filename> directory.
|
||||||
|
Setup script filenames contain the strings <filename>environment-setup</filename>.
|
||||||
|
</para></listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='setting-up-the-environment'>
|
<section id='setting-up-the-cross-development-environment'>
|
||||||
<title>Setting Up the Environment</title>
|
<title>Setting Up the Cross-Development Environment</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Before you can use the cross-toolchain you need to set up the toolchain environment by
|
Before you can develop using the cross-toolchain, you need to set up the
|
||||||
sourcing the 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/$SDKVERSION</filename>
|
then you can find this script in the <filename>/opt/poky/1.1.1</filename>
|
||||||
directory.
|
directory.
|
||||||
If you used BitBake and the Yocto Project Build Tree to install the cross-toolchain
|
If you installed the toolchain in the build tree, you can find the environment setup
|
||||||
then you can find the environment setup scripts in in the Yocto Project build tree
|
script for the toolchain in the Yocto Project build tree's <filename>tmp</filename> directory.
|
||||||
in the <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 “environment-setup” and include as
|
Environment setup scripts begin with the string “<filename>environment-setup</filename>”
|
||||||
part of their name the architecture.
|
and include as part of their name the architecture.
|
||||||
For example, the 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.0/environment-setup-x86_64-poky-linux
|
$ source /opt/poky/1.1.1/environment-setup-x86_64-poky-linux
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='kernels-and-filesystem-images'>
|
<section id='securing-kernel-and-filesystem-images'>
|
||||||
<title>Kernels and Filesystem Images</title>
|
<title>Securing Kernel and Filesystem Images</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You will need to have a kernel and filesystem image to boot using your
|
You will need to have a kernel and filesystem image to boot using your
|
||||||
hardware or the QEMU emulator.
|
hardware or the QEMU emulator.
|
||||||
That means you either have to build them or know where to get them.
|
Furthermore, if you plan on booting your image using NFS or you want to use the root filesystem
|
||||||
You can find lots of details on how to get or build images and kernels for your
|
as the target sysroot, you need to extract the root filesystem.
|
||||||
architecture in the "Yocto Project Quick Start" found at
|
|
||||||
<ulink url='http://www.yoctoproject.org/docs/yocto-quick-start/yocto-project-qs.html'></ulink>.
|
|
||||||
<note>
|
|
||||||
Yocto Project provides basic kernels and filesystem images for several
|
|
||||||
architectures (x86, x86-64, mips, powerpc, and arm) that you can use
|
|
||||||
unaltered in the QEMU emulator.
|
|
||||||
These kernels and filesystem images reside in the Yocto Project release
|
|
||||||
area - <ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.0/machines/'></ulink>
|
|
||||||
and are ideal for experimentation within Yocto Project.
|
|
||||||
</note>
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<section id='getting-the-images'>
|
||||||
|
<title>Getting the Images</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
To get the kernel and filesystem images, you either have to build them or download
|
||||||
|
pre-built versions.
|
||||||
|
You can find examples for both these situations in the
|
||||||
|
"<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 The Yocto Project Quick Start.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The Yocto Project provides basic kernel and filesystem images for several
|
||||||
|
architectures (<filename>x86</filename>, <filename>x86-64</filename>,
|
||||||
|
<filename>mips</filename>, <filename>powerpc</filename>, and <filename>arm</filename>)
|
||||||
|
that you can use unaltered in the QEMU emulator.
|
||||||
|
These kernel images reside in the Yocto Project release
|
||||||
|
area - <ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/machines/'></ulink>
|
||||||
|
and are ideal for experimentation within Yocto Project.
|
||||||
|
For information on the image types you can build using the Yocto Project, see the
|
||||||
|
"<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.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
If you plan on remotely deploying and debugging your application from within the
|
||||||
|
Eclipse IDE, you must have an image that contains the Yocto Target Communication
|
||||||
|
Framework (TCF) agent (<filename>tcf-agent</filename>).
|
||||||
|
By default, the Yocto Project provides only one type pre-built image that contains the
|
||||||
|
<filename>tcf-agent</filename>.
|
||||||
|
And, those images are SDK (e.g.<filename>core-image-sato-sdk</filename>).
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
If you want to use a different image type that contains the <filename>tcf-agent</filename>,
|
||||||
|
you can do so one of two ways:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>Modify the <filename>conf/local.conf</filename> configuration file in
|
||||||
|
the Yocto Project build directory and then rebuild the image.
|
||||||
|
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.
|
||||||
|
Once the image is rebuilt, the <filename>tcf-agent</filename> will be included
|
||||||
|
in the image and is launched automatically after the boot.</para></listitem>
|
||||||
|
<listitem><para>Manually build the <filename>tcf-agent</filename>.
|
||||||
|
To build the agent, follow these steps:
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para>Be sure the ADT is installed as described in the
|
||||||
|
"<link linkend='installing-the-adt'>Installing the ADT</link>" section.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>Set up the cross-development environment as described in the
|
||||||
|
"<link linkend='setting-up-the-cross-development-environment'>Setting
|
||||||
|
Up the Cross-Development Environment</link>" section.</para></listitem>
|
||||||
|
<listitem><para>Get the <filename>tcf-agent</filename> source code, which is
|
||||||
|
stored using the Subversion SCM, using the following command:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ svn checkout svn://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/trunk/agent \
|
||||||
|
<-r #rev_number>
|
||||||
|
</literallayout></para></listitem>
|
||||||
|
<listitem><para>Modify the <filename>Makefile.inc</filename> file
|
||||||
|
for the cross-compilation environment by setting the
|
||||||
|
<filename>OPSYS</filename> and <filename>MACHINE</filename>
|
||||||
|
variables according to your target.</para></listitem>
|
||||||
|
<listitem><para>Use the cross-development tools to build the
|
||||||
|
<filename>tcf-agent</filename>.
|
||||||
|
Before you "Make" the file, be sure your cross-tools are set up first.
|
||||||
|
See the "<link linkend='makefile-based-projects'>Makefile-Based Projects</link>"
|
||||||
|
section for information on how to make sure the cross-tools are set up
|
||||||
|
correctly.</para>
|
||||||
|
<para>If the build is successful, the <filename>tcf-agent</filename> output will
|
||||||
|
be <filename>obj/$(OPSYS)/$(MACHINE)/Debug/agent</filename>.</para></listitem>
|
||||||
|
<listitem><para>Deploy the agent into the image's root filesystem.</para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='extracting-the-root-filesystem'>
|
||||||
|
<title>Extracting the Root Filesystem</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You must extract the root filesystem if you want to boot the image using NFS
|
||||||
|
or you want to use the root filesystem as the target sysroot.
|
||||||
|
For example, the Eclipse IDE environment with the Eclipse Yocto Plug-in installed allows you
|
||||||
|
to use QEMU to boot under NFS.
|
||||||
|
Another example is if you want to develop your target application using the
|
||||||
|
root filesystem as the target sysroot.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
To extract the root filesystem, first <filename>source</filename>
|
||||||
|
the cross-development environment setup script and then
|
||||||
|
use the <filename>runqemu-extract-sdk</filename> command on the
|
||||||
|
filesystem image tarball.
|
||||||
|
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
|
||||||
|
<filename>core-image-sato-sdk-qemux86.tar.bz2</filename>.
|
||||||
|
The example extracts the root filesystem into the <filename>$HOME/qemux86-sato</filename>
|
||||||
|
directory:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ source $HOME/poky/build/tmp/environment-setup-i586-poky-linux
|
||||||
|
$ runqemu-extract-sdk \
|
||||||
|
tmp/deploy/images/core-image-sato-sdk-qemux86.tar.bz2 \
|
||||||
|
$HOME/qemux86-sato
|
||||||
|
</literallayout>
|
||||||
|
In this case, you could now point to the target sysroot at
|
||||||
|
<filename>$HOME/qemux86-sato</filename>.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 17 KiB |
@@ -19,10 +19,17 @@
|
|||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<firstname>Richard</firstname> <surname>Purdie</surname>
|
<firstname>Tom</firstname> <surname>Zanussi</surname>
|
||||||
<affiliation>
|
<affiliation>
|
||||||
<orgname>Intel Corporation</orgname>
|
<orgname>Intel Corporation</orgname>
|
||||||
</affiliation>
|
</affiliation>
|
||||||
|
<email>tom.zanussi@intel.com</email>
|
||||||
|
</author>
|
||||||
|
<author>
|
||||||
|
<firstname>Richard</firstname> <surname>Purdie</surname>
|
||||||
|
<affiliation>
|
||||||
|
<orgname>Linux Foundation</orgname>
|
||||||
|
</affiliation>
|
||||||
<email>richard.purdie@linuxfoundation.org</email>
|
<email>richard.purdie@linuxfoundation.org</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
@@ -30,24 +37,33 @@
|
|||||||
<revhistory>
|
<revhistory>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>0.9</revnumber>
|
<revnumber>0.9</revnumber>
|
||||||
<date>27 October 2010</date>
|
<date>24 November 2010</date>
|
||||||
<revremark>This manual revision is the initial manual and corresponds to the
|
<revremark>The initial document draft released with the Yocto Project 0.9 Release.</revremark>
|
||||||
Yocto Project 0.9 Release.</revremark>
|
|
||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>1.0</revnumber>
|
<revnumber>1.0</revnumber>
|
||||||
<date>6 April 2011</date>
|
<date>6 April 2011</date>
|
||||||
<revremark>This manual revision corresponds to the Yocto Project 1.0 Release.</revremark>
|
<revremark>Released with the Yocto Project 1.0 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>1.0.1</revnumber>
|
<revnumber>1.0.1</revnumber>
|
||||||
<date>23 May 2011</date>
|
<date>23 May 2011</date>
|
||||||
<revremark>Released with Yocto Project 1.0.1 on 23 May 2011.</revremark>
|
<revremark>Released with the Yocto Project 1.0.1 Release.</revremark>
|
||||||
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.1</revnumber>
|
||||||
|
<date>6 October 2011</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.1 Release.</revremark>
|
||||||
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.1.1</revnumber>
|
||||||
|
<date>15 March 2012</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.1.1 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>2010-2011</year>
|
<year>2010-2012</year>
|
||||||
<holder>Linux Foundation</holder>
|
<holder>Linux Foundation</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
|
|
||||||
@@ -56,6 +72,14 @@
|
|||||||
Permission is granted to copy, distribute and/or modify this document under
|
Permission is granted to copy, distribute and/or modify this document under
|
||||||
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/">Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England & Wales</ulink> as published by Creative Commons.
|
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/">Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England & Wales</ulink> as published by Creative Commons.
|
||||||
</para>
|
</para>
|
||||||
|
<note>
|
||||||
|
Due to production processes, there could be differences between the Yocto Project
|
||||||
|
documentation bundled in the release tarball and the
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/bsp-guide/bsp-guide.html'>
|
||||||
|
Board Support Package (BSP) Developer's Guide</ulink> on
|
||||||
|
the <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink> website.
|
||||||
|
For the latest version of this manual, see the manual on the website.
|
||||||
|
</note>
|
||||||
</legalnotice>
|
</legalnotice>
|
||||||
|
|
||||||
</bookinfo>
|
</bookinfo>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<chapter id='bsp'>
|
<chapter id='bsp'>
|
||||||
|
|
||||||
<title>Board Support Packages (BSP) - Developers Guide</title>
|
<title>Board Support Packages (BSP) - Developer's Guide</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
A Board Support Package (BSP) is a collection of information that
|
A Board Support Package (BSP) is a collection of information that
|
||||||
@@ -27,12 +27,17 @@
|
|||||||
of software support of hardware.
|
of software support of hardware.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<note><para>
|
<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 information on how to create a BSP, see the Yocto Project Development Manual or the
|
For examples on how to create a BSP, see the
|
||||||
<ulink url='https://wiki.yoctoproject.org/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another'></ulink>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#dev-manual-bsp-appendix'>
|
||||||
wiki page.
|
BSP Development Example</ulink> in
|
||||||
</para></note>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>
|
||||||
|
The Yocto Project Development Manual</ulink>.
|
||||||
|
You can also see the
|
||||||
|
<ulink url='https://wiki.yoctoproject.org/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another'>
|
||||||
|
wiki page</ulink>.
|
||||||
|
</note>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The proposed format does have elements that are specific to the Yocto Project and
|
The proposed format does have elements that are specific to the Yocto Project and
|
||||||
@@ -81,8 +86,11 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The base directory (<filename>meta-<bsp_name></filename>) is the root of the BSP layer.
|
The base directory (<filename>meta-<bsp_name></filename>) is the root of the BSP layer.
|
||||||
This root is what you add to the BBLAYERS variable in <filename>build/conf/bblayers.conf</filename>
|
This root is what you add to the <filename>BBLAYERS</filename>
|
||||||
so that the build system recognizes the BSP definition and from it can build an image.
|
variable in the <filename>build/conf/bblayers.conf</filename> file found in the
|
||||||
|
Yocto Project file's build directory.
|
||||||
|
Adding the root allows the Yocto Project build system to recognize the BSP
|
||||||
|
definition and from it build an image.
|
||||||
Here is an example:
|
Here is an example:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
BBLAYERS = " \
|
BBLAYERS = " \
|
||||||
@@ -92,8 +100,10 @@
|
|||||||
"
|
"
|
||||||
</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/poky-ref-manual/poky-ref-manual.html#usingpoky-changes-layers'>
|
"<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.
|
||||||
BitBake Layers</ulink> section of the Yocto Project Reference Manual.
|
You can also see the detailed examples in the appendices of
|
||||||
|
<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>
|
||||||
@@ -101,41 +111,56 @@
|
|||||||
While you can use this basic form for the standard, realize that the actual structures
|
While you can use this basic form for the standard, realize that the actual structures
|
||||||
for specific BSPs could differ.
|
for specific BSPs could differ.
|
||||||
|
|
||||||
<programlisting>
|
<literallayout class='monospaced'>
|
||||||
meta-<bsp_name>/
|
meta-<bsp_name>/
|
||||||
meta-<bsp_name>/<bsp_license_file>
|
meta-<bsp_name>/<bsp_license_file>
|
||||||
meta-<bsp_name>/README
|
meta-<bsp_name>/README
|
||||||
meta-<bsp_name>/binary/<bootable_images>
|
meta-<bsp_name>/binary/<bootable_images>
|
||||||
meta-<bsp_name>/conf/layer.conf
|
meta-<bsp_name>/conf/layer.conf
|
||||||
meta-<bsp_name>/conf/machine/*.conf
|
meta-<bsp_name>/conf/machine/*.conf
|
||||||
meta-<bsp_name>/recipes-bsp/*
|
meta-<bsp_name>/recipes-bsp/*
|
||||||
meta-<bsp_name>/recipes-graphics/*
|
meta-<bsp_name>/recipes-graphics/*
|
||||||
meta-<bsp_name>/recipes-kernel/linux/linux-yocto_git.bbappend
|
meta-<bsp_name>/recipes-kernel/linux/linux-yocto_<kernel_rev>.bbappend
|
||||||
</programlisting>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Below is an example of the crownbay BSP:
|
Below is an example of the Crown Bay BSP:
|
||||||
|
|
||||||
<programlisting>
|
<literallayout class='monospaced'>
|
||||||
meta-crownbay/COPYING.MIT
|
meta-crownbay/COPYING.MIT
|
||||||
meta-crownbay/README
|
meta-crownbay/README
|
||||||
meta-crownbay/binary/.gitignore
|
meta-crownbay/binary
|
||||||
meta-crownbay/conf/layer.conf
|
meta-crownbay/conf/
|
||||||
meta-crownbay/conf/machine/crownbay.conf
|
meta-crownbay/conf/layer.conf
|
||||||
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/machconfig
|
meta-crownbay/conf/machine/
|
||||||
meta-crownbay/recipes-bsp/formfactor/formfactor_0.0.bbappend
|
meta-crownbay/conf/machine/crownbay.conf
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/xcorg.conf
|
meta-crownbay/conf/machine/crownbay-noemgd.conf
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
|
meta-crownbay/recipes-bsp/
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd-bin/.gitignore
|
meta-crownbay/recipes-bsp/formfactor/
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd-bin_1.7.99.2.bb
|
meta-crownbay/recipes-bsp/formfactor/formfactor_0.0.bbappend
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/crosscompile.patch
|
meta-crownbay/recipes-bsp/formfactor/formfactor/
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/fix_open_max_preprocessor_error.patch
|
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/macro_tweak.patch
|
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/machconfig
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/nodolt.patch
|
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay-noemgd/
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd_1.7.99.2.bb
|
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay-noemgd/machconfig
|
||||||
meta-crownbay/recipes-kernel/linux/linux-yocto_git.bbappend
|
meta-crownbay/recipes-core
|
||||||
</programlisting>
|
meta-crownbay/recipes-core/tasks
|
||||||
|
meta-crownbay/recipes-core/tasks/task-core-tools.bbappend
|
||||||
|
meta-crownbay/recipes-graphics/
|
||||||
|
meta-crownbay/recipes-graphics/xorg-xserver/
|
||||||
|
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
|
||||||
|
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/xorg.conf
|
||||||
|
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay-noemgd/
|
||||||
|
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay-noemgd/xorg.conf
|
||||||
|
meta-crownbay/recipes-kernel/
|
||||||
|
meta-crownbay/recipes-kernel/linux/
|
||||||
|
meta-crownbay/recipes-kernel/linux/linux-yocto_2.6.34.bbappend
|
||||||
|
meta-crownbay/recipes-kernel/linux/linux-yocto_2.6.37.bbappend
|
||||||
|
meta-crownbay/recipes-kernel/linux/linux-yocto_3.0.bbappend
|
||||||
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -144,14 +169,18 @@ meta-crownbay/recipes-kernel/linux/linux-yocto_git.bbappend
|
|||||||
|
|
||||||
<section id="bsp-filelayout-license">
|
<section id="bsp-filelayout-license">
|
||||||
<title>License Files</title>
|
<title>License Files</title>
|
||||||
<programlisting>
|
|
||||||
meta-<bsp_name>/<bsp_license_file>
|
<para>
|
||||||
</programlisting>
|
You can find these files in the Yocto Project file's directory structure at:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
meta-<bsp_name>/<bsp_license_file>
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
These optional files satisfy licensing requirements for the BSP.
|
These optional files satisfy licensing requirements for the BSP.
|
||||||
The type or types of files here can vary depending on the licensing requirements.
|
The type or types of files here can vary depending on the licensing requirements.
|
||||||
For example, in the crownbay BSP all licensing requirements are handled with the
|
For example, in the Crown Bay BSP all licensing requirements are handled with the
|
||||||
<filename>COPYING.MIT</filename> file.
|
<filename>COPYING.MIT</filename> file.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -163,9 +192,12 @@ meta-<bsp_name>/<bsp_license_file>
|
|||||||
|
|
||||||
<section id="bsp-filelayout-readme">
|
<section id="bsp-filelayout-readme">
|
||||||
<title>README File</title>
|
<title>README File</title>
|
||||||
<programlisting>
|
<para>
|
||||||
meta-<bsp_name>/README
|
You can find these files in the Yocto Project file's directory structure at:
|
||||||
</programlisting>
|
<literallayout class='monospaced'>
|
||||||
|
meta-<bsp_name>/README
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This file provides information on how to boot the live images that are optionally
|
This file provides information on how to boot the live images that are optionally
|
||||||
@@ -182,9 +214,12 @@ meta-<bsp_name>/README
|
|||||||
|
|
||||||
<section id="bsp-filelayout-binary">
|
<section id="bsp-filelayout-binary">
|
||||||
<title>Pre-built User Binaries</title>
|
<title>Pre-built User Binaries</title>
|
||||||
<programlisting>
|
<para>
|
||||||
meta-<bsp_name>/binary/<bootable_images>
|
You can find these files in the Yocto Project file's directory structure at:
|
||||||
</programlisting>
|
<literallayout class='monospaced'>
|
||||||
|
meta-<bsp_name>/binary/<bootable_images>
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This optional area contains useful pre-built kernels and user-space filesystem
|
This optional area contains useful pre-built kernels and user-space filesystem
|
||||||
@@ -206,12 +241,16 @@ meta-<bsp_name>/binary/<bootable_images>
|
|||||||
|
|
||||||
<section id='bsp-filelayout-layer'>
|
<section id='bsp-filelayout-layer'>
|
||||||
<title>Layer Configuration File</title>
|
<title>Layer Configuration File</title>
|
||||||
<programlisting>
|
<para>
|
||||||
meta-<bsp_name>/conf/layer.conf
|
You can find this file in the Yocto Project file's directory structure at:
|
||||||
</programlisting>
|
<literallayout class='monospaced'>
|
||||||
|
meta-<bsp_name>/conf/layer.conf
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This file identifies the structure as a Yocto Project layer, identifies the
|
The <filename>conf/layer.conf</filename> file identifies the file structure as a Yocto
|
||||||
|
Project layer, identifies the
|
||||||
contents of the layer, and contains information about how Yocto Project should use it.
|
contents of the layer, and contains information about how Yocto Project should use it.
|
||||||
Generally, a standard boilerplate file such as the following works.
|
Generally, a standard boilerplate file such as the following works.
|
||||||
In the following example you would replace "bsp" and "_bsp" with the actual name
|
In the following example you would replace "bsp" and "_bsp" with the actual name
|
||||||
@@ -219,18 +258,18 @@ meta-<bsp_name>/conf/layer.conf
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<programlisting>
|
<literallayout class='monospaced'>
|
||||||
# We have a conf directory, add to BBPATH
|
# We have a conf directory, add to BBPATH
|
||||||
BBPATH := "${BBPATH}:${LAYERDIR}"
|
BBPATH := "${BBPATH}:${LAYERDIR}"
|
||||||
|
|
||||||
# We have a recipes directory containing .bb and .bbappend files, add to BBFILES
|
# We have a recipes directory containing .bb and .bbappend files, add to BBFILES
|
||||||
BBFILES := "${BBFILES} ${LAYERDIR}/recipes/*/*.bb \
|
BBFILES := "${BBFILES} ${LAYERDIR}/recipes/*/*.bb \
|
||||||
${LAYERDIR}/recipes/*/*.bbappend"
|
${LAYERDIR}/recipes/*/*.bbappend"
|
||||||
|
|
||||||
BBFILE_COLLECTIONS += "bsp"
|
BBFILE_COLLECTIONS += "bsp"
|
||||||
BBFILE_PATTERN_bsp := "^${LAYERDIR}/"
|
BBFILE_PATTERN_bsp := "^${LAYERDIR}/"
|
||||||
BBFILE_PRIORITY_bsp = "5"
|
BBFILE_PRIORITY_bsp = "5"
|
||||||
</programlisting>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -241,21 +280,25 @@ BBFILE_PRIORITY_bsp = "5"
|
|||||||
|
|
||||||
<section id="bsp-filelayout-machine">
|
<section id="bsp-filelayout-machine">
|
||||||
<title>Hardware Configuration Options</title>
|
<title>Hardware Configuration Options</title>
|
||||||
<programlisting>
|
<para>
|
||||||
meta-<bsp_name>/conf/machine/*.conf
|
You can find these files in the Yocto Project file's directory structure at:
|
||||||
</programlisting>
|
<literallayout class='monospaced'>
|
||||||
|
meta-<bsp_name>/conf/machine/*.conf
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The machine files bind together all the information contained elsewhere
|
The machine files bind together all the information contained elsewhere
|
||||||
in the BSP into a format that the Yocto Project build system can understand.
|
in the BSP into a format that the Yocto Project build system can understand.
|
||||||
If the BSP supports multiple machines, multiple machine configuration files
|
If the BSP supports multiple machines, multiple machine configuration files
|
||||||
can be present.
|
can be present.
|
||||||
These filenames correspond to the values to which users have set the MACHINE variable.
|
These filenames correspond to the values to which users have set the
|
||||||
|
<filename>MACHINE</filename> variable.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
These files define things such as the kernel package to use
|
These files define things such as the kernel package to use
|
||||||
(PREFERRED_PROVIDER of virtual/kernel), the hardware drivers to
|
(<filename>PREFERRED_PROVIDER</filename> of virtual/kernel), the hardware drivers to
|
||||||
include in different types of images, any special software components
|
include in different types of images, any special software components
|
||||||
that are needed, any bootloader information, and also any special image
|
that are needed, any bootloader information, and also any special image
|
||||||
format requirements.
|
format requirements.
|
||||||
@@ -264,49 +307,61 @@ meta-<bsp_name>/conf/machine/*.conf
|
|||||||
<para>
|
<para>
|
||||||
At least one machine file is required for a BSP layer.
|
At least one machine file is required for a BSP layer.
|
||||||
However, you can supply more than one file.
|
However, you can supply more than one file.
|
||||||
|
For example, in the Crown Bay BSP shown earlier in this section, the
|
||||||
|
<filename>conf/machine</filename> directory contains two configuration files:
|
||||||
|
<filename>crownbay.conf</filename> and <filename>crownbay-noemgd.conf</filename>.
|
||||||
|
The <filename>crownbay.conf</filename> file is used for the Crown Bay BSP
|
||||||
|
that supports the <trademark class='registered'>Intel</trademark> Embedded
|
||||||
|
Media and Graphics Driver (<trademark class='registered'>Intel</trademark>
|
||||||
|
EMGD), while the <filename>crownbay-noemgd.conf</filename> file is used for the
|
||||||
|
Crown Bay BSP that does not support the <trademark class='registered'>Intel</trademark>
|
||||||
|
EMGD.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory could also contain shared hardware "tuning" definitions that are commonly used to
|
This <filename>crownbay.conf</filename> file could also include
|
||||||
pass specific optimization flags to the compiler.
|
a hardware "tuning" file that is commonly used to
|
||||||
An example is <filename>tune-atom.inc</filename>:
|
define the the package architecture and specify
|
||||||
|
optimization flags, which are carefully chosen to give best
|
||||||
|
performance on a given processor.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<programlisting>
|
Tuning files are found in the <filename>meta/conf/machine/include</filename>
|
||||||
BASE_PACKAGE_ARCH = "core2"
|
directory.
|
||||||
TARGET_CC_ARCH = "-m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse"
|
To use them, you simply include them in the machine configuration file.
|
||||||
</programlisting>
|
For example, the Crown Bay BSP <filename>crownbay.conf</filename> has the
|
||||||
</para>
|
following statement:
|
||||||
<para>
|
<literallayout class='monospaced'>
|
||||||
This example defines a new package architecture called "core2" and uses the
|
include conf/machine/include/tune-atom.inc
|
||||||
specified optimization flags, which are carefully chosen to give best
|
</literallayout>
|
||||||
performance on atom processors.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
The tune file would be included by the machine definition and can be
|
|
||||||
contained in the BSP or referenced from one of the standard core set of
|
|
||||||
files included with the Yocto Project.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Both the base package architecture file and the tune file are optional for a BSP layer.
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='bsp-filelayout-misc-recipes'>
|
<section id='bsp-filelayout-misc-recipes'>
|
||||||
<title>Miscellaneous Recipe Files</title>
|
<title>Miscellaneous Recipe Files</title>
|
||||||
<programlisting>
|
<para>
|
||||||
meta-<bsp_name>/recipes-bsp/*
|
You can find these files in the Yocto Project file's directory structure at:
|
||||||
</programlisting>
|
<literallayout class='monospaced'>
|
||||||
|
meta-<bsp_name>/recipes-bsp/*
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This optional directory contains miscellaneous recipe files for the BSP.
|
This optional directory contains miscellaneous recipe files for the BSP.
|
||||||
Most notably would be the formfactor files.
|
Most notably would be the formfactor files.
|
||||||
For example, in the crownbay BSP there is a <filename>machconfig</filename> file and a
|
For example, in the Crown Bay BSP there is the
|
||||||
<filename>formfactor_0.0.bbappend</filename> file:
|
<filename>formfactor_0.0.bbappend</filename> file, which is an append file used
|
||||||
<programlisting>
|
to augment the recipe that starts the build.
|
||||||
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/machconfig
|
Furthermore, there are machine-specific settings used during the build that are
|
||||||
meta-crownbay/recipes-bsp/formfactor/formfactor_0.0.bbappend
|
defined by the <filename>machconfig</filename> files.
|
||||||
</programlisting>
|
In the Crown Bay example, two <filename>machconfig</filename> files exist:
|
||||||
|
one that supports the Intel EMGD and one that does not:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/machconfig
|
||||||
|
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay-noemgd/machconfig
|
||||||
|
meta-crownbay/recipes-bsp/formfactor/formfactor_0.0.bbappend
|
||||||
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<note><para>
|
<note><para>
|
||||||
@@ -315,233 +370,196 @@ meta-crownbay/recipes-bsp/formfactor/formfactor_0.0.bbappend
|
|||||||
</para></note>
|
</para></note>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section id='bsp-filelayout-core-recipes'>
|
||||||
|
<title>Core Recipe Files</title>
|
||||||
|
<para>
|
||||||
|
You can find these files in the Yocto Project file's directory structure at:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
meta-<bsp_name>/recipes-core/*
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This directory contains recipe files for the core.
|
||||||
|
For example, in the Crown Bay BSP there is the
|
||||||
|
<filename>task-core-tools.bbappend</filename> file, which is an append file used
|
||||||
|
to recommend that the SystemTap package be included as a package when the image
|
||||||
|
is built.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section id='bsp-filelayout-recipes-graphics'>
|
<section id='bsp-filelayout-recipes-graphics'>
|
||||||
<title>Display Support Files</title>
|
<title>Display Support Files</title>
|
||||||
<programlisting>
|
<para>
|
||||||
meta-<bsp_name>/recipes-graphics/*
|
You can find these files in the Yocto Project file's directory structure at:
|
||||||
</programlisting>
|
<literallayout class='monospaced'>
|
||||||
|
meta-<bsp_name>/recipes-graphics/*
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This optional directory contains recipes for the BSP if it has
|
This optional directory contains recipes for the BSP if it has
|
||||||
special requirements for graphics support.
|
special requirements for graphics support.
|
||||||
All files that are needed for the BSP to support a display are kept here.
|
All files that are needed for the BSP to support a display are kept here.
|
||||||
For example, in the crownbay BSP several display support files exist:
|
For example, the Crown Bay BSP contains the following files that support
|
||||||
<programlisting>
|
building a BSP that supports and does not support the Intel EMGD:
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/xcorg.conf
|
<literallayout class='monospaced'>
|
||||||
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-emgd-bin/.gitignore
|
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/xorg.conf
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd-bin_1.7.99.2.bb
|
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay-noemgd/xorg.conf
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/crosscompile.patch
|
</literallayout>
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/fix_open_max_preprocessor_error.patch
|
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/macro_tweak.patch
|
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/nodolt.patch
|
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd_1.7.99.2.bb
|
|
||||||
</programlisting>
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='bsp-filelayout-kernel'>
|
<section id='bsp-filelayout-kernel'>
|
||||||
<title>Linux Kernel Configuration</title>
|
<title>Linux Kernel Configuration</title>
|
||||||
<programlisting>
|
<para>
|
||||||
meta-<bsp_name>/recipes-kernel/linux/linux-yocto_git.bbappend
|
You can find these files in the Yocto Project file's directory structure at:
|
||||||
</programlisting>
|
<literallayout class='monospaced'>
|
||||||
|
meta-<bsp_name>/recipes-kernel/linux/linux-yocto_*.bbappend
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This file appends your specific changes to the kernel you are using.
|
These files append your specific changes to the kernel you are using.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
For your BSP you typically want to use an existing Yocto Project kernel found in the
|
For your BSP, you typically want to use an existing Yocto Project kernel found in the
|
||||||
Yocto Project repository at <filename class='directory'>meta/recipes-kernel/linux</filename>.
|
Yocto Project repository at <filename>meta/recipes-kernel/linux</filename>.
|
||||||
You can append your specific changes to the kernel recipe by using an append file,
|
You can append your specific changes to the kernel recipe by using a
|
||||||
which is located in the
|
similarly named append file, which is located in the
|
||||||
<filename class='directory'>meta-<bsp_name>/recipes-kernel/linux</filename>
|
<filename>meta-<bsp_name>/recipes-kernel/linux</filename>
|
||||||
directory.
|
directory.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Suppose you use a BSP that uses the <filename>linux-yocto_git.bb</filename> kernel,
|
Suppose you use a BSP that uses the <filename>linux-yocto_3.0.bb</filename> kernel,
|
||||||
which is the preferred kernel to use for developing a new BSP using the Yocto Project.
|
which is the preferred kernel to use for developing a new BSP using the Yocto Project.
|
||||||
In other words, you have selected the kernel in your
|
In other words, you have selected the kernel in your
|
||||||
<filename><bsp_name>.conf</filename> file by adding the following statement:
|
<filename><bsp_name>.conf</filename> file by adding the following statements:
|
||||||
<programlisting>
|
<literallayout class='monospaced'>
|
||||||
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
|
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
|
||||||
</programlisting>
|
PREFERRED_VERSION_linux-yocto = "3.0%"
|
||||||
You would use the <filename>linux-yocto_git.bbappend</filename> file to append
|
</literallayout>
|
||||||
|
You would use the <filename>linux-yocto_3.0.bbappend</filename> file to append
|
||||||
specific BSP settings to the kernel, thus configuring the kernel for your particular BSP.
|
specific BSP settings to the kernel, thus configuring the kernel for your particular BSP.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Now take a look at the existing "crownbay" BSP.
|
As an example, look at the existing Crown Bay BSP.
|
||||||
The append file used is:
|
The append file used is:
|
||||||
<programlisting>
|
<literallayout class='monospaced'>
|
||||||
meta-crownbay/recipes-kernel/linux/linux-yocto_git.bbappend
|
meta-crownbay/recipes-kernel/linux/linux-yocto_3.0.bbappend
|
||||||
</programlisting>
|
</literallayout>
|
||||||
The file contains the following:
|
The file contains the following:
|
||||||
<programlisting>
|
<literallayout class='monospaced'>
|
||||||
FILESEXTRAPATHS := "${THISDIR}/${PN}"
|
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||||
COMPATIBLE_MACHINE_crownbay = "crownbay"
|
|
||||||
KMACHINE_crownbay = "yocto/standard/crownbay"
|
COMPATIBLE_MACHINE_crownbay = "crownbay"
|
||||||
</programlisting>
|
KMACHINE_crownbay = "yocto/standard/crownbay"
|
||||||
This append file adds "crownbay" as a compatible machine,
|
KERNEL_FEATURES_append_crownbay += " cfg/smp.scc"
|
||||||
and additionally sets a Yocto Kernel-specific variable that identifies the name of the
|
|
||||||
BSP branch to use in the Git repository to find configuration information.
|
COMPATIBLE_MACHINE_crownbay-noemgd = "crownbay-noemgd"
|
||||||
|
KMACHINE_crownbay-noemgd = "yocto/standard/crownbay"
|
||||||
|
KERNEL_FEATURES_append_crownbay-noemgd += " cfg/smp.scc"
|
||||||
|
|
||||||
|
SRCREV_machine_pn-linux-yocto_crownbay ?= "2247da9131ea7e46ed4766a69bb1353dba22f873"
|
||||||
|
SRCREV_meta_pn-linux-yocto_crownbay ?= "d05450e4aef02c1b7137398ab3a9f8f96da74f52"
|
||||||
|
|
||||||
|
SRCREV_machine_pn-linux-yocto_crownbay-noemgd ?= "2247da9131ea7e46ed4766a69bb1353dba22f873"
|
||||||
|
SRCREV_meta_pn-linux-yocto_crownbay-noemgd ?= "d05450e4aef02c1b7137398ab3a9f8f96da74f52"
|
||||||
|
</literallayout>
|
||||||
|
This append file contains statements used to support the Crown Bay BSP for both
|
||||||
|
Intel EMGD and non-EMGD.
|
||||||
|
The build process, in this case, recognizes and uses only the statements that
|
||||||
|
apply to the defined machine name - <filename>crownbay</filename> in this case.
|
||||||
|
So, the applicable statements in the <filename>linux-yocto_3.0.bbappend</filename>
|
||||||
|
file are follows:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||||
|
|
||||||
|
COMPATIBLE_MACHINE_crownbay = "crownbay"
|
||||||
|
KMACHINE_crownbay = "yocto/standard/crownbay"
|
||||||
|
KERNEL_FEATURES_append_crownbay += " cfg/smp.scc"
|
||||||
|
|
||||||
|
SRCREV_machine_pn-linux-yocto_crownbay ?= "2247da9131ea7e46ed4766a69bb1353dba22f873"
|
||||||
|
SRCREV_meta_pn-linux-yocto_crownbay ?= "d05450e4aef02c1b7137398ab3a9f8f96da74f52"
|
||||||
|
</literallayout>
|
||||||
|
The append file defines <filename>crownbay</filename> as the compatible machine,
|
||||||
|
defines the <filename>KMACHINE</filename>, points to some configuration fragments
|
||||||
|
to use by setting the <filename>KERNEL_FEATURES</filename> variable, and then points
|
||||||
|
to the specific commits in the Yocto Project files Git repository and the
|
||||||
|
<filename>meta</filename> Git repository branches to identify the exact kernel needed
|
||||||
|
to build the Crown Bay BSP.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
One thing missing in this particular BSP, which you will typically need when
|
One thing missing in this particular BSP, which you will typically need when
|
||||||
developing a BSP, is the kernel configuration (.config) for your BSP.
|
developing a BSP, is the kernel configuration file (<filename>.config</filename>) for your BSP.
|
||||||
When developing a BSP, you probably have a kernel configuration file or a set of kernel
|
When developing a BSP, you probably have a kernel configuration file or a set of kernel
|
||||||
configuration files that, when taken together, define the kernel configuration for your BSP.
|
configuration files that, when taken together, define the kernel configuration for your BSP.
|
||||||
You can accomplish this definition by putting the configurations in a file or a set of files
|
You can accomplish this definition by putting the configurations in a file or a set of files
|
||||||
inside a directory located at the same level as your append file and having the same name
|
inside a directory located at the same level as your append file and having the same name
|
||||||
as the kernel.
|
as the kernel.
|
||||||
With all these conditions met simply reference those files in a SRC_URI statement in the append
|
With all these conditions met simply reference those files in a
|
||||||
file.
|
<filename>SRC_URI</filename> statement in the append file.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
For example, suppose you had a set of configuration options in a file called
|
For example, suppose you had a set of configuration options in a file called
|
||||||
<filename>defconfig</filename>.
|
<filename>defconfig</filename>.
|
||||||
If you put that file inside a directory named
|
If you put that file inside a directory named
|
||||||
<filename class='directory'>/linux-yocto</filename> and then added
|
<filename>/linux-yocto</filename> and then added
|
||||||
a SRC_URI statement such as the following to the append file, those configuration
|
a <filename>SRC_URI</filename> statement such as the following to the append file,
|
||||||
|
those configuration
|
||||||
options will be picked up and applied when the kernel is built.
|
options will be picked up and applied when the kernel is built.
|
||||||
<programlisting>
|
<literallayout class='monospaced'>
|
||||||
SRC_URI += "file://defconfig"
|
SRC_URI += "file://defconfig"
|
||||||
</programlisting>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
As mentioned earlier, you can group related configurations into multiple files and
|
As mentioned earlier, you can group related configurations into multiple files and
|
||||||
name them all in the SRC_URI statement as well.
|
name them all in the <filename>SRC_URI</filename> statement as well.
|
||||||
For example, you could group separate configurations specifically for Ethernet and graphics
|
For example, you could group separate configurations specifically for Ethernet and graphics
|
||||||
into their own files and add those by using a SRC_URI statement like the
|
into their own files and add those by using a <filename>SRC_URI</filename> statement like the
|
||||||
following in your append file:
|
following in your append file:
|
||||||
<programlisting>
|
<literallayout class='monospaced'>
|
||||||
SRC_URI += "file://defconfig \
|
SRC_URI += "file://defconfig \
|
||||||
file://eth.cfg \
|
file://eth.cfg \
|
||||||
file://gfx.cfg"
|
file://gfx.cfg"
|
||||||
</programlisting>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The FILESEXTRAPATHS variable is in boilerplate form here in order to make it easy
|
The <filename>FILESEXTRAPATHS</filename> variable is in boilerplate form here
|
||||||
to do that.
|
in order to make it easy to do that.
|
||||||
It basically allows those configuration files to be found by the build process.
|
It basically allows those configuration files to be found by the build process.
|
||||||
</para>
|
</para>
|
||||||
<note><para>
|
<note>
|
||||||
|
<para>
|
||||||
Other methods exist to accomplish grouping and defining configuration options.
|
Other methods exist to accomplish grouping and defining configuration options.
|
||||||
For example, you could directly add configuration options to the Yocto kernel
|
For example, you could directly add configuration options to the Yocto kernel
|
||||||
<filename class='directory'>meta</filename> branch for your BSP.
|
<filename>meta</filename> branch for your BSP.
|
||||||
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 the
|
For information on how to add these configurations directly, see
|
||||||
"Yocto Project Kernel Architecture and Use Manual" on the
|
<ulink url='http://yoctoproject.org/docs/1.1.1/kernel-manual/kernel-manual.html'>
|
||||||
<ulink url="http://yoctoproject.org/community/documentation">Yocto Project website
|
The Yocto Project Kernel Architecture and Use Manual</ulink>.</para>
|
||||||
Documentation Page</ulink>
|
<para>
|
||||||
</para>
|
In general, however, the Yocto Project maintainers take care of moving the
|
||||||
<para>
|
<filename>SRC_URI</filename>-specified
|
||||||
In general, however, the Yocto Project maintainers take care of moving the SRC_URI-specified
|
configuration options to the <filename>meta</filename> branch.
|
||||||
configuration options to the <filename class='directory'>meta</filename> branch.
|
|
||||||
Not only is it easier for BSP developers to not have to worry about putting those
|
Not only is it easier for BSP developers to not have to worry about putting those
|
||||||
configurations in the branch, but having the maintainers do it allows them to apply
|
configurations in the branch, but having the maintainers do it allows them to apply
|
||||||
'global' knowledge about the kinds of common configuration options multiple BSPs in
|
'global' knowledge about the kinds of common configuration options multiple BSPs in
|
||||||
the tree are typically using.
|
the tree are typically using.
|
||||||
This allows for promotion of common configurations into common features.
|
This allows for promotion of common configurations into common features.</para>
|
||||||
</para></note>
|
</note>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- <section id='bsp-filelayout-packages'>
|
|
||||||
<title>Other Software (meta-<bsp_name>/recipes-kernel/*)</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
This section describes other pieces of software that the hardware might need for best
|
|
||||||
operation.
|
|
||||||
Examples show some of the things you could encounter.
|
|
||||||
The examples are standard <filename>.bb</filename> file recipes in the
|
|
||||||
usual Poky format.
|
|
||||||
You can include the source directly by referring to it in the source control system or
|
|
||||||
the released tarballs of external software projects.
|
|
||||||
You only need to provide these types of files if the platform requires them.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
The following file is a bootloader recipe that can be used to generate a new
|
|
||||||
bootloader binary.
|
|
||||||
Sometimes these files are included in the final image format and are needed to re-flash hardware.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
<programlisting>
|
|
||||||
meta-Emenlow/recipes-kernel/bootloader/bootloader_0.1.bb
|
|
||||||
</programlisting>
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
These next two files are examples of a hardware driver and a hardware daemon that might need
|
|
||||||
to be included in images to make the hardware useful.
|
|
||||||
Although the example uses "modem" there may be other components needed, such as firmware.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
<programlisting>
|
|
||||||
meta-Emenlow/recipes-Emenlow/modem/modem-driver_0.1.bb
|
|
||||||
meta-Emenlow/recipes-Emenlow/modem/modem-daemon_0.1.bb
|
|
||||||
</programlisting>
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Sometimes the device needs an image in a very specific format so that the update
|
|
||||||
mechanism can accept and re-flash it.
|
|
||||||
Recipes to build the tools needed to do this can be included with the BSP.
|
|
||||||
Following is an example.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
<programlisting>
|
|
||||||
meta-Emenlow/recipes-Emenlow/image-creator/image-creator-native_0.1.bb
|
|
||||||
</programlisting>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='bs-filelayout-bbappend'>
|
|
||||||
<title>Append BSP-Specific Information to Existing Recipes</title>
|
|
||||||
<para>
|
|
||||||
Suppose you have a recipe such as "pointercal" that requires machine-specific information.
|
|
||||||
At the same time, you have your new BSP code nicely partitioned into a layer through which
|
|
||||||
you would also like to specify any machine-specific information associated with your new machine.
|
|
||||||
Before the <filename>.bbappend</filename> extension was introduced, you would have to copy the whole
|
|
||||||
pointercal recipe and files into your layer and then add the single file for your machine.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
With the <filename>.bbappend</filename> extension, however, your work becomes much easier.
|
|
||||||
This extension allows you to easily merge BSP-specific information with the original recipe.
|
|
||||||
Whenever BitBake finds any <filename>.bbappend</filename> files BitBake will include them after
|
|
||||||
it loads the associated <filename>.bb</filename> file but before any finalize
|
|
||||||
or anonymous methods are run.
|
|
||||||
This allows the BSP layer to do whatever it might want to do to customize the original recipe.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
If your recipe needs to reference extra files it can use the FILESEXTRAPATHS variable
|
|
||||||
to specify their location.
|
|
||||||
The example below shows extra files contained in a folder called ${PN} (the package name).
|
|
||||||
</para>
|
|
||||||
<programlisting>
|
|
||||||
FILESEXTRAPATHS := "${THISDIR}/${PN}"
|
|
||||||
</programlisting>
|
|
||||||
<para>
|
|
||||||
This technique allows the BSP to add machine-specific configuration files to the layer directory,
|
|
||||||
which will be picked up by BitBake.
|
|
||||||
For an example see <filename>meta-emenlow/packages/formfactor</filename>.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="bsp-filelayout-prebuilds">
|
|
||||||
<title>Pre-build Data (meta-<bsp_name>/prebuilds/*)</title>
|
|
||||||
<para>
|
|
||||||
This location can contain precompiled representations of the source code
|
|
||||||
contained elsewhere in the BSP layer.
|
|
||||||
Assuming a compatible configuration is used, Poky can process and use these optional pre-compiled
|
|
||||||
representations to provide much faster build times.
|
|
||||||
</para>
|
|
||||||
</section> -->
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='bsp-click-through-licensing'>
|
<section id='bsp-click-through-licensing'>
|
||||||
<title>BSP 'Click-Through' Licensing Procedure</title>
|
<title>BSP 'Click-Through' Licensing Procedure</title>
|
||||||
|
|
||||||
<note><para> This section describes how
|
<note> This section describes how
|
||||||
click-through licensing is expected to work.
|
click-through licensing is expected to work.
|
||||||
Currently, this functionality is not yet implemented.
|
Currently, this functionality is not yet implemented.
|
||||||
</para></note>
|
</note>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
In some cases, a BSP contains separately licensed IP
|
In some cases, a BSP contains separately licensed IP
|
||||||
@@ -595,19 +613,6 @@ FILESEXTRAPATHS := "${THISDIR}/${PN}"
|
|||||||
through a web form.
|
through a web form.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<!--
|
|
||||||
<ulink url='https://pokylinux.org/bsp-keys.html'>https://pokylinux.org/bsp-keys.html</ulink>
|
|
||||||
and give the name of the BSP and your e-mail address in the web form.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
COMMENT: This link is not implemented at this point.
|
|
||||||
|
|
||||||
<programlisting>
|
|
||||||
[screenshot of dialog box]
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
After agreeing to any applicable license terms, the
|
After agreeing to any applicable license terms, the
|
||||||
BSP key(s) will be immediately sent to the address
|
BSP key(s) will be immediately sent to the address
|
||||||
@@ -615,9 +620,9 @@ FILESEXTRAPATHS := "${THISDIR}/${PN}"
|
|||||||
environment variables when building the image:
|
environment variables when building the image:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>
|
<literallayout class='monospaced'>
|
||||||
$ BSPKEY_<keydomain>=<key> bitbake core-image-sato
|
$ BSPKEY_<keydomain>=<key> bitbake core-image-sato
|
||||||
</programlisting>
|
</literallayout>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
These steps allow the encumbered image to be built
|
These steps allow the encumbered image to be built
|
||||||
@@ -627,7 +632,8 @@ FILESEXTRAPATHS := "${THISDIR}/${PN}"
|
|||||||
<para>
|
<para>
|
||||||
Equivalently and probably more conveniently, a line
|
Equivalently and probably more conveniently, a line
|
||||||
for each key can instead be put into the user's
|
for each key can instead be put into the user's
|
||||||
<filename>local.conf</filename> file.
|
<filename>local.conf</filename> file found in the Yocto Project file's
|
||||||
|
build directory.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 17 KiB |
670
documentation/dev-manual/dev-manual-bsp-appendix.xml
Normal file
@@ -0,0 +1,670 @@
|
|||||||
|
<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
|
<appendix id='dev-manual-bsp-appendix'>
|
||||||
|
|
||||||
|
<title>BSP Development Example</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This appendix provides a complete BSP example.
|
||||||
|
The example assumes the following:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>No previous preparation or use of the Yocto Project.</para></listitem>
|
||||||
|
<listitem><para>Use of the Crown Bay Board Support Package (BSP) as a "base" BSP from
|
||||||
|
which to work.
|
||||||
|
The example begins with the Crown Bay BSP as the starting point
|
||||||
|
but ends by building a new 'atom-pc' BSP, which was based on the Crown Bay BSP.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>Shell commands assume <filename>bash</filename></para></listitem>
|
||||||
|
<listitem><para>Example was developed on an Intel-based Core i7 platform running
|
||||||
|
Ubuntu 10.04 LTS released in April of 2010.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<section id='getting-local-yocto-project-files-and-bsp-files'>
|
||||||
|
<title>Getting Local Yocto Project Files and BSP Files</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You need to have the Yocto Project files available on your host system.
|
||||||
|
You can get files through tarball extraction or by cloning the <filename>poky</filename>
|
||||||
|
Git repository.
|
||||||
|
The following paragraphs describe both methods.
|
||||||
|
For additional information, see the bulleted item
|
||||||
|
"<link linkend='local-yp-release'>Yocto Project Release</link>".
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
As mentioned, one way to get the Yocto Project files is to use Git to clone the
|
||||||
|
<filename>poky</filename> repository:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ git clone git://git.yoctoproject.org/poky
|
||||||
|
$ cd poky
|
||||||
|
</literallayout>
|
||||||
|
Alternatively, you can start with the downloaded Poky "edison" tarball:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ tar xfj poky-edison-6.0.1.tar.bz2
|
||||||
|
$ cd poky
|
||||||
|
</literallayout>
|
||||||
|
<note>If you're using the tarball method, you can ignore all the following steps that
|
||||||
|
ask you to carry out Git operations.
|
||||||
|
You already have the results of those operations
|
||||||
|
in the form of the edison release tarballs.
|
||||||
|
Consequently, there is nothing left to do other than extract those tarballs into the
|
||||||
|
proper locations.</note>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Once you have the local <filename>poky</filename> Git 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'>
|
||||||
|
$ git branch -a
|
||||||
|
$ git tag -l
|
||||||
|
</literallayout>
|
||||||
|
For this example we are going to use the Yocto Project 1.1.1 Release, which is code
|
||||||
|
named "edison".
|
||||||
|
These commands create a local branch named <filename>edison</filename>
|
||||||
|
that tracks the remote branch of the same name.
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ git checkout -b edison origin/edison
|
||||||
|
Switched to a new branch 'edison'
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='choosing-a-base-bsp-app'>
|
||||||
|
<title>Choosing a Base BSP</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For this example, the base BSP is the <trademark class='registered'>Intel</trademark>
|
||||||
|
<trademark class='trade'>Atom</trademark> Processor E660 with Intel Platform
|
||||||
|
Controller Hub EG20T Development Kit, which is otherwise referred to as "Crown Bay."
|
||||||
|
The BSP layer is <filename>meta-crownbay</filename>.
|
||||||
|
The base BSP is simply the BSP
|
||||||
|
we will be using as a starting point, so don't worry if you don't actually have Crown Bay
|
||||||
|
hardware.
|
||||||
|
The remainder of the example transforms the base BSP into a BSP that should be
|
||||||
|
able to boot on generic atom-pc (netbook) hardware.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For information on how to choose a base BSP, see
|
||||||
|
"<link linkend='developing-a-board-support-package-bsp'>Developing a Board Support Package (BSP)</link>".
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='getting-your-base-bsp-app'>
|
||||||
|
<title>Getting Your Base BSP</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You need to have the base BSP layer on your development system.
|
||||||
|
Similar to the local Yocto Project files, you can get the BSP
|
||||||
|
layer a couple of different ways:
|
||||||
|
download the BSP tarball and extract it, or set up a local Git repository that
|
||||||
|
has the Yocto Project BSP layers.
|
||||||
|
You should use the same method that you used to get the local Yocto Project files earlier.
|
||||||
|
See "<link linkend='getting-setup'>Getting Setup</link>" for information on how to get
|
||||||
|
the BSP files.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This example assumes the BSP layer will be located within a directory named
|
||||||
|
<filename>meta-intel</filename> contained within the <filename>poky</filename>
|
||||||
|
parent directory.
|
||||||
|
The following steps will automatically create the
|
||||||
|
<filename>meta-intel</filename> directory and the contained meta-crownbay
|
||||||
|
starting point in both the Git and the tarball cases.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
If you're using the Git method, you could do the following to create
|
||||||
|
the starting layout after you have made sure you are in the <filename>poky</filename>
|
||||||
|
directory created in the previous steps:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ git clone git://git.yoctoproject.org/meta-intel.git
|
||||||
|
$ cd meta-intel
|
||||||
|
</literallayout>
|
||||||
|
Alternatively, you can start with the downloaded <filename>meta-intel</filename>
|
||||||
|
edison tarball.
|
||||||
|
Again, be sure that you are already in the <filename>poky</filename> directory
|
||||||
|
as described previously:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ tar xfj crownbay-noemgd-edison-6.0.1.tar.bz2
|
||||||
|
$ cd meta-intel
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The <filename>meta-intel</filename> directory contains all the metadata
|
||||||
|
that supports BSP creation.
|
||||||
|
If you're using the Git method, the following
|
||||||
|
step will switch to the edison metadata.
|
||||||
|
If you're using the tarball method, you already have the correct metadata and can
|
||||||
|
skip to the next step.
|
||||||
|
Because <filename>meta-intel</filename> is its own Git repository, you will want
|
||||||
|
to be sure you are in the appropriate branch for your work.
|
||||||
|
For this example we are going to use the <filename>edison</filename> branch.
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ git checkout -b edison origin/edison
|
||||||
|
Switched to a new branch 'edison'
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='making-a-copy-of-the-base bsp-to-create-your-new-bsp-layer-app'>
|
||||||
|
<title>Making a Copy of the Base BSP to Create Your New BSP Layer</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Now that you have the local Yocto Project files and the base BSP files, you need to create a
|
||||||
|
new layer for your BSP.
|
||||||
|
To create your BSP layer, you simply copy the <filename>meta-crownbay</filename>
|
||||||
|
layer to a new layer.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For this example, the new layer will be named <filename>meta-mymachine</filename>.
|
||||||
|
The name should follow the BSP layer naming convention, which is
|
||||||
|
<filename>meta-<name></filename>.
|
||||||
|
The following assumes your working directory is <filename>meta-intel</filename>
|
||||||
|
inside the local Yocto Project files.
|
||||||
|
To start your new layer, just copy the new layer alongside the existing
|
||||||
|
BSP layers in the <filename>meta-intel</filename> directory:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ cp -a meta-crownbay/ meta-mymachine
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='making-changes-to-your-bsp-app'>
|
||||||
|
<title>Making Changes to Your BSP</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Right now you have two identical BSP layers with different names:
|
||||||
|
<filename>meta-crownbay</filename> and <filename>meta-mymachine</filename>.
|
||||||
|
You need to change your configurations so that they work for your new BSP and
|
||||||
|
your particular hardware.
|
||||||
|
The following sections look at each of these areas of the BSP.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<section id='changing-the-bsp-configuration'>
|
||||||
|
<title>Changing the BSP Configuration</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
We will look first at the configurations, which are all done in the layer’s
|
||||||
|
<filename>conf</filename> directory.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
First, since in this example the new BSP will not support EMGD, we will get rid of the
|
||||||
|
<filename>crownbay.conf</filename> file and then rename the
|
||||||
|
<filename>crownbay-noemgd.conf</filename> file to <filename>mymachine.conf</filename>.
|
||||||
|
Much of what we do in the configuration directory is designed to help the Yocto Project
|
||||||
|
build system work with the new layer and to be able to find and use the right software.
|
||||||
|
The following two commands result in a single machine configuration file named
|
||||||
|
<filename>mymachine.conf</filename>.
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ rm meta-mymachine/conf/machine/crownbay.conf
|
||||||
|
$ mv meta-mymachine/conf/machine/crownbay-noemgd.conf \
|
||||||
|
meta-mymachine/conf/machine/mymachine.conf
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Next, we need to make changes to the <filename>mymachine.conf</filename> itself.
|
||||||
|
The only changes we want to make for this example are to the comment lines.
|
||||||
|
Changing comments, of course, is never strictly necessary, but it's alway good form to make
|
||||||
|
them reflect reality as much as possible.
|
||||||
|
|
||||||
|
Here, simply substitute the Crown Bay name with an appropriate name for the BSP
|
||||||
|
(<filename>mymachine</filename> in this case) and change the description to
|
||||||
|
something that describes your hardware.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Note that inside the <filename>mymachine.conf</filename> is the
|
||||||
|
<filename>PREFERRED_PROVIDER_virtual/kernel</filename> statement.
|
||||||
|
This statement identifies the kernel that the BSP is going to use.
|
||||||
|
In this case, the BSP is using <filename>linux-yocto</filename>, which is the
|
||||||
|
current Linux Yocto kernel based on the Linux 3.0 release.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The next configuration file in the new BSP layer we need to edit is
|
||||||
|
<filename>meta-mymachine/conf/layer.conf</filename>.
|
||||||
|
This file identifies build information needed for the new layer.
|
||||||
|
You can see the
|
||||||
|
"<ulink url='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/1.1.1/bsp-guide/bsp-guide.html'>The Board
|
||||||
|
Support Packages (BSP) Development Guide</ulink>
|
||||||
|
for more information on this configuration file.
|
||||||
|
Basically, we are changing the existing statements to work with our BSP.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The file contains these statements that reference the Crown Bay BSP:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
BBFILE_COLLECTIONS += "crownbay"
|
||||||
|
BBFILE_PATTERN_crownbay := "^${LAYERDIR}/"
|
||||||
|
BBFILE_PRIORITY_crownbay = "6"
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Simply substitute the machine string name <filename>crownbay</filename>
|
||||||
|
with the new machine name <filename>mymachine</filename> to get the following:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
BBFILE_COLLECTIONS += "mymachine"
|
||||||
|
BBFILE_PATTERN_mymachine := "^${LAYERDIR}/"
|
||||||
|
BBFILE_PRIORITY_mymachine = "6"
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='changing-the-recipes-in-your-bsp'>
|
||||||
|
<title>Changing the Recipes in Your BSP</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Now we will take a look at the recipes in your new layer.
|
||||||
|
The standard BSP structure has areas for BSP, graphics, core, and kernel recipes.
|
||||||
|
When you create a BSP, you use these areas for appropriate recipes and append files.
|
||||||
|
Recipes take the form of <filename>.bb</filename> files.
|
||||||
|
If you want to leverage the existing recipes the Yocto Project build system uses
|
||||||
|
but change those recipes, you can use <filename>.bbappend</filename> files.
|
||||||
|
All new recipes and append files for your layer must go in the layer’s
|
||||||
|
<filename>recipes-bsp</filename>, <filename>recipes-kernel</filename>,
|
||||||
|
<filename>recipes-core</filename>, and
|
||||||
|
<filename>recipes-graphics</filename> directories.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<section id='changing-recipes-bsp'>
|
||||||
|
<title>Changing <filename>recipes-bsp</filename></title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
First, let's look at <filename>recipes-bsp</filename>.
|
||||||
|
For this example we are not adding any new BSP recipes.
|
||||||
|
And, we only need to remove the formfactor we do not want and change the name of
|
||||||
|
the remaining one that doesn't support EMGD.
|
||||||
|
These commands take care of the <filename>recipes-bsp</filename> recipes:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ rm -rf meta-mymachine/recipes-bsp/formfactor/formfactor/crownbay
|
||||||
|
$ mv meta-mymachine/recipes-bsp/formfactor/formfactor/crownbay-noemgd/ \
|
||||||
|
meta-mymachine/recipes-bsp/formfactor/formfactor/mymachine
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='changing-recipes-graphics'>
|
||||||
|
<title>Changing <filename>recipes-graphics</filename></title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Now let's look at <filename>recipes-graphics</filename>.
|
||||||
|
For this example we want to remove anything that supports EMGD and
|
||||||
|
be sure to rename remaining directories appropriately.
|
||||||
|
The following commands clean up the <filename>recipes-graphics</filename> directory:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ rm -rf meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay
|
||||||
|
$ mv meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay-noemgd \
|
||||||
|
meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-config/mymachine
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
At this point the <filename>recipes-graphics</filename> directory just has files that
|
||||||
|
support Video Electronics Standards Association (VESA) graphics modes and not EMGD.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='changing-recipes-core'>
|
||||||
|
<title>Changing <filename>recipes-core</filename></title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Now let's look at changes in <filename>recipes-core</filename>.
|
||||||
|
The file <filename>task-core-tools.bbappend</filename> in
|
||||||
|
<filename>recipes-core/tasks</filename> appends the similarly named recipe
|
||||||
|
located in the local Yocto Project files at
|
||||||
|
<filename>meta/recipes-core/tasks</filename>.
|
||||||
|
The "append" file in our layer right now is Crown Bay-specific and supports
|
||||||
|
EMGD and non-EMGD.
|
||||||
|
Here are the contents of the file:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
RRECOMMENDS_task-core-tools-profile_append_crownbay = " systemtap"
|
||||||
|
RRECOMMENDS_task-core-tools-profile_append_crownbay-noemgd = " systemtap"
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The <filename>RRECOMMENDS</filename> statements list packages that
|
||||||
|
extend usability.
|
||||||
|
The first <filename>RRECOMMENDS</filename> statement can be removed, while the
|
||||||
|
second one can be changed to reflect <filename>meta-mymachine</filename>:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
RRECOMMENDS_task-core-tools-profile_append_mymachine = " systemtap"
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='changing-recipes-kernel'>
|
||||||
|
<title>Changing <filename>recipes-kernel</filename></title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Finally, let's look at <filename>recipes-kernel</filename> changes.
|
||||||
|
Recall that the BSP uses the <filename>linux-yocto</filename> kernel as determined
|
||||||
|
earlier in the <filename>mymachine.conf</filename>.
|
||||||
|
The recipe for that kernel is not located in the
|
||||||
|
BSP layer but rather in the local Yocto Project files at
|
||||||
|
<filename>meta/recipes-kernel/linux</filename> and is
|
||||||
|
named <filename>linux-yocto_3.0.bb</filename>.
|
||||||
|
The <filename>SRCREV_machine</filename> and <filename>SRCREV_meta</filename>
|
||||||
|
statements point to the exact commits used by the Yocto Project development team
|
||||||
|
in their source repositories that identify the right kernel for our hardware.
|
||||||
|
In other words, the <filename>SRCREV</filename> values are simply Git commit
|
||||||
|
IDs that identify which commit on each
|
||||||
|
of the kernel branches (machine and meta) will be checked out and used to build
|
||||||
|
the kernel.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
However, in the <filename>meta-mymachine</filename> layer in
|
||||||
|
<filename>recipes-kernel/linux</filename> resides a <filename>.bbappend</filename>
|
||||||
|
file named <filename>linux-yocto_3.0.bbappend</filename> that
|
||||||
|
is appended to the recipe of the same name in <filename>meta/recipes-kernel/linux</filename>.
|
||||||
|
Thus, the <filename>SRCREV</filename> statements in the "append" file override
|
||||||
|
the more general statements found in <filename>meta</filename>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The <filename>SRCREV</filename> statements in the "append" file currently identify
|
||||||
|
the kernel that supports the Crown Bay BSP with and without EMGD support.
|
||||||
|
Here are the statements:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
SRCREV_machine_pn-linux-yocto_crownbay ?= \
|
||||||
|
"2247da9131ea7e46ed4766a69bb1353dba22f873"
|
||||||
|
SRCREV_meta_pn-linux-yocto_crownbay ?= \
|
||||||
|
"d05450e4aef02c1b7137398ab3a9f8f96da74f52"
|
||||||
|
|
||||||
|
SRCREV_machine_pn-linux-yocto_crownbay-noemgd ?= \
|
||||||
|
"2247da9131ea7e46ed4766a69bb1353dba22f873"
|
||||||
|
SRCREV_meta_pn-linux-yocto_crownbay-noemgd ?= \
|
||||||
|
"d05450e4aef02c1b7137398ab3a9f8f96da74f52"
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You will notice that there are two pairs of <filename>SRCREV</filename> statements.
|
||||||
|
The top pair identifies the kernel that supports
|
||||||
|
EMGD, which we don’t care about in this example.
|
||||||
|
The bottom pair identifies the kernel that we will use:
|
||||||
|
<filename>linux-yocto</filename>.
|
||||||
|
At this point though, the unique commit strings all are still associated with
|
||||||
|
Crown Bay and not <filename>meta-mymachine</filename>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
To fix this situation in <filename>linux-yocto_3.0.bbappend</filename>,
|
||||||
|
we delete the two <filename>SRCREV</filename> statements that support
|
||||||
|
EMGD (the top pair).
|
||||||
|
We also change the remaining pair to specify <filename>mymachine</filename>
|
||||||
|
and insert the commit identifiers to identify the kernel in which we
|
||||||
|
are interested, which will be based on the <filename>atom-pc-standard</filename>
|
||||||
|
kernel.
|
||||||
|
In this case, because we're working with the edison branch of everything, we
|
||||||
|
need to use the <filename>SRCREV</filename> values for the atom-pc branch
|
||||||
|
that are associated with the edison release.
|
||||||
|
To find those values, we need to find the <filename>SRCREV</filename>
|
||||||
|
values that edison uses for the atom-pc branch, which we find in the
|
||||||
|
<filename>poky/meta-yocto/recipes-kernel/linux/linux-yocto_3.0.bbappend</filename>
|
||||||
|
file.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The machine <filename>SRCREV</filename> we want is in the
|
||||||
|
<filename>SRCREV_machine_atom-pc</filename> variable.
|
||||||
|
The meta <filename>SRCREV</filename> isn't specified in this file, so it must be
|
||||||
|
specified in the base kernel recipe in the
|
||||||
|
<filename>poky/meta/recipes-kernel/linux/linux-yocto_3.0.bb</filename>
|
||||||
|
file, in the <filename>SRCREV_meta variable</filename> found there.
|
||||||
|
It happens to be the same as the value we already inherited from the
|
||||||
|
<filename>meta-crownbay</filename> BSP.
|
||||||
|
Here are the final <filename>SRCREV</filename> statements:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
SRCREV_machine_pn-linux-yocto_mymachine ?= \
|
||||||
|
"1e18e44adbe79b846e382370eb29bc4b8cd5a1a0"
|
||||||
|
SRCREV_meta_pn-linux-yocto_mymachine ?= \
|
||||||
|
"d05450e4aef02c1b7137398ab3a9f8f96da74f52"
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
In this example, we're using the <filename>SRCREV</filename> values we
|
||||||
|
found already captured in the edison release because we're creating a BSP based on
|
||||||
|
edison.
|
||||||
|
If, instead, we had based our BSP on the master branches, we would want to use
|
||||||
|
the most recent <filename>SRCREV</filename> values taken directly from the kernel repo.
|
||||||
|
We will not be doing that for this example.
|
||||||
|
However, if you do base a future BSP on master and
|
||||||
|
if you are familiar with Git repositories, you probably won’t have trouble locating the
|
||||||
|
exact commit strings in the Yocto Project source repositories you need to change
|
||||||
|
the <filename>SRCREV</filename> statements.
|
||||||
|
You can find all the <filename>machine</filename> and <filename>meta</filename>
|
||||||
|
branch points (commits) for the <filename>linux-yocto-3.0</filename> kernel at
|
||||||
|
<ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.0'></ulink>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
If you need a little more assistance after going to the link then do the following:
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para>Expand the list of branches by clicking <filename>[…]</filename></para></listitem>
|
||||||
|
<listitem><para>Click on the <filename>yocto/standard/common-pc/atom-pc</filename>
|
||||||
|
branch</para></listitem>
|
||||||
|
<listitem><para>Click on the commit column header to view the top commit</para></listitem>
|
||||||
|
<listitem><para>Copy the commit string for use in the
|
||||||
|
<filename>linux-yocto_3.0.bbappend</filename> file</para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For the <filename>SRCREV</filename> statement that points to the <filename>meta</filename>
|
||||||
|
branch use the same procedure except expand the <filename>meta</filename>
|
||||||
|
branch in step 2 above.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Also in the <filename>linux-yocto_3.0.bbappend</filename> file are
|
||||||
|
<filename>COMPATIBLE_MACHINE</filename>, <filename>KMACHINE</filename>,
|
||||||
|
and <filename>KERNEL_FEATURES</filename> statements.
|
||||||
|
Two sets of these exist: one set supports EMGD and one set does not.
|
||||||
|
Because we are not interested in supporting EMGD those three can be deleted.
|
||||||
|
The remaining three must be changed so that <filename>mymachine</filename> replaces
|
||||||
|
<filename>crownbay-noemgd</filename> and <filename>crownbay</filename>.
|
||||||
|
Because we are using the atom-pc branch for this new BSP, we can also find
|
||||||
|
the exact branch we need for the KMACHINE variable in our new BSP from the value
|
||||||
|
we find in the
|
||||||
|
<filename>poky/meta-yocto/recipes-kernel/linux/linux-yocto_3.0.bbappend</filename>
|
||||||
|
file we looked at in a previous step.
|
||||||
|
In this case, the value we want is in the KMACHINE_atom-pc variable in that file.
|
||||||
|
Here is the final <filename>linux-yocto_3.0.bbappend</filename> file after all
|
||||||
|
the edits:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||||
|
|
||||||
|
COMPATIBLE_MACHINE_mymachine = "mymachine"
|
||||||
|
KMACHINE_mymachine = "yocto/standard/common-pc/atom-pc"
|
||||||
|
KERNEL_FEATURES_append_mymachine += " cfg/smp.scc"
|
||||||
|
|
||||||
|
SRCREV_machine_pn-linux-yocto_mymachine ?= \
|
||||||
|
"1e18e44adbe79b846e382370eb29bc4b8cd5a1a0"
|
||||||
|
SRCREV_meta_pn-linux-yocto_mymachine ?= \
|
||||||
|
"d05450e4aef02c1b7137398ab3a9f8f96da74f52"
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='bsp-recipe-change-summary'>
|
||||||
|
<title>BSP Recipe Change Summary</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
In summary, the edits to the layer’s recipe files result in removal of any files and
|
||||||
|
statements that do not support your targeted hardware in addition to the inclusion
|
||||||
|
of any new recipes you might need.
|
||||||
|
In this example, it was simply a matter of ridding the new layer
|
||||||
|
<filename>meta-machine</filename> of any code that supported the EMGD features
|
||||||
|
and making sure we were identifying the kernel that supports our example, which
|
||||||
|
is the <filename>atom-pc-standard</filename> kernel.
|
||||||
|
We did not introduce any new recipes to the layer.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Finally, it is also important to update the layer’s <filename>README</filename>
|
||||||
|
file so that the information in it reflects your BSP.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='preparing-for-the-build-app'>
|
||||||
|
<title>Preparing for the Build</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
To get ready to build your image that uses the new layer you need to do the following:
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para>Get the environment ready for the build by sourcing the environment
|
||||||
|
script.
|
||||||
|
The environment script is in the top-level of the local Yocto Project files
|
||||||
|
directory structure.
|
||||||
|
The script has the string
|
||||||
|
<filename>init-build-env</filename> in the file’s name.
|
||||||
|
For this example, the following command gets the build environment ready:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ source oe-init-build-env yocto-build
|
||||||
|
</literallayout>
|
||||||
|
When you source the script a build directory is created in the current
|
||||||
|
working directory.
|
||||||
|
In our example we were in the <filename>poky</filename> directory.
|
||||||
|
Thus, entering the previous command created the <filename>yocto-build</filename> directory.
|
||||||
|
If you do not provide a name for the build directory it defaults to
|
||||||
|
<filename>build</filename>.
|
||||||
|
The <filename>yocot-build</filename> directory contains a
|
||||||
|
<filename>conf</filename> directory that has
|
||||||
|
two configuration files you will need to check: <filename>bblayers.conf</filename>
|
||||||
|
and <filename>local.conf</filename>.</para></listitem>
|
||||||
|
<listitem><para>Check and edit the resulting <filename>local.conf</filename> file.
|
||||||
|
This file minimally identifies the machine for which to build the image by
|
||||||
|
configuring the <filename>MACHINE</filename> variable.
|
||||||
|
For this example you must set the variable to mymachine as follows:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
MACHINE ??= “mymachine”
|
||||||
|
</literallayout>
|
||||||
|
You should also be sure any other variables in which you are interested are set.
|
||||||
|
Some variables to consider are <filename>BB_NUMBER_THREADS</filename>
|
||||||
|
and <filename>PARALLEL_MAKE</filename>, both of which can greatly reduce your build time
|
||||||
|
if you are using a multi-threaded development system (e.g. values of
|
||||||
|
<filename>8</filename> and <filename>j 6</filename>, respectively are optimal
|
||||||
|
for a development machine that has four available cores).</para></listitem>
|
||||||
|
<listitem><para>Update the <filename>bblayers.conf</filename> file so that it includes
|
||||||
|
the path to your new BSP layer.
|
||||||
|
In this example you need to include the pathname to <filename>meta-mymachine</filename>.
|
||||||
|
For this example the
|
||||||
|
<filename>BBLAYERS</filename> variable in the file would need to include the following path:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$HOME/poky/meta-intel/meta-mymachine
|
||||||
|
</literallayout></para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The appendix
|
||||||
|
<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
|
||||||
|
on configuration variables.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='building-the-image-app'>
|
||||||
|
<title>Building and Booting the Image</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
To build the image for our <filename>meta-mymachine</filename> BSP enter the following command
|
||||||
|
from the same shell from which you ran the setup script.
|
||||||
|
You should run the <filename>bitbake</filename> command without any intervening shell commands.
|
||||||
|
For example, moving your working directory around could cause problems.
|
||||||
|
Here is the command for this example:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ bitbake -k core-image-sato
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This command specifies an image that has Sato support and that can be run from a USB device or
|
||||||
|
from a CD without having to first install anything.
|
||||||
|
The build process takes significant time and includes thousands of tasks, which are reported
|
||||||
|
at the console.
|
||||||
|
If the build results in any type of error you should check for misspellings in the
|
||||||
|
files you changed or problems with your host development environment such as missing packages.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Finally, once you have an image, you can try booting it from a device
|
||||||
|
(e.g. a USB device).
|
||||||
|
To prepare a bootable USB device, insert a USB flash drive into your build system and
|
||||||
|
copy the <filename>.hddimage</filename>, located in the
|
||||||
|
<filename>poky/build/tmp/deploy/images</filename>
|
||||||
|
directory after a successful build to the flash drive.
|
||||||
|
Assuming the USB flash drive takes device <filename>/dev/sdc</filename>,
|
||||||
|
use <filename>dd</filename> to copy the live image to it.
|
||||||
|
For example:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
# dd if=core-image-sato-mymachine-20120111232235.hddimg of=/dev/sdc
|
||||||
|
# sync
|
||||||
|
# eject /dev/sdc
|
||||||
|
</literallayout>
|
||||||
|
You should now have a bootable USB flash device.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Insert the device
|
||||||
|
into a bootable USB socket on the target, and power it on.
|
||||||
|
The system should boot to the Sato graphical desktop.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For reference, the sato image produced by the previous steps for edison
|
||||||
|
should look like the following in terms of size.
|
||||||
|
If your sato image is much different from this,
|
||||||
|
you probably made a mistake in one of the above steps:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
358709248 2012-01-11 20:43 core-image-sato-mymachine-20120111232235.hddimg
|
||||||
|
</literallayout>
|
||||||
|
<note>The previous instructions are also present in the README that was copied
|
||||||
|
from meta-crownbay, which should also be updated to reflect the specifics of your
|
||||||
|
new BSP.
|
||||||
|
That file and the <filename>README.hardware</filename> file in the top-level
|
||||||
|
<filename>poky</filename> directory
|
||||||
|
also provides some suggestions for things to try if booting fails and produces
|
||||||
|
strange error messages.</note>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
</appendix>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
vim: expandtab tw=80 ts=4
|
||||||
|
-->
|
||||||
@@ -1,779 +0,0 @@
|
|||||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
|
||||||
|
|
||||||
<chapter id='dev-manual-cases'>
|
|
||||||
|
|
||||||
<title>Development Cases</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
For the purposes of this manual we are going to focus on two common development cases or groupings:
|
|
||||||
System Development and User Application Development.
|
|
||||||
System Development covers Board Support Package (BSP) development and kernel image modification.
|
|
||||||
User Application Development covers development of applications that you intend to run on some
|
|
||||||
target hardware.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
[WRITERS NOTE: What is undetermined at this point is how much of the entire development process
|
|
||||||
we include in this particular chapter.
|
|
||||||
In other words, do we cover debugging and emulation steps here on a case-specific basis?
|
|
||||||
Or, do we capture that information in the appropriate subsequent chapter by case?]
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<section id='system-development'>
|
|
||||||
<title>System Development</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
System development involves modification or creation of an image that you want to run on
|
|
||||||
a specific hardware target.
|
|
||||||
Usually when you want to create an image that runs on embedded hardware the image does
|
|
||||||
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 just use the hardware
|
|
||||||
features for your particular hardware.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
To help you understand how system development works in the Yocto Project, this section
|
|
||||||
covers two types of image development: BSP creation and kernel modification.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<section id='developing-a-board-support-package-bsp'>
|
|
||||||
<title>Developing a Board Support Package (BSP)</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
A BSP is a package of recipes that when applied while building an image results in
|
|
||||||
an image you can run on a particular board.
|
|
||||||
Thus, the package, when compiled into the new image, supports the operation of the board.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Packages consist of recipes.
|
|
||||||
Recipes are sets of instructions for building a package.
|
|
||||||
The recipes describe where to get source code and what patches to apply.
|
|
||||||
Recipes also describe dependencies for libraries or for other recipes.
|
|
||||||
They also contain configuration and compilation options.
|
|
||||||
Recipes are logical units of execution.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Here are the basic steps involved in creating a BSP:
|
|
||||||
<orderedlist>
|
|
||||||
<listitem><para>Be sure you are set up to use Yocto Project (see
|
|
||||||
<xref linkend='dev-manual-start'>Getting Started with the Yocto Project</xref>).</para></listitem>
|
|
||||||
<listitem><para>Choose a BSP available with Yocto Project that most closely represents
|
|
||||||
your hardware.</para></listitem>
|
|
||||||
<listitem><para>Get set up with a base BSP.</para></listitem>
|
|
||||||
<listitem><para>Make a copy of the existing BSP and isolate your work by creating a layer
|
|
||||||
for your recipes.</para></listitem>
|
|
||||||
<listitem><para>Make configuration and recipe changes to your new BSP layer.</para></listitem>
|
|
||||||
<listitem><para>Prepare for the build.</para></listitem>
|
|
||||||
<listitem><para>Select and configure the kernel. (WRITER'S NOTE: Not sure on this step).</para></listitem>
|
|
||||||
<listitem><para>Identify the machine branch in the Git repository.</para></listitem>
|
|
||||||
<listitem><para>Build the image.</para></listitem>
|
|
||||||
</orderedlist>
|
|
||||||
You can view a video presentation of the BSP creation process
|
|
||||||
<ulink url='http://free-electrons.com/blog/elc-2011-videos'>here</ulink>.
|
|
||||||
You can also find supplemental information in the
|
|
||||||
<ulink url='http://yoctoproject.org/docs/1.1/bsp-guide/bsp-guide.html'>
|
|
||||||
Board Support Package (BSP) Development Guide</ulink>.
|
|
||||||
Finally, there is wiki page write up of the example located
|
|
||||||
<ulink url='https://wiki.yoctoproject.org/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another'>
|
|
||||||
here</ulink> you might find helpful.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<section id='setting-up-yocto-project'>
|
|
||||||
<title>Setting Up Yocto Project</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
For general host development system preparation such as package requirements and
|
|
||||||
operating system requirements, see
|
|
||||||
<xref linkend='dev-manual-start'>Getting Started with the Yocto Project</xref>)Chapter 2 of
|
|
||||||
this manual or the
|
|
||||||
<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html'>
|
|
||||||
Yocto Project Quick Start</ulink>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
You need to have the Yocto Project source tree available on your host system.
|
|
||||||
You can get that through tarball extraction or by initializing and checking out the
|
|
||||||
Yocto Project Git repository.
|
|
||||||
Typically, checking out the Git repository is the method to use.
|
|
||||||
This allows you to maintain a complete history of changes and facilitates you
|
|
||||||
contributing back to the Yocto Project.
|
|
||||||
However, if you just want the source you can download the Yocto Project Release
|
|
||||||
tarball from the
|
|
||||||
<ulink url='http://yoctoproject.org/download'>download page</ulink>.
|
|
||||||
If you download the tarball you can extract it into any directory you want using the
|
|
||||||
tar command.
|
|
||||||
For example, the following commands extract the 1.0.1 release tarball into
|
|
||||||
<filename>/usr/local/yocto</filename> with the Yocto Project source directory as
|
|
||||||
<filename>poky.bernard.5.0.1.tar.bz2</filename>:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
/usr/local/yocto$ tar xfj poky.bernard.5.0.1.tar.bz2
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The following transcript shows how to initialize a Git repository and checkout the
|
|
||||||
Yocto Project source tree:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
/usr/local/yocto$ git init
|
|
||||||
Initialized empty Git repository in /usr/local/yocto/.git
|
|
||||||
/usr/local/yocto$ git remote add poky git://git.yoctoproject.org/poky.git
|
|
||||||
/usr/local/yocto$ git remote update
|
|
||||||
Fetching poky
|
|
||||||
remote: Counting objects: 106111, done.
|
|
||||||
remote: Compressing objects: 100% (36106/36106), done.
|
|
||||||
remote: Total 106111 (delta 72275), reused 99193 (delta 66808)
|
|
||||||
Receiving objects: 100% (106111/106111), 69.51 MiB | 518 KiB/s, done.
|
|
||||||
Resolving deltas: 100% (72275/72275), done.
|
|
||||||
From git://git.yoctoproject.org/poky
|
|
||||||
* [new branch] 1.1_M1 -> poky/1.1_M1
|
|
||||||
* [new branch] 1.1_M2 -> poky/1.1_M2
|
|
||||||
* [new branch] bernard -> poky/bernard
|
|
||||||
* [new branch] blinky -> poky/blinky
|
|
||||||
* [new branch] clyde -> poky/clyde
|
|
||||||
* [new branch] elroy -> poky/elroy
|
|
||||||
* [new branch] green -> poky/green
|
|
||||||
* [new branch] laverne -> poky/laverne
|
|
||||||
* [new branch] master -> poky/master
|
|
||||||
* [new branch] pinky -> poky/pinky
|
|
||||||
* [new branch] purple -> poky/purple
|
|
||||||
* [new tag] 1.1_M1.final -> 1.1_M1.final
|
|
||||||
* [new tag] 1.1_M2.rc1 -> 1.1_M2.rc1
|
|
||||||
* [new tag] bernard-5.0.1 -> bernard-5.0.1
|
|
||||||
* [new tag] pinky-3.1.2 -> pinky-3.1.2
|
|
||||||
From git://git.yoctoproject.org/poky
|
|
||||||
* [new tag] 1.1_M1.rc1 -> 1.1_M1.rc1
|
|
||||||
* [new tag] 1.1_M1.rc2 -> 1.1_M1.rc2
|
|
||||||
* [new tag] bernard-1.0rc1 -> bernard-1.0rc1
|
|
||||||
* [new tag] bernard-5.0 -> bernard-5.0
|
|
||||||
* [new tag] bernard-5.0-alpha -> bernard-5.0-alpha
|
|
||||||
* [new tag] bernard-5.0rc1 -> bernard-5.0rc1
|
|
||||||
* [new tag] bernard-5.0rc2 -> bernard-5.0rc2
|
|
||||||
* [new tag] laverne-4.0 -> laverne-4.0
|
|
||||||
* [new tag] laverne-4.0.1 -> laverne-4.0.1
|
|
||||||
* [new tag] m4 -> m4
|
|
||||||
* [new tag] purple-3.2 -> purple-3.2
|
|
||||||
* [new tag] purple-3.2.1 -> purple-3.2.1
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Once you have the repository set up, you have many development branches from which
|
|
||||||
you can work.
|
|
||||||
For this example we are going to use the Yocto Project 1.0.1 Release,
|
|
||||||
which maps to the <filename>Bernard 5.0.1</filename> tag in Git.
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
/usr/local/yocto$ git checkout -b Bernard-5.0.1 bernard-5.0.1
|
|
||||||
Switched to a new branch 'bernard-5.0.1'
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='choosing-a-base-bsp'>
|
|
||||||
<title>Choosing a Base BSP</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The Yocto Project ships with several BSPs that support various hardware.
|
|
||||||
It is best to base your new BSP on an existing BSP rather than create all the
|
|
||||||
recipes and configuration files from scratch.
|
|
||||||
While it is possible to create everything from scratch, basing your new BSP
|
|
||||||
on something that is close is much easier.
|
|
||||||
Or, at a minimum, it gives you some structure with which to start.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
At this point you need to understand your target hardware well enough to determine which
|
|
||||||
existing BSP most closely matches it.
|
|
||||||
Things to consider are your hardware’s on-board features such as CPU type and graphics support.
|
|
||||||
You should look at the README files for supported BSPs to get an idea of which one
|
|
||||||
you could use.
|
|
||||||
A generic Atom-based BSP to consider is the Crown Bay with no Intel® Embedded Media
|
|
||||||
Graphics Driver (EMGD) support.
|
|
||||||
That is the BSP that this example is going to use.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
To see the supported BSPs, go to the Yocto Project
|
|
||||||
<ulink url='http://www.yoctoproject.org/download'>download page</ulink> and click on “BSP Downloads.”
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='getting-your-base-bsp'>
|
|
||||||
<title>Getting Your Base BSP</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
You need to have the base BSP layer on your development system.
|
|
||||||
Like the Yocto Project source tree you can get the BSP layer one of two ways:
|
|
||||||
download the tarball and extract it, or initialize a Git repository and check out the BSP.
|
|
||||||
You should use the same method that you used for the Yocto Project source tree.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
If you are using tarball extraction then simply download the tarball for the base
|
|
||||||
BSP you chose in the previous step and then extract it into any directory
|
|
||||||
you choose using the tar command.
|
|
||||||
Upon extraction, the BSP source directory (layer) will be named
|
|
||||||
<filename>meta-<BSP_name></filename>.
|
|
||||||
The following command extracts the Crown Bay BSP into a directory named
|
|
||||||
<filename>meta-crownbay</filename>:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
/usr/local$ tar xjf crownbay-noemgd-bernard-5.0.1.tar.bz2
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
If you initialized a Yocto Project Git repository then you need to do the same for the
|
|
||||||
BSP, which is located in the meta-intel Git repository.
|
|
||||||
The meta-intel repository contains all the metadata that supports BSP creation.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The following transcript shows the steps to create and set up the meta-intel Git
|
|
||||||
repository inside the Yocto Project Git repository:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
/usr/local/yocto$ mkdir meta-intel
|
|
||||||
/usr/local/yocto$ cd meta-intel
|
|
||||||
/usr/local/yocto/meta-intel$ git init
|
|
||||||
Initialized empty Git repository in /usr/local/yocto/meta-intel/.git/
|
|
||||||
/usr/local/yocto/meta-intel$ git remote add meta-intel \ git://git.yoctoproject.org/meta-intel.git
|
|
||||||
/usr/local/yocto/meta-intel$ git remote update
|
|
||||||
Fetching meta-intel
|
|
||||||
remote: Counting objects: 1240, done.
|
|
||||||
remote: Compressing objects: 100% (1008/1008), done.
|
|
||||||
remote: Total 1240 (delta 513), reused 85 (delta 27)
|
|
||||||
Receiving objects: 100% (1240/1240), 1.55 MiB | 510 KiB/s, done.
|
|
||||||
Resolving deltas: 100% (513/513), done.
|
|
||||||
From git://git.yoctoproject.org/meta-intel
|
|
||||||
* [new branch] 1.1_M1 -> meta-intel/1.1_M1
|
|
||||||
* [new branch] 1.1_M2 -> meta-intel/1.1_M2
|
|
||||||
* [new branch] bernard -> meta-intel/bernard
|
|
||||||
* [new branch] dvhart/n450 -> meta-intel/dvhart/n450
|
|
||||||
* [new branch] laverne -> meta-intel/laverne
|
|
||||||
* [new branch] master -> meta-intel/master
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Once you have the repository set up, you have many development branches from
|
|
||||||
which you can work.
|
|
||||||
For this example we are going to use Bernard 5.0.
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
/usr/local/yocto/meta-intel$ git checkout -b Bernard-5.0.1 meta-intel/bernard
|
|
||||||
Branch Bernard-5.0.1 set up to track remote branch bernard from meta-intel.
|
|
||||||
Switched to a new branch 'bernard-5.0.1'
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='making-a-copy-of-the-base bsp-to-create-your-new-bsp-layer'>
|
|
||||||
<title>Making a Copy of the Base BSP to Create Your New BSP Layer</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Now that you have the Yocto Project and base BSP source you need to create a
|
|
||||||
new layer for your BSP.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Layers are ideal for isolating and storing work for a given piece of hardware.
|
|
||||||
A layer is really just a location or area in which you place the recipes for your BSP.
|
|
||||||
In fact, a BSP is, in itself, a special type of layer.
|
|
||||||
Consider an application as another example that illustrates a layer.
|
|
||||||
Suppose you are creating an application that has library or other dependencies in
|
|
||||||
order for it to compile and run.
|
|
||||||
The layer, in this case, would be where all the recipes that define those dependencies
|
|
||||||
are kept. The key point for a layer is that it is an isolated area that contains
|
|
||||||
all the relevant information for the project that the Yocto Project build system knows about.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<note>
|
|
||||||
The Yocto Project supports four BSPs that are part of the
|
|
||||||
Yocto Project release: <filename>atom-pc</filename>, <filename>beagleboard</filename>,
|
|
||||||
<filename>mpc8315e</filename>, and <filename>routerstationpro</filename>.
|
|
||||||
The recipes and configurations for these four BSPs are located and dispersed
|
|
||||||
within <filename>meta</filename>, which can be found in the Yocto Project source directory.
|
|
||||||
Consequently, they are not totally isolated in the spirit of layers unless you think
|
|
||||||
of <filename>meta</filename> as a layer itself.
|
|
||||||
On the other hand, the Yocto Project has isolated BSP layers within
|
|
||||||
<filename>meta-intel</filename> for the Crown Bay, Emenlow, Jasper Forest, N450, and
|
|
||||||
Sugar Bay.
|
|
||||||
[WRITER'S NOTE: <filename>meta-yocto</filename>, <filename>meta</filename>, and
|
|
||||||
<filename>meta-intel</filename> need some explanation.
|
|
||||||
Not sure about the relationship of meta-yocto as compared to meta-intel.]
|
|
||||||
</note>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
When you set up a layer for a new BSP you should follow a standard layout.
|
|
||||||
This layout is described in
|
|
||||||
<ulink url='http://www.yoctoproject.org/docs/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 hierarchy for BSP kernel recipes,
|
|
||||||
graphics recipes, and configuration information.
|
|
||||||
You can see the standard layout for the Crown Bay BSP in this example by examining the
|
|
||||||
directory structure of <filename>meta-crownbay</filename>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
To create your BSP layer you simply copy the <filename>meta-crownbay</filename>
|
|
||||||
layer to a new layer.
|
|
||||||
For this example the new layer is named <filename>meta-mymachine</filename>.
|
|
||||||
The name must follow the BSP layer naming convention, which is
|
|
||||||
<filename>meta-<name></filename>.
|
|
||||||
The following example assumes a meta-intel Git repository.
|
|
||||||
If you downloaded and expanded a Crown Bay tarball then you simply copy the resulting
|
|
||||||
<filename>meta-crownbay</filename> directory structure to a location of your choice:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
/usr/local/yocto/meta-intel$ cp -a meta-crownbay/ meta-mymachine
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='making-changes-to-your-bsp'>
|
|
||||||
<title>Making Changes to Your BSP</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Right now you have two identical BSP layers with different names:
|
|
||||||
<filename>meta-crownbay</filename> and <filename>meta-mymachine</filename>.
|
|
||||||
You need to change your configurations so that they work for your new BSP and
|
|
||||||
your particular hardware.
|
|
||||||
We will look first at the configurations, which are all done in the layer’s
|
|
||||||
<filename>conf</filename> directory.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
First, since in this example the new BSP will not support EMGD we will get rid of the
|
|
||||||
<filename>crownbay.conf</filename> file and then rename the
|
|
||||||
<filename>crownbay-noemgd.conf</filename> file to <filename>mymachine.conf</filename>.
|
|
||||||
Much of what we do in the configuration directory is designed to help the Yocto Project
|
|
||||||
build system work with the new layer and to be able to find and use the right software.
|
|
||||||
The following two commands result in a single machine configuration file named
|
|
||||||
<filename>mymachine.conf</filename>.
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
/usr/local/yocto/meta-intel$ rm meta-mymachine/conf/machine/crownbay.conf
|
|
||||||
/usr/local/yocto/meta-intel$ mv meta-mymachine/conf/machine/crownbay-noemgd.conf \
|
|
||||||
meta-mymachine/conf/machine/mymachine.conf
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The next step makes changes to <filename>mymachine.conf</filename> itself.
|
|
||||||
The only changes needed for this example are changes to the comment lines and to the
|
|
||||||
Source Revision (<filename>SRCREV</filename>) lines at the bottom of the file.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
For the comments the string <filename>crownbay-noemgd</filename> needs to be changed to
|
|
||||||
<filename>mymachine</filename>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
To understand how to complete the changes to the <filename>SRCREV</filename>
|
|
||||||
statements we need to know which kernel we are using.
|
|
||||||
The <filename>PREFERRED_PROVIDER_virtual/kernel</filename> statement in the file specifies
|
|
||||||
the kernel we are going to use.
|
|
||||||
We are going to use <filename>linux-yocto-stable</filename>.
|
|
||||||
The <filename>SRCREV</filename> statement pairs point to the exact machine branch
|
|
||||||
(commit) and <filename>meta</filename> branch in the Git repository.
|
|
||||||
Right now the <filename>SRCREV</filename> variables are as follows in
|
|
||||||
<filename>mymachine.conf</filename>:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
SRCREV_machine_pn-linux-yocto_crownbay-noemgd ?= \ "56fe215d3f1a2cc3a5a26482ac9809ba44495695"
|
|
||||||
SRCREV_meta_pn-linux-yocto_crownbay-noemgd ?= \ "e1f85a470934a0cf6abde5d95533e74501822c6b"
|
|
||||||
|
|
||||||
SRCREV_machine_pn-linux-yocto-stable_crownbay-noemgd ?= \ "56fe215d3f1a2cc3a5a26482ac9809ba44495695"
|
|
||||||
SRCREV_meta_pn-linux-yocto-stable_crownbay-noemgd ?= \ "e1f85a470934a0cf6abde5d95533e74501822c6b"
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
You will notice that there are two pairs of <filename>SRCREV</filename> statements.
|
|
||||||
The first pair points to a current development kernel, which we don’t care about
|
|
||||||
in this example.
|
|
||||||
The bottom pair points to the stable kernel that we will use:
|
|
||||||
<filename>linux-yocto-stable</filename>.
|
|
||||||
At this point though, the unique commit strings all are still associated with
|
|
||||||
Crown Bay.
|
|
||||||
So the next changes we make to the configuration file gets rid of the pair that points
|
|
||||||
to the development kernel and provides new commit strings that points to the
|
|
||||||
<filename>atom-pc-standard</filename>, which we are choosing for the initial build of this BSP.
|
|
||||||
Here are the final <filename>SRCREV</filename> statements:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
SRCREV_machine_pn-linux-yocto-stable_mymachine ?= \ "72ca49ab08b8eb475cec82a10049503602325791"
|
|
||||||
SRCREV_meta_pn-linux-yocto-stable_mymachine ?= \ "ec26387cb168e9e0976999b528b5a9dd62e3157a"
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
If you are familiar with Git repositories you probably won’t have trouble locating the
|
|
||||||
exact commit strings you need to change the <filename>SRCREV</filename> statements.
|
|
||||||
You can find all the <filename>machine</filename> and <filename>meta</filename>
|
|
||||||
branch points (commits) for the <filename>linux-yocto-2.6.34</filename> kernel
|
|
||||||
<ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-2.6.34'>here</ulink>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
If you need a little more assistance after going to the link then do the following:
|
|
||||||
<orderedlist>
|
|
||||||
<listitem><para>Expand the list of branches by clicking <filename>[…]</filename></para></listitem>
|
|
||||||
<listitem><para>Click on the <filename>atom-pc-standard</filename> branch</para></listitem>
|
|
||||||
<listitem><para>Click on the commit column header to view the top commit</para></listitem>
|
|
||||||
<listitem><para>Copy the commit string for use in the <filename>mymachine.conf</filename>
|
|
||||||
file</para></listitem>
|
|
||||||
</orderedlist>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
For the <filename>SRCREV</filename> statement that points to the <filename>meta</filename>
|
|
||||||
branch use the same procedure except expand the <filename>wrs_meta</filename>
|
|
||||||
branch in step 2 above.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The next configuration file in the new BSP layer we need to edit is <filename>layer.conf</filename>.
|
|
||||||
This file identifies build information needed for the new layer.
|
|
||||||
You can see the
|
|
||||||
<ulink url='http://www.yoctoproject.org/docs/1.1/bsp-guide/bsp-guide.html#bsp-filelayout-layer'>
|
|
||||||
Layer Configuration File</ulink> section in the Board Support Packages (BSP) Development Guide
|
|
||||||
for more information on this configuration file.
|
|
||||||
Basically, we are removing statements that support EMGD and changing the ones that support no EMGD.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
First, remove these statements from the file:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
BBFILE_COLLECTIONS_crownbayd += "crownbay"
|
|
||||||
BBFILE_PATTERN_crownbay := "^${LAYERDIR}/"
|
|
||||||
BBFILE_PRIORITY_crownbay = "6"
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
This leaves three similar statements that we care about:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
BBFILE_COLLECTIONS_crownbay-noemgd += "crownbay-noemgd"
|
|
||||||
BBFILE_PATTERN_crownbay-noemgd := "^${LAYERDIR}/"
|
|
||||||
BBFILE_PRIORITY_crownbay-noemgd = "6"
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Simply substitute the machine string name <filename>crownbay-noemgd</filename>
|
|
||||||
with the new machine name <filename>mymachine</filename> to get the following:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
BBFILE_COLLECTIONS_mymachine += "mymachine"
|
|
||||||
BBFILE_PATTERN_mymachine := "^${LAYERDIR}/"
|
|
||||||
BBFILE_PRIORITY_mymachine = "6"
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Now we will take a look at the recipes in your new layer.
|
|
||||||
The standard BSP structure has areas for BSP, graphics, and kernel recipes.
|
|
||||||
When you create a BSP you use these areas for appropriate recipes and append files.
|
|
||||||
Recipes take the form of <filename>.bb</filename> files.
|
|
||||||
If you want to leverage off of existing recipes elsewhere in the Yocto Project
|
|
||||||
source tree but change them you can use <filename>.bbappend</filename> files.
|
|
||||||
All new recipes and append files for your layer go in the layer’s
|
|
||||||
<filename>recipes-bsp</filename>, <filename>recipes-kernel</filename>, and
|
|
||||||
<filename>recipes-graphics</filename> directories.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
For this example we are not adding any new BSP recipes.
|
|
||||||
And, we only need to remove the formfactor we do not want and change the name of
|
|
||||||
the remaining one that supports no EMGD.
|
|
||||||
These commands take care of the new layer’s BSP recipes:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
/usr/local/yocto/meta-intel$ rm -rf \
|
|
||||||
meta-mymachine/recipes-bsp/formfactor/formfactor/crownbay
|
|
||||||
/usr/local/yocto/meta-intel$ mv \
|
|
||||||
meta-mymachine/recipes-bsp/formfactor/formfactor/crownbay-noemgd/ \
|
|
||||||
meta-mymachine/recipes-bsp/formfactor/formfactor/mymachine
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
For this example we want to remove anything that supports EMGD.
|
|
||||||
The following command cleans up the <filename>recipes-graphics</filename> directory:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
/usr/local/yocto/meta-intel$ rm –rf \
|
|
||||||
meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-emgd*
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
At this point the <filename>recipes-graphics</filename> directory just has files that
|
|
||||||
support Video Electronics Standards Association (VESA) graphics modes.
|
|
||||||
However, we still need to rename a directory in the layer.
|
|
||||||
This command applies the final change to the <filename>recipes-graphics</filename> directory:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
/usr/local/yocto/meta-intel$ mv \
|
|
||||||
meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay-noemgd \
|
|
||||||
meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-config/mymachine
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Finally, let us look at the <filename>recipes-kernel</filename> directory in the example.
|
|
||||||
The only file we are concerned with for the example is
|
|
||||||
<filename>linux-yocto-stable_git.bbappend</filename>.
|
|
||||||
The other files all support the EMGD feature of Crown Bay.
|
|
||||||
These commands clean up the directory:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
/usr/local/yocto/meta-intel$ rm –rf meta-mymachine/recipes-kernel/linux/linux-yocto
|
|
||||||
/usr/local/yocto/meta-intel$ rm –rf \
|
|
||||||
meta-mymachine/recipes-kernel/linux/linux-yocto-stable
|
|
||||||
/usr/local/yocto/meta-intel$ rm \
|
|
||||||
meta-mymachine/recipes-kernel/linux/linux-yocto_git.bbappend
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The <filename>linux-yocto-stable_git.bbappend</filename> file appends a Yocto Project
|
|
||||||
recipe having the same name.
|
|
||||||
The changes we need to make are to remove the statements that support EMGD
|
|
||||||
and change the remaining Crown Bay strings to be <filename>mymachine</filename>.
|
|
||||||
We also do not need to include the pointer to the EMGD licenses patch at the end of
|
|
||||||
the file.
|
|
||||||
Here is the original file:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
FILESEXTRAPATHS := “${THISDIR}/${PN}”
|
|
||||||
COMPATIBLE_MACHINE_crownbay = “crownbay”
|
|
||||||
KMACHINE_CROWNBAY = “CROWNBAY”
|
|
||||||
COMPATIBLE_MACHINE_crownbay-noemgd = “crownbay-noemgd”
|
|
||||||
KMACHINE_crownbay-noemgd = “crownbay”
|
|
||||||
SRC_URI += file://0001-crownbay-update-a-handful-of-EMGD-licenses.patch
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
After editing the file it looks like this:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
FILESEXTRAPATHS := “${THISDIR}/${PN}”
|
|
||||||
COMPATIBLE_MACHINE_mymachine = “mymachine”
|
|
||||||
KMACHINE_mymachine = “mymachine
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
In summary, the edits to the layer’s recipe files result in removal of any files and
|
|
||||||
statements that do not support your targeted hardware in addition to the inclusion
|
|
||||||
of any new recipes you might need.
|
|
||||||
In this example, it was simply a matter of ridding the new layer <filename>meta-machine</filename>
|
|
||||||
of any code that supported the EMGD features.
|
|
||||||
We did not introduce any new recipes to the layer.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Finally, it is also important to update the layer’s <filename>README</filename>
|
|
||||||
file so that the information in it reflects your BSP.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='preparing-for-the-build'>
|
|
||||||
<title>Preparing for the Build</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Once you have made all the changes to your BSP layer there remains a few things
|
|
||||||
you need to do for the Yocto Project build system in order for it to create your image.
|
|
||||||
You need to get the build environment ready by sourcing an environment setup script
|
|
||||||
and you need to be sure two key configuration files are configured appropriately.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The entire process for building an image is overviewed in the
|
|
||||||
<ulink url='http://www.yoctoproject.org/docs/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.
|
|
||||||
The remainder of this section will apply to our example of the <filename>meta-mymachine</filename> layer.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
To get ready to build your new layer you need to do the following:
|
|
||||||
<orderedlist>
|
|
||||||
<listitem><para>Get the environment ready for the build by sourcing the environment
|
|
||||||
script.
|
|
||||||
The environment script is in the Yocto Project source directory and has the string
|
|
||||||
<filename>init-build-env</filename> in the file’s name.
|
|
||||||
For this example, the following command gets the build environment ready:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
/usr/local/yocto$ source oe-init-build-env yocto-build
|
|
||||||
</literallayout>
|
|
||||||
When you source the script a build directory is created in the current
|
|
||||||
working directory.
|
|
||||||
In our example we were in the Yocto Project source 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 build.
|
|
||||||
The build directory contains a <filename>conf</filename> directory that contains
|
|
||||||
two configuration files you will need to check: <filename>bblayers.conf</filename>
|
|
||||||
and <filename>local.conf</filename>.</para></listitem>
|
|
||||||
<listitem><para>Check and edit the resulting <filename>local.conf</filename> file.
|
|
||||||
This file minimally identifies the machine for which to build the image by
|
|
||||||
configuring the <filename>MACHINE</filename> variable.
|
|
||||||
For this example you must set the variable to mymachine as follows:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
MACHINE ??= “mymachine”
|
|
||||||
</literallayout>
|
|
||||||
You should also be sure any other variables in which you are interested are set.
|
|
||||||
Some variables to consider are <filename>BB_NUMBER_THREADS</filename>
|
|
||||||
and <filename>PARALLEL_MAKE</filename>, both of which can greatly reduce your build time
|
|
||||||
if you are using a multi-threaded development system (e.g. values of
|
|
||||||
<filename>8</filename> and <filename>j 6</filename>, respectively are optimal
|
|
||||||
for a development machine that has four available cores).</para></listitem>
|
|
||||||
<listitem><para>Update the <filename>bblayers.conf</filename> file so that it includes
|
|
||||||
the path to your new BSP layer.
|
|
||||||
In this example you need to include the pathname to <filename>meta-mymachine</filename>.
|
|
||||||
For example, if you created a Yocto Project Git repository named
|
|
||||||
<filename>yocto</filename> in <filename>/usr/local</filename> then the
|
|
||||||
<filename>BBLAYERS</filename> variable in the file would need to include the following path:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
/usr/local/yocto/meta-intel/meta-mymachine
|
|
||||||
</literallayout></para></listitem>
|
|
||||||
</orderedlist>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The appendix
|
|
||||||
<ulink url='http://www.yoctoproject.org/docs/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
|
|
||||||
on configuration variables.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='building-the-image'>
|
|
||||||
<title>Building the Image</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The Yocto Project uses the BitBake tool to build images based on the type of image
|
|
||||||
you want to create.
|
|
||||||
You can find more information on BitBake
|
|
||||||
<ulink url='http://bitbake.berlios.de/manual/'>here</ulink>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The build process supports several types of images to satisfy different needs.
|
|
||||||
When you issue the BitBake command you provide a “top-level” recipe that essentially
|
|
||||||
starts the process off of building the type of image you want.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
You can find these recipes in the <filename>meta/recipes-core/images</filename> and
|
|
||||||
<filename>meta/recipes-sato/images</filename> directories of the Yocto Project source
|
|
||||||
tree or Git repository.
|
|
||||||
Although the recipe names are somewhat explanatory, here is a list that describes them:
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem><para><emphasis>Base</emphasis> – A foundational basic image without support
|
|
||||||
for X that can be reasonably used for customization.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Core</emphasis> – A foundational basic image with support for
|
|
||||||
X that can be reasonably used for customization.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Direct Disk</emphasis> – An image that you can copy directory to
|
|
||||||
the disk of the target device.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Live</emphasis> – An image you can run from a USB device or from
|
|
||||||
a CD without having to first install something.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Minimal</emphasis> – A small image without a GUI.
|
|
||||||
This image is not much more than a kernel with a shell.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Minimal Development</emphasis> – A Minimal image suitable for
|
|
||||||
development work.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Minimal Direct Disk</emphasis> – A Minimal Direct Disk image.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Minimal RAM-based Initial Root Filesystem</emphasis> – A minimal image
|
|
||||||
that has the <filename>initramfs</filename> as part of the kernel, which allows the
|
|
||||||
system to find the first “init” program more efficiently.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Minimal Live</emphasis> – A Minimal Live image.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Minimal MTD Utilities</emphasis> – A minimal image that has support
|
|
||||||
for the MTD utilities, which let the user interact with the MTD subsystem in
|
|
||||||
the kernel to perform operations on flash devices.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Sato</emphasis> – An image with Sato support, a mobile environment
|
|
||||||
and visual style that works well with mobile devices.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Sato Development</emphasis> – A Sato image suitable for
|
|
||||||
development work.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Sato Direct Disk</emphasis> – A Sato Direct Disk image.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Sato Live</emphasis> – A Sato Live image.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Sato SDK</emphasis> – A Sato image that includes the Yocto Project
|
|
||||||
toolchain and development libraries.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Sato SDK Direct Disk</emphasis> – A Sato SDK Direct
|
|
||||||
Disk image.</para></listitem>
|
|
||||||
<listitem><para><emphasis>Sato SDK Live</emphasis> – A Sato SDK Live image.</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The remainder of this section applies to our example of the <filename>meta-mymachine</filename> layer.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
To build the image for our <filename>meta-mymachine</filename> BSP enter the following command
|
|
||||||
from the same shell from which you ran the setup script.
|
|
||||||
You should run the <filename>bitbake</filename> command without any intervening shell commands.
|
|
||||||
For example, moving your working directory around could cause problems.
|
|
||||||
Here is the command for this example:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
/usr/local/yocto/yocto-build$ bitbake –k poky-image-sato-live
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
This command requests an image that has Sato support and can be run from a USB device or
|
|
||||||
from a CD without having to first install anything.
|
|
||||||
The build process takes significant time and includes thousands of tasks, which are reported
|
|
||||||
at the console.
|
|
||||||
If the build results in any type of error you should check for misspellings in the
|
|
||||||
files you changed or problems with your host development environment such as missing packages.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='modifying-a-kernel'>
|
|
||||||
<title>Modifying a Kernel</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
[WRITER'S NOTE: This section is a second example that focuses on just modifying the kernel.
|
|
||||||
I don't have any information on this yet.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Here are some points to consider though:
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem><para>Reference Darren's presentation
|
|
||||||
<ulink url='http://events.linuxfoundation.org/events/embedded-linux-conference/hart'>
|
|
||||||
here</ulink></para></listitem>
|
|
||||||
<listitem><para>Reference <xref linkend='dev-manual-start'>Getting Started with the Yocto Project</xref>
|
|
||||||
section to get set up at minimum.</para></listitem>
|
|
||||||
<listitem><para>Are there extra steps I need specific to kernel development to get started?</para></listitem>
|
|
||||||
<listitem><para>What do I do to get set up?
|
|
||||||
Is it a matter of just installing YP and having some pieces together?
|
|
||||||
What are the pieces?</para></listitem>
|
|
||||||
<listitem><para>Where do I get the base kernel to start with?</para></listitem>
|
|
||||||
<listitem><para>Do I install the appropriate toolchain?</para></listitem>
|
|
||||||
<listitem><para>What kernel git repository do I use?</para></listitem>
|
|
||||||
<listitem><para>What is the conversion script?
|
|
||||||
What does it do?</para></listitem>
|
|
||||||
<listitem><para>What do I have to do to integrate the kernel layer?</para></listitem>
|
|
||||||
<listitem><para>What do I use to integrate the kernel layer?
|
|
||||||
HOB?
|
|
||||||
Do I just Bitbake it?</para></listitem>
|
|
||||||
<listitem><para>Using the System Image Creator.]</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='user-application-development'>
|
|
||||||
<title>User Application Development</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
[WRITER'S NOTE: This section is the second major development case - developing an application.
|
|
||||||
Here are points to consider:
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem><para>User-space Application Development scenario overview.</para></listitem>
|
|
||||||
<listitem><para>Using the Yocto Eclipse Plug-in.</para></listitem>
|
|
||||||
<listitem><para>Back-door support.</para></listitem>
|
|
||||||
<listitem><para>I feel there is more to this area than we have captured during our two review meetings.]</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
</chapter>
|
|
||||||
<!--
|
|
||||||
vim: expandtab tw=80 ts=4
|
|
||||||
-->
|
|
||||||
@@ -4,124 +4,178 @@
|
|||||||
<chapter id='dev-manual-intro'>
|
<chapter id='dev-manual-intro'>
|
||||||
|
|
||||||
<title>The Yocto Project Development Manual</title>
|
<title>The Yocto Project Development Manual</title>
|
||||||
|
<section id='intro'>
|
||||||
|
<title>Introduction</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
WRITER NOTE: The goal of this manual is to provide an over-arching development guide for using the Yocto Project.
|
Welcome to the Yocto Project Development Manual!
|
||||||
The intent is to give the reader the “big picture” around development.
|
This manual gives you an idea of how to use the Yocto Project to develop embedded Linux
|
||||||
Much of the information in the manual will be detailed in other manuals.
|
images and user-space applications to run on targeted devices.
|
||||||
For example, detailed information on Git, repositories and open-source in general can be found in many places.
|
Reading this manual gives you an overview of image, kernel, and user-space application development
|
||||||
Another example is getting set up to use the Yocto Project, which our Yocto Project Quick Start covers.
|
using the Yocto Project.
|
||||||
However, this manual needs to at least address it.
|
Because much of the information in this manual is general, it contains many references to other
|
||||||
One might ask “What becomes of the Poky Reference Manual?”
|
sources where you can find more detail.
|
||||||
This manual, over time, needs to develop into a pure reference manual where all procedural information
|
For example, detailed information on Git, repositories and open-source in general
|
||||||
eventually ends up in an appropriate guide.
|
can be found in many places.
|
||||||
A good example of information perfect for the Poky Reference Manual is the appendix on variable
|
Another example is how to get set up to use the Yocto Project, which our Yocto Project Quick Start covers.
|
||||||
definitions (glossary).
|
</para>
|
||||||
</para>
|
|
||||||
|
|
||||||
<section id='intro'>
|
<para>
|
||||||
<title>Introduction</title>
|
The Yocto Project Development Manual, however, does provide detailed examples on how to create a
|
||||||
|
Board Support Package (BSP), change the kernel source code, and re-configure the kernel.
|
||||||
|
You can find this information in the appendices of the manual.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
<para>
|
<section id='what-this-manual-provides'>
|
||||||
Welcome to the Yocto Project Development Guide!
|
<title>What this Manual Provides</title>
|
||||||
This guide provides an over-arching view of the development process within the Yocto Project.
|
|
||||||
This guide is just that – a guide.
|
|
||||||
It helps you understand the bigger picture involving development using the Yocto Project.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='what-this-manual-provides'>
|
<para>
|
||||||
<title>What this Manual Provides</title>
|
The following list describes what you can get from this guide:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>Information that lets you get set
|
||||||
|
up to develop using the Yocto Project.</para></listitem>
|
||||||
|
<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
|
||||||
|
uses.</para></listitem>
|
||||||
|
<listitem><para>An understanding of common end-to-end development models.</para></listitem>
|
||||||
|
<listitem><para>Development case overviews for both system development and user-space
|
||||||
|
applications.</para></listitem>
|
||||||
|
<listitem><para>An overview and understanding of the emulation environment used with
|
||||||
|
the Yocto Project (QEMU).</para></listitem>
|
||||||
|
<!-- <listitem><para>A discussion of target-level analysis techniques, tools, tips,
|
||||||
|
and tricks.</para></listitem>
|
||||||
|
<listitem><para>Considerations for deploying your final product.</para></listitem> -->
|
||||||
|
<listitem><para>An understanding of basic kernel architecture and
|
||||||
|
concepts.</para></listitem>
|
||||||
|
<!-- <listitem><para>Information that will help you migrate an existing project to the
|
||||||
|
Yocto Project development environment.</para></listitem> -->
|
||||||
|
<listitem><para>Many references to other sources of related information.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
<para>
|
<section id='what-this-manual-does-not-provide'>
|
||||||
The following list describes what you can get from this guide:
|
<title>What this Manual Does Not Provide</title>
|
||||||
<itemizedlist>
|
|
||||||
<listitem><para>A general idea of and references to information that lets you get set
|
|
||||||
up to develop using the Yocto Project.</para></listitem>
|
|
||||||
<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
|
|
||||||
uses.</para></listitem>
|
|
||||||
<listitem><para>An understanding of common end-to-end development models.</para></listitem>
|
|
||||||
<listitem><para>Development case overviews for both system development and user-space
|
|
||||||
applications.</para></listitem>
|
|
||||||
<listitem><para>An overview and understanding of the emulation environment used with
|
|
||||||
the Yocto Project (QEMU).</para></listitem>
|
|
||||||
<listitem><para>A discussion of target-level analysis techniques, tools, tips,
|
|
||||||
and tricks.</para></listitem>
|
|
||||||
<listitem><para>Considerations for deploying your final product.</para></listitem>
|
|
||||||
<listitem><para>An understanding of basic kernel architecture and
|
|
||||||
concepts.</para></listitem>
|
|
||||||
<listitem><para>Information that will help you migrate an existing project to the
|
|
||||||
Yocto Project development environment.</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='what-this-manual-does-not-provide'>
|
<para>
|
||||||
<title>What this Manual Does Not Provide</title>
|
This manual will not give you the following:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>Step-by-step instructions if those instructions exist in other Yocto
|
||||||
|
Project documentation.
|
||||||
|
For example, The Application Development Toolkit (ADT) User’s Guide contains detailed
|
||||||
|
instruction on how to obtain and configure the
|
||||||
|
<trademark class='trade'>Eclipse</trademark> Yocto Plug-in.</para></listitem>
|
||||||
|
<listitem><para>Reference material.
|
||||||
|
This type of material resides in an appropriate reference manual.
|
||||||
|
For example, system variables are documented in the
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||||
|
Yocto Project Reference Manual</ulink>.</para></listitem>
|
||||||
|
<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
|
||||||
|
Internet than in this manual.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
<para>
|
<section id='other-information'>
|
||||||
This manual will not give you the following:
|
<title>Other Information</title>
|
||||||
<itemizedlist>
|
|
||||||
<listitem><para>Step-by-step instructions when these instructions exist in other Yocto
|
|
||||||
Project documentation.
|
|
||||||
For example, The Application Development Toolkit (ADT) User’s Guide contains detailed
|
|
||||||
instruction on how to obtain and configure the Eclipse Yocto Plug-in.</para></listitem>
|
|
||||||
<listitem><para>Reference material.
|
|
||||||
This type of material resides in an appropriate reference manual.
|
|
||||||
For example, system variables are documented in the Poky Reference Manual.</para></listitem>
|
|
||||||
<listitem><para>Detailed public information that is not specific to the Yocto Project.
|
|
||||||
For example, exhaustive information on how to use Git is better covered in the public
|
|
||||||
domain than in this manual.</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='other-information'>
|
|
||||||
<title>Other Information</title>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Because this manual presents overview information for many different topics, you will
|
Because this manual presents overview information for many different topics, you will
|
||||||
need to supplement it with other information.
|
need to supplement it with other information.
|
||||||
The following list presents other sources of information you might find helpful:
|
The following list presents other sources of information you might find helpful:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>The <ulink url='http://www.yoctoproject.org'>Yocto Project Website</ulink> - The
|
<listitem><para><emphasis>The <ulink url='http://www.yoctoproject.org'>Yocto Project Website</ulink>:
|
||||||
home page for the Yocto Project
|
</emphasis> The home page for the Yocto Project provides lots of information on the project
|
||||||
provides lots of information on the project as well as links to software
|
as well as links to software and documentation.</para></listitem>
|
||||||
and documentation.</para></listitem>
|
<listitem><para><emphasis>
|
||||||
<listitem><para>The <ulink url='http://www.yoctoproject.org/docs/1.1/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> - 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>The <ulink url='http://www.yoctoproject.org/docs/1.1/poky-ref-manual/poky-ref-manual.html'>
|
<listitem><para><emphasis>
|
||||||
Yocto Project Reference Manual</ulink> - This manual is the complete reference
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||||
guide to the Yocto Project build component.
|
The Yocto Project Reference Manual</ulink>:</emphasis> This manual is a reference
|
||||||
The manual also contains a reference chapter on Board Support Package (BSP)
|
guide to the Yocto Project build component known as "Poky."
|
||||||
layout.</para></listitem>
|
The manual also contains a reference chapter on Board Support Package (BSP)
|
||||||
<listitem><para><ulink url='http://www.yoctoproject.org/docs/1.1/adt-manual/adt-manual.html'>
|
layout.</para></listitem>
|
||||||
Application Development Toolkit (ADT) User's Guide</ulink> - This guide provides
|
<listitem><para><emphasis>
|
||||||
information that lets you get going with the ADT to develop projects using the
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/adt-manual/adt-manual.html'>
|
||||||
Yocto Project.</para></listitem>
|
The Yocto Project Application Development Toolkit (ADT) User's Guide</ulink>:</emphasis>
|
||||||
<listitem><para><ulink url='http://www.yoctoproject.org/docs/1.1/bsp-guide/bsp-guide.html'>
|
This guide provides information that lets you get going with the ADT to
|
||||||
Board Support Package (BSP) Developer's Guide</ulink> - This guide defines the
|
develop projects using the Yocto Project.</para></listitem>
|
||||||
structure for BSP components.
|
<listitem><para><emphasis>
|
||||||
Having a commonly understood structure encourages standardization.</para></listitem>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/bsp-guide/bsp-guide.html'>
|
||||||
<listitem><para><ulink url='http://www.yoctoproject.org/docs/1.1/kernel-manual/kernel-manual.html'>
|
The Yocto Project Board Support Package (BSP) Developer's Guide</ulink>:</emphasis>
|
||||||
Yocto Project Kernel Architecture and Use Manual</ulink> - This manual
|
This guide defines the structure for BSP components.
|
||||||
describes the architecture of the Yocto Project kernel and provides some work flow
|
Having a commonly understood structure encourages standardization.</para></listitem>
|
||||||
examples.</para></listitem>
|
<listitem><para><emphasis>
|
||||||
<listitem><para><ulink url='http://www.youtube.com/watch?v=3ZlOu-gLsh0'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/kernel-manual/kernel-manual.html'>
|
||||||
Yocto Eclipse Plug-in</ulink> - A step-by-step instructional video that
|
The Yocto Project Kernel Architecture and Use Manual</ulink>:</emphasis>
|
||||||
demonstrates how an application developer uses Yocto Plug-in features within
|
This manual describes the architecture of the Yocto Project kernel and provides
|
||||||
the Eclipse IDE.</para></listitem>
|
some work flow examples.</para></listitem>
|
||||||
<listitem><para><ulink url='http://wiki.yoctoproject.org/wiki/FAQ'>FAQ</ulink> - A
|
<listitem><para><emphasis>
|
||||||
list of commonly asked questions and their answers.</para></listitem>
|
<ulink url='http://www.youtube.com/watch?v=3ZlOu-gLsh0'>
|
||||||
<listitem><para><ulink url='http://www.yoctoproject.org/download/yocto/yocto-project-1.0-release-notes-poky-5.0'>
|
Yocto Eclipse Plug-in</ulink>:</emphasis> A step-by-step instructional video that
|
||||||
Release Notes</ulink> - Features, updates and known issues for the current
|
demonstrates how an application developer uses Yocto Plug-in features within
|
||||||
release of the Yocto Project.</para></listitem>
|
the Eclipse IDE.</para></listitem>
|
||||||
</itemizedlist>
|
<listitem><para><emphasis>
|
||||||
</para>
|
<ulink url='http://wiki.yoctoproject.org/wiki/FAQ'>FAQ</ulink>:</emphasis>
|
||||||
</section>
|
A list of commonly asked questions and their answers.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<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 of the Yocto Project.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<ulink url='http://bugzilla.yoctoproject.org/'>Bugzilla</ulink>:</emphasis>
|
||||||
|
The bug tracking application the Yocto Project uses.
|
||||||
|
If you find problems with the Yocto Project, you should report them using this
|
||||||
|
application.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
Yocto Project Mailing Lists:</emphasis> To subscribe to the Yocto Project mailing
|
||||||
|
lists, click on the following URLs and follow the instructions:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><ulink url='http://lists.yoctoproject.org/listinfo/yocto'></ulink> for a
|
||||||
|
Yocto Project Discussions mailing list.</para></listitem>
|
||||||
|
<listitem><para><ulink url='http://lists.yoctoproject.org/listinfo/poky'></ulink> for a
|
||||||
|
Yocto Project Discussions mailing list about the Poky build system.</para></listitem>
|
||||||
|
<listitem><para><ulink url='http://lists.yoctoproject.org/listinfo/yocto-announce'></ulink>
|
||||||
|
for a mailing list to receive offical Yocto Project announcements for developments and
|
||||||
|
as well as Yocto Project milestones.</para></listitem>
|
||||||
|
</itemizedlist></para></listitem>
|
||||||
|
<listitem><para><emphasis>Internet Relay Chat (IRC):</emphasis>
|
||||||
|
Two IRC channels on freenode are available
|
||||||
|
for Yocto Project and Poky discussions: <filename>#yocto</filename> and
|
||||||
|
<filename>#poky</filename>.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<ulink url='http://www.openedhand.com/'>OpenedHand</ulink>:</emphasis>
|
||||||
|
The company where the Yocto Project build system Poky was first developed.
|
||||||
|
OpenedHand has since been acquired by Intel Corporation.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<ulink url='http://www.intel.com/'>Intel Corporation</ulink>:</emphasis>
|
||||||
|
The company who acquired OpenedHand in 2008 and continues development on the
|
||||||
|
Yocto Project.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<ulink url='http://www.openembedded.org/'>OpenEmbedded</ulink>:</emphasis>
|
||||||
|
The upstream, generic, embedded distribution the Yocto Project build system (Poky) derives
|
||||||
|
from and to which it contributes.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<ulink url='http://developer.berlios.de/projects/bitbake/'>
|
||||||
|
Bitbake</ulink>:</emphasis> The tool used to process Yocto Project metadata.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<ulink url='http://bitbake.berlios.de/manual/'>
|
||||||
|
BitBake User Manual</ulink>:</emphasis> A comprehensive guide to the BitBake tool.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<ulink url='http://pimlico-project.org/'>Pimlico</ulink>:</emphasis>
|
||||||
|
A suite of lightweight Personal Information Management (PIM) applications designed
|
||||||
|
primarily for handheld and mobile devices.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<ulink url='http://wiki.qemu.org/Index.html'>QEMU</ulink>:
|
||||||
|
</emphasis> An open-source machine emulator and virtualizer.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
<!--
|
<!--
|
||||||
vim: expandtab tw=80 ts=4
|
vim: expandtab tw=80 ts=4
|
||||||
|
|||||||
1132
documentation/dev-manual/dev-manual-kernel-appendix.xml
Normal file
@@ -6,39 +6,669 @@
|
|||||||
<title>Common Development Models</title>
|
<title>Common Development Models</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
[WRITERS NOTE: This chapter presents common development models within the Yocto Project.
|
Many development models exist for which you can use the Yocto Project.
|
||||||
Reading this chapter will give the user a feel for the overall development process.
|
However, for the purposes of this manual we are going to focus on two common ones:
|
||||||
The chapter will follow the framework for the manual.
|
System Development and User Application Development.
|
||||||
The team decided to present a single development model and not to try and represent all the
|
System Development covers Board Support Package (BSP) development and kernel modification
|
||||||
various possibilities that might exist.
|
or configuration.
|
||||||
The chapter will include an over-arching diagram that shows a simple, most-common development model.
|
User Application Development covers development of applications that you intend to run on some
|
||||||
The diagram will consist of boxes that represent high-level areas of the development process.
|
target hardware.
|
||||||
For example, a box for “Setting Up” will be in the model.
|
|
||||||
A box for “Debugging” will exist.
|
|
||||||
The diagram needs to account for the two use-cases we are going to showcase
|
|
||||||
(system development and application development)].
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='place-holder-section-one'>
|
<para>
|
||||||
<title>Place-Holder Section One</title>
|
This chapter presents overviews of both system and application models.
|
||||||
|
If you want to examine specific examples of the system development models,
|
||||||
|
see the "<link linkend='dev-manual-bsp-appendix'>BSP Development Example</link>"
|
||||||
|
appendix and the
|
||||||
|
"<link linkend='dev-manual-kernel-appendix'>Kernel Modification Example</link>" appendix.
|
||||||
|
For a user-space application development example that uses the
|
||||||
|
<trademark class='trade'>Eclipse</trademark> IDE,
|
||||||
|
see the
|
||||||
|
<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>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<section id='system-development-model'>
|
||||||
|
<title>System Development</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Text needed here.
|
System development involves modification or creation of an image that you want to run on
|
||||||
|
a specific hardware target.
|
||||||
|
Usually, when you want to create an image that runs on embedded hardware, the image does
|
||||||
|
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 just use the hardware
|
||||||
|
features for your particular hardware.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
To help you understand how system development works in the Yocto Project, this section
|
||||||
|
covers two types of image development: BSP creation and kernel modification or
|
||||||
|
configuration.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<section id='developing-a-board-support-package-bsp'>
|
||||||
|
<title>Developing a Board Support Package (BSP)</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
A BSP is a package of recipes that, when applied, during a build results in
|
||||||
|
an image you can run on a particular board.
|
||||||
|
Thus, the package, when compiled into the new image, supports the operation of the board.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<note>
|
||||||
|
For a brief list of terms used when describing the development process in the Yocto Project,
|
||||||
|
see the "<link linkend='yocto-project-terms'>Yocto Project Terms</link>" section.
|
||||||
|
</note>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The remainder of this section presents the basic steps to create a BSP basing it on an
|
||||||
|
existing BSP that ships with the Yocto Project.
|
||||||
|
You can reference the "<link linkend='dev-manual-bsp-appendix'>BSP Development Example</link>"
|
||||||
|
appendix for a detailed example that uses the Crown Bay BSP as a base BSP from which to start.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The following illustration and list summarize the BSP creation general workflow.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<imagedata fileref="figures/bsp-dev-flow.png" width="6in" depth="7in" align="center" scalefit="1" />
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para><emphasis>Set up your host development system to support
|
||||||
|
development using the Yocto Project</emphasis>: See 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/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>
|
||||||
|
<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.
|
||||||
|
Having the Yocto Project files on your system gives you access to the build
|
||||||
|
process and tools you need.
|
||||||
|
For information on how to get these files, see the
|
||||||
|
"<link linkend='getting-setup'>Getting Setup</link>" section.</para></listitem>
|
||||||
|
<listitem><para><emphasis>Establish a local copy of the base BSP files</emphasis>: Having
|
||||||
|
the BSP files on your system gives you access to the build
|
||||||
|
process and tools you need for creating a BSP.
|
||||||
|
For information on how to get these files, see the
|
||||||
|
"<link linkend='getting-setup'>Getting Setup</link>" section.</para></listitem>
|
||||||
|
<listitem><para><emphasis>Choose a Yocto Project-supported BSP as your base BSP</emphasis>:
|
||||||
|
The Yocto Project ships with several BSPs that support various hardware.
|
||||||
|
It is best to base your new BSP on an existing BSP rather than create all the
|
||||||
|
recipes and configuration files from scratch.
|
||||||
|
While it is possible to create everything from scratch, basing your new BSP
|
||||||
|
on something that is close is much easier.
|
||||||
|
Or, at a minimum, leveraging off an existing BSP
|
||||||
|
gives you some structure with which to start.</para>
|
||||||
|
<para>At this point you need to understand your target hardware well enough to determine which
|
||||||
|
existing BSP it most closely matches.
|
||||||
|
Things to consider are your hardware’s on-board features, such as CPU type and graphics support.
|
||||||
|
You should look at the README files for supported BSPs to get an idea of which one
|
||||||
|
you could use.
|
||||||
|
A generic <trademark class='registered'>Intel</trademark>
|
||||||
|
<trademark class='trade'>Atom</trademark>-based BSP to consider is the
|
||||||
|
Crown Bay that does not support the <trademark class='registered'>Intel</trademark>
|
||||||
|
Embedded Media Graphics Driver (EMGD).
|
||||||
|
The remainder of this example uses that base BSP.</para>
|
||||||
|
<para>To see the supported BSPs, go to the Yocto Project
|
||||||
|
<ulink url='http://www.yoctoproject.org/download'>download page</ulink> and click
|
||||||
|
on “BSP Downloads.”</para></listitem>
|
||||||
|
<listitem><para><emphasis>Create your own BSP layer</emphasis>: Layers are ideal for
|
||||||
|
isolating and storing work for a given piece of hardware.
|
||||||
|
A layer is really just a location or area in which you place the recipes for your BSP.
|
||||||
|
In fact, a BSP is, in itself, a special type of layer.
|
||||||
|
Another example that illustrates a layer is an application.
|
||||||
|
Suppose you are creating an application that has library or other dependencies in
|
||||||
|
order for it to compile and run.
|
||||||
|
The layer, in this case, would be where all the recipes that define those dependencies
|
||||||
|
are kept.
|
||||||
|
The key point for a layer is that it is an isolated area that contains
|
||||||
|
all the relevant information for the project that the Yocto Project build
|
||||||
|
system knows about.</para>
|
||||||
|
<note>The Yocto Project supports four BSPs that are part of the
|
||||||
|
Yocto Project release: <filename>atom-pc</filename>, <filename>beagleboard</filename>,
|
||||||
|
<filename>mpc8315e</filename>, and <filename>routerstationpro</filename>.
|
||||||
|
The recipes and configurations for these four BSPs are located and dispersed
|
||||||
|
within the local Yocto Project files.
|
||||||
|
Consequently, they are not totally isolated in the spirit of layers unless you think
|
||||||
|
of <filename>meta-yocto</filename> as a layer itself.
|
||||||
|
On the other hand, BSP layers for Crown Bay, Emenlow, Jasper Forest,
|
||||||
|
N450, and Sugar Bay are isolated.</note>
|
||||||
|
<para>When you set up a layer for a new BSP, you should follow a standard layout.
|
||||||
|
This layout is described in the section
|
||||||
|
"<ulink url='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
|
||||||
|
configuration information.
|
||||||
|
You can see the standard layout for the Crown Bay BSP in this example by examining the
|
||||||
|
directory structure of the <filename>meta-crownbay</filename> layer inside the
|
||||||
|
local Yocto Project files.</para></listitem>
|
||||||
|
<listitem><para><emphasis>Make configuration changes to your new BSP
|
||||||
|
layer</emphasis>: The standard BSP layer structure organizes the files you need to edit in
|
||||||
|
<filename>conf</filename> and several <filename>recipes-*</filename> directories within the
|
||||||
|
BSP layer.
|
||||||
|
Configuration changes identify where your new layer is on the local system
|
||||||
|
and identify which kernel you are going to use.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>Make recipe changes to your new BSP layer</emphasis>: Recipe
|
||||||
|
changes include altering recipes (<filename>.bb</filename> files), removing
|
||||||
|
recipes you don't use, and adding new recipes that you need to support your hardware.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>Prepare for the build</emphasis>: Once you have made all the
|
||||||
|
changes to your BSP layer, there remains a few things
|
||||||
|
you need to do for the Yocto Project build system in order for it to create your image.
|
||||||
|
You need to get the build environment ready by sourcing an environment setup script
|
||||||
|
and you need to be sure two key configuration files are configured appropriately.</para>
|
||||||
|
<para>The entire process for building an image is overviewed in the section
|
||||||
|
"<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>
|
||||||
|
<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.
|
||||||
|
You can find more information on BitBake
|
||||||
|
<ulink url='http://bitbake.berlios.de/manual/'>here</ulink>.</para>
|
||||||
|
<para>The build process supports several types of images to satisfy different needs.
|
||||||
|
See the
|
||||||
|
"<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 for information on
|
||||||
|
supported images.</para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
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>.
|
||||||
|
You can also find supplemental information in
|
||||||
|
<ulink url='http://yoctoproject.org/docs/1.1.1/bsp-guide/bsp-guide.html'>
|
||||||
|
The Board Support Package (BSP) Development Guide</ulink>.
|
||||||
|
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'>
|
||||||
|
here</ulink> that you might find helpful.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='modifying-the-kernel'>
|
||||||
|
<title><anchor id='kernel-spot' />Modifying the Kernel</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Kernel modification involves changing the Linux Yocto kernel, which could involve changing
|
||||||
|
configuration variables as well as adding new kernel recipes.
|
||||||
|
Configuration changes can be added in the form of configuration fragments, while recipe
|
||||||
|
modification comes through the kernel's <filename>recipes-kernel</filename> area
|
||||||
|
in a kernel layer you create.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
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.
|
||||||
|
For a complete discussion of the kernel, see
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/kernel-manual/kernel-manual.html'>
|
||||||
|
The Yocto Project Kernel Architecture and Use Manual</ulink>.
|
||||||
|
You can reference the appendix
|
||||||
|
"<link linkend='dev-manual-kernel-appendix'>Kernel Modification Example</link>"
|
||||||
|
for a detailed example that changes the configuration of a kernel.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<section id='kernel-overview'>
|
||||||
|
<title>Kernel Overview</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
When one thinks of the source files for a kernel they usually think of a fixed structure
|
||||||
|
of files that contain kernel patches.
|
||||||
|
The Yocto Project, however, employs mechanisims, that in a sense, result in a kernel source
|
||||||
|
generator.
|
||||||
|
By the end of this section, this analogy will become clearer.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You can find a web interface to the Linux Yocto kernel source repositories at
|
||||||
|
<ulink url='http://git.yoctoproject.org/'></ulink>.
|
||||||
|
If you look at the interface, you will see to the left a grouping of
|
||||||
|
Git repositories titled "Yocto Linux Kernel."
|
||||||
|
Within this group, you will find the four different kernels supported by
|
||||||
|
the Yocto Project:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><emphasis><filename>linux-yocto-2.6.34</filename></emphasis> - The
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
kernel based on the latest upstream release candidate available.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The kernels are maintained using the Git application that, in a sense, structures
|
||||||
|
them in a "tree" complete with branches and 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
|
||||||
|
when gathered from the root of the tree to the leaf accumulate to create the files
|
||||||
|
necessary for a specific piece of hardware and its features.
|
||||||
|
The following figure displays this concept:
|
||||||
|
<para>
|
||||||
|
<imagedata fileref="figures/kernel-overview-1.png"
|
||||||
|
width="6in" depth="6in" align="center" scale="100" />
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Within the figure, the "Kernel.org Branch Point" represents the point in the tree
|
||||||
|
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>
|
||||||
|
kernel.
|
||||||
|
Thus, everything further to the right in the structure is based on the
|
||||||
|
<filename>linux-yocto-3.0</filename> kernel.
|
||||||
|
Branch points to right in the figure represent where the
|
||||||
|
<filename>linux-yocto-3.0</filename> kernel is modified for specific hardware
|
||||||
|
or types of kernels, such as real-time kernels.
|
||||||
|
Each leaf thus represents the end-point for a kernel designed to run on a specific
|
||||||
|
targeted device.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The overall result is a Git-maintained repository from which all the supported
|
||||||
|
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
|
||||||
|
"larger" branches within the tree.
|
||||||
|
This practice eliminates redundant storage of similar features shared among kernels.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<note>
|
||||||
|
Keep in mind the figure does not take into account all four supported Linux Yocto
|
||||||
|
kernel types, but rather shows a single generic kernel just for conceptual purposes.
|
||||||
|
Also keep in mind that this structure represents the Yocto Project source repositories
|
||||||
|
that are either pulled from during the build or established on the host development system
|
||||||
|
prior to the build by either cloning a particular kernel's Git repository or by
|
||||||
|
downloading and unpacking a tarball.
|
||||||
|
</note>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Storage of all the available kernel source code is one thing, while representing the
|
||||||
|
code on your host development system is another.
|
||||||
|
Conceptually, you can think of the Yocto Project kernel source repositories as all the
|
||||||
|
source files necessary for all the supported kernels.
|
||||||
|
As a developer, you are just interested in the source files for the kernel on
|
||||||
|
on which you are working.
|
||||||
|
And, furthermore, you need them available on your host system.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You make kernel source code available on your host development system by using
|
||||||
|
Git to create a bare clone of the Linux Yocto kernel Git repository
|
||||||
|
in which you are interested.
|
||||||
|
Then, you use Git again to clone a copy of that bare clone.
|
||||||
|
This copy represents the directory structure on your host system that is particular
|
||||||
|
to the kernel you want.
|
||||||
|
These are the files you actually modify to change the kernel.
|
||||||
|
See the <link linkend='local-kernel-files'>Linux Yocto Kernel</link> item earlier
|
||||||
|
in this manual for an example of how to set up the kernel source directory
|
||||||
|
structure on your host system.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This next figure illustrates how the kernel source files might be arranged on
|
||||||
|
your host system.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<imagedata fileref="figures/kernel-overview-3-edison.png"
|
||||||
|
width="6in" depth="4in" align="center" scale="100" />
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
In the previous figure, the file structure on the left represents the bare clone
|
||||||
|
set up to track the Yocto Project kernel Git repository.
|
||||||
|
The structure on the right represents the copy of the bare clone.
|
||||||
|
When you make modifcations to the kernel source code, this is the area in which
|
||||||
|
you work.
|
||||||
|
Once you make corrections, you must use Git to push the committed changes to the
|
||||||
|
bare clone.
|
||||||
|
The example in <xref linkend='modifying-the-kernel-source-code'>
|
||||||
|
Modifying the Kernel Source Code</xref> provides a detailed example.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
What happens during the build?
|
||||||
|
When you build the kernel on your development system all files needed for the build
|
||||||
|
are taken from the Yocto Project source repositories pointed to by the
|
||||||
|
<filename>SRC_URI</filename> variable and gathered in a temporary work area
|
||||||
|
where they are subsequently used to create the unique kernel.
|
||||||
|
Thus, in a sense, the process constructs a local source tree specific to your
|
||||||
|
kernel to generate the new kernel image - a source generator if you will.
|
||||||
|
</para>
|
||||||
|
The following figure shows the temporary file structure
|
||||||
|
created on your host system when the build occurs.
|
||||||
|
This build directory contains all the source files used during the build.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<imagedata fileref="figures/kernel-overview-2.png"
|
||||||
|
width="6in" depth="5in" align="center" scale="100" />
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Again, for a complete discussion of the Yocto Project kernel's architcture and its
|
||||||
|
branching strategy,
|
||||||
|
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>.
|
||||||
|
Also, you can reference
|
||||||
|
<xref linkend='modifying-the-kernel-source-code'>Modifying the Kernel Source Code</xref>
|
||||||
|
for a detailed example that modifies the kernel.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='kernel-modification-workflow'>
|
||||||
|
<title>Kernel Modification Workflow</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This illustration and the following list summarizes the kernel modification general workflow.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<imagedata fileref="figures/kernel-dev-flow.png"
|
||||||
|
width="6in" depth="7.5in" align="center" scalefit="1" />
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para><emphasis>Set up your host development system to support
|
||||||
|
development using the Yocto Project</emphasis>: See
|
||||||
|
"<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/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>
|
||||||
|
<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
|
||||||
|
the build process and tools you need.
|
||||||
|
For information on how to get these files, see the bulleted item
|
||||||
|
"<link linkend='local-yp-release'>Yocto Project Release</link>" earlier in this manual.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>Set up the <filename>poky-extras</filename> Git
|
||||||
|
repository</emphasis>: This repository is the area for your configuration
|
||||||
|
fragments, new kernel recipes, and the kernel <filename>.bbappend</filename>
|
||||||
|
file used during the build.
|
||||||
|
It is good practice to set this repository up inside the local Yocto
|
||||||
|
Project files Git repository.
|
||||||
|
For information on how to get these files, see the bulleted item
|
||||||
|
"<link linkend='poky-extras-repo'>The <filename>poky-extras</filename> Git Repository</link>"
|
||||||
|
earlier in this manual.</para></listitem>
|
||||||
|
<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:
|
||||||
|
a bare clone of the Linux Yocto kernel you are modifying and
|
||||||
|
a copy of that bare clone.
|
||||||
|
The bare clone is required by the build process and is the area to which you
|
||||||
|
push your kernel source changes (pulling does not work with bare clones).
|
||||||
|
The copy of the bare clone is a local Git repository that contains all the kernel's
|
||||||
|
source files.
|
||||||
|
You make your changes to the files in this copy of the bare clone.
|
||||||
|
For information on how to set these two items up, see the bulleted item
|
||||||
|
"<link linkend='local-kernel-files'>Linux Yocto Kernel</link>"
|
||||||
|
earlier in this manual.</para></listitem>
|
||||||
|
<listitem><para><emphasis>Make changes to the kernel source code if
|
||||||
|
applicable</emphasis>: Modifying the kernel does not always mean directly
|
||||||
|
changing source files.
|
||||||
|
However, if you have to do this, you make the changes in the local
|
||||||
|
Git repository you set up to hold the source files (i.e. the copy of the
|
||||||
|
bare clone).
|
||||||
|
Once the changes are made, you need to use Git commands to commit the changes
|
||||||
|
and then push them to the bare clone.</para></listitem>
|
||||||
|
<listitem><para><emphasis>Make kernel configuration changes
|
||||||
|
to your local kernel layer if applicable</emphasis>:
|
||||||
|
If your situation calls for changing the kernel's configuration, you can
|
||||||
|
use <filename>menuconfig</filename>
|
||||||
|
to enable and disable kernel configurations.
|
||||||
|
Using <filename>menuconfig</filename> allows you to interactively develop and test the
|
||||||
|
configuration changes you are making to the kernel.
|
||||||
|
When saved, changes using <filename>menuconfig</filename> update the kernel's
|
||||||
|
<filename>.config</filename>.
|
||||||
|
As an alternative method to changing the kernel's configuration, you can simply
|
||||||
|
edit the <filename>.config</filename> found in the Yocto Project build
|
||||||
|
directory at <filename>tmp/sysroots/<machine-name>/kernel</filename>
|
||||||
|
directly.</para></listitem>
|
||||||
|
<listitem><para><emphasis>Add new kernel recipes if applicable</emphasis>: The standard
|
||||||
|
layer structure organizes recipe files inside the
|
||||||
|
<filename>meta-kernel-dev</filename> layer that is within the
|
||||||
|
<filename>poky-extras</filename> Git repository.
|
||||||
|
If you need to add new kernel recipes, you add them within this layer.
|
||||||
|
Also within this area, you will find the <filename>.bbappend</filename>
|
||||||
|
file that appends information to the kernel's recipe file used during the
|
||||||
|
build.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>Prepare for the build</emphasis>: Once you have made all the
|
||||||
|
changes to your kernel (configurations, source code changes, recipe additions,
|
||||||
|
or recipe changes), there remains a few things
|
||||||
|
you need to do in order for the Yocto Project build system to create your image.
|
||||||
|
If you have not done so, you need to get the build environment ready by sourcing
|
||||||
|
the environment setup script described earlier.
|
||||||
|
You also need to be sure two key configuration files
|
||||||
|
(<filename>local.conf</filename> and <filename>bblayers.conf</filename>)
|
||||||
|
are configured appropriately.</para>
|
||||||
|
<para>The entire process for building an image is overviewed in the
|
||||||
|
"<ulink url='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.
|
||||||
|
Also, you should look at the detailed examples found in the appendices at
|
||||||
|
at the end of this manual.</para></listitem>
|
||||||
|
<listitem><para><emphasis>Build the image</emphasis>: The Yocto Project
|
||||||
|
build system Poky uses the BitBake
|
||||||
|
tool to build images based on the type of image you want to create.
|
||||||
|
You can find more information on BitBake
|
||||||
|
<ulink url='http://bitbake.berlios.de/manual/'>here</ulink>.</para>
|
||||||
|
<para>The build process supports several types of images to satisfy different needs.
|
||||||
|
See the appendix
|
||||||
|
"<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 for information on supported images.</para></listitem>
|
||||||
|
<listitem><para><emphasis>Make your configuration changes available
|
||||||
|
in the kernel layer</emphasis>: Up to this point, all the configuration changes to the
|
||||||
|
kernel have been done and tested iteratively.
|
||||||
|
Once they are tested and ready to go, you can move them into the kernel layer,
|
||||||
|
which allows you to distribute the layer.</para></listitem>
|
||||||
|
<listitem><para><emphasis>If applicable, share your in-tree changes</emphasis>:
|
||||||
|
If the changes you made
|
||||||
|
are suited for all Linux Yocto users, you might want to push the changes to a
|
||||||
|
contribution area for the Linux Yocto Git repository.
|
||||||
|
Once the changes are pushed, you can request that they
|
||||||
|
be pulled into the master branch of the kernel tree.
|
||||||
|
Doing so makes them available to everyone using the kernel.</para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='place-holder-section-two'>
|
<section id='place-holder-section-two'>
|
||||||
<title>Place-Holder Section Two</title>
|
<title>Application Development Workflow</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Text needed here.
|
Application development involves creation of an application that you want to be able
|
||||||
|
to run on your target hardware, which is running a Linux Yocto image.
|
||||||
|
The Yocto Project provides an Application Development Toolkit (ADT) that
|
||||||
|
facilitates quick development and integration of your application into its run-time environment.
|
||||||
|
Using the ADT you can employ cross-development toolchains designed for your target hardware
|
||||||
|
to compile and link your application.
|
||||||
|
You can then deploy your application to the actual hardware or to the QEMU emulator for testing.
|
||||||
|
If you are familiar with the popular Eclipse IDE, you can use an Eclipse Yocto Plug-in to
|
||||||
|
allow you to develop, deploy, and test your application all from within Eclipse.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
While we strongly suggest using the Yocto Project ADT to develop your application, you might
|
||||||
|
not want to.
|
||||||
|
If this is the case, you can still use pieces of the Yocto Project for your development process.
|
||||||
|
However, because the process can vary greatly, this manual does not provide detail on the process.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<section id='workflow-using-the-adt-and-eclipse'>
|
||||||
|
<title>Workflow Using the ADT and <trademark class='trade'>Eclipse</trademark></title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
To help you understand how application development works in the Yocto Project ADT
|
||||||
|
environment, this section
|
||||||
|
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
|
||||||
|
IDE, see
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/adt-manual/adt-manual.html'>
|
||||||
|
The Application Development Toolkit (ADT) User's Manual</ulink>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This illustration and the following list summarizes the application development general workflow.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<imagedata fileref="figures/app-dev-flow.png"
|
||||||
|
width="7in" depth="8in" align="center" scale="100" />
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para><emphasis>Prepare the Host System for the Yocto Project</emphasis>:
|
||||||
|
See
|
||||||
|
"<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/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>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
WRITER NOTE: The areas to get the kernel and root filesystem are located in the Index of
|
||||||
|
downloads. There are many forms of each. The files that have "rootfs" are just the
|
||||||
|
target root filesystems. The file that is very small and starts with bzImage is just
|
||||||
|
the kernel image isolated so that it can be written to a special on-board area of
|
||||||
|
flash memory. Some systems require this. In the machines directory there are
|
||||||
|
files that combine the kernel image and the root filesystem. These files are the ISO
|
||||||
|
and HDDIMG files. ISO images are designed to be deployed on a DVD or CD. The ISO
|
||||||
|
images are designed to be deployed on a USB stick. There might be some relics in
|
||||||
|
the machine directory. For example, there is the "emenlow-bernard-5.0.0.tar.bz2"
|
||||||
|
file. Nobody seems to know what this is. If a developer needs the image and the
|
||||||
|
root filesystem I think that they want the small kernel image and a matching root
|
||||||
|
filesystem. Although, Paul Eggleton says that the HDDIMG types could be used to
|
||||||
|
develop on. I am not sure that we can use one of those in the ADT though as they
|
||||||
|
want you to point to the kernel image and the target root filesystem. Maybe you
|
||||||
|
could just point to the same spot. I am not sure.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<listitem><para><emphasis>Secure the Linux Yocto Kernel Target Image</emphasis>:
|
||||||
|
You must have a target kernel image that has been built using the Yocto Project.</para>
|
||||||
|
<para>Depending on whether the Yocto Project has a pre-built image that matches your target
|
||||||
|
architecture and where you are going to run the image while you develop your application
|
||||||
|
(QEMU or real hardware), the area you get the image from differs.
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>Download the image from
|
||||||
|
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/machines/'>
|
||||||
|
<filename>machines</filename></ulink> if your target architecture is supported
|
||||||
|
and you are going to develop and test your application on actual hardware.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>Download the image from the
|
||||||
|
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/machines/qemu/'>
|
||||||
|
<filename>machines/qemu</filename></ulink> if your target architecture is supported
|
||||||
|
and you are going to develop and test your application using the QEMU
|
||||||
|
emulator.</para></listitem>
|
||||||
|
<listitem><para>Build your image if you cannot find a pre-built image that matches
|
||||||
|
your target architecture.
|
||||||
|
If your target architecture is similar to a supported architecture, you can
|
||||||
|
modify the kernel image before you build it.
|
||||||
|
See the
|
||||||
|
"<link linkend='kernel-modification-workflow'>Kernel Modification Workflow</link>"
|
||||||
|
section earlier in this manual for information on how to create a modified
|
||||||
|
Linux Yocto kernel.</para></listitem>
|
||||||
|
</itemizedlist></para>
|
||||||
|
<para>For information on pre-built kernel image naming schemes for images
|
||||||
|
that can run on the QEMU emulator, see the
|
||||||
|
"<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
|
||||||
|
<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>
|
||||||
|
<listitem><para><emphasis>Install the ADT</emphasis>:
|
||||||
|
The ADT provides a target-specific cross-development toolchain, the root filesystem,
|
||||||
|
the QEMU emulator, and other tools that can help you develop your application.
|
||||||
|
While it is possible to get these pieces separately, the Yocto Project provides an
|
||||||
|
easy method.
|
||||||
|
You can get these pieces by running an ADT installer script, which is configurable.
|
||||||
|
For information on how to install the ADT, see the
|
||||||
|
"<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/1.1.1/adt-manual/adt-manual.html'>The Yocto Project
|
||||||
|
Application Development (ADT) User's Manual</ulink>.</para></listitem>
|
||||||
|
<listitem><para><emphasis>If Applicable, Secure the Target Root Filesystem</emphasis>:
|
||||||
|
If you choose not to install the ADT using the ADT Installer,
|
||||||
|
you need to find and download the
|
||||||
|
appropriate root filesystems.
|
||||||
|
You can find these tarballs in the same areas used for the kernel images.
|
||||||
|
Depending on the type of image you are running, the root filesystem you need differs.
|
||||||
|
For example, if you are developing an application that runs on an image that
|
||||||
|
supports Sato, you need to get root filesystem that supports Sato.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>Create and Build your Application</emphasis>:
|
||||||
|
At this point, you need to have source files for your application.
|
||||||
|
Once you have the files, you can use the Eclipse IDE to import them and build the
|
||||||
|
project.
|
||||||
|
If you are not using Eclipse, you need to use the cross-development tools you have
|
||||||
|
installed to create the image.</para></listitem>
|
||||||
|
<listitem><para><emphasis>Deploy the Image with the Application</emphasis>:
|
||||||
|
If you are using the Eclipse IDE, you can deploy your image to the hardware or to
|
||||||
|
QEMU through the project's preferences.
|
||||||
|
If you are not using the Eclipse IDE, then you need to deploy the application using
|
||||||
|
other methods to the hardware.
|
||||||
|
Or, if you are using QEMU, you need to use that tool and load your image in for testing.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>Test and Debug the Application</emphasis>:
|
||||||
|
Once your application is deployed, you need to test it.
|
||||||
|
Within the Eclipse IDE, you can use the debubbing environment along with the
|
||||||
|
set of user-space tools installed along with the ADT to debug your application.
|
||||||
|
Of course, the same user-space tools are available separately to use if you choose
|
||||||
|
not to use the Eclipse IDE.</para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='workflow-without-adt'>
|
||||||
|
<title>Workflow Without ADT</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
If you want to develop an application outside of the Yocto Project ADT environment, you
|
||||||
|
can still employ the cross-development toolchain, the QEMU emulator, and a number of supported
|
||||||
|
target image files.
|
||||||
|
You just need to follow these general steps:
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para><emphasis>Install the cross-development toolchain for your target hardware:</emphasis>
|
||||||
|
For information on how to install the toolchain, see the
|
||||||
|
"<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.1/adt-manual/adt-manual.html'>The Yocto Project
|
||||||
|
Application Development (ADT) User's Manual</ulink>.</para></listitem>
|
||||||
|
<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
|
||||||
|
images.</para>
|
||||||
|
<para>If you are going to develop your application on hardware, go to the
|
||||||
|
<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
|
||||||
|
from which to download the kernel image and root filesystem.
|
||||||
|
This download area could have several files in it that support development using
|
||||||
|
actual hardware.
|
||||||
|
For example, the area might contain <filename>.hddimg</filename> files that combine the
|
||||||
|
kernel image with the filesystem, boot loaders, etc.
|
||||||
|
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
|
||||||
|
emulator, go to the
|
||||||
|
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/machines/qemu/'>
|
||||||
|
<filename>machines/qemu</filename></ulink> download area.
|
||||||
|
From this area, go down into the directory for your target architecture
|
||||||
|
(e.g. <filename>qemux86_64</filename> for an
|
||||||
|
<trademark class='registered'>Intel</trademark>-based 64-bit architecture).
|
||||||
|
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.
|
||||||
|
See 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>
|
||||||
|
<listitem><para><emphasis>Develop and Test your Application:</emphasis> At this point,
|
||||||
|
you have the tools to develop your application.
|
||||||
|
If you need to separately install and use the QEMU emulator, you can go to
|
||||||
|
<ulink url='http://www.qemu.org'>QEMU Home Page</ulink> to download and learn about the
|
||||||
|
emulator.</para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
<!--
|
<!--
|
||||||
vim: expandtab tw=80 ts=4
|
vim: expandtab tw=80 ts=4
|
||||||
|
|||||||
@@ -7,34 +7,37 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
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 your development host up 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 the
|
hardware supported by the Yocto Project by reading
|
||||||
<ulink url='http://www.yoctoproject.org/docs/yocto-quick-start/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> located on the <ulink url='http://www.yoctoproject.org'>
|
The Yocto Project Quick Start</ulink>.
|
||||||
Yocto Project website</ulink>.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The remainder of this chapter summarizes what is in the Yocto Project Quick Start and provides
|
The remainder of this chapter summarizes what is in the Yocto Project Quick Start and provides
|
||||||
some higher level concepts you might want to consider.
|
some higher-level concepts you might want to consider.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='introducing-the-yocto-project'>
|
<section id='introducing-the-yocto-project'>
|
||||||
<title>Introducing the Yocto Project</title>
|
<title>Introducing the Yocto Project</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The Yocto Project is an open-source collaboration project focused on embedded Linux developers.
|
The Yocto Project is an open-source collaboration project focused on embedded Linux development.
|
||||||
The project provides a recent Linux kernel along with a set of system commands, libraries,
|
The project currently provides a build system, which is sometimes referred to as "Poky",
|
||||||
and system components suitable for the embedded developer.
|
and provides various ancillary tools suitable for the embedded developer.
|
||||||
The Yocto Project also features the Sato reference User Interface should you be dealing with
|
The Yocto Project also features the Sato reference User Interface, which is optimized for
|
||||||
devices with restricted screens.
|
stylus driven, low-resolution screens.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can use the Yocto Project, which uses the BitBake build tool, to develop complete Linux
|
You can use the Yocto Project, which uses the BitBake build tool, to develop complete Linux
|
||||||
images and user-space applications for architectures based on ARM, MIPS, PowerPC, x86 and x86-64.
|
images and associated user-space applications for architectures based on ARM, MIPS, PowerPC,
|
||||||
You can perform target-level testing and debugging as well as test in a hardware emulated environment.
|
x86 and x86-64.
|
||||||
And, if you are an Eclipse user, you can install an Eclipse Yocto Plug-in to allow you to
|
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
|
||||||
|
emulated testing and debugging.
|
||||||
|
And, if you are an <trademark class='trade'>Eclipse</trademark>
|
||||||
|
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>
|
||||||
@@ -45,55 +48,176 @@
|
|||||||
<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:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><emphasis>Host System:</emphasis> You need a recent release of Fedora,
|
<listitem><para><emphasis>Host System:</emphasis> You should have a reasonably current
|
||||||
OpenSUSE, Debian, or Ubuntu.
|
Linux-based host system.
|
||||||
You should have a reasonably current Linux-based host system.
|
You will have the best results with a recent release of Fedora,
|
||||||
You should also have about 100 gigabytes of free disk space if you plan on building
|
OpenSUSE, or Ubuntu as these releases are frequently tested against the Yocto Project
|
||||||
images.</para></listitem>
|
and officially supported.
|
||||||
<listitem><para><emphasis>Packages:</emphasis> Depending on your host system (Debian-based or RPM-based),
|
You should also have about 100 gigabytes of free disk space for building images.
|
||||||
you need certain packages.
|
</para></listitem>
|
||||||
See the <ulink url='http://www.yoctoproject.org/docs/yocto-quick-start/yocto-project-qs.html#packages'>
|
<listitem><para><emphasis>Packages:</emphasis> The Yocto Project requires certain packages
|
||||||
The Packages</ulink> section in the Yocto Project Quick start for the exact package
|
exist on your development system (e.g. Python 2.6 or 2.7).
|
||||||
requirements.</para></listitem>
|
See "<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#packages'>The Packages</ulink>"
|
||||||
<listitem><para><emphasis>Yocto Project Release:</emphasis> You need a release of the Yocto Project.
|
section in the Yocto Project Quick start for the exact package
|
||||||
You can get set up for this one of two ways depending on whether you are going to be contributing
|
requirements and the installation commands to install them
|
||||||
back into the Yocto Project source repository or not.
|
for the supported distributions.</para></listitem>
|
||||||
|
<listitem id='local-yp-release'><para><emphasis>Yocto Project Release:</emphasis>
|
||||||
|
You need a release of the Yocto Project.
|
||||||
|
You can get set up with local Yocto Project files one of two ways depending on whether you
|
||||||
|
are going to be contributing back into the Yocto Project source repository or not.
|
||||||
|
<note>
|
||||||
|
Regardless of the method you use, this manual refers to the resulting
|
||||||
|
hierarchical set of files as "the Yocto Project files" or "the Yocto Project file
|
||||||
|
structure."
|
||||||
|
</note>
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><emphasis>Tarball Extraction:</emphasis> If you are not going to contribute
|
<listitem><para><emphasis>Tarball Extraction:</emphasis> If you are not going to contribute
|
||||||
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.
|
Once you have the tarball, just extract it into a directory of your choice.</para>
|
||||||
If you are interested in supported Board Support Packages (BSPs) you can also download
|
<para>For example, the following command extracts the Yocto Project 1.1.1 release tarball
|
||||||
these release tarballs from the same site and locate them in a directory of your
|
into the current working directory and sets up the Yocto Project file structure
|
||||||
choice.</para></listitem>
|
with a top-level directory named <filename>poky-edison-6.0.1</filename>:
|
||||||
<listitem><para><emphasis>Git Method:</emphasis> If you are going to be contributing
|
<literallayout class='monospaced'>
|
||||||
back into the Yocto Project you should probably use Git commands to set up a local
|
$ tar xfj poky-edison-6.0.1.tar.bz2
|
||||||
Git repository of the Yocto Project.
|
</literallayout></para>
|
||||||
Doing so creates a history of changes you might make and allows you to easily submit
|
<para>This method does not produce a Git repository.
|
||||||
changes upstream to the project.
|
Instead, you simply end up with a local snapshot of the
|
||||||
For an example of how to set up your own local Git repository of Yocto Project,
|
Yocto Project files that are based on the particular release in the
|
||||||
see this
|
tarball.</para></listitem>
|
||||||
|
<listitem><para><emphasis>Git Repository Method:</emphasis> If you are going to be contributing
|
||||||
|
back into the Yocto Project, you should use Git commands to set up a local
|
||||||
|
Git repository of the Yocto Project files.
|
||||||
|
Doing so creates a Git repository with a complete history of changes and allows
|
||||||
|
you to easily submit your changes upstream to the project.</para>
|
||||||
|
<para>The following transcript shows how to clone the Yocto Project files'
|
||||||
|
Git repository into the current working directory.
|
||||||
|
The command creates the repository in a directory named <filename>poky</filename>.
|
||||||
|
For information on the Yocto Project and Git, see the
|
||||||
|
"<link linkend='git'>Git</link>" section.
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ git clone git://git.yoctoproject.org/poky
|
||||||
|
Initialized empty Git repository in /home/scottrif/poky/.git/
|
||||||
|
remote: Counting objects: 116882, done.
|
||||||
|
remote: Compressing objects: 100% (35987/35987), done.
|
||||||
|
remote: Total 116882 (delta 80651), reused 113045 (delta 77578)
|
||||||
|
Receiving objects: 100% (116882/116882), 72.13 MiB | 2.68 MiB/s, done.
|
||||||
|
Resolving deltas: 100% (80651/80651), done. </literallayout></para>
|
||||||
|
<para>For another example of how to set up your own local Git repositories, see this
|
||||||
<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'>
|
||||||
wiki page</ulink>, which covers checking out the Yocto sources.</para></listitem>
|
wiki page</ulink>, which describes how to create both <filename>poky</filename>
|
||||||
|
and <filename>meta-intel</filename> Git repositories.</para></listitem>
|
||||||
</itemizedlist></para></listitem>
|
</itemizedlist></para></listitem>
|
||||||
<listitem><para><emphasis>Supported Board Support Packages (BSPs):</emphasis> The same considerations
|
<listitem id='local-kernel-files'><para><emphasis>Linux Yocto Kernel:</emphasis>
|
||||||
exist for BSPs.
|
If you are going to be making modifications to a supported Linux Yocto kernel, you
|
||||||
You can get set up for BSP development one of two ways:
|
need to establish local copies of the source.
|
||||||
|
This setup involves creating a bare clone of the Linux Yocto kernel and then cloning
|
||||||
|
that repository.
|
||||||
|
You can create the bare clone and the copy of the bare clone anywhere you like.
|
||||||
|
For simplicity, it is recommended that you create these structures outside of the
|
||||||
|
Yocto Project files' Git repository.</para>
|
||||||
|
<para>As an example, the following transcript shows how to create the bare clone
|
||||||
|
of the <filename>linux-yocto-3.0-1.1.x</filename> kernel and then create a copy of
|
||||||
|
that clone.
|
||||||
|
<note>When you have a local Linux Yocto kernel Git repository, you can
|
||||||
|
reference that repository rather than the upstream Git repository as
|
||||||
|
part of the <filename>clone</filename> command.
|
||||||
|
Doing so can speed up the process.</note>
|
||||||
|
In the following example, the bare clone is named
|
||||||
|
<filename>linux-yocto-3.0-1.1.x.git</filename>, while the
|
||||||
|
copy is named <filename>my-linux-yocto-3.0-1.1.x-work</filename>:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ 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-1.1.x.git/
|
||||||
|
remote: Counting objects: 2259181, done.
|
||||||
|
remote: Compressing objects: 100% (373259/373259), done.
|
||||||
|
remote: Total 2259181 (delta 1892638), reused 2231556 (delta 1865300)
|
||||||
|
Receiving objects: 100% (2259181/2259181), 482.44 MiB | 580 KiB/s, done.
|
||||||
|
Resolving deltas: 100% (1892638/1892638), done.
|
||||||
|
</literallayout></para>
|
||||||
|
<para>Now create a clone of the bare clone just created:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ 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/my-linux-yocto-3.0-1.1.x/.git/
|
||||||
|
Checking out files: 100% (36898/36898), done.
|
||||||
|
</literallayout></para></listitem>
|
||||||
|
<listitem id='poky-extras-repo'><para><emphasis>
|
||||||
|
The <filename>poky-extras</filename> Git Repository</emphasis>:
|
||||||
|
The <filename>poky-extras</filename> Git repository contains metadata needed to
|
||||||
|
build the kernel image.
|
||||||
|
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
|
||||||
|
image.
|
||||||
|
Pointing to these local files is much more efficient than requiring a download of the
|
||||||
|
source files from upstream each time you make changes to the kernel.</para>
|
||||||
|
<para>It is good practice to create this Git repository inside the Yocto Project
|
||||||
|
files Git repository.
|
||||||
|
Following is an example that creates the <filename>poky-extras</filename> Git
|
||||||
|
repository inside the Yocto Project files Git repository, which is named
|
||||||
|
<filename>poky</filename> in this case:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ cd ~/poky
|
||||||
|
$ git clone git://git.yoctoproject.org/poky-extras poky-extras
|
||||||
|
Initialized empty Git repository in /home/scottrif/poky/poky-extras/.git/
|
||||||
|
remote: Counting objects: 561, done.
|
||||||
|
remote: Compressing objects: 100% (501/501), done.
|
||||||
|
remote: Total 561 (delta 159), reused 306 (delta 39)
|
||||||
|
Receiving objects: 100% (561/561), 519.96 KiB | 479 KiB/s, done.
|
||||||
|
Resolving deltas: 100% (159/159), done.
|
||||||
|
</literallayout></para></listitem>
|
||||||
|
<listitem><para><emphasis>Supported Board Support Packages (BSPs):</emphasis>
|
||||||
|
Similar considerations exist for BSPs.
|
||||||
|
You can get set up for BSP development one of two ways: tarball extraction or
|
||||||
|
with a local Git repository.
|
||||||
|
Regardless of the method you use, the Yocto Project uses the following BSP layer
|
||||||
|
naming scheme:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
meta-<BSP_name>
|
||||||
|
</literallayout>
|
||||||
|
where <BSP_name> is the recognized BSP name.
|
||||||
|
Here are some examples:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
meta-crownbay
|
||||||
|
meta-emenlow
|
||||||
|
meta-n450
|
||||||
|
</literallayout>
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><emphasis>Tarball Extraction:</emphasis> You can download any released
|
<listitem><para><emphasis>Tarball Extraction:</emphasis> You can download any released
|
||||||
BSP tarball from the same
|
BSP tarball from the same
|
||||||
<ulink url='http://yoctoproject.org/download'>download site</ulink>.
|
<ulink url='http://yoctoproject.org/download'>download site</ulink> used
|
||||||
Once you have the tarball just extract it into a directory of your choice.</para></listitem>
|
to get the Yocto Project release.
|
||||||
<listitem><para><emphasis>Git Method:</emphasis> For an example of how to integrate
|
Once you have the tarball, just extract it into a directory of your choice.
|
||||||
the metadata for BSPs into your local Yocto Project Git repository see this
|
Again, this method just produces a snapshot of the BSP layer in the form
|
||||||
|
of a hierarchical directory structure.</para></listitem>
|
||||||
|
<listitem><para><emphasis>Git Repository Method:</emphasis> If you are working
|
||||||
|
with a Yocto Project files Git repository, you should also set up a
|
||||||
|
<filename>meta-intel</filename> Git repository.
|
||||||
|
Typically, you set up the <filename>meta-intel</filename> Git repository inside
|
||||||
|
the Yocto Project files Git repository.</para>
|
||||||
|
<para>For example, the following transcript shows the steps to clone the
|
||||||
|
<filename>meta-intel</filename>
|
||||||
|
Git repository inside the <filename>poky</filename> Git repository.
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$cd poky
|
||||||
|
$ git clone git://git.yoctoproject.org/meta-intel.git
|
||||||
|
Initialized empty Git repository in /home/scottrif/poky/meta-intel/.git/
|
||||||
|
remote: Counting objects: 3279, done.
|
||||||
|
remote: Compressing objects: 100% (2708/2708), done.
|
||||||
|
remote: Total 3279 (delta 1761), reused 194 (delta 105)
|
||||||
|
Receiving objects: 100% (3279/3279), 1.75 MiB | 377 KiB/s, done.
|
||||||
|
Resolving deltas: 100% (1761/1761), done.
|
||||||
|
</literallayout></para>
|
||||||
|
<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'>
|
||||||
wiki page</ulink>, which covers how to check out the meta-intel repository.</para></listitem>
|
wiki page</ulink> referenced earlier covers how to
|
||||||
|
set up the <filename>meta-intel</filename> Git repository.</para></listitem>
|
||||||
</itemizedlist></para></listitem>
|
</itemizedlist></para></listitem>
|
||||||
<listitem><para><emphasis>Eclipse Yocto Plug-in:</emphasis> If you are developing using the
|
<listitem><para><emphasis>Eclipse Yocto Plug-in:</emphasis> If you are developing
|
||||||
Eclipse Integrated Development Environment (IDE) you will need this plug-in.
|
applications using the Eclipse Integrated Development Environment (IDE),
|
||||||
|
you will need this plug-in.
|
||||||
See the
|
See the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/adt-manual/adt-manual.html#setting-up-the-eclipse-ide'>
|
"<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>"
|
||||||
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>
|
||||||
</para>
|
</para>
|
||||||
@@ -105,8 +229,8 @@
|
|||||||
<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/yocto-quick-start/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>"
|
||||||
Building an Image</ulink> section in the Yocto Project Quick Start.
|
section in the Yocto Project Quick Start.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -116,13 +240,14 @@
|
|||||||
previous section.</para></listitem>
|
previous section.</para></listitem>
|
||||||
<listitem><para>Initialize the build environment by sourcing a build environment
|
<listitem><para>Initialize the build environment by sourcing a build environment
|
||||||
script.</para></listitem>
|
script.</para></listitem>
|
||||||
<listitem><para>Make sure 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 and other build configurations.</para></listitem>
|
This file defines the target machine architecture and other build options.</para></listitem>
|
||||||
<listitem><para>Build the image using the BitBake 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>Optionally, you can run the image in the QEMU emulator.</para></listitem>
|
<listitem><para>Run the image either on the actual hardware or using the QEMU
|
||||||
|
emulator.</para></listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -131,18 +256,19 @@
|
|||||||
<title>Using Pre-Built Binaries and QEMU</title>
|
<title>Using Pre-Built Binaries and QEMU</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Another option you have to get started is to use a pre-built binary.
|
Another option you have to get started is to use pre-built binaries.
|
||||||
This scenario is ideal for developing software applications to run on your target hardware.
|
This scenario is ideal for developing software applications to run on your target hardware.
|
||||||
To do this you need to install the stand-alone Yocto toolchain tarball and then download the
|
To do this, you need to install the stand-alone Yocto Project cross-toolchain tarball and
|
||||||
pre-built kernel that you will boot using the QEMU emulator.
|
then download the pre-built kernel that you will boot in the QEMU emulator.
|
||||||
Next, you must download the filesystem for your target machine’s architecture.
|
Next, you must download and extract the target root filesystem for your target
|
||||||
Finally, you set up the environment to emulate the hardware then start the emulator.
|
machine’s architecture.
|
||||||
|
Finally, you set up the environment to emulate the hardware and then start the QEMU emulator.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<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/yocto-quick-start/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>"
|
||||||
Using Pre-Built Binaries and QEMU</ulink> section in the Yocto Project Quick Start.
|
section of the Yocto Project Quick Start.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<imagedata fileref='figures/dev-title.png'
|
<imagedata fileref='figures/dev-title.png'
|
||||||
format='SVG'
|
format='SVG'
|
||||||
align='left' scalefit='1' width='100%'/>
|
align='left' scalefit='1' width='100%'/>
|
||||||
</imageobject>
|
</imageobject>
|
||||||
</mediaobject>
|
</mediaobject>
|
||||||
|
|
||||||
<title></title>
|
<title></title>
|
||||||
@@ -30,22 +30,37 @@
|
|||||||
<revhistory>
|
<revhistory>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>1.1</revnumber>
|
<revnumber>1.1</revnumber>
|
||||||
<date>TBD 2011</date>
|
<date>6 October 2011</date>
|
||||||
<revremark>This revision is the initial document draft and corresponds with
|
<revremark>The initial document released with the Yocto Project 1.1 Release.</revremark>
|
||||||
the Yocto Project 1.1 Release.</revremark>
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.1.1</revnumber>
|
||||||
|
<date>15 March 2012</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.1.1 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>2010-2011</year>
|
<year>2010-2012</year>
|
||||||
<holder>Linux Foundation</holder>
|
<holder>Linux Foundation</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
|
|
||||||
<legalnotice>
|
<legalnotice>
|
||||||
<para>
|
<para>
|
||||||
Permission is granted to copy, distribute and/or modify this document under
|
Permission is granted to copy, distribute and/or modify this document under
|
||||||
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England & Wales</ulink> as published by Creative Commons.
|
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">
|
||||||
|
Creative Commons Attribution-Share Alike 2.0 UK: England & Wales</ulink> as published by
|
||||||
|
Creative Commons.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<note>
|
||||||
|
Due to production processes, there could be differences between the Yocto Project
|
||||||
|
documentation bundled in the release tarball and
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>
|
||||||
|
The Yocto Project Development Manual</ulink> on
|
||||||
|
the <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink> website.
|
||||||
|
For the latest version of this manual, see the manual on the website.
|
||||||
|
</note>
|
||||||
</legalnotice>
|
</legalnotice>
|
||||||
|
|
||||||
</bookinfo>
|
</bookinfo>
|
||||||
@@ -58,12 +73,9 @@
|
|||||||
|
|
||||||
<xi:include href="dev-manual-model.xml"/>
|
<xi:include href="dev-manual-model.xml"/>
|
||||||
|
|
||||||
<xi:include href="dev-manual-cases.xml"/>
|
<xi:include href="dev-manual-bsp-appendix.xml"/>
|
||||||
|
|
||||||
<!-- <index id='index'>
|
<xi:include href="dev-manual-kernel-appendix.xml"/>
|
||||||
<title>Index</title>
|
|
||||||
</index>
|
|
||||||
-->
|
|
||||||
|
|
||||||
</book>
|
</book>
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
BIN
documentation/dev-manual/figures/app-dev-flow.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
documentation/dev-manual/figures/bsp-dev-flow.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
documentation/dev-manual/figures/git-workflow.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
documentation/dev-manual/figures/index-downloads.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
documentation/dev-manual/figures/kernel-dev-flow.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
documentation/dev-manual/figures/kernel-example-repos-edison.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
documentation/dev-manual/figures/kernel-overview-1.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
documentation/dev-manual/figures/kernel-overview-2.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
documentation/dev-manual/figures/kernel-overview-3-edison.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
documentation/dev-manual/figures/source-repos.png
Normal file
|
After Width: | Height: | Size: 185 KiB |
BIN
documentation/dev-manual/figures/wip.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
documentation/dev-manual/figures/yp-download.png
Normal file
|
After Width: | Height: | Size: 116 KiB |
@@ -46,12 +46,14 @@
|
|||||||
the baseline kernel is the most stable official release.</para></listitem>
|
the baseline kernel is the most stable official release.</para></listitem>
|
||||||
<listitem><para>Include major technological features as part of Yocto Project's up-rev
|
<listitem><para>Include major technological features as part of Yocto Project's up-rev
|
||||||
strategy.</para></listitem>
|
strategy.</para></listitem>
|
||||||
<listitem><para>Present a Git tree, that just like the upstream kernel.org tree, has a
|
<listitem><para>Present a kernel Git repository that, similar to the upstream
|
||||||
clear and continuous history.</para></listitem>
|
<filename>kernel.org</filename> tree,
|
||||||
|
has a clear and continuous history.</para></listitem>
|
||||||
<listitem><para>Deliver a key set of supported kernel types, where each type is tailored
|
<listitem><para>Deliver a key set of supported kernel types, where each type is tailored
|
||||||
to a specific use case (i.e. networking, consumer, devices, and so forth).</para></listitem>
|
to a specific use case (e.g. networking, consumer, devices, and so forth).</para></listitem>
|
||||||
<listitem><para>Employ a Git branching strategy that from a customer's point of view
|
<listitem><para>Employ a Git branching strategy that, from a developer's point of view,
|
||||||
results in a linear path from the baseline kernel.org, through a select group of features and
|
results in a linear path from the baseline <filename>kernel.org</filename>,
|
||||||
|
through a select group of features and
|
||||||
ends with their BSP-specific commits.</para></listitem>
|
ends with their BSP-specific commits.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
@@ -60,27 +62,29 @@
|
|||||||
<section id='kernel-big-picture'>
|
<section id='kernel-big-picture'>
|
||||||
<title>Yocto Project Kernel Development and Maintenance Overview</title>
|
<title>Yocto Project Kernel Development and Maintenance Overview</title>
|
||||||
<para>
|
<para>
|
||||||
Yocto Project kernel, like other kernels, is based off the Linux kernel release
|
The Yocto Project kernel, like other kernels, is based off the Linux kernel release
|
||||||
from <ulink url='http://www.kernel.org'></ulink>.
|
from <ulink url='http://www.kernel.org'></ulink>.
|
||||||
At the beginning of our major development cycle, we choose our Yocto Project kernel
|
At the beginning of a major development cycle, the Yocto Project team
|
||||||
based on factors like release timing, the anticipated release timing of "final" (i.e. non "rc")
|
chooses its Yocto Project kernel
|
||||||
upstream kernel.org versions, and Yocto Project feature requirements.
|
based on factors like release timing, the anticipated release timing of final
|
||||||
Typically this will be a kernel that is in the
|
upstream <filename>kernel.org</filename> versions, and Yocto Project feature requirements.
|
||||||
final stages of development by the community (i.e. still in the release
|
Typically, the kernel chosen is in the
|
||||||
candidate or "rc" phase) and not yet a final release.
|
final stages of development by the community.
|
||||||
But by being in the final stages of external development, we know that the
|
In other words, the kernel is in the release
|
||||||
kernel.org final release will clearly land within the early stages of
|
candidate or "rc" phase and not yet a final release.
|
||||||
|
But, by being in the final stages of external development, the team knows that the
|
||||||
|
<filename>kernel.org</filename> final release will clearly be within the early stages of
|
||||||
the Yocto Project development window.
|
the Yocto Project development window.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
This balance allows us to deliver the most up-to-date kernel
|
This balance allows the team to deliver the most up-to-date kernel
|
||||||
as possible, while still ensuring that we have a stable official release as
|
as possible, while still ensuring that the team has a stable official release as
|
||||||
our baseline kernel version.
|
the baseline kernel version.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The ultimate source for the Yocto Project kernel is a released kernel
|
The ultimate source for the Yocto Project kernel is a released kernel
|
||||||
from kernel.org.
|
from <filename>kernel.org</filename>.
|
||||||
In addition to a foundational kernel from kernel.org the released
|
In addition to a foundational kernel from <filename>kernel.org</filename>, the released
|
||||||
Yocto Project kernel contains a mix of important new mainline
|
Yocto Project kernel contains a mix of important new mainline
|
||||||
developments, non-mainline developments (when there is no alternative),
|
developments, non-mainline developments (when there is no alternative),
|
||||||
Board Support Package (BSP) developments,
|
Board Support Package (BSP) developments,
|
||||||
@@ -88,37 +92,21 @@
|
|||||||
These additions result in a commercially released Yocto Project kernel that caters
|
These additions result in a commercially released Yocto Project kernel that caters
|
||||||
to specific embedded designer needs for targeted hardware.
|
to specific embedded designer needs for targeted hardware.
|
||||||
</para>
|
</para>
|
||||||
<!-- <para>
|
|
||||||
The following figure represents the overall place the Yocto Project kernel fills.
|
|
||||||
</para>
|
|
||||||
<para>
|
<para>
|
||||||
<imagedata fileref="figures/kernel-big-picture.png" width="6in" depth="6in" align="center" scale="100" />
|
Once a Yocto Project kernel is officially released, the Yocto Project team goes into
|
||||||
</para>
|
their next development cycle, or "uprev" cycle, while still continuing maintenance on the
|
||||||
<para>
|
|
||||||
In the figure the ultimate source for the Yocto Project kernel is a released kernel
|
|
||||||
from kernel.org.
|
|
||||||
In addition to a foundational kernel from kernel.org the commercially released
|
|
||||||
Yocto Project kernel contains a mix of important new mainline
|
|
||||||
developments, non-mainline developments, Board Support Package (BSP) developments,
|
|
||||||
and custom features.
|
|
||||||
These additions result in a commercially released Yocto Project kernel that caters
|
|
||||||
to specific embedded designer needs for targeted hardware.
|
|
||||||
</para> -->
|
|
||||||
<para>
|
|
||||||
Once a Yocto Project kernel is officially released the Yocto Project team goes into
|
|
||||||
their next development cycle, or "uprev" cycle while continuing maintenance on the
|
|
||||||
released kernel.
|
released kernel.
|
||||||
It is important to note that the most sustainable and stable way
|
It is important to note that the most sustainable and stable way
|
||||||
to include feature development upstream is through a kernel uprev process.
|
to include feature development upstream is through a kernel uprev process.
|
||||||
Back-porting of hundreds of individual fixes and minor features from various
|
Back-porting hundreds of individual fixes and minor features from various
|
||||||
kernel versions is not sustainable and can easily compromise quality.
|
kernel versions is not sustainable and can easily compromise quality.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
During the uprev cycle, the Yocto Project team uses an ongoing analysis of
|
During the uprev cycle, the Yocto Project team uses an ongoing analysis of
|
||||||
kernel development, BSP support, and release timing to select the best
|
kernel development, BSP support, and release timing to select the best
|
||||||
possible kernel.org version.
|
possible <filename>kernel.org</filename> version.
|
||||||
The team continually monitors community kernel
|
The team continually monitors community kernel
|
||||||
development to look for significant features of interest.
|
development to look for significant features of interest.
|
||||||
<!-- The illustration depicts this by showing the team looking back to kernel.org for new features,
|
|
||||||
BSP features, and significant bug fixes. -->
|
|
||||||
The team does consider back-porting large features if they have a significant advantage.
|
The team does consider back-porting large features if they have a significant advantage.
|
||||||
User or community demand can also trigger a back-port or creation of new
|
User or community demand can also trigger a back-port or creation of new
|
||||||
functionality in the Yocto Project baseline kernel during the uprev cycle.
|
functionality in the Yocto Project baseline kernel during the uprev cycle.
|
||||||
@@ -130,7 +118,7 @@
|
|||||||
It is the Yocto Project team's policy to not back-port minor features to the released kernel.
|
It is the Yocto Project team's policy to not back-port minor features to the released kernel.
|
||||||
They only consider back-porting significant technological jumps - and, that is done
|
They only consider back-porting significant technological jumps - and, that is done
|
||||||
after a complete gap analysis.
|
after a complete gap analysis.
|
||||||
The reason for this policy is that simply back-porting any small to medium sized change
|
The reason for this policy is that back-porting any small to medium sized change
|
||||||
from an evolving kernel can easily create mismatches, incompatibilities and very
|
from an evolving kernel can easily create mismatches, incompatibilities and very
|
||||||
subtle errors.
|
subtle errors.
|
||||||
</para>
|
</para>
|
||||||
@@ -163,18 +151,23 @@
|
|||||||
As mentioned earlier, a key goal of Yocto Project is to present the developer with
|
As mentioned earlier, a key goal of Yocto Project is to present the developer with
|
||||||
a kernel that has a clear and continuous history that is visible to the user.
|
a kernel that has a clear and continuous history that is visible to the user.
|
||||||
The architecture and mechanisms used achieve that goal in a manner similar to the
|
The architecture and mechanisms used achieve that goal in a manner similar to the
|
||||||
upstream kernel.org.
|
upstream <filename>kernel.org</filename>.
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
You can think of the Yocto Project kernel as consisting of a baseline kernel with
|
You can think of the Yocto Project kernel as consisting of a baseline kernel with
|
||||||
added features logically structured on top of the baseline.
|
added features logically structured on top of the baseline.
|
||||||
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
|
||||||
|
"<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/1.1.1/dev-manual/dev-manual.html'>The
|
||||||
|
Yocto Project Development Manual</ulink>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
The result is that the user has the ability to see the added features and
|
The result is that the user has the ability to see the added features and
|
||||||
the commits that make up those features.
|
the commits that make up those features.
|
||||||
In addition to being able to see added features, the user can also view the history of what
|
In addition to being able to see added features, the user can also view the history of what
|
||||||
made up the baseline kernel as well.
|
made up the baseline kernel.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The following illustration shows the conceptual Yocto Project kernel.
|
The following illustration shows the conceptual Yocto Project kernel.
|
||||||
@@ -183,18 +176,20 @@
|
|||||||
<imagedata fileref="figures/kernel-architecture-overview.png" width="6in" depth="7in" align="center" scale="100" />
|
<imagedata fileref="figures/kernel-architecture-overview.png" width="6in" depth="7in" align="center" scale="100" />
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
In the illustration, the "kernel.org Branch Point" marks the specific spot (or release) from
|
In the illustration, the "<filename>kernel.org</filename> Branch Point"
|
||||||
which the Yocto Project kernel is created. From this point "up" in the tree features and
|
marks the specific spot (or release) from
|
||||||
differences are organized and tagged.
|
which the Yocto Project kernel is created.
|
||||||
|
From this point "up" in the tree, features and differences are organized and tagged.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The "Yocto Project Baseline Kernel" contains functionality that is common to every kernel
|
The "Yocto Project Baseline Kernel" contains functionality that is common to every kernel
|
||||||
type and BSP that is organized further up the tree. Placing these common features in the
|
type and BSP that is organized further up the tree.
|
||||||
|
Placing these common features in the
|
||||||
tree this way means features don't have to be duplicated along individual branches of the
|
tree this way means features don't have to be duplicated along individual branches of the
|
||||||
structure.
|
structure.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
From the Yocto Project Baseline Kernel branch points represent specific functionality
|
From the Yocto Project Baseline Kernel, branch points represent specific functionality
|
||||||
for individual BSPs as well as real-time kernels.
|
for individual BSPs as well as real-time kernels.
|
||||||
The illustration represents this through three BSP-specific branches and a real-time
|
The illustration represents this through three BSP-specific branches and a real-time
|
||||||
kernel branch.
|
kernel branch.
|
||||||
@@ -209,8 +204,9 @@
|
|||||||
kernel as they apply to a given BSP.
|
kernel as they apply to a given BSP.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The resulting tree structure presents a clear path of markers (or branches) to the user
|
The resulting tree structure presents a clear path of markers (or branches) to the
|
||||||
that for all practical purposes is the kernel needed for any given set of requirements.
|
developer that, for all practical purposes, is the kernel needed for any given set
|
||||||
|
of requirements.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -221,50 +217,52 @@
|
|||||||
no longer shared and thus, needs to be isolated.
|
no longer shared and thus, needs to be isolated.
|
||||||
For example, board-specific incompatibilities would require different functionality
|
For example, board-specific incompatibilities would require different functionality
|
||||||
and would require a branch to separate the features.
|
and would require a branch to separate the features.
|
||||||
Likewise, for specific kernel features the same branching strategy is used.
|
Likewise, for specific kernel features, the same branching strategy is used.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
This branching strategy results in a tree that has features organized to be specific
|
This branching strategy results in a tree that has features organized to be specific
|
||||||
for particular functionality, single kernel types, or a subset of kernel types.
|
for particular functionality, single kernel types, or a subset of kernel types.
|
||||||
This strategy results in not having to store the same feature twice internally in the
|
This strategy also results in not having to store the same feature twice
|
||||||
tree.
|
internally in the tree.
|
||||||
Rather we store the unique differences required to apply the feature onto the kernel type
|
Rather, the kernel team stores the unique differences required to apply the
|
||||||
in question.
|
feature onto the kernel type in question.
|
||||||
|
<note>
|
||||||
|
The Yocto Project team strives to place features in the tree such that they can be
|
||||||
|
shared by all boards and kernel types where possible.
|
||||||
|
However, during development cycles or when large features are merged,
|
||||||
|
the team cannot always follow this practice.
|
||||||
|
In those cases, the team uses isolated branches to merge features.
|
||||||
|
</note>
|
||||||
</para>
|
</para>
|
||||||
<note><para>
|
|
||||||
The Yocto Project team strives to place features in the tree such that they can be
|
|
||||||
shared by all boards and kernel types where possible.
|
|
||||||
However, during development cycles or when large features are merged this practice
|
|
||||||
cannot always be followed.
|
|
||||||
In those cases isolated branches are used for feature merging.
|
|
||||||
</para></note>
|
|
||||||
<para>
|
<para>
|
||||||
BSP-specific code additions are handled in a similar manner to kernel-specific additions.
|
BSP-specific code additions are handled in a similar manner to kernel-specific additions.
|
||||||
Some BSPs only make sense given certain kernel types.
|
Some BSPs only make sense given certain kernel types.
|
||||||
So, for these types, we create branches off the end of that kernel type for all
|
So, for these types, the team creates branches off the end of that kernel type for all
|
||||||
of the BSPs that are supported on that kernel type.
|
of the BSPs that are supported on that kernel type.
|
||||||
From the perspective of the tools that create the BSP branch, the BSP is really no
|
From the perspective of the tools that create the BSP branch, the BSP is really no
|
||||||
different than a feature.
|
different than a feature.
|
||||||
Consequently, the same branching strategy applies to BSPs as it does to features.
|
Consequently, the same branching strategy applies to BSPs as it does to features.
|
||||||
So again, rather than store the BSP twice, only the unique differences for the BSP across
|
So again, rather than store the BSP twice, the team only stores the unique
|
||||||
the supported multiple kernels are uniquely stored.
|
differences for the BSP across the supported multiple kernels.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
While this strategy can result in a tree with a significant number of branches, it is
|
While this strategy can result in a tree with a significant number of branches, it is
|
||||||
important to realize that from the user's point of view, there is a linear
|
important to realize that from the developer's point of view, there is a linear
|
||||||
path that travels from the baseline kernel.org, through a select group of features and
|
path that travels from the baseline <filename>kernel.org</filename>, through a select
|
||||||
ends with their BSP-specific commits.
|
group of features and ends with their BSP-specific commits.
|
||||||
In other words, the divisions of the kernel are transparent and are not relevant
|
In other words, the divisions of the kernel are transparent and are not relevant
|
||||||
to the developer on a day-to-day basis.
|
to the developer on a day-to-day basis.
|
||||||
From the user's perspective, this is the "master" branch.
|
From the developer's perspective, this path is the "master" branch.
|
||||||
They do not need not be aware of the existence of any other branches at all.
|
The developer does not need not be aware of the existence of any other branches at all.
|
||||||
Of course there is value in the existence of these branches
|
Of course, there is value in the existence of these branches
|
||||||
in the tree, should a person decide to explore them.
|
in the tree, should a person decide to explore them.
|
||||||
For example, a comparison between two BSPs at either the commit level or at the line-by-line
|
For example, a comparison between two BSPs at either the commit level or at the line-by-line
|
||||||
code diff level is now a trivial operation.
|
code <filename>diff</filename> level is now a trivial operation.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Working with the kernel as a structured tree follows recognized community best practices.
|
Working with the kernel as a structured tree follows recognized community best practices.
|
||||||
In particular, the kernel as shipped with the product should be
|
In particular, the kernel as shipped with the product, should be
|
||||||
considered an 'upstream source' and viewed as a series of
|
considered an "upstream source" and viewed as a series of
|
||||||
historical and documented modifications (commits).
|
historical and documented modifications (commits).
|
||||||
These modifications represent the development and stabilization done
|
These modifications represent the development and stabilization done
|
||||||
by the Yocto Project kernel development team.
|
by the Yocto Project kernel development team.
|
||||||
@@ -273,7 +271,7 @@
|
|||||||
Because commits only change at significant release points in the product life cycle,
|
Because commits only change at significant release points in the product life cycle,
|
||||||
developers can work on a branch created
|
developers can work on a branch created
|
||||||
from the last relevant commit in the shipped Yocto Project kernel.
|
from the last relevant commit in the shipped Yocto Project kernel.
|
||||||
As mentioned previously, the structure is transparent to the user
|
As mentioned previously, the structure is transparent to the developer
|
||||||
because the kernel tree is left in this state after cloning and building the kernel.
|
because the kernel tree is left in this state after cloning and building the kernel.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -281,20 +279,26 @@
|
|||||||
<section id='source-code-manager-git'>
|
<section id='source-code-manager-git'>
|
||||||
<title>Source Code Manager - Git</title>
|
<title>Source Code Manager - Git</title>
|
||||||
<para>
|
<para>
|
||||||
The Source Code Manager (SCM) is Git and it is the obvious mechanism for meeting the
|
The Source Code Manager (SCM) is Git.
|
||||||
previously mentioned goals.
|
This SCM is the obvious mechanism for meeting the previously mentioned goals.
|
||||||
Not only is it the SCM for kernel.org but Git continues to grow in popularity and
|
Not only is it the SCM for <filename>kernel.org</filename> but,
|
||||||
supports many different work flows, front-ends and management techniques.
|
Git continues to grow in popularity and supports many different work flows,
|
||||||
|
front-ends and management techniques.
|
||||||
</para>
|
</para>
|
||||||
<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>.
|
||||||
Also, the Yocto Project Development manual has an introduction to Git and describes a
|
You can also get an introduction to Git as it applies to the Yocto Project in the
|
||||||
minimal set of commands that allow you to be functional with Git.
|
"<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/1.1.1/dev-manual/dev-manual.html'>The
|
||||||
|
Yocto Project Development Manual</ulink>.
|
||||||
|
This section overviews Git and describes a minimal set of commands that allow you to be
|
||||||
|
functional using Git.
|
||||||
|
<note>
|
||||||
|
You can use as much, or as little, of what Git has to offer to accomplish what
|
||||||
|
you need for your project.
|
||||||
|
You do not have to be a "Git Master" in order to use it with the Yocto Project.
|
||||||
|
</note>
|
||||||
</para>
|
</para>
|
||||||
<note><para>
|
|
||||||
It should be noted that you can use as much, or as little, of what Git has to offer
|
|
||||||
as is appropriate to your project.
|
|
||||||
</para></note>
|
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -307,17 +311,19 @@
|
|||||||
present a simplified view of the kernel for ease of use.
|
present a simplified view of the kernel for ease of use.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The fundamental properties of the tools that manage and construct the
|
Fundamentally, the kernel tools that manage and construct the
|
||||||
Yocto Project kernel are:
|
Yocto Project kernel accomplish the following:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>Group patches into named, reusable features.</para></listitem>
|
<listitem><para>Group patches into named, reusable features.</para></listitem>
|
||||||
<listitem><para>Allow top down control of included features.</para></listitem>
|
<listitem><para>Allow top-down control of included features.</para></listitem>
|
||||||
<listitem><para>Bind kernel configuration to kernel patches and features.</para></listitem>
|
<listitem><para>Bind kernel configurations to kernel patches and features.</para></listitem>
|
||||||
<listitem><para>Present a seamless Git repository that blends Yocto Project value
|
<listitem><para>Present a seamless Git repository that blends Yocto Project value
|
||||||
with the kernel.org history and development.</para></listitem>
|
with the <filename>kernel.org</filename> history and development.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
<!--<para>
|
<!--<para>
|
||||||
|
WRITER NOTE: Put this in for post 1.1 if possible:
|
||||||
|
|
||||||
The tools that construct a kernel tree will be discussed later in this
|
The tools that construct a kernel tree will be discussed later in this
|
||||||
document. The following tools form the foundation of the Yocto Project
|
document. The following tools form the foundation of the Yocto Project
|
||||||
kernel toolkit:
|
kernel toolkit:
|
||||||
|
|||||||
@@ -20,17 +20,20 @@
|
|||||||
on its history, organization, benefits, and use.
|
on its history, organization, benefits, and use.
|
||||||
The manual consists of two sections:
|
The manual consists of two sections:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>Concepts - Describes concepts behind the kernel.
|
<listitem><para><emphasis>Concepts:</emphasis> Describes concepts behind the kernel.
|
||||||
You will understand how the kernel is organized and why it is organized in
|
You will understand how the kernel is organized and why it is organized in
|
||||||
the way it is. You will understand the benefits of the kernel's organization
|
the way it is. You will understand the benefits of the kernel's organization
|
||||||
and the mechanisms used to work with the kernel and how to apply it in your
|
and the mechanisms used to work with the kernel and how to apply it in your
|
||||||
design process.</para></listitem>
|
design process.</para></listitem>
|
||||||
<listitem><para>Using the Kernel - Describes best practices and "how-to" information
|
<listitem><para><emphasis>Using the Kernel:</emphasis> Describes best practices
|
||||||
that lets you put the kernel to practical use. Some examples are "How to Build a
|
and "how-to" information
|
||||||
Project Specific Tree", "How to Examine Changes in a Branch", and "Saving Kernel
|
that lets you put the kernel to practical use.
|
||||||
Modifications."</para></listitem>
|
Some examples are "How to Build a
|
||||||
|
Project Specific Tree", "How to Examine Changes in a Branch", and "How to
|
||||||
|
Save Kernel Modifications."</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
For more information on the kernel, see the following links:
|
For more information on the kernel, see the following links:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
@@ -38,10 +41,19 @@
|
|||||||
<listitem><para><ulink url='http://userweb.kernel.org/~akpm/stuff/tpp.txt'></ulink></para></listitem>
|
<listitem><para><ulink url='http://userweb.kernel.org/~akpm/stuff/tpp.txt'></ulink></para></listitem>
|
||||||
<listitem><para><ulink url='http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Documentation/HOWTO;hb=HEAD'></ulink></para></listitem>
|
<listitem><para><ulink url='http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Documentation/HOWTO;hb=HEAD'></ulink></para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
<para>
|
</para>
|
||||||
You can find more information on Yocto Project by visiting the website at
|
|
||||||
|
<para>
|
||||||
|
For more discussion on the Yocto Project kernel, you can also see the
|
||||||
|
"<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/1.1.1/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#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'>The Yocto Project Development Manual</ulink>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For general information on the Yocto Project, visit the website at
|
||||||
<ulink url='http://www.yoctoproject.org'></ulink>.
|
<ulink url='http://www.yoctoproject.org'></ulink>.
|
||||||
</para>
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@@ -31,23 +31,32 @@
|
|||||||
<revision>
|
<revision>
|
||||||
<revnumber>0.9</revnumber>
|
<revnumber>0.9</revnumber>
|
||||||
<date>24 November 2010</date>
|
<date>24 November 2010</date>
|
||||||
<revremark>This revision is the initial document draft and corresponds with
|
<revremark>The initial document draft released with the Yocto Project 0.9 Release.</revremark>
|
||||||
the Yocto Project 0.9 Release.</revremark>
|
|
||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>1.0</revnumber>
|
<revnumber>1.0</revnumber>
|
||||||
<date>6 April 2011</date>
|
<date>6 April 2011</date>
|
||||||
<revremark>This revision corresponds with the Yocto Project 1.0 Release.</revremark>
|
<revremark>Released with the Yocto Project 1.0 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>1.0.1</revnumber>
|
<revnumber>1.0.1</revnumber>
|
||||||
<date>23 May 2011</date>
|
<date>23 May 2011</date>
|
||||||
<revremark>Released with Yocto Project 1.0.1 on 23 May 2011.</revremark>
|
<revremark>Released with the Yocto Project 1.0.1 Release.</revremark>
|
||||||
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.1</revnumber>
|
||||||
|
<date>6 October 2011</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.1 Release.</revremark>
|
||||||
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.1.1</revnumber>
|
||||||
|
<date>15 March 2012</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.1.1 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>2010-2011</year>
|
<year>2010-2012</year>
|
||||||
<holder>Linux Foundation</holder>
|
<holder>Linux Foundation</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
|
|
||||||
@@ -56,6 +65,14 @@
|
|||||||
Permission is granted to copy, distribute and/or modify this document under
|
Permission is granted to copy, distribute and/or modify this document under
|
||||||
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England & Wales</ulink> as published by Creative Commons.
|
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England & Wales</ulink> as published by Creative Commons.
|
||||||
</para>
|
</para>
|
||||||
|
<note>
|
||||||
|
Due to production processes, there could be differences between the Yocto Project
|
||||||
|
documentation bundled in the release tarball and
|
||||||
|
<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 <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink> website.
|
||||||
|
For the latest version of this manual, see the manual on the website.
|
||||||
|
</note>
|
||||||
</legalnotice>
|
</legalnotice>
|
||||||
|
|
||||||
</bookinfo>
|
</bookinfo>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
DESCRIPTION = "GNU Helloworld application"
|
DESCRIPTION = "GNU Helloworld application"
|
||||||
SECTION = "examples"
|
SECTION = "examples"
|
||||||
LICENSE = "GPLv3"
|
LICENSE = "GPLv3"
|
||||||
|
LIC_FILES_CHKSUM = "file://COPYING;md5=adefda309052235aa5d1e99ce7557010"
|
||||||
|
|
||||||
SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.bz2"
|
SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.bz2"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
DESCRIPTION = "Simple helloworld application"
|
DESCRIPTION = "Simple helloworld application"
|
||||||
SECTION = "examples"
|
SECTION = "examples"
|
||||||
LICENSE = "MIT"
|
LICENSE = "MIT"
|
||||||
|
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||||
|
|
||||||
SRC_URI = "file://helloworld.c"
|
SRC_URI = "file://helloworld.c"
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ require xorg-lib-common.inc
|
|||||||
|
|
||||||
DESCRIPTION = "X11 Pixmap library"
|
DESCRIPTION = "X11 Pixmap library"
|
||||||
LICENSE = "X-BSD"
|
LICENSE = "X-BSD"
|
||||||
|
LIC_FILES_CHKSUM = "file://COPYING;md5=3e07763d16963c3af12db271a31abaa5"
|
||||||
DEPENDS += "libxext"
|
DEPENDS += "libxext"
|
||||||
PR = "r2"
|
PR = "r2"
|
||||||
PE = "1"
|
PE = "1"
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ SECTION = "base"
|
|||||||
DEPENDS = "zlib"
|
DEPENDS = "zlib"
|
||||||
HOMEPAGE = "http://www.linux-mtd.infradead.org/"
|
HOMEPAGE = "http://www.linux-mtd.infradead.org/"
|
||||||
LICENSE = "GPLv2"
|
LICENSE = "GPLv2"
|
||||||
|
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
|
||||||
|
file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
|
||||||
|
|
||||||
SRC_URI = "ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-${PV}.tar.gz"
|
SRC_URI = "ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-${PV}.tar.gz"
|
||||||
|
|
||||||
|
|||||||
@@ -12,24 +12,20 @@
|
|||||||
</question>
|
</question>
|
||||||
<answer>
|
<answer>
|
||||||
<para>
|
<para>
|
||||||
Poky is a derivative of <ulink
|
Poky is the Yocto Project build system that was derived from <ulink
|
||||||
url='http://www.openembedded.org/'>OpenEmbedded</ulink>, a stable,
|
url='http://www.openembedded.org/'>OpenEmbedded</ulink>.
|
||||||
smaller subset focused on the GNOME Mobile environment. Development
|
Poky is a stable, smaller subset focused on the mobile environment.
|
||||||
in Poky is closely tied to OpenEmbedded with features being merged
|
Development in the Yocto Project using Poky is closely tied to OpenEmbedded with
|
||||||
regularly between the two for mutual benefit.
|
features being merged regularly between the two for mutual benefit.
|
||||||
</para>
|
</para>
|
||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<qandaentry>
|
<qandaentry>
|
||||||
<question>
|
<question>
|
||||||
<para>
|
<para>
|
||||||
I only have Python 2.4 or 2.5 but BitBake requires Python 2.6 or 2.7.
|
I only have Python 2.4 or 2.5 but BitBake requires Python 2.6 or 2.7.
|
||||||
Can I still use Poky?
|
Can I still use the Yocto Project?
|
||||||
</para>
|
</para>
|
||||||
</question>
|
</question>
|
||||||
<answer>
|
<answer>
|
||||||
@@ -37,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://autobuilder.yoctoproject.org/downloads/miscsupport/yocto-1.0-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://autobuilder.yoctoproject.org/downloads/miscsupport/yocto-1.0-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>
|
||||||
@@ -57,10 +53,6 @@
|
|||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<qandaentry>
|
<qandaentry>
|
||||||
<question>
|
<question>
|
||||||
<para>
|
<para>
|
||||||
@@ -70,216 +62,221 @@
|
|||||||
<answer>
|
<answer>
|
||||||
<para>
|
<para>
|
||||||
There are three areas that help with stability;
|
There are three areas that help with stability;
|
||||||
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
We keep Poky small and focused - around 650 packages compared to over 5000 for full OE
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
We only support hardware that we have access to for testing
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
We have an autobuilder which provides continuous build and integration tests
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</answer>
|
|
||||||
</qandaentry>
|
|
||||||
<qandaentry>
|
|
||||||
<question>
|
|
||||||
<para>
|
|
||||||
How do I get support for my board added to Poky?
|
|
||||||
</para>
|
|
||||||
</question>
|
|
||||||
<answer>
|
|
||||||
<para>
|
|
||||||
There are two main ways to get a board supported in Poky;
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Send us the board if we don't have it yet
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Send us BitBake recipes if you have them (see the Poky handbook to find out how to create recipes)
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
Usually if it's not a completely exotic board then adding support in Poky should be fairly straightforward.
|
|
||||||
</para>
|
|
||||||
</answer>
|
|
||||||
</qandaentry>
|
|
||||||
<qandaentry>
|
|
||||||
<question>
|
|
||||||
<para>
|
|
||||||
Are there any products running poky ?
|
|
||||||
</para>
|
|
||||||
</question>
|
|
||||||
<answer>
|
|
||||||
<para>
|
|
||||||
The <ulink url='http://vernier.com/labquest/'>Vernier Labquest</ulink> is using Poky (for more about the Labquest see the case study at OpenedHand). There are a number of pre-production devices using Poky and we will announce those as soon as they are released.
|
|
||||||
</para>
|
|
||||||
</answer>
|
|
||||||
</qandaentry>
|
|
||||||
<qandaentry>
|
|
||||||
<question>
|
|
||||||
<para>
|
|
||||||
What is the Poky output ?
|
|
||||||
</para>
|
|
||||||
</question>
|
|
||||||
<answer>
|
|
||||||
<para>
|
|
||||||
The output of a Poky build will depend on how it was started, as the same set of recipes can be used to output various formats. Usually the output is a flashable image ready for the target device.
|
|
||||||
</para>
|
|
||||||
</answer>
|
|
||||||
</qandaentry>
|
|
||||||
<qandaentry>
|
|
||||||
<question>
|
|
||||||
<para>
|
|
||||||
How do I add my package to Poky?
|
|
||||||
</para>
|
|
||||||
</question>
|
|
||||||
<answer>
|
|
||||||
<para>
|
|
||||||
To add a package you need to create a BitBake recipe - see the Poky handbook to find out how to create a recipe.
|
|
||||||
</para>
|
|
||||||
</answer>
|
|
||||||
</qandaentry>
|
|
||||||
<qandaentry>
|
|
||||||
<question>
|
|
||||||
<para>
|
|
||||||
Do I have to reflash my entire board with a new poky image when recompiling a package?
|
|
||||||
</para>
|
|
||||||
</question>
|
|
||||||
<answer>
|
|
||||||
<para>
|
|
||||||
Poky can build packages in various formats, ipk (for ipkg/opkg), Debian package (.deb), or RPM. The packages can then be upgraded using the package tools on the device, much like on a desktop distribution like Ubuntu or Fedora.
|
|
||||||
</para>
|
|
||||||
</answer>
|
|
||||||
</qandaentry>
|
|
||||||
<qandaentry>
|
|
||||||
<question>
|
|
||||||
<para>
|
|
||||||
What is GNOME Mobile? What's the difference between GNOME Mobile and GNOME?
|
|
||||||
</para>
|
|
||||||
</question>
|
|
||||||
<answer>
|
|
||||||
<para>
|
|
||||||
<ulink url='http://www.gnome.org/mobile/'>GNOME Mobile</ulink> is a subset of the GNOME platform targeted at mobile and embedded devices. The the main difference between GNOME Mobile and standard GNOME is that desktop-orientated libraries have been removed, along with deprecated libraries, creating a much smaller footprint.
|
|
||||||
</para>
|
|
||||||
</answer>
|
|
||||||
</qandaentry>
|
|
||||||
<qandaentry>
|
|
||||||
<question>
|
|
||||||
<para>
|
|
||||||
I see the error 'chmod: XXXXX new permissions are r-xrwxrwx, not r-xr-xr-x'. What's wrong?
|
|
||||||
</para>
|
|
||||||
</question>
|
|
||||||
<answer>
|
|
||||||
<para>
|
|
||||||
You're probably running the build on an NTFS filesystem. Use a sane one like ext2/3/4 instead!
|
|
||||||
</para>
|
|
||||||
</answer>
|
|
||||||
</qandaentry>
|
|
||||||
<qandaentry>
|
|
||||||
<question>
|
|
||||||
<para>
|
|
||||||
How do I make Poky work in RHEL/CentOS?
|
|
||||||
</para>
|
|
||||||
</question>
|
|
||||||
<answer>
|
|
||||||
<para>
|
|
||||||
To get Poky working under RHEL/CentOS 5.1 you need to first install some required packages. The standard CentOS packages needed are:
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem><para>The Yocto Project team keeps Poky small and focused.
|
||||||
<para>
|
It contains around 650 packages as compared to over 5000 for full
|
||||||
"Development tools" (selected during installation)
|
OpenEmbedded.</para></listitem>
|
||||||
</para>
|
<listitem><para>The Yocto Project only supports hardware that the
|
||||||
</listitem>
|
team has access to for testing.</para></listitem>
|
||||||
<listitem>
|
<listitem><para>The Yocto Project uses an an autobuilder,
|
||||||
<para>
|
which provides continuous build and integration tests.</para></listitem>
|
||||||
texi2html
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</answer>
|
||||||
<listitem>
|
</qandaentry>
|
||||||
<para>
|
|
||||||
compat-gcc-34
|
<qandaentry>
|
||||||
</para>
|
<question>
|
||||||
</listitem>
|
<para>
|
||||||
|
How do I get support for my board added to the Yocto Project?
|
||||||
|
</para>
|
||||||
|
</question>
|
||||||
|
<answer>
|
||||||
|
<para>
|
||||||
|
There are two main ways to get a board supported in the Yocto Project;
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>Send the Yocto Project team information on the board
|
||||||
|
and if the team does not have it yet they will consider adding it.</para></listitem>
|
||||||
|
<listitem><para>Send the Yocto Project team the BitBake recipes if you have them.
|
||||||
|
</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
Usually, if the board is not completely exotic, adding support in
|
||||||
|
the Yocto Project is fairly straightforward.
|
||||||
|
</para>
|
||||||
|
</answer>
|
||||||
|
</qandaentry>
|
||||||
|
|
||||||
|
<qandaentry>
|
||||||
|
<question>
|
||||||
|
<para>
|
||||||
|
Are there any products using Poky?
|
||||||
|
</para>
|
||||||
|
</question>
|
||||||
|
<answer>
|
||||||
|
<para>
|
||||||
|
The <ulink url='http://vernier.com/labquest/'>Vernier LabQuest</ulink> is using
|
||||||
|
the Yocto Project build system Poky.
|
||||||
|
See the <ulink url='http://www.vernier.com/products/interfaces/labq/'>Vernier LabQuest</ulink>
|
||||||
|
for more information.
|
||||||
|
There are a number of pre-production devices using Poky and the Yocto Project team
|
||||||
|
announces them as soon as they are released.
|
||||||
|
</para>
|
||||||
|
</answer>
|
||||||
|
</qandaentry>
|
||||||
|
|
||||||
|
<qandaentry>
|
||||||
|
<question>
|
||||||
|
<para>
|
||||||
|
What does the Yocto Project build system Poky produce as output?
|
||||||
|
</para>
|
||||||
|
</question>
|
||||||
|
<answer>
|
||||||
|
<para>
|
||||||
|
Because the same set of recipes can be used to create output of various formats, the
|
||||||
|
output of a Yocto Project build depends on how it was started.
|
||||||
|
Usually, the output is a flashable image ready for the target device.
|
||||||
|
</para>
|
||||||
|
</answer>
|
||||||
|
</qandaentry>
|
||||||
|
|
||||||
|
<qandaentry>
|
||||||
|
<question>
|
||||||
|
<para>
|
||||||
|
How do I add my package to the Yocto Project?
|
||||||
|
</para>
|
||||||
|
</question>
|
||||||
|
<answer>
|
||||||
|
<para>
|
||||||
|
To add a package, you need to create a BitBake recipe.
|
||||||
|
For information on how to add a package, see the
|
||||||
|
<link linkend='usingpoky-extend-addpkg'>Adding a Package</link> section
|
||||||
|
earlier in this manual.
|
||||||
|
</para>
|
||||||
|
</answer>
|
||||||
|
</qandaentry>
|
||||||
|
|
||||||
|
<qandaentry>
|
||||||
|
<question>
|
||||||
|
<para>
|
||||||
|
Do I have to reflash my entire board with a new Yocto Project image when recompiling
|
||||||
|
a package?
|
||||||
|
</para>
|
||||||
|
</question>
|
||||||
|
<answer>
|
||||||
|
<para>
|
||||||
|
The Yocto Project can build packages in various formats such as
|
||||||
|
<filename>ipk</filename> for <filename>ipkg</filename>/<filename>opkg</filename>,
|
||||||
|
Debian package (<filename>.deb</filename>), or RPM.
|
||||||
|
The packages can then be upgraded using the package tools on the device, much like
|
||||||
|
on a desktop distribution such as Ubuntu or Fedora.
|
||||||
|
</para>
|
||||||
|
</answer>
|
||||||
|
</qandaentry>
|
||||||
|
|
||||||
|
<qandaentry>
|
||||||
|
<question>
|
||||||
|
<para>
|
||||||
|
What is GNOME Mobile and what is the difference between GNOME Mobile and GNOME?
|
||||||
|
</para>
|
||||||
|
</question>
|
||||||
|
<answer>
|
||||||
|
<para>
|
||||||
|
<ulink url='http://www.gnome.org/mobile/'>GNOME Mobile</ulink> is a subset of the GNOME
|
||||||
|
platform targeted at mobile and embedded devices.
|
||||||
|
The the main difference between GNOME Mobile and standard GNOME is that
|
||||||
|
desktop-orientated libraries have been removed, along with deprecated libraries,
|
||||||
|
creating a much smaller footprint.
|
||||||
|
</para>
|
||||||
|
</answer>
|
||||||
|
</qandaentry>
|
||||||
|
|
||||||
|
<qandaentry>
|
||||||
|
<question>
|
||||||
|
<para>
|
||||||
|
I see the error '<filename>chmod: XXXXX new permissions are r-xrwxrwx, not r-xr-xr-x</filename>'.
|
||||||
|
What is wrong?
|
||||||
|
</para>
|
||||||
|
</question>
|
||||||
|
<answer>
|
||||||
|
<para>
|
||||||
|
You are probably running the build on an NTFS filesystem.
|
||||||
|
Use <filename>ext2</filename>, <filename>ext3</filename>, or <filename>ext4</filename> instead.
|
||||||
|
</para>
|
||||||
|
</answer>
|
||||||
|
</qandaentry>
|
||||||
|
|
||||||
|
<qandaentry>
|
||||||
|
<question>
|
||||||
|
<para>
|
||||||
|
How do I make the Yocto Project work in RHEL/CentOS?
|
||||||
|
</para>
|
||||||
|
</question>
|
||||||
|
<answer>
|
||||||
|
<para>
|
||||||
|
To get the Yocto Project working under RHEL/CentOS 5.1 you need to first
|
||||||
|
install some required packages.
|
||||||
|
The standard CentOS packages needed are:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>"Development tools" (selected during installation)</para></listitem>
|
||||||
|
<listitem><para><filename>texi2html</filename></para></listitem>
|
||||||
|
<listitem><para><filename>compat-gcc-34</filename></para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
On top of these, you need the following external packages:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><filename>python-sqlite2</filename> from
|
||||||
|
<ulink url='http://dag.wieers.com/rpm/packages/python-sqlite2/'>DAG repository</ulink>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><filename>help2man</filename> from
|
||||||
|
<ulink url='http://centos.karan.org/el5/extras/testing/i386/RPMS/help2man-1.33.1-2.noarch.rpm'>Karan repository</ulink></para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
On top of those the following external packages are needed:
|
Once these packages are installed, the Yocto Project will be able to build standard
|
||||||
<itemizedlist>
|
images.
|
||||||
<listitem>
|
However, there might be a problem with the QEMU emulator segfaulting.
|
||||||
<para>
|
You can either disable the generation of binary locales by setting
|
||||||
python-sqlite2 from <ulink
|
<filename><link linkend='var-ENABLE_BINARY_LOCALE_GENERATION'>ENABLE_BINARY_LOCALE_GENERATION</link>
|
||||||
url='http://dag.wieers.com/rpm/packages/python-sqlite2/'>DAG
|
</filename> to "0" or by removing the <filename>linux-2.6-execshield.patch</filename>
|
||||||
repository</ulink>
|
from the kernel and rebuilding it since that is the patch that causes the problems with QEMU.
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
help2man from <ulink
|
|
||||||
url='http://centos.karan.org/el5/extras/testing/i386/RPMS/help2man-1.33.1-2.noarch.rpm'>Karan
|
|
||||||
repository</ulink>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Once these packages are installed Poky will be able to build standard images however there
|
|
||||||
may be a problem with QEMU segfaulting. You can either disable the generation of binary
|
|
||||||
locales by setting <glossterm><link linkend='var-ENABLE_BINARY_LOCALE_GENERATION'>ENABLE_BINARY_LOCALE_GENERATION</link>
|
|
||||||
</glossterm> to "0" or remove the linux-2.6-execshield.patch from the kernel and rebuild
|
|
||||||
it since its that patch which causes the problems with QEMU.
|
|
||||||
</para>
|
</para>
|
||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|
||||||
<qandaentry>
|
<qandaentry>
|
||||||
<question>
|
<question>
|
||||||
<para>
|
<para>
|
||||||
I see lots of 404 responses for files on
|
I see lots of 404 responses for files on
|
||||||
http://autobuilder.yoctoproject.org/sources/*. Is something wrong?
|
<filename>http://www.yoctoproject.org/sources/*</filename>. Is something wrong?
|
||||||
</para>
|
</para>
|
||||||
</question>
|
</question>
|
||||||
<answer>
|
<answer>
|
||||||
<para>
|
<para>
|
||||||
Nothing is wrong, Poky will check any configured source mirrors before downloading
|
Nothing is wrong.
|
||||||
from the upstream sources. It does this searching for both source archives and
|
The Yocto Project checks any configured source mirrors before downloading
|
||||||
pre-checked out versions of SCM managed software. This is so in large installations,
|
from the upstream sources.
|
||||||
it can reduce load on the SCM servers themselves. The address above is one of the
|
The Yocto Project does this searching for both source archives and
|
||||||
default mirrors configured into standard Poky so if an upstream source disappears,
|
pre-checked out versions of SCM managed software.
|
||||||
we can place sources there so builds continue to work.
|
These checks help in large installations because it can reduce load on the SCM servers
|
||||||
|
themselves.
|
||||||
|
The address above is one of the default mirrors configured into the
|
||||||
|
Yocto Project.
|
||||||
|
Consequently, if an upstream source disappears, the team
|
||||||
|
can place sources there so builds continue to work.
|
||||||
</para>
|
</para>
|
||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|
||||||
<qandaentry>
|
<qandaentry>
|
||||||
<question>
|
<question>
|
||||||
<para>
|
<para>
|
||||||
I have a machine specific data in a package for one machine only but the package is
|
I have machine-specific data in a package for one machine only but the package is
|
||||||
being marked as machine specific in all cases, how do I stop it?
|
being marked as machine-specific in all cases, how do I prevent this?
|
||||||
</para>
|
</para>
|
||||||
</question>
|
</question>
|
||||||
<answer>
|
<answer>
|
||||||
<para>
|
<para>
|
||||||
Set <glossterm><link linkend='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'>SRC_URI_OVERRIDES_PACKAGE_ARCH</link>
|
Set <filename><link linkend='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'>SRC_URI_OVERRIDES_PACKAGE_ARCH</link>
|
||||||
</glossterm> = "0" in the .bb file but make sure the package is manually marked as
|
</filename> = "0" in the <filename>.bb</filename> file but make sure the package is
|
||||||
machine specific in the case that needs it. The code which handles <glossterm><link
|
manually marked as
|
||||||
linkend='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'>SRC_URI_OVERRIDES_PACKAGE_ARCH</link></glossterm>
|
machine-specific in the case that needs it.
|
||||||
is in base.bbclass.
|
The code that handles
|
||||||
|
<filename><link linkend='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'>
|
||||||
|
SRC_URI_OVERRIDES_PACKAGE_ARCH</link></filename> is in <filename>base.bbclass</filename>.
|
||||||
</para>
|
</para>
|
||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|
||||||
<qandaentry>
|
<qandaentry>
|
||||||
<question>
|
<question>
|
||||||
<para>
|
<para>
|
||||||
@@ -288,42 +285,60 @@
|
|||||||
</question>
|
</question>
|
||||||
<answer>
|
<answer>
|
||||||
<para>
|
<para>
|
||||||
Most source fetching by Poky is done by wget and you therefore need to specify the proxy
|
Most source fetching by the Yocto Project is done by <filename>wget</filename>
|
||||||
settings in a .wgetrc file in your home directory. Example settings in that file would be
|
and you therefore need to specify the proxy settings in a
|
||||||
'http_proxy = http://proxy.yoyodyne.com:18023/' and 'ftp_proxy = http://proxy.yoyodyne.com:18023/'.
|
<filename>.wgetrc</filename> file in your home directory.
|
||||||
Poky also includes a site.conf.sample file which shows how to configure cvs and git proxy servers
|
Example settings in that file would be
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
http_proxy = http://proxy.yoyodyne.com:18023/
|
||||||
|
ftp_proxy = http://proxy.yoyodyne.com:18023/
|
||||||
|
</literallayout>
|
||||||
|
The Yocto Project also includes a <filename>site.conf.sample</filename>
|
||||||
|
file that shows how to configure CVS and Git proxy servers
|
||||||
if needed.
|
if needed.
|
||||||
</para>
|
</para>
|
||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|
||||||
<qandaentry>
|
<qandaentry>
|
||||||
<question>
|
<question>
|
||||||
<para>
|
<para>
|
||||||
I'm using Ubuntu Intrepid and am seeing build failures. Whats wrong?
|
I'm using Ubuntu Intrepid and am seeing build failures. What’s wrong?
|
||||||
</para>
|
</para>
|
||||||
</question>
|
</question>
|
||||||
<answer>
|
<answer>
|
||||||
<para>
|
<para>
|
||||||
In Intrepid, Ubuntu turned on by default normally optional compile-time security features
|
In Intrepid, Ubuntu turns on by default the normally optional compile-time security features
|
||||||
and warnings. There are more details at <ulink
|
and warnings.
|
||||||
url='https://wiki.ubuntu.com/CompilerFlags'>https://wiki.ubuntu.com/CompilerFlags</ulink>.
|
There are more details at
|
||||||
You can work around this problem by disabling those options by adding " -Wno-format-security -U_FORTIFY_SOURCE"
|
<ulink url='https://wiki.ubuntu.com/CompilerFlags'>https://wiki.ubuntu.com/CompilerFlags</ulink>.
|
||||||
to the BUILD_CPPFLAGS variable in conf/bitbake.conf.
|
You can work around this problem by disabling those options by adding
|
||||||
|
the following to the <filename>BUILD_CPPFLAGS</filename> variable in the
|
||||||
|
<filename>conf/bitbake.conf</filename> file.
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
" -Wno-format-security -U_FORTIFY_SOURCE"
|
||||||
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|
||||||
<qandaentry>
|
<qandaentry>
|
||||||
<question>
|
<question>
|
||||||
<para>
|
<para>
|
||||||
Whats the difference between foo and foo-native?
|
What’s the difference between <filename>foo</filename> and <filename>foo-native</filename>?
|
||||||
</para>
|
</para>
|
||||||
</question>
|
</question>
|
||||||
<answer>
|
<answer>
|
||||||
<para>
|
<para>
|
||||||
The *-native targets are designed to run on the system the build is running on. These are usually tools that are needed to assist the build in some way such as quilt-native which is used to apply patches. The non-native version is the one that would run on the target device.
|
The <filename>*-native</filename> targets are designed to run on the system
|
||||||
|
being used for the build.
|
||||||
|
These are usually tools that are needed to assist the build in some way such as
|
||||||
|
<filename>quilt-native</filename>, which is used to apply patches.
|
||||||
|
The non-native version is the one that runs on the target device.
|
||||||
</para>
|
</para>
|
||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|
||||||
<qandaentry>
|
<qandaentry>
|
||||||
<question>
|
<question>
|
||||||
<para>
|
<para>
|
||||||
@@ -332,10 +347,17 @@
|
|||||||
</question>
|
</question>
|
||||||
<answer>
|
<answer>
|
||||||
<para>
|
<para>
|
||||||
If the same build is failing in totally different and random ways the most likely explanation is that either the hardware you're running it on has some problem or if you are running it under virtualisation, the virtualisation probably has bugs. Poky processes a massive amount of data causing lots of network, disk and cpu activity and is sensitive to even single bit failure in any of these areas. Totally random failures have always been traced back to hardware or virtualisation issues.
|
If the same build is failing in totally different and random ways,
|
||||||
|
the most likely explanation is that either the hardware you're running the
|
||||||
|
build on has some problem, or, if you are running the build under virtualisation,
|
||||||
|
the virtualisation probably has bugs.
|
||||||
|
The Yocto Project processes a massive amount of data causing lots of network, disk and
|
||||||
|
CPU activity and is sensitive to even single bit failures in any of these areas.
|
||||||
|
True random failures have always been traced back to hardware or virtualisation issues.
|
||||||
</para>
|
</para>
|
||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|
||||||
<qandaentry>
|
<qandaentry>
|
||||||
<question>
|
<question>
|
||||||
<para>
|
<para>
|
||||||
@@ -344,7 +366,13 @@
|
|||||||
</question>
|
</question>
|
||||||
<answer>
|
<answer>
|
||||||
<para>
|
<para>
|
||||||
This is a difficult question and you need to consult your lawyer for the answer for your specific case. Its worth bearing in mind that for GPL compliance there needs to be enough information shipped to allow someone else to rebuild the same end result as you are shipping. This means sharing the source code, any patches applied to it but also any configuration information about how that package was configured and built.
|
This is a difficult question and you need to consult your lawyer for the answer
|
||||||
|
for your specific case.
|
||||||
|
It is worth bearing in mind that for GPL compliance there needs to be enough
|
||||||
|
information shipped to allow someone else to rebuild the same end result
|
||||||
|
you are shipping.
|
||||||
|
This means sharing the source code, any patches applied to it, and also any
|
||||||
|
configuration information about how that package was configured and built.
|
||||||
</para>
|
</para>
|
||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
@@ -359,7 +387,7 @@
|
|||||||
<para>
|
<para>
|
||||||
You need to create a form factor file as described in
|
You need to create a form factor file as described in
|
||||||
<xref linkend='bsp-filelayout-misc-recipes'>"Miscellaneous Recipe Files"</xref>
|
<xref linkend='bsp-filelayout-misc-recipes'>"Miscellaneous Recipe Files"</xref>
|
||||||
and set the <filename>HAVE_TOUCHSCREEN</filename> variable equal to one.
|
and set the <filename>HAVE_TOUCHSCREEN</filename> variable equal to one as follows:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
HAVE_TOUCHSCREEN=1
|
HAVE_TOUCHSCREEN=1
|
||||||
</literallayout>
|
</literallayout>
|
||||||
@@ -377,7 +405,7 @@
|
|||||||
<para>
|
<para>
|
||||||
The default interfaces file provided by the netbase recipe does not
|
The default interfaces file provided by the netbase recipe does not
|
||||||
automatically bring up network interfaces.
|
automatically bring up network interfaces.
|
||||||
Therefore you will need to add a BSP-specific netbase that includes an interfaces
|
Therefore, you will need to add a BSP-specific netbase that includes an interfaces
|
||||||
file.
|
file.
|
||||||
See <xref linkend='bsp-filelayout-misc-recipes'>"Miscellaneous Recipe Files"</xref>
|
See <xref linkend='bsp-filelayout-misc-recipes'>"Miscellaneous Recipe Files"</xref>
|
||||||
for information on creating these types of miscellaneous recipe files.
|
for information on creating these types of miscellaneous recipe files.
|
||||||
@@ -401,7 +429,7 @@
|
|||||||
<answer>
|
<answer>
|
||||||
<para>
|
<para>
|
||||||
Images are created to be 1.2 times the size of the populated root filesystem.
|
Images are created to be 1.2 times the size of the populated root filesystem.
|
||||||
To modify this ratio so that there is more free space available you need to
|
To modify this ratio so that there is more free space available, you need to
|
||||||
set the configuration value <filename>IMAGE_OVERHEAD_FACTOR</filename>.
|
set the configuration value <filename>IMAGE_OVERHEAD_FACTOR</filename>.
|
||||||
For example, setting <filename>IMAGE_OVERHEAD_FACTOR</filename> to 1.5 sets
|
For example, setting <filename>IMAGE_OVERHEAD_FACTOR</filename> to 1.5 sets
|
||||||
the image size ratio to one and a half times the size of the populated
|
the image size ratio to one and a half times the size of the populated
|
||||||
@@ -421,9 +449,10 @@
|
|||||||
</question>
|
</question>
|
||||||
<answer>
|
<answer>
|
||||||
<para>
|
<para>
|
||||||
We have tried to do this before but too many of the tools we depend on such as autoconf
|
The Yocto Project team has tried to do this before but too many of the tools
|
||||||
|
the Yocto Project depends on such as <filename>autoconf</filename>
|
||||||
break when they find spaces in pathnames.
|
break when they find spaces in pathnames.
|
||||||
Until that situation changes we will not support spaces in pathnames.
|
Until that situation changes, the team will not support spaces in pathnames.
|
||||||
</para>
|
</para>
|
||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
@@ -437,17 +466,18 @@
|
|||||||
<answer>
|
<answer>
|
||||||
<para>
|
<para>
|
||||||
The toolchain configuration is very flexible and customizable.
|
The toolchain configuration is very flexible and customizable.
|
||||||
It is primarily controlled with the TCMODE variable.
|
It is primarily controlled with the
|
||||||
|
<filename><link linkend='var-TCMODE'>TCMODE</link></filename> variable.
|
||||||
This variable controls which file to include
|
This variable controls which file to include
|
||||||
(<filename>conf/distro/include/tcmode-*.inc</filename>).
|
(<filename>conf/distro/include/tcmode-*.inc</filename>).
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The default value of TCMODE is "default".
|
The default value of <filename>TCMODE</filename> is "default".
|
||||||
However, other patterns are accepted.
|
However, other patterns are accepted.
|
||||||
In particular, "external-*" refers to external toolchains of which there are some basic examples
|
In particular, "external-*" refers to external toolchains of which there are some basic examples
|
||||||
included with the core.
|
included with the core.
|
||||||
A user can use their own custom toolchain definition in their own layer
|
A user can use their own custom toolchain definition in their own layer
|
||||||
(or <filename>local.conf</filename> directory) at the location
|
(or as defined in the <filename>local.conf</filename> file) at the location
|
||||||
<filename>conf/distro/include/tcmode-*.inc</filename>.
|
<filename>conf/distro/include/tcmode-*.inc</filename>.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
@@ -461,29 +491,27 @@
|
|||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<qandaentry>
|
<qandaentry>
|
||||||
<question>
|
<question>
|
||||||
<para>
|
<para>
|
||||||
How does Poky obtain source code and will it work behind my firewall or proxy server?
|
How does the Yocto Project obtain source code and will it work behind my
|
||||||
|
firewall or proxy server?
|
||||||
</para>
|
</para>
|
||||||
</question>
|
</question>
|
||||||
<answer>
|
<answer>
|
||||||
<para>
|
<para>
|
||||||
The way Poky obtains source code is highly configurable.
|
The way the Yocto Project obtains source code is highly configurable.
|
||||||
You can setup Poky to get source code in most environmnents if
|
You can setup the Yocto Project to get source code in most environments if
|
||||||
HTTP transport is available.
|
HTTP transport is available.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
When Poky searches for source code it first tries the local download directory.
|
When the build system searches for source code, it first tries the local download directory.
|
||||||
If that location fails, Poky tries PREMIRRORS, the upstream source,
|
If that location fails, Poky tries PREMIRRORS, the upstream source,
|
||||||
and then MIRRORS in that order.
|
and then MIRRORS in that order.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
By default, Poky uses the Yocto Project source PREMIRRORS for SCM-based sources,
|
By default, Poky uses the Yocto Project source PREMIRRORS for SCM-based sources,
|
||||||
upstreams for normal tarballs and then falls back to a number of other mirrors
|
upstreams for normal tarballs, and then falls back to a number of other mirrors
|
||||||
including the Yocto Project source mirror if those fail.
|
including the Yocto Project source mirror if those fail.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
@@ -492,16 +520,16 @@
|
|||||||
configuration file:
|
configuration file:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
PREMIRRORS_prepend = "\
|
PREMIRRORS_prepend = "\
|
||||||
git://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \
|
git://.*/.* http://www.yoctoproject.org/sources/ \n \
|
||||||
ftp://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \
|
ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
|
||||||
http://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \
|
http://.*/.* http://www.yoctoproject.org/sources/ \n \
|
||||||
https://.*/.* http://autobuilder.yoctoproject.org/sources/ \n"
|
https://.*/.* http://www.yoctoproject.org/sources/ \n"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
These changes cause Poky to intercept GIT, FTP, HTTP, and HTTPS
|
These changes cause Poky to intercept Git, FTP, HTTP, and HTTPS
|
||||||
requests and direct them to the <filename>http://</filename> sources mirror.
|
requests and direct them to the <filename>http://</filename> sources mirror.
|
||||||
You can use <filename>file://</filename> urls to point to local directories
|
You can use <filename>file://</filename> URLs to point to local directories
|
||||||
or network shares as well.
|
or network shares as well.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
@@ -509,8 +537,6 @@
|
|||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
BB_NO_NETWORK = "1"
|
BB_NO_NETWORK = "1"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
This statement tells BitBake to throw an error instead of trying to access the
|
This statement tells BitBake to throw an error instead of trying to access the
|
||||||
Internet.
|
Internet.
|
||||||
This technique is useful if you want to ensure code builds only from local sources.
|
This technique is useful if you want to ensure code builds only from local sources.
|
||||||
@@ -520,8 +546,6 @@
|
|||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
BB_FETCH_PREMIRRORONLY = "1"
|
BB_FETCH_PREMIRRORONLY = "1"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
This statement limits Poky to pulling source from the PREMIRRORS only.
|
This statement limits Poky to pulling source from the PREMIRRORS only.
|
||||||
Again, this technique is useful for reproducing builds.
|
Again, this technique is useful for reproducing builds.
|
||||||
</para>
|
</para>
|
||||||
@@ -530,8 +554,6 @@
|
|||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
BB_GENERATE_MIRROR_TARBALLS = "1"
|
BB_GENERATE_MIRROR_TARBALLS = "1"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
This statement tells Poky to generate mirror tarballs.
|
This statement tells Poky to generate mirror tarballs.
|
||||||
This technique is useful if you want to create a mirror server.
|
This technique is useful if you want to create a mirror server.
|
||||||
If not, however, the technique can simply waste time during the build.
|
If not, however, the technique can simply waste time during the build.
|
||||||
@@ -539,18 +561,16 @@
|
|||||||
<para>
|
<para>
|
||||||
Finally, consider an example where you are behind an HTTP-only firewall.
|
Finally, consider an example where you are behind an HTTP-only firewall.
|
||||||
You could make the following changes to the <filename>local.conf</filename>
|
You could make the following changes to the <filename>local.conf</filename>
|
||||||
configuration file as long as the premirror server is up to date:
|
configuration file as long as the PREMIRROR server is up to date:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
PREMIRRORS_prepend = "\
|
PREMIRRORS_prepend = "\
|
||||||
ftp://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \
|
ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
|
||||||
http://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \
|
http://.*/.* http://www.yoctoproject.org/sources/ \n \
|
||||||
https://.*/.* http://autobuilder.yoctoproject.org/sources/ \n"
|
https://.*/.* http://www.yoctoproject.org/sources/ \n"
|
||||||
BB_FETCH_PREMIRRORONLY = "1"
|
BB_FETCH_PREMIRRORONLY = "1"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
These changes would cause Poky to successfully fetch source over HTTP and
|
These changes would cause Poky to successfully fetch source over HTTP and
|
||||||
any network accesses to anything other than the premirror would fail.
|
any network accesses to anything other than the PREMIRROR would fail.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Poky also honors the standard environment variables
|
Poky also honors the standard environment variables
|
||||||
@@ -560,9 +580,6 @@
|
|||||||
</para>
|
</para>
|
||||||
</answer>
|
</answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</qandaset>
|
</qandaset>
|
||||||
</appendix>
|
</appendix>
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 38 KiB |
@@ -5,166 +5,141 @@
|
|||||||
<title>Introduction</title>
|
<title>Introduction</title>
|
||||||
|
|
||||||
<section id='intro-welcome'>
|
<section id='intro-welcome'>
|
||||||
<title>Welcome to Poky!</title>
|
<title>Introduction</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Poky is the build tool in the Yocto Project.
|
This manual provides reference information for the current release of the Yocto Project.
|
||||||
The Yocto Project uses Poky to build images (kernel, system, and application software) for
|
The Yocto Project is an open-source collaboration project focused on embedded Linux
|
||||||
targeted hardware.
|
developers.
|
||||||
</para>
|
Amongst other things, the Yocto Project uses the Poky build tool to
|
||||||
|
construct complete Linux images.
|
||||||
<para>
|
You can find complete introductory and getting started information on the Yocto Project
|
||||||
Before diving into Poky, it helps to have an understanding of the Yocto Project.
|
by reading the
|
||||||
Especially useful for newcomers is the information in the Yocto Project Quick Start, which
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||||
you can find on the <ulink url="http://www.yoctoproject.org">Yocto Project website</ulink>.
|
Yocto Project Quick Start</ulink>.
|
||||||
Specifically, the guide is
|
For task-based information using the Yocto Project, see
|
||||||
at <ulink url="http://www.yoctoproject.org/docs/yocto-quick-start/yocto-project-qs.html"/>.
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1//dev-manual/dev-manual.html'>
|
||||||
</para>
|
The Yocto Project Development Manual</ulink>.
|
||||||
</section>
|
You can also find lots of information on the Yocto Project on the
|
||||||
|
<ulink url="http://www.yoctoproject.org">Yocto Project website</ulink>.
|
||||||
<section id='what-is-poky'>
|
|
||||||
<title>What is Poky?</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Within the Yocto Project, Poky provides an open source, full-platform build tool based on
|
|
||||||
Linux, X11, Matchbox, GTK+, Pimlico, Clutter,
|
|
||||||
and other <ulink url='http://gnome.org/mobile'>GNOME Mobile</ulink> technologies.
|
|
||||||
It provides a focused and stable subset of OpenEmbedded upon which you can easily and
|
|
||||||
reliably build and develop.
|
|
||||||
Poky fully supports a wide range of x86, ARM, MIPS and PowerPC hardware and device virtualization.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Poky is primarily a platform builder that generates filesystem images
|
|
||||||
based on open source software such as the Kdrive X server, the Matchbox
|
|
||||||
window manager, the GTK+ toolkit and the D-Bus message bus system. While images
|
|
||||||
for many kinds of devices can be generated, the standard example
|
|
||||||
machines target QEMU full-system emulation (x86, ARM, MIPS and PowerPC) and
|
|
||||||
real reference boards for each of these architectures.
|
|
||||||
Poky's ability to boot inside a QEMU
|
|
||||||
emulator makes it particularly suitable as a test platform for developing embedded software.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
An important component integrated within Poky is Sato, a GNOME Mobile-based
|
|
||||||
user interface environment.
|
|
||||||
It is designed to work well with screens that use very high DPI and have restricted
|
|
||||||
sizes, such as those often found on smartphones and PDAs.
|
|
||||||
Because Sato is coded for speed and efficiency, it works smoothly on hand-held and
|
|
||||||
other embedded hardware.
|
|
||||||
It sits nicely on top of any device that uses the GNOME Mobile stack and it results in
|
|
||||||
a well-defined user experience.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<screenshot>
|
|
||||||
<mediaobject>
|
|
||||||
<imageobject>
|
|
||||||
<imagedata fileref="figures/ss-sato.png" format="PNG" align='center' scalefit='1' width="100%" contentdepth="100%"/>
|
|
||||||
</imageobject>
|
|
||||||
<caption>
|
|
||||||
<para>The Sato Desktop - A screenshot from a machine running a Poky built image</para>
|
|
||||||
</caption>
|
|
||||||
</mediaobject>
|
|
||||||
</screenshot>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Poky has a growing open source community and is also backed up by commercial organizations
|
|
||||||
including Intel® Corporation.
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='intro-manualoverview'>
|
<section id='intro-manualoverview'>
|
||||||
<title>Documentation Overview</title>
|
<title>Documentation Overview</title>
|
||||||
<para>
|
<para>
|
||||||
The sections in this reference manual describe different aspects of Poky.
|
This reference manual consists of the following:
|
||||||
The <link linkend='usingpoky'>'Using Poky'</link> section provides an overview of the components
|
<itemizedlist>
|
||||||
that make up Poky followed by information about using Poky and debugging images created in
|
<listitem><para><emphasis>
|
||||||
the Yocto Project.
|
<link linkend='usingpoky'>Using the Yocto Project</link>:</emphasis> This chapter
|
||||||
The <link linkend='extendpoky'>'Extending Poky'</link> and
|
provides an overview of the components that make up the Yocto Project
|
||||||
<link linkend='bsp'>'Board Support Packages'</link> sections provide information
|
followed by information about debugging images created in the Yocto Project.
|
||||||
about how to extend and customize Poky along with advice on how to manage these changes.
|
</para></listitem>
|
||||||
The <link linkend='platdev'>'Platform Development with Poky'</link> section provides information about
|
<listitem><para><emphasis>
|
||||||
interaction between Poky and target hardware for common platform development tasks such as software
|
<link linkend='extendpoky'>Extending the Yocto Project</link>:</emphasis> This chapter
|
||||||
development, debugging and profiling.
|
provides information about how to extend and customize the Yocto Project
|
||||||
The rest of the manual consists of several reference sections, each providing details on a specific
|
along with advice on how to manage these changes.</para></listitem>
|
||||||
area of Poky functionality.
|
<listitem><para><emphasis>
|
||||||
</para>
|
<link linkend='technical-details'>Technical Details</link>:</emphasis>
|
||||||
|
This chapter describes fundamental Yocto Project components as well as an explanation
|
||||||
<para>
|
behind how the Yocto Project uses shared state (sstate) cache to speed build time.
|
||||||
This manual applies to Poky Release 5.0 (Bernard).
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<link linkend='bsp'>Board Support Packages (BSP) - Developer's Guide</link>:</emphasis>
|
||||||
|
This chapter describes the example filesystem layout for BSP development and
|
||||||
|
the click-through licensing scheme.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<link linkend='platdev'>Platform Development With the Yocto Project</link>:</emphasis>
|
||||||
|
This chapter describes application development, debugging, and profiling using
|
||||||
|
the Yocto Project.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<link linkend='ref-structure'>Reference: Directory Structure</link>:</emphasis>
|
||||||
|
This appendix describes the directory structure of the Yocto Project files.
|
||||||
|
The Yocto Project files represent the file structure or Git repository created
|
||||||
|
as a result of setting up the Yocto Project on your host development system.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<link linkend='ref-bitbake'>Reference: BitBake</link>:</emphasis>
|
||||||
|
This appendix provides an overview of the BitBake tool and its role within
|
||||||
|
the Yocto Project.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<link linkend='ref-classes'>Reference: Classes</link>:</emphasis>
|
||||||
|
This appendix describes the classes used in the Yocto Project.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<link linkend='ref-images'>Reference: Images</link>:</emphasis>
|
||||||
|
This appendix describes the standard images that the Yocto Project supports.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<link linkend='ref-features'>Reference: Features</link>:</emphasis>
|
||||||
|
This appendix describes mechanisms for creating distribution, machine, and image
|
||||||
|
features during the build process using the Yocto Project.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<link linkend='ref-variables-glos'>Reference: Variables Glossary</link>:</emphasis>
|
||||||
|
This appendix presents most Yocto Project variables.
|
||||||
|
Entries describe the function of the variable and how to apply them.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<link linkend='ref-varlocality'>Reference: Variable Context</link>:</emphasis>
|
||||||
|
This appendix provides variable locality or context.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<link linkend='faq'>Reference: FAQ</link>:</emphasis>
|
||||||
|
This appendix provides answers for commonly asked questions in the Yocto Project
|
||||||
|
development environment.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<link linkend='resources'>Reference: Contributing to the Yocto Project</link>:</emphasis>
|
||||||
|
This appendix provides guidance on how you can contribute back to the Yocto
|
||||||
|
Project.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
<section id='intro-requirements'>
|
<section id='intro-requirements'>
|
||||||
<title>System Requirements</title>
|
<title>System Requirements</title>
|
||||||
<para>
|
<para>
|
||||||
Although we recommend Debian-based distributions
|
For system Yocto Project system requirements, see the
|
||||||
(Ubuntu 10.04 or newer) as the host system for Poky, nothing in Poky is
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#resources'>
|
||||||
distribution-specific. Consequently, other distributions should work as long
|
What You Need and How You Get It</ulink> section in the
|
||||||
as the appropriate prerequisites are installed. For example, we know of Poky being used
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||||
successfully on Redhat, SUSE, Gentoo and Slackware host systems.
|
Yocto Project Quick Start</ulink>.
|
||||||
For information on what you need to develop images using Yocto Project and Poky,
|
|
||||||
you should see the Yocto Project Quick Start on the <ulink url="http://www.yoctoproject.org">
|
|
||||||
Yocto Project website</ulink>.
|
|
||||||
The direct link to the quick start is
|
|
||||||
<ulink url='http://yoctoproject.org/docs/yocto-quick-start/yocto-project-qs.html'/>.
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='intro-getit'>
|
<section id='intro-getit'>
|
||||||
<title>Obtaining Poky</title>
|
<title>Obtaining the Yocto Project</title>
|
||||||
|
<para>
|
||||||
<section id='intro-getit-releases'>
|
The Yocto Project development team makes the Yocto Project available through a number
|
||||||
<title>Releases</title>
|
of methods:
|
||||||
|
<itemizedlist>
|
||||||
<para>Periodically, we make releases of Poky available
|
<listitem><para><emphasis>Releases:</emphasis> Stable, tested releases are available through
|
||||||
at <ulink url='http://yoctoproject.org/downloads/poky/'/>.
|
<ulink url='http://downloads.yoctoproject.org/releases/yocto/'/>.</para></listitem>
|
||||||
These releases are more stable and more rigorously tested than the nightly development images.
|
<listitem><para><emphasis>Nightly Builds:</emphasis> These releases are available at
|
||||||
</para>
|
<ulink url='http://autobuilder.yoctoproject.org/nightly'/>.
|
||||||
</section>
|
These builds include Yocto Project releases, meta-toolchain tarballs, and
|
||||||
|
experimental builds.</para></listitem>
|
||||||
<section id='intro-getit-nightly'>
|
<listitem><para><emphasis>Yocto Project Website:</emphasis> You can find releases
|
||||||
<title>Nightly Builds</title>
|
of the Yocto Project and supported BSPs at the
|
||||||
|
<ulink url='http://www.yoctoproject.org'>Yocto Project website</ulink>.
|
||||||
<para>
|
Along with these downloads, you can find lots of other information at this site.
|
||||||
We make nightly builds of Poky for testing purposes and to make the
|
</para></listitem>
|
||||||
latest developments available. The output from these builds is available
|
</itemizedlist>
|
||||||
at <ulink url='http://autobuilder.yoctoproject.org/'/>.
|
</para>
|
||||||
The numbers used in the builds increase for each subsequent build and can be used to
|
|
||||||
reference a specific build.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Automated builds are available for "standard" Poky and for Poky SDKs and toolchains.
|
|
||||||
Additionally, testing versions such as poky-bleeding can be made available as
|
|
||||||
'experimental' builds.
|
|
||||||
The toolchains can
|
|
||||||
be used either as external standalone toolchains or can be combined with Poky as a
|
|
||||||
pre-built toolchain to reduce build time. Using the external toolchains is simply a
|
|
||||||
case of untarring the tarball into the root of your system (it only creates files in
|
|
||||||
<filename>/opt/poky</filename>) and then enabling the option
|
|
||||||
in <filename>local.conf</filename>.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='intro-getit-dev'>
|
|
||||||
<title>Development Checkouts</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Poky is available from our git repository located at
|
|
||||||
git://git.yoctoproject.org/poky.git; a web interface to the repository
|
|
||||||
can be accessed at <ulink url='http://git.yoctoproject.org/'/>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The 'master' is where the development work takes place and you should use this if you're
|
|
||||||
interested in working with the latest cutting-edge developments. It is possible for the trunk
|
|
||||||
to suffer temporary periods of instability while new features are developed.
|
|
||||||
If these periods of instability are undesirable, we recommend using one of the release branches.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section id='intro-getit-dev'>
|
||||||
|
<title>Development Checkouts</title>
|
||||||
|
<para>
|
||||||
|
Development using the Yocto Project requires a local copy of the Yocto Project files.
|
||||||
|
You can get these files by downloading a Yocto Project release tarball and unpacking it,
|
||||||
|
or by establishing a Git repository of the files.
|
||||||
|
For information on both these methods, see
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#getting-setup'>
|
||||||
|
Getting Setup</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>
|
||||||
|
</section>
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
<!--
|
<!--
|
||||||
vim: expandtab tw=80 ts=4
|
vim: expandtab tw=80 ts=4
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 26 KiB |
@@ -1,117 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In -->
|
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
|
||||||
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
|
|
||||||
]>
|
|
||||||
<svg version="1.1"
|
|
||||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
|
|
||||||
x="0px" y="0px" width="300px" height="300px" viewBox="-40.981 -92.592 300 300" enable-background="new -40.981 -92.592 300 300"
|
|
||||||
xml:space="preserve">
|
|
||||||
<defs>
|
|
||||||
</defs>
|
|
||||||
<path fill="#6AC7BD" d="M48.96,48.476v0.003h0.001v-0.061C48.962,48.438,48.96,48.457,48.96,48.476z"/>
|
|
||||||
<g opacity="0.65">
|
|
||||||
<g>
|
|
||||||
<path fill="#EF412A" d="M24.482,23.998v-0.003C10.961,23.994,0,34.955,0,48.476l0.001,0.003v0.003
|
|
||||||
C0.003,62.001,10.962,72.96,24.482,72.96l0,0H0v24.482h0.003c13.52-0.002,24.479-10.962,24.479-24.481h0.003
|
|
||||||
C38.005,72.959,48.963,62,48.963,48.479v-0.003C48.962,34.957,38.001,23.998,24.482,23.998z M24.482,50.928
|
|
||||||
c-1.352,0-2.448-1.096-2.448-2.448s1.096-2.448,2.448-2.448s2.448,1.096,2.448,2.448S25.834,50.928,24.482,50.928z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g opacity="0.65">
|
|
||||||
<g>
|
|
||||||
<path fill="#A9C542" d="M119.96,48.842c0.064-1.294,1.126-2.326,2.437-2.326c1.31,0,2.371,1.032,2.436,2.327
|
|
||||||
c12.378-1.223,22.046-11.662,22.046-24.36h-24.482C122.396,10.961,111.435,0,97.915,0v24.485
|
|
||||||
C97.917,37.183,107.584,47.619,119.96,48.842z M124.833,49.084c-0.064,1.295-1.126,2.327-2.436,2.327h-0.001v22.033h24.482v-0.003
|
|
||||||
C146.876,60.745,137.208,50.308,124.833,49.084z M119.949,48.963H97.915v24.479h0c12.698,0,23.137-9.668,24.36-22.043
|
|
||||||
C120.981,51.334,119.949,50.274,119.949,48.963z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g opacity="0.65">
|
|
||||||
<g>
|
|
||||||
<path fill="#F9C759" d="M168.912,48.967c0-1.311,1.033-2.371,2.328-2.436c-1.222-12.379-11.661-22.049-24.361-22.049v24.481
|
|
||||||
c0,13.521,10.961,24.481,24.482,24.481v-22.03C170.007,51.415,168.912,50.319,168.912,48.967z M195.841,48.978
|
|
||||||
c0-0.005,0.001-0.009,0.001-0.014V24.482h-0.004c-12.698,0.002-23.136,9.672-24.356,22.049c1.294,0.064,2.326,1.125,2.326,2.436
|
|
||||||
s-1.032,2.372-2.327,2.436c1.198,12.187,11.333,21.743,23.763,22.042h-23.883v24.482h0.003
|
|
||||||
c13.515-0.002,24.47-10.954,24.478-24.467h0.002V48.979L195.841,48.978z M195.832,48.964h0.01v0.014L195.832,48.964z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g opacity="0.65">
|
|
||||||
<g>
|
|
||||||
<path fill="#6AC7BD" d="M70.994,48.479H48.962v0.002h22.033C70.995,48.481,70.994,48.48,70.994,48.479z M73.44,24.001h-0.003
|
|
||||||
v22.031c0.002,0,0.003,0,0.005,0c1.352,0,2.448,1.096,2.448,2.448s-1.096,2.448-2.448,2.448c-1.351,0-2.446-1.094-2.448-2.445
|
|
||||||
H48.958v0.003c0.002,13.519,10.961,24.478,24.479,24.478s24.477-10.959,24.479-24.478v-0.003
|
|
||||||
C97.916,34.963,86.958,24.003,73.44,24.001z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g opacity="0.65">
|
|
||||||
<g>
|
|
||||||
<path fill="#EF412A" d="M24.482,23.998v-0.003C10.961,23.994,0,34.955,0,48.476h22.034c0.002-1.351,1.097-2.445,2.448-2.445
|
|
||||||
c1.352,0,2.448,1.096,2.448,2.448s-1.096,2.448-2.448,2.448v22.01C24.469,59.427,13.514,48.479,0,48.479V72.96h24.481l0,0H0
|
|
||||||
v24.482h0.003c13.52-0.002,24.479-10.962,24.479-24.481h0.003C38.005,72.959,48.963,62,48.963,48.479v-0.003
|
|
||||||
C48.962,34.957,38.001,23.998,24.482,23.998z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g opacity="0.65">
|
|
||||||
<g>
|
|
||||||
<path fill="#A9C542" d="M122.397,46.516c1.31,0,2.371,1.032,2.436,2.327c12.378-1.223,22.046-11.662,22.046-24.36h-24.482
|
|
||||||
L122.397,46.516L122.397,46.516z M97.915,0v24.482h24.481C122.396,10.961,111.435,0,97.915,0z M122.275,46.528
|
|
||||||
c-1.223-12.377-11.662-22.046-24.361-22.046v24.482h0v24.479h0c12.698,0,23.137-9.668,24.36-22.043
|
|
||||||
c-1.294-0.065-2.326-1.125-2.326-2.436C119.949,47.653,120.98,46.593,122.275,46.528z M124.833,49.084
|
|
||||||
c-0.064,1.295-1.126,2.327-2.436,2.327h-0.001v22.033h24.482v-0.003C146.876,60.745,137.208,50.308,124.833,49.084z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g opacity="0.65">
|
|
||||||
<g>
|
|
||||||
<path fill="#F9C759" d="M173.795,49.1c-0.071,1.289-1.129,2.315-2.435,2.315c-1.354,0-2.449-1.096-2.449-2.448
|
|
||||||
c0-1.311,1.033-2.371,2.328-2.436c-1.222-12.379-11.661-22.049-24.361-22.049v24.481c0,13.521,10.961,24.481,24.482,24.481v24.482
|
|
||||||
h0.003c13.515-0.002,24.47-10.954,24.478-24.467h0.001v-0.016h-0.001C195.833,60.753,186.167,50.322,173.795,49.1z
|
|
||||||
M195.838,24.482c-12.698,0.002-23.136,9.672-24.356,22.049c1.293,0.064,2.324,1.124,2.326,2.433h22.033v0.015
|
|
||||||
c0-0.005,0.001-0.01,0.001-0.015V24.482H195.838z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g opacity="0.65">
|
|
||||||
<g>
|
|
||||||
<path fill="#6AC7BD" d="M71.007,48.347c0.068-1.242,1.055-2.23,2.297-2.301c-0.795-8.026-5.454-14.913-12.103-18.762
|
|
||||||
C57.601,25.2,53.424,24,48.965,24h-0.003c0,4.46,1.199,8.638,3.283,12.24C56.093,42.891,62.98,47.552,71.007,48.347z
|
|
||||||
M48.962,48.418c0,0.02-0.001,0.038-0.001,0.058v0.003h0.001V48.418z M70.995,48.482c0-0.001,0-0.001,0-0.002H48.962v0.002H70.995
|
|
||||||
z M73.44,24.001h-0.003v22.031c0.002,0,0.003,0,0.005,0c1.352,0,2.448,1.096,2.448,2.448s-1.096,2.448-2.448,2.448
|
|
||||||
c-1.351,0-2.446-1.094-2.448-2.445H48.958v0.003c0.002,13.519,10.961,24.478,24.479,24.478s24.477-10.959,24.479-24.478v-0.003
|
|
||||||
C97.916,34.963,86.958,24.003,73.44,24.001z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g opacity="0.65">
|
|
||||||
<g>
|
|
||||||
<path fill="#EF412A" d="M24.482,23.998v-0.003C10.961,23.994,0,34.955,0,48.476h22.034c0.002-1.351,1.097-2.445,2.448-2.445
|
|
||||||
c1.352,0,2.448,1.096,2.448,2.448s-1.096,2.448-2.448,2.448c-1.311,0-2.372-1.033-2.436-2.327
|
|
||||||
C9.669,49.824,0.001,60.262,0.001,72.96H0v24.482h0.003c13.52-0.002,24.479-10.962,24.479-24.481h0.003
|
|
||||||
C38.005,72.959,48.963,62,48.963,48.479v-0.003C48.962,34.957,38.001,23.998,24.482,23.998z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g opacity="0.65">
|
|
||||||
<g>
|
|
||||||
<path fill="#A9C542" d="M119.949,48.963c0-1.352,1.096-2.448,2.448-2.448c1.31,0,2.371,1.032,2.436,2.327
|
|
||||||
c12.378-1.223,22.046-11.662,22.046-24.36h-24.482C122.396,10.961,111.435,0,97.915,0v24.482h24.479
|
|
||||||
c-13.52,0.002-24.478,10.962-24.478,24.481h0v24.479h0c12.698,0,23.137-9.668,24.36-22.043
|
|
||||||
C120.981,51.334,119.949,50.274,119.949,48.963z M124.833,49.084c-0.064,1.295-1.126,2.327-2.436,2.327h-0.001v22.033h24.482
|
|
||||||
v-0.003C146.876,60.745,137.208,50.308,124.833,49.084z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g opacity="0.65">
|
|
||||||
<g>
|
|
||||||
<path fill="#F9C759" d="M195.841,48.979l-0.006-0.015h0.006V48.979c0-0.005,0.001-0.01,0.001-0.015V24.482h-0.004
|
|
||||||
c-12.698,0.002-23.136,9.672-24.356,22.049c1.294,0.064,2.326,1.125,2.326,2.436c0,1.352-1.096,2.448-2.447,2.448
|
|
||||||
c-1.354,0-2.449-1.096-2.449-2.448c0-1.311,1.033-2.371,2.328-2.436c-1.222-12.379-11.661-22.049-24.361-22.049v24.481
|
|
||||||
c0,13.521,10.961,24.481,24.482,24.481v24.482h0.003c13.519-0.002,24.479-10.963,24.479-24.482h-23.884
|
|
||||||
C185.203,73.126,195.841,62.299,195.841,48.979z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g opacity="0.65">
|
|
||||||
<g>
|
|
||||||
<path fill="#6AC7BD" d="M73.44,24.001h-0.003C59.919,24.003,48.96,34.959,48.958,48.476v0.003h0.003v0.002l-0.004,0.001v0.003
|
|
||||||
c0.002,13.519,10.961,24.478,24.479,24.478s24.477-10.959,24.479-24.478v-0.003C97.916,34.963,86.958,24.003,73.44,24.001z
|
|
||||||
M73.442,50.928c-1.352,0-2.448-1.096-2.448-2.448s1.096-2.448,2.448-2.448s2.448,1.096,2.448,2.448S74.794,50.928,73.442,50.928z
|
|
||||||
"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 6.9 KiB |
@@ -26,7 +26,7 @@
|
|||||||
<email>richard.purdie@linuxfoundation.org</email>
|
<email>richard.purdie@linuxfoundation.org</email>
|
||||||
</author>
|
</author>
|
||||||
|
|
||||||
<author>
|
<!-- <author>
|
||||||
<firstname>Tomas</firstname> <surname>Frydrych</surname>
|
<firstname>Tomas</firstname> <surname>Frydrych</surname>
|
||||||
<affiliation>
|
<affiliation>
|
||||||
<orgname>Intel Corporation</orgname>
|
<orgname>Intel Corporation</orgname>
|
||||||
@@ -38,29 +38,39 @@
|
|||||||
</author>
|
</author>
|
||||||
<author>
|
<author>
|
||||||
<firstname>Dodji</firstname> <surname>Seketeli</surname>
|
<firstname>Dodji</firstname> <surname>Seketeli</surname>
|
||||||
</author>
|
</author> -->
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
|
|
||||||
<revhistory>
|
<revhistory>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>4.0+git</revnumber>
|
<revnumber>4.0+git</revnumber>
|
||||||
<date>24 November 2010</date>
|
<date>24 November 2010</date>
|
||||||
<revremark>Poky Master Documentation</revremark>
|
<revremark>Released with the Yocto Project 0.9 Release</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>5.0+git</revnumber>
|
<revnumber>1.0</revnumber>
|
||||||
<date>6 April 2011</date>
|
<date>6 April 2011</date>
|
||||||
<revremark>Released with Yocto Project 1.0 (Bernard 5.0).</revremark>
|
<revremark>Released with the Yocto Project 1.0 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>1.0.1</revnumber>
|
<revnumber>1.0.1</revnumber>
|
||||||
<date>23 May 2011</date>
|
<date>23 May 2011</date>
|
||||||
<revremark>Released with Yocto Project 1.0.1 on 23 May 2011.</revremark>
|
<revremark>Released with the Yocto Project 1.0.1 Release.</revremark>
|
||||||
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.1</revnumber>
|
||||||
|
<date>6 October 2011</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.1 Release.</revremark>
|
||||||
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.1.1</revnumber>
|
||||||
|
<date>15 March 2012</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.1.1 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>2007-2011</year>
|
<year>2007-2012</year>
|
||||||
<holder>Linux Foundation</holder>
|
<holder>Linux Foundation</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
|
|
||||||
@@ -69,6 +79,14 @@
|
|||||||
Permission is granted to copy, distribute and/or modify this document under
|
Permission is granted to copy, distribute and/or modify this document under
|
||||||
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England & Wales</ulink> as published by Creative Commons.
|
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England & Wales</ulink> as published by Creative Commons.
|
||||||
</para>
|
</para>
|
||||||
|
<note>
|
||||||
|
Due to production processes, there could be differences between the Yocto Project
|
||||||
|
documentation bundled in the release tarball and
|
||||||
|
<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 <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink> website.
|
||||||
|
For the latest version of this manual, see the manual on the website.
|
||||||
|
</note>
|
||||||
</legalnotice>
|
</legalnotice>
|
||||||
|
|
||||||
</bookinfo>
|
</bookinfo>
|
||||||
@@ -79,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"/>
|
||||||
|
|||||||
@@ -6,23 +6,23 @@
|
|||||||
<title>Reference: BitBake</title>
|
<title>Reference: BitBake</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
BitBake is a program written in Python that interprets the metadata that makes up Poky.
|
BitBake is a program written in Python that interprets the metadata that makes up the Yocto Project.
|
||||||
At some point, people wonder what actually happens when you enter:
|
At some point, developers wonder what actually happens when you enter:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ bitbake core-image-sato
|
$ bitbake core-image-sato
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This appendix provides an overview of what happens behind the scenes from BitBake's perspective.
|
This appendix provides an overview of what happens behind the scenes from BitBake's perspective.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<note><para>
|
<note>
|
||||||
BitBake strives to be a generic "task" executor that is capable of handling complex dependency relationships.
|
BitBake strives to be a generic "task" executor that is capable of handling complex dependency relationships.
|
||||||
As such, it has no real knowledge of what the tasks being executed actually do.
|
As such, it has no real knowledge of what the tasks being executed actually do.
|
||||||
BitBake just considers a list of tasks with dependencies and handles metadata
|
BitBake just considers a list of tasks with dependencies and handles metadata
|
||||||
that consists of variables in a certain format that get passed to the tasks.
|
that consists of variables in a certain format that get passed to the tasks.
|
||||||
</para></note>
|
</note>
|
||||||
|
|
||||||
<section id='ref-bitbake-parsing'>
|
<section id='ref-bitbake-parsing'>
|
||||||
<title>Parsing</title>
|
<title>Parsing</title>
|
||||||
@@ -33,61 +33,64 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The first thing BitBake does is look for the <filename>bitbake.conf</filename> file.
|
The first thing BitBake does is look for the <filename>bitbake.conf</filename> file.
|
||||||
Poky keeps this file in <filename>meta/conf/</filename>.
|
The Yocto Project keeps this file in the Yocto Project file's <filename>meta/conf/</filename>
|
||||||
|
directory.
|
||||||
BitBake finds it by examining the <filename>BBPATH</filename> environment
|
BitBake finds it by examining the <filename>BBPATH</filename> environment
|
||||||
variable and looking for the <filename>meta/conf/</filename>
|
variable and looking for the <filename>meta/conf/</filename>
|
||||||
directory.
|
directory.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
In Poky, <filename>bitbake.conf</filename> lists other configuration
|
In the Yocto Project, <filename>bitbake.conf</filename> lists other configuration
|
||||||
files to include from a <filename>conf/</filename>
|
files to include from a <filename>conf/</filename>
|
||||||
directory below the directories listed in <filename>BBPATH</filename>.
|
directory below the directories listed in <filename>BBPATH</filename>.
|
||||||
In general the most important configuration file from a user's perspective
|
In general, the most important configuration file from a user's perspective
|
||||||
is <filename>local.conf</filename>, which contains a user's customized
|
is <filename>local.conf</filename>, which contains a user's customized
|
||||||
settings for Poky.
|
settings for the Yocto Project build environment.
|
||||||
Other notable configuration files are the distribution
|
Other notable configuration files are the distribution
|
||||||
configuration file (set by the <glossterm><link linkend='var-DISTRO'>
|
configuration file (set by the
|
||||||
DISTRO</link></glossterm> variable) and the machine configuration file
|
<filename><link linkend='var-DISTRO'>DISTRO</link></filename> variable)
|
||||||
(set by the <glossterm><link linkend='var-MACHINE'>MACHINE</link>
|
and the machine configuration file
|
||||||
</glossterm> variable).
|
(set by the
|
||||||
The DISTRO and MACHINE environment variables are both usually set in
|
<filename><link linkend='var-MACHINE'>MACHINE</link></filename> variable).
|
||||||
|
The <filename>DISTRO</filename> and <filename>MACHINE</filename> environment
|
||||||
|
variables are both usually set in
|
||||||
the <filename>local.conf</filename> file.
|
the <filename>local.conf</filename> file.
|
||||||
Valid distribution
|
Valid distribution
|
||||||
configuration files are available in the <filename>
|
configuration files are available in the <filename>meta/conf/distro/</filename> directory
|
||||||
meta/conf/distro/</filename> directory and valid machine configuration
|
and valid machine configuration
|
||||||
files in the <filename>meta/conf/machine/</filename>
|
files in the <filename>meta/conf/machine/</filename> directory.
|
||||||
directory.
|
|
||||||
Within the <filename>meta/conf/machine/include/</filename>
|
Within the <filename>meta/conf/machine/include/</filename>
|
||||||
directory are various <filename>tune-*.inc</filename> configuration files that provide common
|
directory are various <filename>tune-*.inc</filename> configuration files that provide common
|
||||||
"tuning" settings specific to and shared between particular architectures and machines.
|
"tuning" settings specific to and shared between particular architectures and machines.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
After the parsing of the configuration files some standard classes are included.
|
After the parsing of the configuration files, some standard classes are included.
|
||||||
The <filename>base.bbclass</filename> file is always included.
|
The <filename>base.bbclass</filename> file is always included.
|
||||||
Other classes that are specified in the configuration using the
|
Other classes that are specified in the configuration using the
|
||||||
<glossterm><link linkend='var-INHERIT'>INHERIT</link></glossterm>
|
<filename><link linkend='var-INHERIT'>INHERIT</link></filename>
|
||||||
variable are also inculded.
|
variable are also included.
|
||||||
Class files are searched for in a classes subdirectory
|
Class files are searched for in a <filename>classes</filename> subdirectory
|
||||||
under the paths in <filename>BBPATH</filename> in the same way as
|
under the paths in <filename>BBPATH</filename> in the same way as
|
||||||
configuration files.
|
configuration files.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
After classes are included, the
|
After classes are included, the variable
|
||||||
variable <glossterm><link linkend='var-BBFILES'>BBFILES</link></glossterm>
|
<filename><link linkend='var-BBFILES'>BBFILES</link></filename>
|
||||||
is set, usually in
|
is set, usually in
|
||||||
<filename>local.conf</filename>, and defines the list of places to search for
|
<filename>local.conf</filename>, and defines the list of places to search for
|
||||||
<filename>.bb</filename> files.
|
<filename>.bb</filename> files.
|
||||||
By default, the BBFILES variable specifies the <filename>meta/recipes-*/
|
By default, the <filename>BBFILES</filename> variable specifies the
|
||||||
</filename> directory within Poky.
|
<filename>meta/recipes-*/</filename> directory within Poky.
|
||||||
Adding extra content to BBFILES is best achieved through the use of BitBake
|
Adding extra content to <filename>BBFILES</filename> is best achieved through the use of
|
||||||
<link linkend='usingpoky-changes-layers'>"layers"</link>.
|
BitBake layers as described in the
|
||||||
|
<link linkend='usingpoky-changes-layers'>BitBake Layers</link> section.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
BitBake parses each <filename>.bb</filename> file in BBFILES and
|
BitBake parses each <filename>.bb</filename> file in <filename>BBFILES</filename> and
|
||||||
stores the values of various variables.
|
stores the values of various variables.
|
||||||
In summary, for each <filename>.bb</filename>
|
In summary, for each <filename>.bb</filename>
|
||||||
file the configuration plus the base class of variables are set, followed
|
file the configuration plus the base class of variables are set, followed
|
||||||
@@ -111,29 +114,30 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Once all the <filename>.bb</filename> files have been
|
Once all the <filename>.bb</filename> files have been
|
||||||
parsed, BitBake starts to build the target (core-image-sato in the previous section's
|
parsed, BitBake starts to build the target (<filename>core-image-sato</filename>
|
||||||
example) and looks for providers of that target.
|
in the previous section's example) and looks for providers of that target.
|
||||||
Once a provider is selected, BitBake resolves all the dependencies for
|
Once a provider is selected, BitBake resolves all the dependencies for
|
||||||
the target.
|
the target.
|
||||||
In the case of "core-image-sato", it would lead to <filename>task-base.bb</filename>,
|
In the case of <filename>core-image-sato</filename>, it would lead to
|
||||||
which in turn leads to packages like <application>Contacts</application>,
|
<filename>task-base.bb</filename>,
|
||||||
<application>Dates</application> and <application>BusyBox</application>.
|
which in turn leads to packages like <filename>Contacts</filename>,
|
||||||
These packages in turn depend on glibc and the toolchain.
|
<filename>Dates</filename> and <filename>BusyBox</filename>.
|
||||||
|
These packages in turn depend on <filename>eglibc</filename> and the toolchain.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Sometimes a target might have multiple providers.
|
Sometimes a target might have multiple providers.
|
||||||
A common example is "virtual/kernel", which is provided by each kernel package.
|
A common example is "virtual/kernel", which is provided by each kernel package.
|
||||||
Each machine often elects the best kernel provider by using a line similar to the
|
Each machine often selects the best kernel provider by using a line similar to the
|
||||||
following in the machine configuration file:
|
following in the machine configuration file:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>
|
<literallayout class='monospaced'>
|
||||||
PREFERRED_PROVIDER_virtual/kernel = "linux-rp"
|
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
|
||||||
</programlisting>
|
</literallayout>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The default <glossterm><link linkend='var-PREFERRED_PROVIDER'>PREFERRED_PROVIDER</link></glossterm>
|
The default <filename><link linkend='var-PREFERRED_PROVIDER'>PREFERRED_PROVIDER</link></filename>
|
||||||
is the provider with the same name as the target.
|
is the provider with the same name as the target.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -142,17 +146,18 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-rp"
|
|||||||
that multiple versions might exist.
|
that multiple versions might exist.
|
||||||
BitBake defaults to the highest version of a provider.
|
BitBake defaults to the highest version of a provider.
|
||||||
Version comparisons are made using the same method as Debian.
|
Version comparisons are made using the same method as Debian.
|
||||||
You can use the <glossterm><link linkend='var-PREFERRED_VERSION'>PREFERRED_VERSION</link></glossterm>
|
You can use the
|
||||||
|
<filename><link linkend='var-PREFERRED_VERSION'>PREFERRED_VERSION</link></filename>
|
||||||
variable to specify a particular version (usually in the distro configuration).
|
variable to specify a particular version (usually in the distro configuration).
|
||||||
You can influence the order by using the
|
You can influence the order by using the
|
||||||
<glossterm><link linkend='var-DEFAULT_PREFERENCE'>DEFAULT_PREFERENCE</link></glossterm>
|
<filename><link linkend='var-DEFAULT_PREFERENCE'>DEFAULT_PREFERENCE</link></filename>
|
||||||
variable.
|
variable.
|
||||||
By default, files have a preference of "0".
|
By default, files have a preference of "0".
|
||||||
Setting the DEFAULT_PREFERENCE to "-1" makes the package unlikely to be used unless it is
|
Setting the <filename>DEFAULT_PREFERENCE</filename> to "-1" makes the
|
||||||
explicitly referenced.
|
package unlikely to be used unless it is explicitly referenced.
|
||||||
Setting the DEFAULT_PREFERENCE to "1" makes it likely the package is used.
|
Setting the <filename>DEFAULT_PREFERENCE</filename> to "1" makes it likely the package is used.
|
||||||
PREFERRED_VERSION overrides any DEFAULT_PREFERENCE setting.
|
<filename>PREFERRED_VERSION</filename> overrides any <filename>DEFAULT_PREFERENCE</filename> setting.
|
||||||
DEFAULT_PREFERENCE is often used to mark newer and more experimental package
|
<filename>DEFAULT_PREFERENCE</filename> is often used to mark newer and more experimental package
|
||||||
versions until they have undergone sufficient testing to be considered stable.
|
versions until they have undergone sufficient testing to be considered stable.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -165,8 +170,10 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-rp"
|
|||||||
<title>Dependencies</title>
|
<title>Dependencies</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Each target BitBake builds consists of multiple tasks such as fetch, unpack, patch, configure,
|
Each target BitBake builds consists of multiple tasks such as
|
||||||
and compile.
|
<filename>fetch</filename>, <filename>unpack</filename>,
|
||||||
|
<filename>patch</filename>, <filename>configure</filename>,
|
||||||
|
and <filename>compile</filename>.
|
||||||
For best performance on multi-core systems, BitBake considers each task as an independent
|
For best performance on multi-core systems, BitBake considers each task as an independent
|
||||||
entity with its own set of dependencies.
|
entity with its own set of dependencies.
|
||||||
</para>
|
</para>
|
||||||
@@ -175,12 +182,11 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-rp"
|
|||||||
Dependencies are defined through several variables.
|
Dependencies are defined through several variables.
|
||||||
You can find information about variables BitBake uses in the
|
You can find information about variables BitBake uses in the
|
||||||
<ulink url='http://bitbake.berlios.de/manual/'>BitBake manual</ulink>.
|
<ulink url='http://bitbake.berlios.de/manual/'>BitBake manual</ulink>.
|
||||||
At a basic level it is sufficient to know that BitBake uses the
|
At a basic level, it is sufficient to know that BitBake uses the
|
||||||
<glossterm><link linkend='var-DEPENDS'>DEPENDS</link></glossterm> and
|
<filename><link linkend='var-DEPENDS'>DEPENDS</link></filename> and
|
||||||
<glossterm><link linkend='var-RDEPENDS'>RDEPENDS</link></glossterm> variables when
|
<filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename> variables when
|
||||||
calculating dependencies.
|
calculating dependencies.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='ref-bitbake-tasklist'>
|
<section id='ref-bitbake-tasklist'>
|
||||||
@@ -191,39 +197,49 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-rp"
|
|||||||
BitBake can now calculate exactly what tasks it needs to run and in what
|
BitBake can now calculate exactly what tasks it needs to run and in what
|
||||||
order it needs to run them.
|
order it needs to run them.
|
||||||
The build now starts with BitBake forking off threads up to the limit set in the
|
The build now starts with BitBake forking off threads up to the limit set in the
|
||||||
<glossterm><link linkend='var-BB_NUMBER_THREADS'>BB_NUMBER_THREADS</link></glossterm> variable.
|
<filename><link linkend='var-BB_NUMBER_THREADS'>BB_NUMBER_THREADS</link></filename> variable.
|
||||||
BitBake continues to fork threads as long as there are tasks ready to run,
|
BitBake continues to fork threads as long as there are tasks ready to run,
|
||||||
those tasks have all their dependencies met, and the thread threshold has not been
|
those tasks have all their dependencies met, and the thread threshold has not been
|
||||||
exceeded.
|
exceeded.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
It is worth noting that you can greatly speed up the build time by properly setting
|
||||||
|
the <filename>BB_NUMBER_THREADS</filename> variable.
|
||||||
|
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 in the
|
||||||
|
<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.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
As each task completes, a timestamp is written to the directory specified by the
|
As each task completes, a timestamp is written to the directory specified by the
|
||||||
<glossterm><link linkend='var-STAMPS'>STAMPS</link></glossterm> variable (usually
|
<filename><link linkend='var-STAMPS'>STAMPS</link></filename> variable (usually
|
||||||
<filename>build/tmp/stamps/*/</filename>).
|
<filename>build/tmp/stamps/*/</filename>).
|
||||||
On subsequent runs, BitBake looks at the STAMPS directory and does not rerun
|
On subsequent runs, BitBake looks at the <filename>STAMPS</filename> directory and does not rerun
|
||||||
tasks that are already completed unless a timestamp is found to be invalid.
|
tasks that are already completed unless a timestamp is found to be invalid.
|
||||||
Currently, invalid timestamps are only considered on a per
|
Currently, invalid timestamps are only considered on a per
|
||||||
<filename>.bb</filename> file basis.
|
<filename>.bb</filename> file basis.
|
||||||
So, for example, if the configure stamp has a timestamp greater than the
|
So, for example, if the configure stamp has a timestamp greater than the
|
||||||
compile timestamp for a given target then the compile task would rerun.
|
compile timestamp for a given target, then the compile task would rerun.
|
||||||
Running the compile task again, however, has no effect on other providers
|
Running the compile task again, however, has no effect on other providers
|
||||||
that depend on that target.
|
that depend on that target.
|
||||||
This behavior could change or become configurable in future versions of BitBake.
|
This behavior could change or become configurable in future versions of BitBake.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<note><para>
|
<note>
|
||||||
Some tasks are marked as "nostamp" tasks.
|
Some tasks are marked as "nostamp" tasks.
|
||||||
No timestamp file is created when these tasks are run.
|
No timestamp file is created when these tasks are run.
|
||||||
Consequently, "nostamp" tasks are always rerun.
|
Consequently, "nostamp" tasks are always rerun.
|
||||||
</para></note>
|
</note>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='ref-bitbake-runtask'>
|
<section id='ref-bitbake-runtask'>
|
||||||
<title>Running a Task</title>
|
<title>Running a Task</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Tasks can either be a shell task or a python task.
|
Tasks can either be a shell task or a Python task.
|
||||||
For shell tasks, BitBake writes a shell script to
|
For shell tasks, BitBake writes a shell script to
|
||||||
<filename>${WORKDIR}/temp/run.do_taskname.pid</filename> and then executes the script.
|
<filename>${WORKDIR}/temp/run.do_taskname.pid</filename> and then executes the script.
|
||||||
The generated shell script contains all the exported variables, and the shell functions
|
The generated shell script contains all the exported variables, and the shell functions
|
||||||
@@ -244,14 +260,56 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-rp"
|
|||||||
<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>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Following is the BitBake manpage:
|
Following is the BitBake help output:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
@@ -268,7 +326,8 @@ Options:
|
|||||||
-h, --help show this help message and exit
|
-h, --help show this help message and exit
|
||||||
-b BUILDFILE, --buildfile=BUILDFILE
|
-b BUILDFILE, --buildfile=BUILDFILE
|
||||||
execute the task against this .bb file, rather than a
|
execute the task against this .bb file, rather than a
|
||||||
package from BBFILES.
|
package from BBFILES. Does not handle any
|
||||||
|
dependencies.
|
||||||
-k, --continue continue as much as possible after an error. While the
|
-k, --continue continue as much as possible after an error. While the
|
||||||
target that failed, and those that depend on it,
|
target that failed, and those that depend on it,
|
||||||
cannot be remade, the other dependencies of these
|
cannot be remade, the other dependencies of these
|
||||||
@@ -276,8 +335,6 @@ Options:
|
|||||||
-a, --tryaltconfigs continue with builds by trying to use alternative
|
-a, --tryaltconfigs continue with builds by trying to use alternative
|
||||||
providers where possible.
|
providers where possible.
|
||||||
-f, --force force run of specified cmd, regardless of stamp status
|
-f, --force force run of specified cmd, regardless of stamp status
|
||||||
-i, --interactive drop into the interactive mode also called the BitBake
|
|
||||||
shell.
|
|
||||||
-c CMD, --cmd=CMD Specify task to execute. Note that this only executes
|
-c CMD, --cmd=CMD Specify task to execute. Note that this only executes
|
||||||
the specified task for the providee and the packages
|
the specified task for the providee and the packages
|
||||||
it depends on, i.e. 'compile' does not implicitly call
|
it depends on, i.e. 'compile' does not implicitly call
|
||||||
@@ -285,26 +342,35 @@ Options:
|
|||||||
what you are doing). Depending on the base.bbclass a
|
what you are doing). Depending on the base.bbclass a
|
||||||
listtasks tasks is defined and will show available
|
listtasks tasks is defined and will show available
|
||||||
tasks
|
tasks
|
||||||
-r FILE, --read=FILE read the specified file before bitbake.conf
|
-r PREFILE, --read=PREFILE
|
||||||
|
read the specified file before bitbake.conf
|
||||||
|
-R POSTFILE, --postread=POSTFILE
|
||||||
|
read the specified file after bitbake.conf
|
||||||
-v, --verbose output more chit-chat to the terminal
|
-v, --verbose output more chit-chat to the terminal
|
||||||
-D, --debug Increase the debug level. You can specify this more
|
-D, --debug Increase the debug level. You can specify this more
|
||||||
than once.
|
than once.
|
||||||
-n, --dry-run don't execute, just go through the motions
|
-n, --dry-run don't execute, just go through the motions
|
||||||
|
-S, --dump-signatures
|
||||||
|
don't execute, just dump out the signature
|
||||||
|
construction information
|
||||||
-p, --parse-only quit after parsing the BB files (developers only)
|
-p, --parse-only quit after parsing the BB files (developers only)
|
||||||
-d, --disable-psyco disable using the psyco just-in-time compiler (not
|
|
||||||
recommended)
|
|
||||||
-s, --show-versions show current and preferred versions of all packages
|
-s, --show-versions show current and preferred versions of all packages
|
||||||
-e, --environment show the global or per-package environment (this is
|
-e, --environment show the global or per-package environment (this is
|
||||||
what used to be bbread)
|
what used to be bbread)
|
||||||
-g, --graphviz emit the dependency trees of the specified packages in
|
-g, --graphviz emit the dependency trees of the specified packages in
|
||||||
the dot syntax
|
the dot syntax
|
||||||
-I IGNORED_DOT_DEPS, --ignore-deps=IGNORED_DOT_DEPS
|
-I EXTRA_ASSUME_PROVIDED, --ignore-deps=EXTRA_ASSUME_PROVIDED
|
||||||
Stop processing at the given list of dependencies when
|
Assume these dependencies don't exist and are already
|
||||||
generating dependency graphs. This can help to make
|
provided (equivalent to ASSUME_PROVIDED). Useful to
|
||||||
the graph more appealing
|
make dependency graphs more appealing
|
||||||
-l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS
|
-l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS
|
||||||
Show debug logging for the specified logging domains
|
Show debug logging for the specified logging domains
|
||||||
-P, --profile profile the command and print a report
|
-P, --profile profile the command and print a report
|
||||||
|
-u UI, --ui=UI userinterface to use
|
||||||
|
-t SERVERTYPE, --servertype=SERVERTYPE
|
||||||
|
Choose which server to use, none, process or xmlrpc
|
||||||
|
--revisions-changed Set the exit code depending on whether upstream
|
||||||
|
floating revisions have changed or not
|
||||||
</screen>
|
</screen>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -321,22 +387,22 @@ Options:
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Fetchers are usually triggered by entries in
|
Fetchers are usually triggered by entries in
|
||||||
<glossterm><link linkend='var-SRC_URI'>SRC_URI</link></glossterm>.
|
<filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>.
|
||||||
You can find information about the options and formats of entries for specific
|
You can find information about the options and formats of entries for specific
|
||||||
fetchers in the <ulink url='http://bitbake.berlios.de/manual/'>BitBake manual</ulink>.
|
fetchers in the <ulink url='http://bitbake.berlios.de/manual/'>BitBake manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
One useful feature for certain SCM fetchers is the ability to
|
One useful feature for certain Source Code Manager (SCM) fetchers is the ability to
|
||||||
"auto-update" when the upstream SCM changes version.
|
"auto-update" when the upstream SCM changes version.
|
||||||
Since this ability requires certain functionality from the SCM, not all
|
Since this ability requires certain functionality from the SCM, not all
|
||||||
systems support it.
|
systems support it.
|
||||||
Currently Subversion, Bazaar and to a limited extent, Git support the ability to "auto-update".
|
Currently Subversion, Bazaar and to a limited extent, Git support the ability to "auto-update".
|
||||||
This feature works using the <glossterm><link linkend='var-SRCREV'>SRCREV</link></glossterm>
|
This feature works using the <filename><link linkend='var-SRCREV'>SRCREV</link></filename>
|
||||||
variable.
|
variable.
|
||||||
See the
|
See the
|
||||||
<link linkend='platdev-appdev-srcrev'>Developing within Poky with an External SCM-based Package</link>
|
<link linkend='platdev-appdev-srcrev'>Development Within Yocto Project for a Package that Uses
|
||||||
section for more information.
|
an External SCM</link> section for more information.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -6,21 +6,21 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Class files are used to abstract common functionality and share it amongst multiple
|
Class files are used to abstract common functionality and share it amongst multiple
|
||||||
<filename>.bb</filename> files. Any metadata usually found in a
|
<filename>.bb</filename> files.
|
||||||
<filename>.bb</filename> file can also be placed in a class
|
Any metadata usually found in a <filename>.bb</filename> file can also be placed in a class
|
||||||
file. Class files are identified by the extension
|
file.
|
||||||
<filename>.bbclass</filename> and are usually placed
|
Class files are identified by the extension <filename>.bbclass</filename> and are usually placed
|
||||||
in a <filename>classes/</filename> directory beneath the
|
in a <filename>classes/</filename> directory beneath the
|
||||||
<filename>meta*/</filename> directory or the directory pointed
|
<filename>meta*/</filename> directory found in the Yocto Project file's area
|
||||||
by BUILDDIR (e.g. <filename>build/</filename>)in the same way as
|
Class files can also be pointed to by BUILDDIR (e.g. <filename>build/</filename>)in the same way as
|
||||||
<filename>.conf</filename> files in the <filename
|
<filename>.conf</filename> files in the <filename>conf</filename> directory.
|
||||||
class="directory">conf</filename> directory. Class files are searched for
|
Class files are searched for in <filename>BBPATH</filename>
|
||||||
in BBPATH in the same was as <filename>.conf</filename> files too.
|
using the same method by which <filename>.conf</filename> files are searched.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
In most cases inheriting the class is enough to enable its features, although
|
In most cases inheriting the class is enough to enable its features, although
|
||||||
for some classes you may need to set variables and/or override some of the
|
for some classes you might need to set variables or override some of the
|
||||||
default behaviour.
|
default behaviour.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -29,13 +29,14 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The base class is special in that every <filename>.bb</filename>
|
The base class is special in that every <filename>.bb</filename>
|
||||||
file inherits it automatically. It contains definitions of standard basic
|
file inherits it automatically.
|
||||||
|
This class contains definitions for standard basic
|
||||||
tasks such as fetching, unpacking, configuring (empty by default), compiling
|
tasks such as fetching, unpacking, configuring (empty by default), compiling
|
||||||
(runs any Makefile present), installing (empty by default) and packaging
|
(runs any <filename>Makefile</filename> present), installing (empty by default) and packaging
|
||||||
(empty by default). These are often overridden or extended by other classes
|
(empty by default).
|
||||||
such as <filename>autotools.bbclass</filename> or
|
These classes are often overridden or extended by other classes
|
||||||
<filename>package.bbclass</filename>. The class also contains some commonly
|
such as <filename>autotools.bbclass</filename> or <filename>package.bbclass</filename>.
|
||||||
used functions such as <filename>oe_runmake</filename>.
|
The class also contains some commonly used functions such as <filename>oe_runmake</filename>.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -43,84 +44,71 @@
|
|||||||
<title>Autotooled Packages - <filename>autotools.bbclass</filename></title>
|
<title>Autotooled Packages - <filename>autotools.bbclass</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Autotools (autoconf, automake, libtool) bring standardization.
|
Autotools (<filename>autoconf</filename>, <filename>automake</filename>,
|
||||||
|
and <filename>libtool</filename>) bring standardization.
|
||||||
This class defines a set of tasks (configure, compile etc.) that
|
This class defines a set of tasks (configure, compile etc.) that
|
||||||
work for all autotooled packages.
|
work for all Autotooled packages.
|
||||||
It should usually be enough to define a few standard variables as documented in the
|
It should usually be enough to define a few standard variables as documented in the
|
||||||
<link linkend='usingpoky-extend-addpkg-autotools'>simple autotools
|
<link linkend='usingpoky-extend-addpkg-autotools'>Autotooled Package</link> section
|
||||||
example</link> section and then simply "inherit autotools".
|
and then simply <filename>inherit autotools</filename>.
|
||||||
This class can also work with software that emulates autotools.
|
This class can also work with software that emulates Autotools.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
It's useful to have some idea of how the tasks defined by this class work
|
It's useful to have some idea of how the tasks defined by this class work
|
||||||
and what they do behind the scenes.
|
and what they do behind the scenes.
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><filename>do_configure</filename> ‐ regenerates the
|
||||||
|
configure script (using <filename>autoreconf</filename>) and then launches it
|
||||||
|
with a standard set of arguments used during cross-compilation.
|
||||||
|
You can pass additional parameters to <filename>configure</filename> through the
|
||||||
|
<filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link></filename> variable.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><filename>do_compile</filename> ‐ runs <filename>make</filename> with
|
||||||
|
arguments that specify the compiler and linker.
|
||||||
|
You can pass additional arguments through
|
||||||
|
the <filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link></filename> variable.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><filename>do_install</filename> ‐ runs <filename>make install</filename>
|
||||||
|
and passes a DESTDIR option, which takes its value from the standard
|
||||||
|
<filename><link linkend='var-DESTDIR'>DESTDIR</link></filename> variable.
|
||||||
|
</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<filename>do_configure</filename> ‐ regenerates the configure script (using autoreconf)
|
|
||||||
and then launches it with a standard set of arguments used during
|
|
||||||
cross-compilation.
|
|
||||||
You can pass additional parameters to
|
|
||||||
<filename>configure</filename> through the
|
|
||||||
<glossterm><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link></glossterm> variable.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<filename>do_compile</filename> ‐ runs <filename>make</filename> with
|
|
||||||
arguments that specify the compiler and linker.
|
|
||||||
You can pass additional arguments through
|
|
||||||
the <glossterm><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link>
|
|
||||||
</glossterm> variable.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<filename>do_install</filename> ‐ runs <filename>make install</filename>
|
|
||||||
and passes a <filename>DESTDIR</filename>
|
|
||||||
option, which takes its value from the standard
|
|
||||||
<glossterm><link linkend='var-DESTDIR'>DESTDIR</link></glossterm> variable.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='ref-classes-update-alternatives'>
|
<section id='ref-classes-update-alternatives'>
|
||||||
<title>Alternatives - <filename>update-alternatives.bbclass</filename></title>
|
<title>Alternatives - <filename>update-alternatives.bbclass</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Several programs can fulfill the same or similar function and
|
Several programs can fulfill the same or similar function and be installed with the same name.
|
||||||
be installed with the same name.
|
For example, the <filename>ar</filename> command is available from the
|
||||||
For example, the <filename>ar</filename>
|
<filename>busybox</filename>, <filename>binutils</filename> and
|
||||||
command is available from the "busybox", "binutils" and "elfutils" packages.
|
<filename>elfutils</filename> packages.
|
||||||
The <filename>update-alternatives.bbclass</filename> class handles renaming the
|
The <filename>update-alternatives.bbclass</filename> class handles renaming the
|
||||||
binaries so that multiple packages can be installed without conflicts.
|
binaries so that multiple packages can be installed without conflicts.
|
||||||
The <filename>ar</filename> command still works regardless of which packages are installed
|
The <filename>ar</filename> command still works regardless of which packages are installed
|
||||||
or subsequently removed.
|
or subsequently removed.
|
||||||
The class renames the conflicting binary in each package
|
The class renames the conflicting binary in each package and symlinks the highest
|
||||||
and symlinks the highest priority binary during installation or removal
|
priority binary during installation or removal of packages.
|
||||||
of packages.
|
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Four variables control this class:
|
Four variables control this class:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><filename>ALTERNATIVE_NAME</filename> ‐ The name of the
|
||||||
|
binary that is replaced (<filename>ar</filename> in this example).</para></listitem>
|
||||||
|
<listitem><para><filename>ALTERNATIVE_LINK</filename> ‐ The path to
|
||||||
|
the resulting binary (<filename>/bin/ar</filename> in this example).</para></listitem>
|
||||||
|
<listitem><para><filename>ALTERNATIVE_PATH</filename> ‐ The path to the
|
||||||
|
real binary (<filename>/usr/bin/ar.binutils</filename> in this example).</para></listitem>
|
||||||
|
<listitem><para><filename>ALTERNATIVE_PRIORITY</filename> ‐ The priority of
|
||||||
|
the binary.
|
||||||
|
The version with the most features should have the highest priority.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
<itemizedlist>
|
|
||||||
<listitem><para><filename>ALTERNATIVE_NAME</filename> ‐ The name of the
|
|
||||||
binary that is replaced (<filename>ar</filename> in this example).</para></listitem>
|
|
||||||
<listitem><para><filename>ALTERNATIVE_LINK</filename> ‐ The path to
|
|
||||||
the resulting binary (<filename>/bin/ar</filename> in this example).</para></listitem>
|
|
||||||
<listitem><para><filename>ALTERNATIVE_PATH</filename> ‐ The path to the
|
|
||||||
real binary (<filename>/usr/bin/ar.binutils</filename> in this example).</para></listitem>
|
|
||||||
<listitem><para><filename>ALTERNATIVE_PRIORITY</filename> ‐ The priority of
|
|
||||||
the binary.
|
|
||||||
The version with the most features should have the highest priority.</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
<para>
|
<para>
|
||||||
Currently, only one binary per package is supported.
|
Currently, the Yocto Project supports only one binary per package.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -128,14 +116,15 @@
|
|||||||
<title>Initscripts - <filename>update-rc.d.bbclass</filename></title>
|
<title>Initscripts - <filename>update-rc.d.bbclass</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This class uses update-rc.d to safely install an initscript on behalf of
|
This class uses <filename>update-rc.d</filename> to safely install an
|
||||||
the package. Details such as making sure the initscript is stopped before
|
initialization script on behalf of the package.
|
||||||
a package is removed and started when the package is installed are taken
|
The Yocto Project takes care of details such as making sure the script is stopped before
|
||||||
care of. Three variables control this class,
|
a package is removed and started when the package is installed.
|
||||||
<link linkend='var-INITSCRIPT_PACKAGES'>INITSCRIPT_PACKAGES</link>,
|
Three variables control this class:
|
||||||
<link linkend='var-INITSCRIPT_NAME'>INITSCRIPT_NAME</link> and
|
<filename><link linkend='var-INITSCRIPT_PACKAGES'>INITSCRIPT_PACKAGES</link></filename>,
|
||||||
<link linkend='var-INITSCRIPT_PARAMS'>INITSCRIPT_PARAMS</link>. See the
|
<filename><link linkend='var-INITSCRIPT_NAME'>INITSCRIPT_NAME</link></filename> and
|
||||||
links for details.
|
<filename><link linkend='var-INITSCRIPT_PARAMS'>INITSCRIPT_PARAMS</link></filename>.
|
||||||
|
See the variable links for details.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -143,17 +132,17 @@
|
|||||||
<title>Binary config scripts - <filename>binconfig.bbclass</filename></title>
|
<title>Binary config scripts - <filename>binconfig.bbclass</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Before pkg-config had become widespread, libraries shipped shell
|
Before <filename>pkg-config</filename> had become widespread, libraries shipped shell
|
||||||
scripts to give information about the libraries and include paths needed
|
scripts to give information about the libraries and include paths needed
|
||||||
to build software (usually named 'LIBNAME-config'). This class assists
|
to build software (usually named <filename>LIBNAME-config</filename>).
|
||||||
any recipe using such scripts.
|
This class assists any recipe using such scripts.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
During staging Bitbake installs such scripts into the <filename
|
During staging, Bitbake installs such scripts into the
|
||||||
class="directory">sysroots/</filename> directory. It also changes all
|
<filename>sysroots/</filename> directory.
|
||||||
paths to point into the <filename>sysroots/</filename>
|
BitBake also changes all paths to point into the <filename>sysroots/</filename>
|
||||||
directory so all builds which use the script will use the correct
|
directory so all builds that use the script will use the correct
|
||||||
directories for the cross compiling layout.
|
directories for the cross compiling layout.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -163,8 +152,8 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
This class renames packages so that they follow the Debian naming
|
This class renames packages so that they follow the Debian naming
|
||||||
policy, i.e. 'glibc' becomes 'libc6' and 'glibc-devel' becomes
|
policy (i.e. <filename>eglibc</filename> becomes <filename>libc6</filename>
|
||||||
'libc6-dev'.
|
and <filename>eglibc-devel</filename> becomes <filename>libc6-dev</filename>.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -172,15 +161,15 @@
|
|||||||
<title>Pkg-config - <filename>pkgconfig.bbclass</filename></title>
|
<title>Pkg-config - <filename>pkgconfig.bbclass</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Pkg-config brought standardisation and this class aims to make its
|
<filename>pkg-config</filename> brought standardization and this class aims to make its
|
||||||
integration smooth for all libraries which make use of it.
|
integration smooth for all libraries that make use of it.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
During staging Bitbake installs pkg-config data into the <filename
|
During staging, Bitbake installs <filename>pkg-config</filename> data into the
|
||||||
class="directory">sysroots/</filename> directory. By making use of
|
<filename>sysroots/</filename> directory.
|
||||||
sysroot functionality within pkgconfig this class no longer has to
|
By making use of sysroot functionality within <filename>pkg-config</filename>,
|
||||||
manipulate the files.
|
this class no longer has to manipulate the files.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -188,126 +177,173 @@
|
|||||||
<title>Distribution of sources - <filename>src_distribute_local.bbclass</filename></title>
|
<title>Distribution of sources - <filename>src_distribute_local.bbclass</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Many software licenses require providing the sources for compiled
|
Many software licenses require that source files be provided along with the binaries.
|
||||||
binaries. To simplify this process two classes were created:
|
To simplify this process, two classes were created:
|
||||||
<filename>src_distribute.bbclass</filename> and
|
<filename>src_distribute.bbclass</filename> and
|
||||||
<filename>src_distribute_local.bbclass</filename>.
|
<filename>src_distribute_local.bbclass</filename>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Result of their work are <filename>tmp/deploy/source/</filename>
|
The results of these classes are <filename>tmp/deploy/source/</filename>
|
||||||
subdirs with sources sorted by <glossterm><link linkend='var-LICENSE'>LICENSE</link>
|
subdirs with sources sorted by
|
||||||
</glossterm> field. If recipe lists few licenses (or has entries like "Bitstream Vera") source archive is put in each
|
<filename><link linkend='var-LICENSE'>LICENSE</link></filename> field.
|
||||||
license dir.
|
If recipes list few licenses (or have entries like "Bitstream Vera"),
|
||||||
|
the source archive is placed in each license directory.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Src_distribute_local class has three modes of operating:
|
This class operates using three modes:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><emphasis>copy:</emphasis> Copies the files to the
|
||||||
|
distribute directory.</para></listitem>
|
||||||
|
<listitem><para><emphasis>symlink:</emphasis> Symlinks the files to the
|
||||||
|
distribute directory.</para></listitem>
|
||||||
|
<listitem><para><emphasis>move+symlink:</emphasis> Moves the files into
|
||||||
|
the distribute directory and then symlinks them back.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem><para>copy - copies the files to the distribute dir</para></listitem>
|
|
||||||
<listitem><para>symlink - symlinks the files to the distribute dir</para></listitem>
|
|
||||||
<listitem><para>move+symlink - moves the files into distribute dir, and symlinks them back</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='ref-classes-perl'>
|
<section id='ref-classes-perl'>
|
||||||
<title>Perl modules - <filename>cpan.bbclass</filename></title>
|
<title>Perl modules - <filename>cpan.bbclass</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Recipes for Perl modules are simple - usually needs only
|
Recipes for Perl modules are simple.
|
||||||
pointing to source archive and inheriting of proper bbclass.
|
These recipes usually only need to point to the source's archive and then inherit the
|
||||||
Building is split into two methods dependly on method used by
|
proper <filename>.bbclass</filename> file.
|
||||||
module authors.
|
Building is split into two methods depending on which method the module authors used.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Modules which use old Makefile.PL based build system require
|
Modules that use old <filename>Makefile.PL</filename>-based build system require
|
||||||
using of <filename>cpan.bbclass</filename> in their recipes.
|
<filename>cpan.bbclass</filename> in their recipes.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Modules which use Build.PL based build system require
|
Modules that use <filename>Build.PL</filename>-based build system require
|
||||||
using of <filename>cpan_build.bbclass</filename> in their recipes.
|
using <filename>cpan_build.bbclass</filename> in their recipes.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='ref-classes-distutils'>
|
<section id='ref-classes-distutils'>
|
||||||
<title>Python extensions - <filename>distutils.bbclass</filename></title>
|
<title>Python extensions - <filename>distutils.bbclass</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Recipes for Python extensions are simple - they usually only
|
Recipes for Python extensions are simple.
|
||||||
require pointing to the source archive and inheriting the proper
|
These recipes usually only need to point to the source's archive and then inherit
|
||||||
bbclasses.
|
the proper <filename>.bbclass</filename> file.
|
||||||
Building is split into two methods depending on the build method
|
Building is split into two methods dependling on which method the module authors used.
|
||||||
used by the module authors.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Extensions which use autotools based build system require use
|
Extensions that use an Autotools-based build system require Autotools and
|
||||||
of autotools and distutils-base bbclasses in their recipes.
|
<filename>distutils</filename>-based <filename>.bbclasse</filename> files in their recipes.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Extensions which use distutils build system require use
|
Extensions that use <filename>distutils</filename>-based build systems require
|
||||||
of <filename>distutils.bbclass</filename> in their recipes.
|
<filename>distutils.bbclass</filename> in their recipes.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='ref-classes-devshell'>
|
<section id='ref-classes-devshell'>
|
||||||
<title>Developer Shell - <filename>devshell.bbclass</filename></title>
|
<title>Developer Shell - <filename>devshell.bbclass</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This class adds the devshell task. Its usually up to distribution policy
|
This class adds the <filename>devshell</filename> task.
|
||||||
to include this class (Poky does). See the <link
|
Distribution policy dictates whether to include this class as the Yocto Project does.
|
||||||
linkend='platdev-appdev-devshell'>developing with 'devshell' section</link>
|
See the <link
|
||||||
|
linkend='platdev-appdev-devshell'>Development Within a Development Shell</link> section
|
||||||
for more information about using devshell.
|
for more information about using devshell.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='ref-classes-package'>
|
<section id='ref-classes-package'>
|
||||||
<title>Packaging - <filename>package*.bbclass</filename></title>
|
<title>Packaging - <filename>package*.bbclass</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The packaging classes add support for generating packages from a builds
|
The packaging classes add support for generating packages from a build's
|
||||||
output. The core generic functionality is in
|
output.
|
||||||
<filename>package.bbclass</filename>, code specific to particular package
|
The core generic functionality is in <filename>package.bbclass</filename>.
|
||||||
types is contained in various sub classes such as
|
The code specific to particular package types is contained in various sub-classes such as
|
||||||
<filename>package_deb.bbclass</filename>, <filename>package_ipk.bbclass</filename>
|
<filename>package_deb.bbclass</filename>, <filename>package_ipk.bbclass</filename>,
|
||||||
and <filename>package_rpm.bbclass</filename>. Most users will
|
and <filename>package_rpm.bbclass</filename>.
|
||||||
want one or more of these classes and this is controlled by the <glossterm>
|
Most users will want one or more of these classes.
|
||||||
<link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link></glossterm>
|
</para>
|
||||||
variable. The first class listed in this variable will be used for image
|
|
||||||
generation. Since images are generated from packages a packaging class is
|
<para>
|
||||||
|
You can control the list of resulting package formats by using the
|
||||||
|
<filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link></filename>
|
||||||
|
variable defined in the <filename>local.conf</filename> configuration file
|
||||||
|
found in the Yocto Project file's <filename>conf</filename> directory.
|
||||||
|
When defining the variable, you can specify one or more package types.
|
||||||
|
Since images are generated from packages, a packaging class is
|
||||||
needed to enable image generation.
|
needed to enable image generation.
|
||||||
|
The first class listed in this variable is used for image generation.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The package class you choose can affect build-time performance and has space
|
||||||
|
ramifications.
|
||||||
|
In general, building a package with RPM takes about thirty percent more time as
|
||||||
|
compared to using IPK to build the same or similar package.
|
||||||
|
This comparison takes into account a complete build of the package with all
|
||||||
|
dependencies previously built.
|
||||||
|
The reason for this discrepancy is because the RPM package manager creates and
|
||||||
|
processes more metadata than the IPK package manager.
|
||||||
|
Consequently, you might consider setting <filename>PACKAGE_CLASSES</filename>
|
||||||
|
to "package_ipk" if you are building smaller systems.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Keep in mind, however, that RPM starts to provide more abilities than IPK due to
|
||||||
|
the fact that it processes more metadata.
|
||||||
|
For example, this information includes individual file types, file checksum generation
|
||||||
|
and evaluation on install, sparse file support, conflict detection and resolution
|
||||||
|
for multilib systems, ACID style upgrade, and repackaging abilities for rollbacks.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Another consideration for packages built using the RPM package manager is space.
|
||||||
|
For smaller systems, the extra space used for the Berkley Database and the amount
|
||||||
|
of metadata can affect your ability to do on-device upgrades.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You can find additional information on the effects of the package class at these
|
||||||
|
two Yocto Project mailing list links:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><ulink url='https://lists.yoctoproject.org/pipermail/poky/2011-May/006362.html'>
|
||||||
|
https://lists.yoctoproject.org/pipermail/poky/2011-May/006362.html</ulink></para></listitem>
|
||||||
|
<listitem><para><ulink url='https://lists.yoctoproject.org/pipermail/poky/2011-May/006363.html'>
|
||||||
|
https://lists.yoctoproject.org/pipermail/poky/2011-May/006363.html</ulink></para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='ref-classes-kernel'>
|
<section id='ref-classes-kernel'>
|
||||||
<title>Building kernels - <filename>kernel.bbclass</filename></title>
|
<title>Building kernels - <filename>kernel.bbclass</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This class handles building of Linux kernels and the class contains code to know how to build both 2.4 and 2.6 kernel trees. All needed headers are
|
This class handles building Linux kernels.
|
||||||
staged into <glossterm><link
|
The class contains code to build all kernel trees.
|
||||||
linkend='var-STAGING_KERNEL_DIR'>STAGING_KERNEL_DIR</link></glossterm>
|
All needed headers are staged into the
|
||||||
directory to allow building of out-of-tree modules using <filename>module.bbclass</filename>.
|
<filename><link linkend='var-STAGING_KERNEL_DIR'>STAGING_KERNEL_DIR</link></filename>
|
||||||
|
directory to allow out-of-tree module builds using <filename>module.bbclass</filename>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This means that each kernel module built is packaged separately and inter-module dependencies are
|
This means that each built kernel module is packaged separately and inter-module
|
||||||
created by parsing the <filename>modinfo</filename> output. If all modules are
|
dependencies are created by parsing the <filename>modinfo</filename> output.
|
||||||
required then installing the "kernel-modules" package will install all
|
If all modules are required, then installing the <filename>kernel-modules</filename>
|
||||||
packages with modules and various other kernel packages such as "kernel-vmlinux".
|
package installs all packages with modules and various other kernel packages
|
||||||
|
such as <filename>kernel-vmlinux</filename>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Various other classes are used by the kernel and module classes internally including
|
Various other classes are used by the kernel and module classes internally including
|
||||||
<filename>kernel-arch.bbclass</filename>, <filename>module_strip.bbclass</filename>,
|
<filename>kernel-arch.bbclass</filename>, <filename>module_strip.bbclass</filename>,
|
||||||
<filename>module-base.bbclass</filename> and <filename>linux-kernel-base.bbclass</filename>.
|
<filename>module-base.bbclass</filename>, and <filename>linux-kernel-base.bbclass</filename>.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -315,18 +351,20 @@
|
|||||||
<title>Creating images - <filename>image.bbclass</filename> and <filename>rootfs*.bbclass</filename></title>
|
<title>Creating images - <filename>image.bbclass</filename> and <filename>rootfs*.bbclass</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Those classes add support for creating images in many formats. First the
|
These classes add support for creating images in several formats.
|
||||||
rootfs is created from packages by one of the <filename>rootfs_*.bbclass</filename>
|
First, the root filesystem is created from packages using
|
||||||
files (depending on package format used) and then image is created.
|
one of the <filename>rootfs_*.bbclass</filename>
|
||||||
|
files (depending on the package format used) and then the image is created.
|
||||||
|
</para>
|
||||||
|
|
||||||
The <glossterm><link
|
<para>
|
||||||
linkend='var-IMAGE_FSTYPES'>IMAGE_FSTYPES</link></glossterm>
|
The <filename><link linkend='var-IMAGE_FSTYPES'>IMAGE_FSTYPES</link></filename>
|
||||||
variable controls which types of image to generate.
|
variable controls the types of images to generate.
|
||||||
|
</para>
|
||||||
The list of packages to install into the image is controlled by the
|
|
||||||
<glossterm><link
|
<para>
|
||||||
linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></glossterm>
|
The <filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename>
|
||||||
variable.
|
variable controls the list of packages to install into the image.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -334,11 +372,12 @@
|
|||||||
<title>Host System sanity checks - <filename>sanity.bbclass</filename></title>
|
<title>Host System sanity checks - <filename>sanity.bbclass</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This class checks prerequisite software is present to
|
This class checks to see if prerequisite software is present so that
|
||||||
notify the users of potential problems that will affect their build. It
|
users can be notified of potential problems that might affect their build.
|
||||||
also performs basic checks of the user configuration from local.conf to
|
The class also performs basic user configuration checks from
|
||||||
prevent common mistakes resulting in build failures. It's usually up to
|
the <filename>local.conf</filename> configuration file to
|
||||||
distribution policy whether to include this class (Poky does).
|
prevent common mistakes that cause build failures.
|
||||||
|
Distribution policy usually whether to include this class as the Yocto Project does.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -346,11 +385,92 @@
|
|||||||
<title>Generated output quality assurance checks - <filename>insane.bbclass</filename></title>
|
<title>Generated output quality assurance checks - <filename>insane.bbclass</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This class adds a step to package generation which sanity checks the
|
This class adds a step to the package generation process that sanity checks the
|
||||||
packages generated by Poky. There are an ever increasing range of checks
|
packages generated by the Yocto Project.
|
||||||
it performs, checking for common problems which break builds/packages/images,
|
A range of checks are performed that check the build's output
|
||||||
see the bbclass file for more information. It's usually up to distribution
|
for common problems that show up during runtime.
|
||||||
policy whether to include this class (Poky does).
|
Distribution policy usually dictates whether to include this class as the Yocto Project does.
|
||||||
|
</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>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -358,23 +478,43 @@
|
|||||||
<title>Autotools configuration data cache - <filename>siteinfo.bbclass</filename></title>
|
<title>Autotools configuration data cache - <filename>siteinfo.bbclass</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Autotools can require tests which have to execute on the target hardware.
|
Autotools can require tests that must execute on the target hardware.
|
||||||
Since this isn't possible in general when cross compiling, siteinfo is
|
Since this is not possible in general when cross compiling, site information is
|
||||||
used to provide cached test results so these tests can be skipped over but
|
used to provide cached test results so these tests can be skipped over but
|
||||||
the correct values used. The <link linkend='structure-meta-site'>meta/site directory</link>
|
still make the correct values available.
|
||||||
contains test results sorted into different categories like architecture, endianess and
|
The <filename><link linkend='structure-meta-site'>meta/site directory</link></filename>
|
||||||
the libc used. Siteinfo provides a list of files containing data relevant to
|
contains test results sorted into different categories such as architecture, endianness, and
|
||||||
the current build in the <glossterm><link linkend='var-CONFIG_SITE'>CONFIG_SITE
|
the <filename>libc</filename> used.
|
||||||
</link></glossterm> variable which autotools will automatically pick up.
|
Site information provides a list of files containing data relevant to
|
||||||
|
the current build in the
|
||||||
|
<filename><link linkend='var-CONFIG_SITE'>CONFIG_SITE</link></filename> variable
|
||||||
|
that Autotools automatically picks up.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The class also provides variables like <glossterm><link
|
The class also provides variables like
|
||||||
linkend='var-SITEINFO_ENDIANESS'>SITEINFO_ENDIANESS</link></glossterm>
|
<filename><link linkend='var-SITEINFO_ENDIANNESS'>SITEINFO_ENDIANNESS</link></filename>
|
||||||
and <glossterm><link linkend='var-SITEINFO_BITS'>SITEINFO_BITS</link>
|
and <filename><link linkend='var-SITEINFO_BITS'>SITEINFO_BITS</link></filename>
|
||||||
</glossterm> which can be used elsewhere in the metadata.
|
that can be used elsewhere in the metadata.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This class is included from <filename>base.bbclass</filename> and is hence always active.
|
Because this class is included from <filename>base.bbclass</filename>, it is always active.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='ref-classes-useradd'>
|
||||||
|
<title>Adding Users - <filename>useradd.bbclass</filename></title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
If you have packages that install files that are owned by custom users or groups,
|
||||||
|
you can use this class to specify those packages and associate the users and groups
|
||||||
|
with those packages.
|
||||||
|
The <filename>meta-skeleton/recipes-skeleton/useradd/useradd-example.bb</filename>
|
||||||
|
recipe in the Yocto Project Files provides a simple exmample that shows how to add three
|
||||||
|
users and groups to two packages.
|
||||||
|
See the <filename>useradd-example.bb</filename> for more information on how to
|
||||||
|
use this class.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -382,50 +522,81 @@
|
|||||||
<title>Other Classes</title>
|
<title>Other Classes</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Only the most useful/important classes are covered here but there are
|
Thus far, this appendix has discussed only the most useful and important
|
||||||
others, see the <filename>meta/classes</filename> directory for the rest.
|
classes.
|
||||||
|
However, other classes exist within the <filename>meta/classes</filename> directory
|
||||||
|
in the Yocto Project file's directory structure.
|
||||||
|
You can examine the <filename>.bbclass</filename> files directly for more
|
||||||
|
information.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- Undocumented classes are:
|
<!-- Undocumented classes are:
|
||||||
base_srpm.bbclass
|
allarch.bbclass
|
||||||
|
binconfig.bbclass
|
||||||
bootimg.bbclass
|
bootimg.bbclass
|
||||||
|
buildstats.bbclass
|
||||||
ccache.inc
|
ccache.inc
|
||||||
ccdv.bbclass
|
|
||||||
cmake.bbclass
|
cmake.bbclass
|
||||||
cml1.bbclass
|
cml1.bbclass
|
||||||
cross.bbclass
|
cross.bbclass
|
||||||
flow-lossage.bbclass
|
cross-canadian.bbclass
|
||||||
|
deploy.bbclass
|
||||||
|
distrodata.bbclass
|
||||||
gconf.bbclass
|
gconf.bbclass
|
||||||
gettext.bbclass
|
gettext.bbclass
|
||||||
gnome.bbclass
|
gnome.bbclass
|
||||||
|
gtk-doc.bbclass
|
||||||
gtk-icon-cache.bbclass
|
gtk-icon-cache.bbclass
|
||||||
icecc.bbclass
|
icecc.bbclass
|
||||||
|
image-mklibs.bbclass
|
||||||
|
image-prelink.bbclass
|
||||||
|
image-swab.bbclass
|
||||||
|
imagetest-dummy.bbclass
|
||||||
|
imagetest-qemu.bbclass
|
||||||
|
insserv.bbclass
|
||||||
lib_package.bbclass
|
lib_package.bbclass
|
||||||
|
license.bbclass
|
||||||
|
logging.bbclass
|
||||||
|
meta.bbclass
|
||||||
|
metadata_scm.bbclass
|
||||||
mirrors.bbclass
|
mirrors.bbclass
|
||||||
mozilla.bbclass
|
multilib*.bbclass
|
||||||
multimachine.bbclass
|
|
||||||
native.bbclass
|
native.bbclass
|
||||||
|
nativesdk.bbclass
|
||||||
oelint.bbclass
|
oelint.bbclass
|
||||||
|
own-mirrors.bbclass
|
||||||
|
packagedata.bbclass
|
||||||
|
packagehistory.bbclass
|
||||||
patch.bbclass
|
patch.bbclass
|
||||||
patcher.bbclass
|
perlnative.bbclass
|
||||||
pkg_distribute.bbclass
|
pkg_distribute.bbclass
|
||||||
pkg_metainfo.bbclass
|
pkg_metainfo.bbclass
|
||||||
poky.bbclass
|
populate_sdk*.bbclass
|
||||||
|
prserv.bbclass
|
||||||
|
python-dir.bbclass
|
||||||
|
qemu.bbclass
|
||||||
|
qmake*.bbclass
|
||||||
|
qt4*.bbclass
|
||||||
|
recipe_sanity.bbclass
|
||||||
|
relocatable.bbclass
|
||||||
rm_work.bbclass
|
rm_work.bbclass
|
||||||
rpm_core.bbclass
|
|
||||||
scons.bbclass
|
scons.bbclass
|
||||||
sdk.bbclass
|
|
||||||
sdl.bbclass
|
sdl.bbclass
|
||||||
|
setuptools.bbclass
|
||||||
sip.bbclass
|
sip.bbclass
|
||||||
|
siteconfig.bbclass
|
||||||
sourcepkg.bbclass
|
sourcepkg.bbclass
|
||||||
srec.bbclass
|
sstate.bbclass
|
||||||
|
staging.bbclass
|
||||||
syslinux.bbclass
|
syslinux.bbclass
|
||||||
|
task.bbclass
|
||||||
|
terminal.bbclass
|
||||||
tinderclient.bbclass
|
tinderclient.bbclass
|
||||||
tmake.bbclass
|
toolchain-scripts.bbclass
|
||||||
|
typecheck.bbclass
|
||||||
|
utility-tasks.bbclass
|
||||||
utils.bbclass
|
utils.bbclass
|
||||||
xfce.bbclass
|
|
||||||
xlibs.bbclass
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,298 +4,157 @@
|
|||||||
<appendix id='ref-features'>
|
<appendix id='ref-features'>
|
||||||
<title>Reference: Features</title>
|
<title>Reference: Features</title>
|
||||||
|
|
||||||
<para>'Features' provide a mechanism for working out which packages
|
<para>
|
||||||
should be included in the generated images. Distributions can
|
Features provide a mechanism for working out which packages
|
||||||
select which features they want to support through the
|
should be included in the generated images.
|
||||||
<glossterm linkend='var-DISTRO_FEATURES'><link
|
Distributions can select which features they want to support through the
|
||||||
linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></glossterm>
|
<filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>
|
||||||
variable which is set in the distribution configuration file
|
variable, which is set in the <filename>poky.conf</filename> distribution configuration file.
|
||||||
(poky.conf for Poky). Machine features are set in the
|
Machine features are set in the
|
||||||
<glossterm linkend='var-MACHINE_FEATURES'><link
|
<filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>
|
||||||
linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></glossterm>
|
variable, which is set in the machine configuration file and
|
||||||
variable which is set in the machine configuration file and
|
specifies the hardware features for a given machine.
|
||||||
specifies which hardware features a given machine has.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>These two variables are combined to work out which kernel modules,
|
<para>
|
||||||
utilities and other packages to include. A given distribution can
|
These two variables combine to work out which kernel modules,
|
||||||
support a selected subset of features so some machine features might not
|
utilities, and other packages to include.
|
||||||
be included if the distribution itself doesn't support them.
|
A given distribution can support a selected subset of features so some machine features might not
|
||||||
|
be included if the distribution itself does not support them.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='ref-features-distro'>
|
<section id='ref-features-distro'>
|
||||||
<title>Distro</title>
|
<title>Distro</title>
|
||||||
|
|
||||||
<para>The items below are valid options for <glossterm linkend='var-DISTRO_FEATURES'><link
|
<para>
|
||||||
linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></glossterm>.
|
The items below are valid options for
|
||||||
</para>
|
<filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>:
|
||||||
|
<itemizedlist>
|
||||||
<itemizedlist>
|
<listitem><para><emphasis>alsa:</emphasis> ALSA support will be included (OSS compatibility
|
||||||
<listitem>
|
kernel modules will be installed if available).</para></listitem>
|
||||||
<para>
|
<listitem><para><emphasis>bluetooth:</emphasis> Include bluetooth support (integrated BT only)
|
||||||
alsa - ALSA support will be included (OSS compatibility
|
</para></listitem>
|
||||||
kernel modules will be installed if available)
|
<listitem><para><emphasis>ext2:</emphasis> Include tools for supporting for devices with internal
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
bluetooth - Include bluetooth support (integrated BT only)
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
ext2 - Include tools for supporting for devices with internal
|
|
||||||
HDD/Microdrive for storing files (instead of Flash only devices)
|
HDD/Microdrive for storing files (instead of Flash only devices)
|
||||||
</para>
|
</para></listitem>
|
||||||
</listitem>
|
<listitem><para><emphasis>irda:</emphasis> Include Irda support
|
||||||
<listitem>
|
</para></listitem>
|
||||||
<para>
|
<listitem><para><emphasis>keyboard:</emphasis> Include keyboard support (e.g. keymaps will be
|
||||||
irda - Include Irda support
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
keyboard - Include keyboard support (e.g. keymaps will be
|
|
||||||
loaded during boot).
|
loaded during boot).
|
||||||
</para>
|
</para></listitem>
|
||||||
</listitem>
|
<listitem><para><emphasis>pci:</emphasis> Include PCI bus support
|
||||||
<listitem>
|
</para></listitem>
|
||||||
<para>
|
<listitem><para><emphasis>pcmcia:</emphasis> Include PCMCIA/CompactFlash support
|
||||||
pci - Include PCI bus support
|
</para></listitem>
|
||||||
</para>
|
<listitem><para><emphasis>usbgadget:</emphasis> USB Gadget Device support (for USB
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
pcmcia - Include PCMCIA/CompactFlash support
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
usbgadget - USB Gadget Device support (for USB
|
|
||||||
networking/serial/storage)
|
networking/serial/storage)
|
||||||
</para>
|
</para></listitem>
|
||||||
</listitem>
|
<listitem><para><emphasis>usbhost:</emphasis> USB Host support (allows to connect external
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
usbhost - USB Host support (allows to connect external
|
|
||||||
keyboard, mouse, storage, network etc)
|
keyboard, mouse, storage, network etc)
|
||||||
</para>
|
</para></listitem>
|
||||||
</listitem>
|
<listitem><para><emphasis>wifi:</emphasis> WiFi support (integrated only)
|
||||||
<listitem>
|
</para></listitem>
|
||||||
<para>
|
<listitem><para><emphasis>cramfs:</emphasis> CramFS support
|
||||||
wifi - WiFi support (integrated only)
|
</para></listitem>
|
||||||
</para>
|
<listitem><para><emphasis>ipsec:</emphasis> IPSec support
|
||||||
</listitem>
|
</para></listitem>
|
||||||
<listitem>
|
<listitem><para><emphasis>ipv6:</emphasis> IPv6 support
|
||||||
<para>
|
</para></listitem>
|
||||||
cramfs - CramFS support
|
<listitem><para><emphasis>nfs:</emphasis> NFS client support (for mounting NFS exports on
|
||||||
</para>
|
device)</para></listitem>
|
||||||
</listitem>
|
<listitem><para><emphasis>ppp:</emphasis> PPP dialup support</para></listitem>
|
||||||
<listitem>
|
<listitem><para><emphasis>smbfs:</emphasis> SMB networks client support (for mounting
|
||||||
<para>
|
Samba/Microsoft Windows shares on device)</para></listitem>
|
||||||
ipsec - IPSec support
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
ipv6 - IPv6 support
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
nfs - NFS client support (for mounting NFS exports on
|
|
||||||
device)
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
ppp - PPP dialup support
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
smbfs - SMB networks client support (for mounting
|
|
||||||
Samba/Microsoft Windows shares on device)
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='ref-features-machine'>
|
<section id='ref-features-machine'>
|
||||||
<title>Machine</title>
|
<title>Machine</title>
|
||||||
|
|
||||||
<para>The items below are valid options for <glossterm linkend='var-MACHINE_FEATURES'><link
|
<para>
|
||||||
linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></glossterm>.
|
The items below are valid options for
|
||||||
|
<filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><emphasis>acpi:</emphasis> Hardware has ACPI (x86/x86_64 only)
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>alsa:</emphasis> Hardware has ALSA audio drivers
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>apm:</emphasis> Hardware uses APM (or APM emulation)
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>bluetooth:</emphasis> Hardware has integrated BT
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>ext2:</emphasis> Hardware HDD or Microdrive
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>irda:</emphasis> Hardware has Irda support
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>keyboard:</emphasis> Hardware has a keyboard
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>pci:</emphasis> Hardware has a PCI bus
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>pcmcia:</emphasis> Hardware has PCMCIA or CompactFlash sockets
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>screen:</emphasis> Hardware has a screen
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>serial:</emphasis> Hardware has serial support (usually RS232)
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>touchscreen:</emphasis> Hardware has a touchscreen
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>usbgadget:</emphasis> Hardware is USB gadget device capable
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>usbhost:</emphasis> Hardware is USB Host capable
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>wifi:</emphasis> Hardware has integrated WiFi
|
||||||
|
</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
acpi - Hardware has ACPI (x86/x86_64 only)
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
alsa - Hardware has ALSA audio drivers
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
apm - Hardware uses APM (or APM emulation)
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
bluetooth - Hardware has integrated BT
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
ext2 - Hardware HDD or Microdrive
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
irda - Hardware has Irda support
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
keyboard - Hardware has a keyboard
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
pci - Hardware has a PCI bus
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
pcmcia - Hardware has PCMCIA or CompactFlash sockets
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
screen - Hardware has a screen
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
serial - Hardware has serial support (usually RS232)
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
touchscreen - Hardware has a touchscreen
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
usbgadget - Hardware is USB gadget device capable
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
usbhost - Hardware is USB Host capable
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
wifi - Hardware has integrated WiFi
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='ref-features-image'>
|
<section id='ref-features-image'>
|
||||||
<title>Reference: Images</title>
|
<title>Reference: Images</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The contents of images generated by Poky can be controlled by the
|
The contents of images generated by the Yocto Project can be controlled by the
|
||||||
<glossterm linkend='var-IMAGE_FEATURES'><link linkend='var-IMAGE_FEATURES'>
|
<filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>
|
||||||
IMAGE_FEATURES</link></glossterm> variable and the in local.conf and the
|
and <filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</link></filename>
|
||||||
<glossterm linkend='var-EXTRA_IMAGE_FEATURES'><link linkend='var-EXTRA_IMAGE_FEATURES'>
|
variables that you typically configure in your image recipes.
|
||||||
EXTRA_IMAGE_FEATURES</link></glossterm> that you typically configure in your image recipes.
|
Through these variables you can add several different
|
||||||
Through these varibales you can add several different
|
|
||||||
predefined packages such as development utilities or packages with debug
|
predefined packages such as development utilities or packages with debug
|
||||||
information needed to investigate application problems or profile applications.
|
information needed to investigate application problems or profile applications.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Current list of <glossterm
|
Current list of
|
||||||
linkend='var-IMAGE_FEATURES'><link
|
<filename>IMAGE_FEATURES</filename> contains the following:
|
||||||
linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></glossterm> contains:
|
<itemizedlist>
|
||||||
|
<listitem><para><emphasis>apps-console-core:</emphasis> Core console applications such as
|
||||||
|
<filename>ssh</filename>, <filename>daemon</filename>, <filename>avahi daemon</filename>,
|
||||||
|
<filename>portmap</filename> (for mounting NFS shares)</para></listitem>
|
||||||
|
<listitem><para><emphasis>x11-base:</emphasis> X11 server + minimal desktop</para></listitem>
|
||||||
|
<listitem><para><emphasis>x11-sato:</emphasis> OpenedHand Sato environment</para></listitem>
|
||||||
|
<listitem><para><emphasis>apps-x11-core:</emphasis> Core X11 applications such as an
|
||||||
|
X Terminal, file manager, and file editor</para></listitem>
|
||||||
|
<listitem><para><emphasis>apps-x11-games:</emphasis> A set of X11 games</para></listitem>
|
||||||
|
<listitem><para><emphasis>apps-x11-pimlico:</emphasis> OpenedHand Pimlico application suite
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>tools-sdk:</emphasis> A full SDK that runs on the device
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>tools-debug:</emphasis> Debugging tools such as
|
||||||
|
<filename>strace</filename> and <filename>gdb</filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>tools-profile:</emphasis> Profiling tools such as
|
||||||
|
<filename>oprofile</filename>, <filename>exmap</filename>, and
|
||||||
|
<filename>LTTng</filename></para></listitem>
|
||||||
|
<listitem><para><emphasis>tools-testapps:</emphasis> Device testing tools (e.g.
|
||||||
|
touchscreen debugging)</para></listitem>
|
||||||
|
<listitem><para><emphasis>nfs-server:</emphasis> NFS server (exports / over NFS
|
||||||
|
to everybody)</para></listitem>
|
||||||
|
<listitem><para><emphasis>dev-pkgs:</emphasis> Development packages (headers and
|
||||||
|
extra library links) for all packages installed in a given image</para></listitem>
|
||||||
|
<listitem><para><emphasis>dbg-pkgs:</emphasis> Debug packages for all packages
|
||||||
|
installed in a given image</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
apps-console-core - Core console applications such as ssh daemon,
|
|
||||||
avahi daemon, portmap (for mounting NFS shares)
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
x11-base - X11 server + minimal desktop
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
x11-sato - OpenedHand Sato environment
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
apps-x11-core - Core X11 applications such as an X Terminal, file manager, file editor
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
apps-x11-games - A set of X11 games
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
apps-x11-pimlico - OpenedHand Pimlico application suite
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
tools-sdk - A full SDK which runs on device
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
tools-debug - Debugging tools such as strace and gdb
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
tools-profile - Profiling tools such as oprofile, exmap and LTTng
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
tools-testapps - Device testing tools (e.g. touchscreen debugging)
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
nfs-server - NFS server (exports / over NFS to everybody)
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
dev-pkgs - Development packages (headers and extra library links) for all packages
|
|
||||||
installed in a given image
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
dbg-pkgs - Debug packages for all packages installed in a given image
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</section>
|
</section>
|
||||||
</appendix>
|
</appendix>
|
||||||
|
|
||||||
|
|||||||
@@ -5,12 +5,9 @@
|
|||||||
<title>Reference: Images</title>
|
<title>Reference: Images</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Poky has several standard images covering most people's standard needs.
|
The Yocto Project build process supports several types of images to satisfy different needs.
|
||||||
Use the following command to list the supported images:
|
When you issue the <filename>bitbake</filename> command you provide a “top-level” recipe
|
||||||
<literallayout class='monospaced'>
|
that essentially begins the build for the type of image you want.
|
||||||
$ ls meta*/recipes*/images/*.bb
|
|
||||||
</literallayout>
|
|
||||||
Images are listed below along with details of what they contain:
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
@@ -25,67 +22,88 @@
|
|||||||
</literallayout>
|
</literallayout>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
From within the <filename>poky</filename> Git repository, use the following command to list
|
||||||
|
the supported images:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ ls meta*/recipes*/images/*.bb
|
||||||
|
</literallayout>
|
||||||
|
These recipes reside in the <filename>meta/recipes-core/images</filename>,
|
||||||
|
<filename>meta/recipes-extended/images</filename>,
|
||||||
|
<filename>meta/recipes-graphics/images</filename>, and
|
||||||
|
<filename>meta/recipes-sato/images</filename> directories of your local Yocto Project
|
||||||
|
file structure (Git repository or extracted release tarball).
|
||||||
|
Although the recipe names are somewhat explanatory, here is a list that describes them:
|
||||||
|
</para>
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem><para><emphasis><filename>core-image-base</filename>:</emphasis>
|
||||||
<para>
|
A console-only image that fully supports the target device hardware.</para></listitem>
|
||||||
<emphasis>core-image-minimal</emphasis> - A small image just capable
|
<listitem><para><emphasis><filename>core-image-core</filename>:</emphasis>
|
||||||
of allowing a device to boot.
|
An X11 image with simple applications such as terminal, editor, and file manager.
|
||||||
</para>
|
</para></listitem>
|
||||||
</listitem>
|
<listitem><para><emphasis><filename>core-image-minimal</filename>:</emphasis>
|
||||||
<listitem>
|
A small image just capable of allowing a device to boot.</para></listitem>
|
||||||
<para>
|
<listitem><para><emphasis><filename>core-image-minimal-dev</filename>:</emphasis>
|
||||||
<emphasis>core-image-base</emphasis> - A console-only image that fully
|
A <filename>core-image-minimal</filename> image suitable for development work.
|
||||||
supports the target device hardware.
|
</para></listitem>
|
||||||
</para>
|
<listitem><para><emphasis><filename>core-image-minimal-initramfs</filename>:</emphasis>
|
||||||
</listitem>
|
A <filename>core-image-minimal</filename> image that has the Minimal RAM-based
|
||||||
<listitem>
|
Initial Root Filesystem (<filename>initramfs</filename>) as part of the kernel,
|
||||||
<para>
|
which allows the system to find the first “init” program more efficiently.
|
||||||
<emphasis>core-image-core</emphasis> - An X11 image with simple
|
</para></listitem>
|
||||||
applications such as terminal, editor, and file manager.
|
<listitem><para><emphasis><filename>core-image-minimal-mtdutils</filename>:</emphasis>
|
||||||
</para>
|
A <filename>core-image-minimal</filename> image that has support
|
||||||
</listitem>
|
for the Minimal MTD Utilities, which let the user interact with the
|
||||||
<listitem>
|
MTD subsystem in the kernel to perform operations on flash devices.
|
||||||
<para>
|
</para></listitem>
|
||||||
<emphasis>core-image-sato</emphasis> - An X11 image with Sato theme and
|
<listitem><para><emphasis><filename>core-image-basic</filename>:</emphasis>
|
||||||
Pimlico applications.
|
A foundational basic image without support for X that can be reasonably used for
|
||||||
The image also contains terminal, editor, and file manager.
|
customization.</para></listitem>
|
||||||
</para>
|
<listitem><para><emphasis><filename>core-image-lsb</filename>:</emphasis>
|
||||||
</listitem>
|
A <filename>core-image-basic</filename> image suitable for implementations
|
||||||
<listitem>
|
that conform to Linux Standard Base (LSB).</para></listitem>
|
||||||
<para>
|
<listitem><para><emphasis><filename>core-image-lsb-dev</filename>:</emphasis>
|
||||||
<emphasis>core-image-sato-dev</emphasis> - An X11 image similar to
|
A <filename>core-image-lsb</filename> image that is suitable for development work.
|
||||||
core-image-sato but
|
</para></listitem>
|
||||||
also includes a native toolchain and libraries needed to build applications
|
<listitem><para><emphasis><filename>core-image-lsb-sdk</filename>:</emphasis>
|
||||||
on the device itself. The image also includes testing and profiling tools
|
A <filename>core-image-lsb</filename> that includes everything in meta-toolchain
|
||||||
as well as debug symbols. This image was formerly core-image-sdk.
|
but also includes development headers and libraries to form a complete standalone SDK.
|
||||||
</para>
|
See the <link linkend='platdev-appdev-external-sdk'>
|
||||||
</listitem>
|
External Development Using the Poky SDK</link> section for more information.
|
||||||
<listitem>
|
</para></listitem>
|
||||||
<para>
|
<listitem><para><emphasis><filename>core-image-clutter</filename>:</emphasis>
|
||||||
<emphasis>core-image-lsb</emphasis> - An image suitable for implementations
|
An image with support for the Open GL-based toolkit Clutter, which enables development of
|
||||||
that conform to Linux Standard Base (LSB).
|
rich and animated graphical user interfaces.</para></listitem>
|
||||||
</para>
|
<listitem><para><emphasis><filename>core-image-sato</filename>:</emphasis>
|
||||||
</listitem>
|
An image with Sato support, a mobile environment and visual style that works well
|
||||||
<listitem>
|
with mobile devices.
|
||||||
<para>
|
The image supports X11 with a Sato theme and Pimlico applications and also
|
||||||
<emphasis>meta-toolchain</emphasis> - This image generates a tarball
|
contains terminal, editor, and file manager.</para></listitem>
|
||||||
that contains a stand-alone toolchain that can be used externally to Poky.
|
<listitem><para><emphasis><filename>core-image-sato-dev</filename>:</emphasis>
|
||||||
The tarball is self-contained and unpacks to the
|
A <filename>core-image-sato</filename> image suitable for development
|
||||||
<filename class="directory">/opt/poky</filename> directory.
|
that also includes a native toolchain and libraries needed to build applications on
|
||||||
The tarball also contains a copy of QEMU and the scripts necessary to run
|
the device itself.
|
||||||
poky QEMU images.
|
The image also includes testing and profiling tools as well as debug symbols.
|
||||||
</para>
|
This image was formerly <filename>core-image-sdk</filename>.</para></listitem>
|
||||||
</listitem>
|
<listitem><para><emphasis><filename>core-image-sato-sdk</filename>:</emphasis>
|
||||||
<listitem>
|
A <filename>core-image-sato</filename> image that includes everything in meta-toolchain.
|
||||||
<para>
|
The image also includes development headers and libraries to form a complete standalone SDK.
|
||||||
<emphasis>meta-toolchain-sdk</emphasis> - This image includes everything in
|
See the <link linkend='platdev-appdev-external-sdk'>
|
||||||
meta-toolchain but also includes development headers and libraries
|
External Development Using the Poky SDK</link> section for more information.
|
||||||
to form a complete standalone SDK.
|
</para></listitem>
|
||||||
See the <link linkend='platdev-appdev-external-sdk'>
|
|
||||||
External Development Using the Poky SDK</link> section for more information.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
|
<tip>
|
||||||
|
From the Yocto Project release 1.1 onwards, <filename>-live</filename> and
|
||||||
|
<filename>-directdisk</filename> images have been replaced by a "live"
|
||||||
|
option in <filename>IMAGE_FSTYPES</filename> that will work with any image to produce an
|
||||||
|
image file that can be
|
||||||
|
copied directly to a CD or USB device and run as is.
|
||||||
|
To build a live image, simply add
|
||||||
|
"live" to <filename>IMAGE_FSTYPES</filename> within the <filename>local.conf</filename>
|
||||||
|
file or wherever appropriate and then build the desired image as normal.
|
||||||
|
</tip>
|
||||||
</appendix>
|
</appendix>
|
||||||
<!--
|
<!--
|
||||||
vim: expandtab tw=80 ts=4
|
vim: expandtab tw=80 ts=4
|
||||||
|
|||||||
@@ -6,28 +6,36 @@
|
|||||||
<title>Reference: Directory Structure</title>
|
<title>Reference: Directory Structure</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Poky consists of several components.
|
The Yocto Project consists of several components.
|
||||||
Understanding them and knowing where they are located is key to using Poky well.
|
Understanding them and knowing where they are located is key to using the Yocto Project well.
|
||||||
This appendix describes the Poky directory structure and gives information about the various
|
This appendix describes the Yocto Project file's directory structure and gives information about the various
|
||||||
files and directories.
|
files and directories.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For information on how to establish the Yocto Project files on your local development system, see the
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#getting-started'>
|
||||||
|
Getting Setup</ulink> section in the
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>
|
||||||
|
The Yocto Project Development Manual</ulink>.
|
||||||
|
</para>
|
||||||
|
|
||||||
<section id='structure-core'>
|
<section id='structure-core'>
|
||||||
<title>Top level core components</title>
|
<title>Top level core components</title>
|
||||||
|
|
||||||
<section id='structure-core-bitbake'>
|
<section id='structure-core-bitbake'>
|
||||||
<title><filename class="directory">bitbake/</filename></title>
|
<title><filename>bitbake/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Poky includes a copy of BitBake for ease of use.
|
The Yocto Project includes a copy of BitBake for ease of use.
|
||||||
The copy usually matches the current stable BitBake release from the BitBake project.
|
The copy usually matches the current stable BitBake release from the BitBake project.
|
||||||
BitBake, a metadata interpreter, reads the Poky metadata and runs the tasks
|
BitBake, a metadata interpreter, reads the Yocto Project metadata and runs the tasks
|
||||||
defined by that data.
|
defined by that data.
|
||||||
Failures are usually from the metadata and not
|
Failures are usually from the metadata and not
|
||||||
from BitBake itself.
|
from BitBake itself.
|
||||||
Consequently, most users do not need to worry about BitBake.
|
Consequently, most users do not need to worry about BitBake.
|
||||||
The <filename class="directory">bitbake/bin/</filename> directory is placed
|
The <filename>bitbake/bin/</filename> directory is placed
|
||||||
into the PATH environment variable by the
|
into the <filename>PATH</filename> environment variable by the
|
||||||
<link linkend="structure-core-script">oe-init-build-env</link> script.
|
<link linkend="structure-core-script">oe-init-build-env</link> script.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -38,118 +46,88 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-core-build'>
|
<section id='structure-core-build'>
|
||||||
<title><filename class="directory">build/</filename></title>
|
<title><filename>build/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains user configuration files and the output
|
This directory contains user configuration files and the output
|
||||||
generated by Poky in its standard configuration where the source tree is
|
generated by the Yocto Project in its standard configuration where the source tree is
|
||||||
combined with the output.
|
combined with the output.
|
||||||
|
The build directory is created initially when you <filename>source</filename>
|
||||||
|
the Yocto Project environment setup script <filename>oe-init-build-env</filename>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
It is also possible to place output and configuration
|
It is also possible to place output and configuration
|
||||||
files in a directory separate from the Poky source.
|
files in a directory separate from the Yocto Project files
|
||||||
For information on separating output from the Poky source, see <link
|
by providing a directory name when you <filename>source</filename>
|
||||||
|
the setup script.
|
||||||
|
For information on separating output from the Yocto Project files, see <link
|
||||||
linkend='structure-core-script'>oe-init-build-env</link>.
|
linkend='structure-core-script'>oe-init-build-env</link>.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-core-meta'>
|
<section id='handbook'>
|
||||||
<title><filename class="directory">meta/</filename></title>
|
<title><filename>documentation</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains the core metadata, which is a key part of Poky.
|
This directory holds the source for the Yocto Project documentation
|
||||||
This directory contains the machine definitions, the Poky distribution,
|
as well as templates and tools that allow you to generate PDF and HTML
|
||||||
|
versions of the manuals.
|
||||||
|
Each manual is contained in a sub-folder.
|
||||||
|
For example, the files for this manual reside in
|
||||||
|
<filename>poky-ref-manual</filename>.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='structure-core-meta'>
|
||||||
|
<title><filename>meta/</filename></title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This directory contains the Yocto Project core metadata.
|
||||||
|
The directory holds machine definitions, the Yocto Project distribution,
|
||||||
and the packages that make up a given system.
|
and the packages that make up a given system.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- <section id='structure-core-meta-extras'>
|
|
||||||
<title><filename class="directory">meta-extras/</filename></title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
This directory is similar to <filename class="directory">meta/</filename>.
|
|
||||||
The directory contains extra metadata not included in standard Poky.
|
|
||||||
This metadata is disabled by default and is not supported as part of Poky.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<section id='structure-core-meta-demoapps'>
|
<section id='structure-core-meta-demoapps'>
|
||||||
<title><filename class="directory">meta-demoapps/</filename></title>
|
<title><filename>meta-demoapps/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains recipes for applications and demos that are not core.
|
This directory contains recipes for applications and demos that are not part of the
|
||||||
|
Yocto Project core.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-core-meta-rt'>
|
<section id='structure-core-meta-rt'>
|
||||||
<title><filename class="directory">meta-rt/</filename></title>
|
<title><filename>meta-rt/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains recipes for RealTime.
|
This directory contains recipes for real-time kernels.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- <section id='structure-core-meta-***'>
|
<section id='structure-meta-skeleton'>
|
||||||
<title><filename class="directory">meta-***/</filename></title>
|
<title><filename>meta-skeleton/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
These directories are optional layers that are added to core metadata.
|
This directory contains template recipes for BSP and kernel development.
|
||||||
The layers are enabled by adding them to the <filename>conf/bblayers.conf</filename> file.
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
-->
|
|
||||||
|
|
||||||
<section id='structure-core-scripts'>
|
<section id='structure-core-scripts'>
|
||||||
<title><filename class="directory">scripts/</filename></title>
|
<title><filename>scripts/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains various integration scripts that implement
|
This directory contains various integration scripts that implement
|
||||||
extra functionality in the Poky environment (e.g. QEMU scripts).
|
extra functionality in the Yocto Project environment (e.g. QEMU scripts).
|
||||||
The <link linkend="structure-core-script">oe-init-build-env</link> script appends this
|
The <link linkend="structure-core-script">oe-init-build-env</link> script appends this
|
||||||
directory to the PATH environment variable.
|
directory to the <filename>PATH</filename> environment variable.
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- <section id='structure-core-sources'>
|
|
||||||
<title><filename class="directory">sources/</filename></title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
This directory receives downloads as specified by the
|
|
||||||
<glossterm><link linkend='var-DL_DIR'>DL_DIR</link></glossterm> variable.
|
|
||||||
Even though the directory is not part of a checkout, Poky creates it during a build.
|
|
||||||
You can use this directory to share downloading files between Poky builds.
|
|
||||||
This practice can save you from downloading files multiple times.
|
|
||||||
<note><para>
|
|
||||||
You can override the location for this directory by setting
|
|
||||||
the DL_DIR variable in <filename>local.conf</filename>.
|
|
||||||
</para></note>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
This directory also contains SCM checkouts (e.g. <filename class="directory">sources/svn/
|
|
||||||
</filename>, <filename class="directory">sources/cvs/</filename> or
|
|
||||||
<filename class="directory">sources/git/</filename>).
|
|
||||||
The <filename class="directory">sources</filename> directory can contain archives of
|
|
||||||
checkouts for various revisions or dates.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
It's worth noting that BitBake creates <filename class="extension">.md5
|
The <filename>scripts</filename> directory has useful scripts that assist contributing
|
||||||
</filename> stamp files for downloads.
|
back to the Yocto Project, such as <filename>create_pull_request</filename> and
|
||||||
BitBake uses these files to mark downloads as
|
<filename>send_pull_request</filename>.
|
||||||
complete as well as for checksum and access accounting purposes.
|
|
||||||
If you manually add a file to the directory, you need to touch the corresponding
|
|
||||||
<filename class="extension">.md5</filename> file as well.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<section id='handbook'>
|
|
||||||
<title><filename class="directory">documentation</filename></title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
This directory holds the source for the documentation. Each manual is contained in
|
|
||||||
a sub-folder. For example, the files for this manual reside in
|
|
||||||
<filename class="directory">poky-ref-manual</filename>.
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -157,25 +135,25 @@
|
|||||||
<title><filename>oe-init-build-env</filename></title>
|
<title><filename>oe-init-build-env</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This script sets up the Poky build environment.
|
This script sets up the Yocto Project build environment.
|
||||||
Sourcing this file in
|
Running this script with the <filename>source</filename> command in
|
||||||
a shell makes changes to PATH and sets other core BitBake variables based on the
|
a shell makes changes to <filename>PATH</filename> and sets other core BitBake variables based on the
|
||||||
current working directory.
|
current working directory.
|
||||||
You need to run this script before running Poky commands.
|
You need to run this script before running BitBake commands.
|
||||||
The script uses other scripts within the <filename class="directory">scripts/
|
The script uses other scripts within the <filename>scripts</filename> directory to do
|
||||||
</filename> directory to do the bulk of the work.
|
the bulk of the work.
|
||||||
You can use this script to specify any directory for the build's output by doing the following:
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
$ source POKY_SRC/oe-init-build-env [BUILDDIR]
|
|
||||||
</literallayout>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can enter the above command from any directory, as long as POKY_SRC points to
|
By default, running this script without a build directory argument creates the
|
||||||
the desired Poky source tree.
|
<filename>build</filename> directory.
|
||||||
The optional BUILDDIR can be any directory into which you would
|
If you provide a build directory argument when you <filename>source</filename>
|
||||||
like Poky to generate the build output.
|
the script, you direct the Yocto Project to create a build directory of your choice.
|
||||||
|
For example, the following command creates a build directory named
|
||||||
|
<filename>mybuilds</filename> that is outside of the Yocto Project files:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ source oe-init-build-env ~/mybuilds
|
||||||
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -189,14 +167,14 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-build'>
|
<section id='structure-build'>
|
||||||
<title>The Build Directory - <filename class="directory">build/</filename></title>
|
<title>The Build Directory - <filename>build/</filename></title>
|
||||||
|
|
||||||
<section id='structure-build-pseudodone'>
|
<section id='structure-build-pseudodone'>
|
||||||
<title><filename>build/pseudodone</filename></title>
|
<title><filename>build/pseudodone</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This tag file indicates that the intitial pseudo binar was created.
|
This tag file indicates that the initial pseudo binary was created.
|
||||||
The first time BitBake is invoked this file is built.
|
The file is built the first time BitBake is invoked.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -204,21 +182,21 @@
|
|||||||
<title><filename>build/conf/local.conf</filename></title>
|
<title><filename>build/conf/local.conf</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This file contains all the local user configuration of Poky.
|
This file contains all the local user configuration of the Yocto Project.
|
||||||
If there is no <filename>local.conf</filename> present, it is created from
|
If there is no <filename>local.conf</filename> present, it is created from
|
||||||
<filename>local.conf.sample</filename>.
|
<filename>local.conf.sample</filename>.
|
||||||
The <filename>local.conf</filename> file contains documentation on the various configuration options.
|
The <filename>local.conf</filename> file contains documentation on the various configuration options.
|
||||||
Any variable set here overrides any variable set elsewhere within Poky unless
|
Any variable set here overrides any variable set elsewhere within the Yocto Project unless
|
||||||
that variable is hard-coded within Poky (e.g. by using '=' instead of '?=').
|
that variable is hard-coded within the Yocto Project (e.g. by using '=' instead of '?=').
|
||||||
Some variables are hard-coded for various reasons but these variables are
|
Some variables are hard-coded for various reasons but these variables are
|
||||||
relatively rare.
|
relatively rare.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Edit this file to set the <glossterm><link linkend='var-MACHINE'>MACHINE</link></glossterm>
|
Edit this file to set the <filename><link linkend='var-MACHINE'>MACHINE</link></filename>
|
||||||
for which you want to build, which package types you
|
for which you want to build, which package types you
|
||||||
wish to use (PACKAGE_CLASSES) or where you want to downloaded files
|
wish to use (<filename>PACKAGE_CLASSES</filename>), or where you want to downloaded files
|
||||||
(<glossterm><link linkend='var-DL_DIR'>DL_DIR</link></glossterm>).
|
(<filename><link linkend='var-DL_DIR'>DL_DIR</link></filename>).
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -228,8 +206,8 @@
|
|||||||
<para>
|
<para>
|
||||||
This file defines layers, which is a directory tree, traversed (or walked) by BitBake.
|
This file defines layers, which is a directory tree, traversed (or walked) by BitBake.
|
||||||
If <filename>bblayers.conf</filename>
|
If <filename>bblayers.conf</filename>
|
||||||
is not present, it is created from <filename>bblayers.conf.sample</filename> when the environment
|
is not present, it is created from <filename>bblayers.conf.sample</filename> when
|
||||||
setup script is sourced.
|
you <filename>source</filename> the environment setup script.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -248,7 +226,7 @@
|
|||||||
This directory is used for the upstream source tarballs.
|
This directory is used for the upstream source tarballs.
|
||||||
The directory can be reused by multiple builds or moved to another location.
|
The directory can be reused by multiple builds or moved to another location.
|
||||||
You can control the location of this directory through the
|
You can control the location of this directory through the
|
||||||
<glossterm><link linkend='var-DL_DIR'>DL_DIR</link></glossterm> variable.
|
<filename><link linkend='var-DL_DIR'>DL_DIR</link></filename> variable.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -259,25 +237,25 @@
|
|||||||
This directory is used for the shared state cache.
|
This directory is used for the shared state cache.
|
||||||
The directory can be reused by multiple builds or moved to another location.
|
The directory can be reused by multiple builds or moved to another location.
|
||||||
You can control the location of this directory through the
|
You can control the location of this directory through the
|
||||||
<glossterm><link linkend='var-SSTATE_DIR'>SSTATE_DIR</link></glossterm> variable.
|
<filename><link linkend='var-SSTATE_DIR'>SSTATE_DIR</link></filename> variable.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-build-tmp'>
|
<section id='structure-build-tmp'>
|
||||||
<title><filename class="directory">build/tmp/</filename></title>
|
<title><filename>build/tmp/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory receives all the Poky output.
|
This directory receives all the Yocto Project output.
|
||||||
BitBake creates this directory if it does not exist.
|
BitBake creates this directory if it does not exist.
|
||||||
To clean Poky and start a build from scratch (other than downloads),
|
As a last resort, to clean the Yocto Project and start a build from scratch (other than downloads),
|
||||||
you can remove everything in this directory or get rid of the directory completely.
|
you can remove everything in this directory or get rid of the directory completely.
|
||||||
The <filename class="directory">tmp/</filename> directory has some important
|
If you do, you should also completely remove the <filename>build/sstate-cache</filename>
|
||||||
sub-components detailed below.
|
directory as well.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-build-tmp-buildstats'>
|
<section id='structure-build-tmp-buildstats'>
|
||||||
<title><filename class="directory">build/tmp/buildstats/</filename></title>
|
<title><filename>build/tmp/buildstats/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory stores the build statistics.
|
This directory stores the build statistics.
|
||||||
@@ -285,56 +263,68 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-build-tmp-cache'>
|
<section id='structure-build-tmp-cache'>
|
||||||
<title><filename class="directory">build/tmp/cache/</filename></title>
|
<title><filename>build/tmp/cache/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
When BitBake parses the metadata it creates a cache file of the result that can
|
When BitBake parses the metadata, it creates a cache file of the result that can
|
||||||
be used when subsequently running commands.
|
be used when subsequently running commands.
|
||||||
These results are stored here on a per-machine basis.
|
These results are stored here on a per-machine basis.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-build-tmp-deploy'>
|
<section id='structure-build-tmp-deploy'>
|
||||||
<title><filename class="directory">build/tmp/deploy/</filename></title>
|
<title><filename>build/tmp/deploy/</filename></title>
|
||||||
|
|
||||||
<para>This directory contains any 'end result' output from Poky.</para>
|
<para>
|
||||||
|
This directory contains any 'end result' output from the Yocto Project build process.
|
||||||
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-build-tmp-deploy-deb'>
|
<section id='structure-build-tmp-deploy-deb'>
|
||||||
<title><filename class="directory">build/tmp/deploy/deb/</filename></title>
|
<title><filename>build/tmp/deploy/deb/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory receives any <filename>.deb</filename> packages produced by Poky.
|
This directory receives any <filename>.deb</filename> packages produced by the Yocto Project.
|
||||||
The packages are sorted into feeds for different architecture types.
|
The packages are sorted into feeds for different architecture types.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-build-tmp-deploy-rpm'>
|
<section id='structure-build-tmp-deploy-rpm'>
|
||||||
<title><filename class="directory">build/tmp/deploy/rpm/</filename></title>
|
<title><filename>build/tmp/deploy/rpm/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory receives any <filename>.rpm</filename> packages produced by Poky.
|
This directory receives any <filename>.rpm</filename> packages produced by the Yocto Project.
|
||||||
The packages are sorted into feeds for different architecture types.
|
The packages are sorted into feeds for different architecture types.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-build-tmp-deploy-images'>
|
<section id='structure-build-tmp-deploy-images'>
|
||||||
<title><filename class="directory">build/tmp/deploy/images/</filename></title>
|
<title><filename>build/tmp/deploy/images/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory receives complete filesystem images.
|
This directory receives complete filesystem images.
|
||||||
If you want to flash the resulting image from a build onto a device, look here for the image.
|
If you want to flash the resulting image from a build onto a device, look here for the image.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Note, you should not remove any files from this directory by hand in an attempt
|
||||||
|
to rebuild an image.
|
||||||
|
If you want to clean out the cache, re-run the build using the following
|
||||||
|
BitBake command:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ bitbake -c cleanall <target>
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-build-tmp-deploy-ipk'>
|
<section id='structure-build-tmp-deploy-ipk'>
|
||||||
<title><filename class="directory">build/tmp/deploy/ipk/</filename></title>
|
<title><filename>build/tmp/deploy/ipk/</filename></title>
|
||||||
|
|
||||||
<para>This directory receives <filename>.ipk</filename> packages produced by Poky.</para>
|
<para>This directory receives <filename>.ipk</filename> packages produced by the Yocto Project.</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-build-tmp-sysroots'>
|
<section id='structure-build-tmp-sysroots'>
|
||||||
<title><filename class="directory">build/tmp/sysroots/</filename></title>
|
<title><filename>build/tmp/sysroots/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains shared header files and libraries as well as other shared
|
This directory contains shared header files and libraries as well as other shared
|
||||||
@@ -346,7 +336,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-build-tmp-stamps'>
|
<section id='structure-build-tmp-stamps'>
|
||||||
<title><filename class="directory">build/tmp/stamps/</filename></title>
|
<title><filename>build/tmp/stamps/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory holds information that that BitBake uses for accounting purposes
|
This directory holds information that that BitBake uses for accounting purposes
|
||||||
@@ -358,17 +348,18 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-build-tmp-log'>
|
<section id='structure-build-tmp-log'>
|
||||||
<title><filename class="directory">build/tmp/log/</filename></title>
|
<title><filename>build/tmp/log/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains general logs that are not otherwise placed using the
|
This directory contains general logs that are not otherwise placed using the
|
||||||
package's <glossterm><link linkend='var-WORKDIR'>WORKDIR</link></glossterm>.
|
package's <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>.
|
||||||
Examples of logs are the output from the "check_pkg" or "distro_check" tasks.
|
Examples of logs are the output from the <filename>check_pkg</filename> or
|
||||||
|
<filename>distro_check</filename> tasks.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-build-tmp-pkgdata'>
|
<section id='structure-build-tmp-pkgdata'>
|
||||||
<title><filename class="directory">build/tmp/pkgdata/</filename></title>
|
<title><filename>build/tmp/pkgdata/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains intermediate packaging data that is used later in the packaging process.
|
This directory contains intermediate packaging data that is used later in the packaging process.
|
||||||
@@ -376,72 +367,65 @@
|
|||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-build-tmp-pstagelogs'>
|
|
||||||
<title><filename class="directory">build/tmp/pstagelogs/</filename></title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
This directory contains manifest for task-based pre-built.
|
|
||||||
Each manifest is basically a file list for installed files from a given task.
|
|
||||||
Manifests are useful for later packaging or cleanup processes.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='structure-build-tmp-work'>
|
<section id='structure-build-tmp-work'>
|
||||||
<title><filename class="directory">build/tmp/work/</filename></title>
|
<title><filename>build/tmp/work/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains architecture-specific work sub-directories for packages built by BitBake.
|
This directory contains architecture-specific work sub-directories for packages built by BitBake.
|
||||||
All tasks execute from a work directory.
|
All tasks execute from a work directory.
|
||||||
For example, the source for a particular package is unpacked, patched, configured and compiled all
|
For example, the source for a particular package is unpacked, patched, configured and compiled all
|
||||||
within its own work directory.
|
within its own work directory.
|
||||||
|
Within the work directory, organization is based on the package group for which the source
|
||||||
|
is being compiled.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
It is worth considering the structure of a typical work directory.
|
It is worth considering the structure of a typical work directory.
|
||||||
As an example consider the linux-rp kernel, version 2.6.20 r7 on the machine spitz
|
As an example, consider the linux-yocto kernel 3.0 on the machine <filename>qemux86</filename>
|
||||||
built within Poky.
|
built within the Yocto Project.
|
||||||
For this package a work directory of
|
For this package, a work directory of
|
||||||
<filename class="directory">tmp/work/spitz-poky-linux-gnueabi/linux-rp-2.6.20-r7/</filename>,
|
<filename>tmp/work/qemux86-poky-linux/linux-yocto-3.0+git1+<.....></filename>,
|
||||||
referred to as <glossterm><link linkend='var-WORKDIR'>WORKDIR</link></glossterm>, is created.
|
referred to as <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>, is created.
|
||||||
Within this directory, the source is unpacked to linux-2.6.20 and then patched by quilt
|
Within this directory, the source is unpacked to
|
||||||
(see <link linkend="usingpoky-modifying-packages-quilt">Section 3.5.1</link>).
|
<filename>linux-qemux86-standard-build</filename> and then patched by Quilt
|
||||||
Within the <filename class="directory">linux-2.6.20</filename> directory,
|
(see the <link linkend="usingpoky-modifying-packages-quilt">Modifying Package Source Code
|
||||||
standard quilt directories <filename class="directory">linux-2.6.20/patches</filename>
|
With Quilt</link> section).
|
||||||
and <filename class="directory">linux-2.6.20/.pc</filename> are created,
|
Within the <filename>linux-qemux86-standard-build</filename> directory,
|
||||||
and standard quilt commands can be used.
|
standard Quilt directories <filename>linux-3.0/patches</filename>
|
||||||
|
and <filename>linux-3.0/.pc</filename> are created,
|
||||||
|
and standard Quilt commands can be used.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
There are other directories generated within WORKDIR.
|
There are other directories generated within WORKDIR.
|
||||||
The most important directory is WORKDIR
|
The most important directory is WORKDIR<filename>/temp/</filename>, which has log files for each
|
||||||
<filename class="directory">/temp/</filename>, which has log files for each
|
|
||||||
task (<filename>log.do_*.pid</filename>) and contains the scripts BitBake runs for
|
task (<filename>log.do_*.pid</filename>) and contains the scripts BitBake runs for
|
||||||
each task (<filename>run.do_*.pid</filename>).
|
each task (<filename>run.do_*.pid</filename>).
|
||||||
The WORKDIR<filename class="directory">/image/</filename> directory is where "make
|
The WORKDIR<filename>/image/</filename> directory is where "make
|
||||||
install" places its output that is then split into sub-packages
|
install" places its output that is then split into sub-packages
|
||||||
within WORKDIR<filename class="directory">/packages-split/</filename>.
|
within WORKDIR<filename>/packages-split/</filename>.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-meta'>
|
<section id='structure-meta'>
|
||||||
<title>The Metadata - <filename class="directory">meta/</filename></title>
|
<title>The Metadata - <filename>meta/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
As mentioned previously, metadata is the core of Poky.
|
As mentioned previously, metadata is the core of the Yocto Project.
|
||||||
Metadata has several important subdivisions:
|
Metadata has several important subdivisions:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='structure-meta-classes'>
|
<section id='structure-meta-classes'>
|
||||||
<title><filename class="directory">meta/classes/</filename></title>
|
<title><filename>meta/classes/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains the <filename class="extension">*.bbclass</filename> files.
|
This directory contains the <filename>*.bbclass</filename> files.
|
||||||
Class files are used to abstract common code so it can be reused by multiple
|
Class files are used to abstract common code so it can be reused by multiple
|
||||||
packages.
|
packages.
|
||||||
Every package inherits the <filename>base.bbclass</filename> file.
|
Every package inherits the <filename>base.bbclass</filename> file.
|
||||||
Examples of other important classes are <filename>autotools.bbclass</filename>, which
|
Examples of other important classes are <filename>autotools.bbclass</filename>, which
|
||||||
in theory allows any Autotool-enabled package to work with Poky with minimal effort.
|
in theory allows any Autotool-enabled package to work with the Yocto Project with minimal effort.
|
||||||
Another example is <filename>kernel.bbclass</filename> that contains common code and functions
|
Another example is <filename>kernel.bbclass</filename> that contains common code and functions
|
||||||
for working with the Linux kernel.
|
for working with the Linux kernel.
|
||||||
Functions like image generation or packaging also have their specific class files
|
Functions like image generation or packaging also have their specific class files
|
||||||
@@ -451,14 +435,14 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-meta-conf'>
|
<section id='structure-meta-conf'>
|
||||||
<title><filename class="directory">meta/conf/</filename></title>
|
<title><filename>meta/conf/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains the core set of configuration files that start from
|
This directory contains the core set of configuration files that start from
|
||||||
<filename>bitbake.conf</filename> and from which all other configuration
|
<filename>bitbake.conf</filename> and from which all other configuration
|
||||||
files are included.
|
files are included.
|
||||||
See the includes at the end of the file and you will note that even
|
See the include statements at the end of the file and you will note that even
|
||||||
<filename>local.conf</filename> is loaded from there!
|
<filename>local.conf</filename> is loaded from there.
|
||||||
While <filename>bitbake.conf</filename> sets up the defaults, you can often override
|
While <filename>bitbake.conf</filename> sets up the defaults, you can often override
|
||||||
these by using the (<filename>local.conf</filename>) file, machine file or
|
these by using the (<filename>local.conf</filename>) file, machine file or
|
||||||
the distribution configuration file.
|
the distribution configuration file.
|
||||||
@@ -466,41 +450,43 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-meta-conf-machine'>
|
<section id='structure-meta-conf-machine'>
|
||||||
<title><filename class="directory">meta/conf/machine/</filename></title>
|
<title><filename>meta/conf/machine/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains all the machine configuration files.
|
This directory contains all the machine configuration files.
|
||||||
If you set MACHINE="spitz", Poky looks for a <filename>spitz.conf</filename> file in this
|
If you set <filename>MACHINE="qemux86"</filename>,
|
||||||
|
Yocto Project looks for a <filename>qemux86.conf</filename> file in this
|
||||||
directory.
|
directory.
|
||||||
The includes directory contains various data common to multiple machines.
|
The <filename>include</filename> directory contains various data common to multiple machines.
|
||||||
If you want to add support for a new machine to Poky, look in this directory.
|
If you want to add support for a new machine to the Yocto Project, look in this directory.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-meta-conf-distro'>
|
<section id='structure-meta-conf-distro'>
|
||||||
<title><filename class="directory">meta/conf/distro/</filename></title>
|
<title><filename>meta/conf/distro/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Any distribution-specific configuration is controlled from this directory.
|
Any distribution-specific configuration is controlled from this directory.
|
||||||
Poky only contains the Poky distribution so <filename>poky.conf</filename>
|
The Yocto Project only contains the Yocto Project distribution so
|
||||||
is the main file here.
|
<filename>defaultsetup.conf</filename> is the main file here.
|
||||||
This directory includes the versions and SRCDATES for applications that are configured here.
|
This directory includes the versions and the
|
||||||
|
<filename>SRCDATE</filename> definitions for applications that are configured here.
|
||||||
An example of an alternative configuration is <filename>poky-bleeding.conf</filename>
|
An example of an alternative configuration is <filename>poky-bleeding.conf</filename>
|
||||||
although this file mainly inherits its configuration from Poky itself.
|
although this file mainly inherits its configuration from the Yocto Project itself.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-meta-recipes-bsp'>
|
<section id='structure-meta-recipes-bsp'>
|
||||||
<title><filename class="directory">meta/recipes-bsp/</filename></title>
|
<title><filename>meta/recipes-bsp/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains anything linking to specific hardware or hardware configuration information
|
This directory contains anything linking to specific hardware or hardware configuration information
|
||||||
such as "uboot" and "grub".
|
such as "u-boot" and "grub".
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-meta-recipes-connectivity'>
|
<section id='structure-meta-recipes-connectivity'>
|
||||||
<title><filename class="directory">meta/recipes-connectivity/</filename></title>
|
<title><filename>meta/recipes-connectivity/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains libraries and applications related to communication with other devices.
|
This directory contains libraries and applications related to communication with other devices.
|
||||||
@@ -508,7 +494,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-meta-recipes-core'>
|
<section id='structure-meta-recipes-core'>
|
||||||
<title><filename class="directory">meta/recipes-core/</filename></title>
|
<title><filename>meta/recipes-core/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains what is needed to build a basic working Linux image
|
This directory contains what is needed to build a basic working Linux image
|
||||||
@@ -517,7 +503,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-meta-recipes-devtools'>
|
<section id='structure-meta-recipes-devtools'>
|
||||||
<title><filename class="directory">meta/recipes-devtools/</filename></title>
|
<title><filename>meta/recipes-devtools/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains tools that are primarily used by the build system.
|
This directory contains tools that are primarily used by the build system.
|
||||||
@@ -526,7 +512,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-meta-recipes-extended'>
|
<section id='structure-meta-recipes-extended'>
|
||||||
<title><filename class="directory">meta/recipes-extended/</filename></title>
|
<title><filename>meta/recipes-extended/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains non-essential applications that add features compared to the
|
This directory contains non-essential applications that add features compared to the
|
||||||
@@ -537,7 +523,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-meta-recipes-gnome'>
|
<section id='structure-meta-recipes-gnome'>
|
||||||
<title><filename class="directory">meta/recipes-gnome/</filename></title>
|
<title><filename>meta/recipes-gnome/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains all things related to the GTK+ application framework.
|
This directory contains all things related to the GTK+ application framework.
|
||||||
@@ -545,7 +531,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-meta-recipes-graphics'>
|
<section id='structure-meta-recipes-graphics'>
|
||||||
<title><filename class="directory">meta/recipes-graphics/</filename></title>
|
<title><filename>meta/recipes-graphics/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains X and other graphically related system libraries
|
This directory contains X and other graphically related system libraries
|
||||||
@@ -553,7 +539,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-meta-recipes-kernel'>
|
<section id='structure-meta-recipes-kernel'>
|
||||||
<title><filename class="directory">meta/recipes-kernel/</filename></title>
|
<title><filename>meta/recipes-kernel/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains the kernel and generic applications and libraries that
|
This directory contains the kernel and generic applications and libraries that
|
||||||
@@ -562,7 +548,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-meta-recipes-multimedia'>
|
<section id='structure-meta-recipes-multimedia'>
|
||||||
<title><filename class="directory">meta/recipes-multimedia/</filename></title>
|
<title><filename>meta/recipes-multimedia/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains codecs and support utilities for audio, images and video.
|
This directory contains codecs and support utilities for audio, images and video.
|
||||||
@@ -570,15 +556,15 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-meta-recipes-qt'>
|
<section id='structure-meta-recipes-qt'>
|
||||||
<title><filename class="directory">meta/recipes-qt/</filename></title>
|
<title><filename>meta/recipes-qt/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains all things related to the QT application framework.
|
This directory contains all things related to the Qt application framework.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-meta-recipes-sato'>
|
<section id='structure-meta-recipes-sato'>
|
||||||
<title><filename class="directory">meta/recipes-sato/</filename></title>
|
<title><filename>meta/recipes-sato/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains the Sato demo/reference UI/UX and its associated applications
|
This directory contains the Sato demo/reference UI/UX and its associated applications
|
||||||
@@ -587,16 +573,16 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-meta-recipes-support'>
|
<section id='structure-meta-recipes-support'>
|
||||||
<title><filename class="directory">meta/recipes-support/</filename></title>
|
<title><filename>meta/recipes-support/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains recipes that used by other recipes, but that are not directly
|
This directory contains recipes that used by other recipes, but that are not directly
|
||||||
included in images (i.e. depenendies of other recipes).
|
included in images (i.e. dependencies of other recipes).
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-meta-site'>
|
<section id='structure-meta-site'>
|
||||||
<title><filename class="directory">meta/site/</filename></title>
|
<title><filename>meta/site/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This directory contains a list of cached results for various architectures.
|
This directory contains a list of cached results for various architectures.
|
||||||
@@ -607,7 +593,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='structure-meta-recipes-txt'>
|
<section id='structure-meta-recipes-txt'>
|
||||||
<title><filename class="directory">meta/recipes.txt/</filename></title>
|
<title><filename>meta/recipes.txt/</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This file is a description of the contents of <filename>recipes-*</filename>.
|
This file is a description of the contents of <filename>recipes-*</filename>.
|
||||||
|
|||||||
@@ -2,208 +2,202 @@
|
|||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<appendix id='ref-varlocality'>
|
<appendix id='ref-varlocality'>
|
||||||
<title>Reference: Variable Locality (Distro, Machine, Recipe etc.)</title>
|
<title>Reference: Variable Context</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Whilst most variables can be used in almost any context (.conf, .bbclass,
|
While most variables can be used in almost any context such as
|
||||||
.inc or .bb file), variables are often associated with a particular
|
<filename>.conf</filename>, <filename>.bbclass</filename>,
|
||||||
locality/context. This section describes some common associations.
|
<filename>.inc</filename>, and <filename>.bb</filename> files,
|
||||||
|
some variables are often associated with a particular locality or context.
|
||||||
|
This appendix describes some common associations.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='ref-varlocality-config-distro'>
|
<section id='ref-varlocality-configuration'>
|
||||||
<title>Distro Configuration</title>
|
<title>Configuration</title>
|
||||||
|
|
||||||
<itemizedlist>
|
<para>
|
||||||
<listitem>
|
The following subsections provide lists of variables whose context is
|
||||||
<para><glossterm linkend='var-DISTRO'><link linkend='var-DISTRO'>DISTRO</link></glossterm></para>
|
configuration: distribution, machine, and local.
|
||||||
</listitem>
|
</para>
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-DISTRO_NAME'><link linkend='var-DISTRO_NAME'>DISTRO_NAME</link></glossterm></para>
|
<section id='ref-varlocality-config-distro'>
|
||||||
</listitem>
|
<title>Distribution (Distro)</title>
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-DISTRO_VERSION'><link linkend='var-DISTRO_VERSION'>DISTRO_VERSION</link></glossterm></para>
|
<para>
|
||||||
</listitem>
|
This section lists variables whose context is the distribution, or distro.
|
||||||
<listitem>
|
<itemizedlist>
|
||||||
<para><glossterm linkend='var-MAINTAINER'><link linkend='var-MAINTAINER'>MAINTAINER</link></glossterm></para>
|
<listitem><para><filename><link linkend='var-DISTRO'>DISTRO</link></filename></para></listitem>
|
||||||
</listitem>
|
<listitem><para><filename><link linkend='var-DISTRO_NAME'>DISTRO_NAME</link></filename>
|
||||||
<listitem>
|
</para></listitem>
|
||||||
<para><glossterm linkend='var-PACKAGE_CLASSES'><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link></glossterm></para>
|
<listitem><para><filename><link linkend='var-DISTRO_VERSION'>DISTRO_VERSION</link>
|
||||||
</listitem>
|
</filename></para></listitem>
|
||||||
<listitem>
|
<listitem><para><filename><link linkend='var-MAINTAINER'>MAINTAINER</link></filename>
|
||||||
<para><glossterm linkend='var-TARGET_OS'><link linkend='var-TARGET_OS'>TARGET_OS</link></glossterm></para>
|
</para></listitem>
|
||||||
</listitem>
|
<listitem><para><filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link>
|
||||||
<listitem>
|
</filename></para></listitem>
|
||||||
<para><glossterm linkend='var-TARGET_FPU'><link linkend='var-TARGET_FPU'>TARGET_FPU</link></glossterm></para>
|
<listitem><para><filename><link linkend='var-TARGET_OS'>TARGET_OS</link></filename>
|
||||||
</listitem>
|
</para></listitem>
|
||||||
<listitem>
|
<listitem><para><filename><link linkend='var-TARGET_FPU'>TARGET_FPU</link></filename>
|
||||||
<para><glossterm linkend='var-POKYMODE'><link linkend='var-POKYMODE'>POKYMODE</link></glossterm></para>
|
</para></listitem>
|
||||||
</listitem>
|
<listitem><para><filename><link linkend='var-POKYMODE'>POKYMODE</link></filename>
|
||||||
<listitem>
|
</para></listitem>
|
||||||
<para><glossterm linkend='var-POKYLIBC'><link linkend='var-POKYLIBC'>POKYLIBC</link></glossterm></para>
|
<listitem><para><filename><link linkend='var-TCMODE'>TCMODE</link></filename>
|
||||||
</listitem>
|
</para></listitem>
|
||||||
</itemizedlist>
|
<listitem><para><filename><link linkend='var-POKYLIBC'>POKYLIBC</link></filename>
|
||||||
|
</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='ref-varlocality-config-machine'>
|
||||||
|
<title>Machine</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This section lists variables whose context is the machine.
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><filename><link linkend='var-TARGET_ARCH'>TARGET_ARCH</link></filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-SERIAL_CONSOLE'>SERIAL_CONSOLE</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-PACKAGE_EXTRA_ARCHS'>PACKAGE_EXTRA_ARCHS</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-IMAGE_FSTYPES'>IMAGE_FSTYPES</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-ROOT_FLASH_SIZE'>ROOT_FLASH_SIZE</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-MACHINE_EXTRA_RDEPENDS'>MACHINE_EXTRA_RDEPENDS
|
||||||
|
</link></filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-MACHINE_EXTRA_RRECOMMENDS'>MACHINE_EXTRA_RRECOMMENDS
|
||||||
|
</link></filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'>MACHINE_ESSENTIAL_EXTRA_RDEPENDS
|
||||||
|
</link></filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'>
|
||||||
|
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</link></filename></para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='ref-varlocality-config-local'>
|
||||||
|
<title>Local</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This section lists variables whose context is the local configuration through the
|
||||||
|
<filename>local.conf</filename> file.
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><filename><link linkend='var-DISTRO'>DISTRO</link></filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-MACHINE'>MACHINE</link></filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-DL_DIR'>DL_DIR</link></filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-BBFILES'>BBFILES</link></filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES
|
||||||
|
</link></filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-BB_NUMBER_THREADS'>BB_NUMBER_THREADS</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-BBINCLUDELOGS'>BBINCLUDELOGS</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-ENABLE_BINARY_LOCALE_GENERATION'>
|
||||||
|
ENABLE_BINARY_LOCALE_GENERATION</link></filename></para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='ref-varlocality-config-machine'>
|
<section id='ref-varlocality-recipes'>
|
||||||
<title>Machine Configuration</title>
|
<title>Recipes</title>
|
||||||
|
|
||||||
<itemizedlist>
|
<para>
|
||||||
<listitem>
|
The following subsections provide lists of variables whose context is
|
||||||
<para><glossterm linkend='var-TARGET_ARCH'><link linkend='var-TARGET_ARCH'>TARGET_ARCH</link></glossterm></para>
|
recipes: required, dependencies, path, and extra build information.
|
||||||
</listitem>
|
</para>
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-SERIAL_CONSOLE'><link linkend='var-SERIAL_CONSOLE'>SERIAL_CONSOLE</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-PACKAGE_EXTRA_ARCHS'><link linkend='var-PACKAGE_EXTRA_ARCHS'>PACKAGE_EXTRA_ARCHS</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-IMAGE_FSTYPES'><link linkend='var-IMAGE_FSTYPES'>IMAGE_FSTYPES</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-ROOT_FLASH_SIZE'><link linkend='var-ROOT_FLASH_SIZE'>ROOT_FLASH_SIZE</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-MACHINE_FEATURES'><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-MACHINE_EXTRA_RDEPENDS'><link linkend='var-MACHINE_EXTRA_RDEPENDS'>MACHINE_EXTRA_RDEPENDS</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-MACHINE_EXTRA_RRECOMMENDS'><link linkend='var-MACHINE_EXTRA_RRECOMMENDS'>MACHINE_EXTRA_RRECOMMENDS</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-MACHINE_ESSENTIAL_RDEPENDS'><link linkend='var-MACHINE_ESSENTIAL_RDEPENDS'>MACHINE_ESSENTIAL_RDEPENDS</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-MACHINE_ESSENTIAL_RRECOMMENDS'><link linkend='var-MACHINE_ESSENTIAL_RRECOMMENDS'>MACHINE_ESSENTIAL_RRECOMMENDS</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='ref-varlocality-config-local'>
|
<section id='ref-varlocality-recipe-required'>
|
||||||
<title>Local Configuration (local.conf)</title>
|
<title>Required</title>
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-DISTRO'><link linkend='var-DISTRO'>DISTRO</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-MACHINE'><link linkend='var-MACHINE'>MACHINE</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-DL_DIR'><link linkend='var-DL_DIR'>DL_DIR</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-BBFILES'><link linkend='var-BBFILES'>BBFILES</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-EXTRA_IMAGE_FEATURES'><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-PACKAGE_CLASSES'><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-BB_NUMBER_THREADS'><link linkend='var-BB_NUMBER_THREADS'>BB_NUMBER_THREADS</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-BBINCLUDELOGS'><link linkend='var-BBINCLUDELOGS'>BBINCLUDELOGS</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm linkend='var-ENABLE_BINARY_LOCALE_GENERATION'><link linkend='var-ENABLE_BINARY_LOCALE_GENERATION'>ENABLE_BINARY_LOCALE_GENERATION</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='ref-varlocality-recipe-required'>
|
<para>
|
||||||
<title>Recipe Variables - Required</title>
|
This section lists variables that are required for recipes.
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><filename><link linkend='var-DESCRIPTION'>DESCRIPTION</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-LICENSE'>LICENSE</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-SECTION'>SECTION</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-HOMEPAGE'>HOMEPAGE</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-AUTHOR'>AUTHOR</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-SRC_URI'>SRC_URI</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
<itemizedlist>
|
<section id='ref-varlocality-recipe-dependencies'>
|
||||||
<listitem>
|
<title>Dependencies</title>
|
||||||
<para><glossterm><link linkend='var-DESCRIPTION'>DESCRIPTION</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm><link linkend='var-LICENSE'>LICENSE</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm><link linkend='var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm><link linkend='var-SECTION'>SECTION</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm><link linkend='var-HOMEPAGE'>HOMEPAGE</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm><link linkend='var-AUTHOR'>AUTHOR</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm><link linkend='var-SRC_URI'>SRC_URI</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='ref-varlocality-recipe-dependencies'>
|
<para>
|
||||||
<title>Recipe Variables - Dependencies</title>
|
This section lists variables that define recipe dependencies.
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><filename><link linkend='var-DEPENDS'>DEPENDS</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-RDEPENDS'>RDEPENDS</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-RRECOMMENDS'>RRECOMMENDS</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-RCONFLICTS'>RCONFLICTS</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-RREPLACES'>RREPLACES</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
<itemizedlist>
|
<section id='ref-varlocality-recipe-paths'>
|
||||||
<listitem>
|
<title>Paths</title>
|
||||||
<para><glossterm><link linkend='var-DEPENDS'>DEPENDS</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm><link linkend='var-RDEPENDS'>RDEPENDS</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm><link linkend='var-RRECOMMENDS'>RRECOMMENDS</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm><link linkend='var-RCONFLICTS'>RCONFLICTS</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm><link linkend='var-RREPLACES'>RREPLACES</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='ref-varlocality-recipe-paths'>
|
<para>
|
||||||
<title>Recipe Variables - Paths</title>
|
This section lists variables that define recipe paths.
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><filename><link linkend='var-WORKDIR'>WORKDIR</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-S'>S</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
<listitem><para><filename><link linkend='var-FILES'>FILES</link>
|
||||||
|
</filename></para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
<itemizedlist>
|
<section id='ref-varlocality-recipe-build'>
|
||||||
<listitem>
|
<title>Extra Build Information</title>
|
||||||
<para><glossterm><link linkend='var-WORKDIR'>WORKDIR</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm><link linkend='var-S'>S</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm><link linkend='var-FILES'>FILES</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='ref-varlocality-recipe-build'>
|
<para>
|
||||||
<title>Recipe Variables - Extra Build Information</title>
|
This section lists variables that define extra build information for recipes.
|
||||||
|
<itemizedlist>
|
||||||
<itemizedlist>
|
<listitem><para><filename><link linkend='var-DISTRO_PN_ALIAS'>DISTRO_PN_ALIAS</link>
|
||||||
<listitem>
|
</filename></para></listitem>
|
||||||
<para><glossterm><link
|
<listitem><para><filename><link linkend='var-EXTRA_OECMAKE'>EXTRA_OECMAKE</link>
|
||||||
linkend='var-DISTRO_PN_ALIAS'>DISTRO_PN_ALIAS</link></glossterm></para>
|
</filename></para></listitem>
|
||||||
</listitem>
|
<listitem><para><filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link>
|
||||||
<listitem>
|
</filename></para></listitem>
|
||||||
<para><glossterm><link linkend='var-EXTRA_OECMAKE'>EXTRA_OECMAKE</link></glossterm></para>
|
<listitem><para><filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link>
|
||||||
</listitem>
|
</filename></para></listitem>
|
||||||
<listitem>
|
<listitem><para><filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
|
||||||
<para><glossterm><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link></glossterm></para>
|
</para></listitem>
|
||||||
</listitem>
|
<listitem><para><filename><link linkend='var-DEFAULT_PREFERENCE'>DEFAULT_PREFERENCE
|
||||||
<listitem>
|
</link></filename></para></listitem>
|
||||||
<para><glossterm><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link></glossterm></para>
|
</itemizedlist>
|
||||||
</listitem>
|
</para>
|
||||||
<listitem>
|
</section>
|
||||||
<para><glossterm><link linkend='var-PACKAGES'>PACKAGES</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para><glossterm><link linkend='var-DEFAULT_PREFERENCE'>DEFAULT_PREFERENCE</link></glossterm></para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</section>
|
</section>
|
||||||
</appendix>
|
</appendix>
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
@@ -2,24 +2,27 @@
|
|||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<appendix id='resources'>
|
<appendix id='resources'>
|
||||||
<title>Contributing to Poky</title>
|
<title>Contributing to the Yocto Project</title>
|
||||||
|
|
||||||
<section id='resources-intro'>
|
<section id='resources-intro'>
|
||||||
<title>Introduction</title>
|
<title>Introduction</title>
|
||||||
<para>
|
<para>
|
||||||
We're happy for people to experiment with Poky and there are a number of places to
|
The Yocto Project team is happy for people to experiment with the Yocto Project.
|
||||||
find help if you run into difficulties or find bugs. To find out how to download
|
A number of places exist to find help if you run into difficulties or find bugs.
|
||||||
source code see the <link linkend='intro-getit'>Obtaining Poky</link> section of
|
To find out how to download source code,
|
||||||
the Introduction.
|
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
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>The Yocto
|
||||||
|
Project Development Manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='resources-bugtracker'>
|
<section id='resources-bugtracker'>
|
||||||
<title>Bugtracker</title>
|
<title>Tracking Bugs</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Problems with Poky should be reported using the Bugzilla application at
|
If you find problems with the Yocto Project, you should report them using the
|
||||||
<ulink url='http://bugzilla.yoctoproject.org/'></ulink>.
|
Bugzilla application at <ulink url='http://bugzilla.yoctoproject.org/'></ulink>.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -27,26 +30,20 @@
|
|||||||
<title>Mailing lists</title>
|
<title>Mailing lists</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To subscribe to the mailing lists click on the following URLs and follow the instructions:
|
To subscribe to the Yocto Project mailing lists, click on the following URLs and follow the instructions:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<ulink url='http://lists.yoctoproject.org/listinfo/yocto-announce'></ulink></emphasis>:
|
||||||
|
Use this list to receive offical Yocto Project announcements for developments and
|
||||||
|
to learn about Yocto Project milestones.</para></listitem>
|
||||||
|
<listitem><para><emphasis><ulink url='http://lists.yoctoproject.org/listinfo/yocto'></ulink></emphasis>:
|
||||||
|
Use this list to monitor Yocto Project development discussions, ask questions, and
|
||||||
|
get help.</para></listitem>
|
||||||
|
<listitem><para><emphasis><ulink url='http://lists.yoctoproject.org/listinfo/poky'></ulink></emphasis>:
|
||||||
|
Use this list to monitor discussions about the Yocto Project build system Poky,
|
||||||
|
ask questions, and get help.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem><para>
|
|
||||||
<ulink url='http://lists.yoctoproject.org/listinfo/yocto'></ulink> for a Yocto Discussions
|
|
||||||
mailing list.
|
|
||||||
</para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>
|
|
||||||
<ulink url='http://lists.yoctoproject.org/listinfo/poky'></ulink> for a Poky Discussions
|
|
||||||
mailing list.
|
|
||||||
</para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>
|
|
||||||
<ulink url='http://lists.yoctoproject.org/listinfo/yocto-announce'></ulink> for a mailing list
|
|
||||||
to receive offical Yocto Project announcements for developments and milestones.
|
|
||||||
</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='resources-irc'>
|
<section id='resources-irc'>
|
||||||
@@ -54,111 +51,59 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Two IRC channels on freenode are available for Yocto Project and Poky discussions:
|
Two IRC channels on freenode are available for Yocto Project and Poky discussions:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>
|
<listitem><para><filename>#yocto</filename></para></listitem>
|
||||||
#yocto
|
<listitem><para><filename>#poky</filename></para></listitem>
|
||||||
</para></listitem>
|
</itemizedlist>
|
||||||
|
|
||||||
<listitem><para>
|
|
||||||
#poky
|
|
||||||
</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='resources-links'>
|
<section id='resources-links'>
|
||||||
<title>Links</title>
|
<title>Links</title>
|
||||||
|
|
||||||
<itemizedlist>
|
<para>
|
||||||
<listitem><para>
|
Following is a list of resources you will find helpful:
|
||||||
<ulink url='http://yoctoproject.org'>The Yocto Project website</ulink> - The home site
|
<itemizedlist>
|
||||||
for Yocto Project.
|
<listitem><para><emphasis><ulink url='http://yoctoproject.org'>The Yocto Project website</ulink>:
|
||||||
</para></listitem>
|
</emphasis> The home site for the Yocto Project.</para></listitem>
|
||||||
<!-- <listitem><para>
|
<listitem><para><emphasis><ulink url='http://www.openedhand.com/'>OpenedHand</ulink>:</emphasis>
|
||||||
<ulink url='http://pokylinux.org'>The Poky website</ulink> - The home site
|
The company where the Yocto Project build system Poky was first developed.
|
||||||
for Poky Linux.
|
OpenedHand has since been acquired by Intel Corporation.</para></listitem>
|
||||||
</para></listitem>
|
<listitem><para><emphasis><ulink url='http://www.intel.com/'>Intel Corporation</ulink>:</emphasis>
|
||||||
-->
|
The company who acquired OpenedHand in 2008 and continues development on the
|
||||||
<listitem><para>
|
Yocto Project.</para></listitem>
|
||||||
<ulink url='http://www.openedhand.com/'>OpenedHand</ulink> - The
|
<listitem><para><emphasis><ulink url='http://www.openembedded.org/'>OpenEmbedded</ulink>:</emphasis>
|
||||||
original company behind Poky.
|
The upstream, generic, embedded distribution the Yocto Project build system (Poky) derives
|
||||||
</para></listitem>
|
from and to which it contributes.</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para><emphasis><ulink url='http://developer.berlios.de/projects/bitbake/'>
|
||||||
<ulink url='http://www.intel.com/'>Intel Corporation</ulink> - The
|
Bitbake</ulink>:</emphasis> The tool used to process Yocto Project metadata.</para></listitem>
|
||||||
company who acquired OpenedHand in 2008.
|
<listitem><para><emphasis><ulink url='http://bitbake.berlios.de/manual/'>
|
||||||
</para></listitem>
|
BitBake User Manual</ulink>:</emphasis> A comprehensive guide to the BitBake tool.
|
||||||
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para><emphasis><ulink url='http://pimlico-project.org/'>Pimlico</ulink>:</emphasis>
|
||||||
<ulink url='http://www.openembedded.org/'>OpenEmbedded</ulink>
|
A suite of lightweight Personal Information Management (PIM) applications designed
|
||||||
- The upstream generic embedded distribution Poky derives
|
primarily for handheld and mobile devices.</para></listitem>
|
||||||
from (and contributes to).
|
<listitem><para><emphasis><ulink url='http://wiki.qemu.org/Index.html'>QEMU</ulink>:
|
||||||
</para></listitem>
|
</emphasis> An open source machine emulator and virtualizer.</para></listitem>
|
||||||
<listitem><para>
|
</itemizedlist>
|
||||||
<ulink url='http://developer.berlios.de/projects/bitbake/'>Bitbake</ulink>
|
</para>
|
||||||
- The tool used to process Poky metadata.
|
|
||||||
</para></listitem>
|
|
||||||
<listitem><para>
|
|
||||||
<ulink url='http://bitbake.berlios.de/manual/'>BitBake User
|
|
||||||
Manual</ulink> - A comprehensive guide to the BitBake tool.
|
|
||||||
</para></listitem>
|
|
||||||
<listitem><para>
|
|
||||||
<ulink url='http://pimlico-project.org/'>Pimlico</ulink> - A
|
|
||||||
suite of lightweight Personal Information Management (PIM)
|
|
||||||
applications designed primarily for handheld and mobile
|
|
||||||
devices.
|
|
||||||
</para></listitem>
|
|
||||||
<listitem><para>
|
|
||||||
<ulink url='http://fabrice.bellard.free.fr/qemu/'>QEMU</ulink>
|
|
||||||
- An open source machine emulator and virtualizer.
|
|
||||||
</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='resources-contributions'>
|
<section id='resources-contributions'>
|
||||||
<title>Contributions</title>
|
<title>Contributions</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Contributions to Poky are very welcome. Patches should be sent to the Poky mailing list along with a Signed-off-by: line in the same style as the Linux kernel. Adding this line signifies the developer has agreed to the Developer's Certificate of Origin 1.1:
|
The Yocto Project gladly accepts contributions.
|
||||||
|
You can submit changes to the project either by creating and sending pull requests,
|
||||||
|
or by submitting patches through email.
|
||||||
|
For information on how to do both, see
|
||||||
|
<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
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>
|
||||||
|
The Yocto Project Development Manual</ulink>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>
|
|
||||||
Developer's Certificate of Origin 1.1
|
|
||||||
|
|
||||||
By making a contribution to this project, I certify that:
|
|
||||||
|
|
||||||
(a) The contribution was created in whole or in part by me and I
|
|
||||||
have the right to submit it under the open source license
|
|
||||||
indicated in the file; or
|
|
||||||
|
|
||||||
(b) The contribution is based upon previous work that, to the best
|
|
||||||
of my knowledge, is covered under an appropriate open source
|
|
||||||
license and I have the right under that license to submit that
|
|
||||||
work with modifications, whether created in whole or in part
|
|
||||||
by me, under the same open source license (unless I am
|
|
||||||
permitted to submit under a different license), as indicated
|
|
||||||
in the file; or
|
|
||||||
|
|
||||||
(c) The contribution was provided directly to me by some other
|
|
||||||
person who certified (a), (b) or (c) and I have not modified
|
|
||||||
it.
|
|
||||||
|
|
||||||
(d) I understand and agree that this project and the contribution
|
|
||||||
are public and that a record of the contribution (including all
|
|
||||||
personal information I submit with it, including my sign-off) is
|
|
||||||
maintained indefinitely and may be redistributed consistent with
|
|
||||||
this project or the open source license(s) involved.
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
A Poky contributions tree (poky-contrib, git://git.yoctoproject.org/poky-contrib.git)
|
|
||||||
exists for people to stage contributions in, for regular contributors.
|
|
||||||
If people desire such access, please ask on the mailing list. Usually
|
|
||||||
access will be given to anyone with a proven track record of good patches.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
</appendix>
|
</appendix>
|
||||||
<!--
|
<!--
|
||||||
vim: expandtab tw=80 ts=4
|
vim: expandtab tw=80 ts=4
|
||||||
|
|||||||
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
|
||||||
|
-->
|
||||||
@@ -1,227 +1,135 @@
|
|||||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
<chapter id='usingpoky'>
|
<chapter id='usingpoky'>
|
||||||
<title>Using Poky</title>
|
<title>Using the Yocto Project</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This section gives an overview of the components that make up Poky
|
This chapter describes common usage for the Yocto Project.
|
||||||
followed by information about running poky builds and dealing with any
|
The information is introductory in nature as other manuals in the Yocto Project
|
||||||
problems that may arise.
|
provide more details on how to use the Yocto Project.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='usingpoky-components'>
|
|
||||||
<title>Poky Overview</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The BitBake task executor together with various types of configuration files form the core of Poky.
|
|
||||||
This section overviews the BitBake task executor and the
|
|
||||||
configuration files by describing what they are used for and they they interact.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
BitBake handles the parsing and execution of the data files.
|
|
||||||
The data itself is of various types:
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem><para>Recipes: Provides details about particular pieces of software</para></listitem>
|
|
||||||
<listitem><para>Class Data: An abstraction of common build information (e.g. how to build a
|
|
||||||
Linux kernel).</para></listitem>
|
|
||||||
<listitem><para>Configuration Data: Defines machine-specific settings, policy decisions, etc.
|
|
||||||
Configuration data acts a the glue to bind everything together.</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</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 Poky and is responsible
|
|
||||||
for parsing the metadata, generating a list of tasks from it
|
|
||||||
and then executing them. To see a list of the options BitBake
|
|
||||||
supports look at 'bitbake --help'.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The most common usage for BitBake is <filename>bitbake <packagename></filename>, where
|
|
||||||
packagename 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 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 glibc if they had not already been built.
|
|
||||||
</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 such
|
|
||||||
as from where 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 Poky (i.e. .ipk or .deb
|
|
||||||
files), this document avoids it.
|
|
||||||
</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 what Poky does.
|
|
||||||
These files are split 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>).
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</section>
|
|
||||||
|
|
||||||
|
|
||||||
<section id='usingpoky-build'>
|
<section id='usingpoky-build'>
|
||||||
<title>Running a Build</title>
|
<title>Running a Build</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
First the Poky build environment needs to be set up using the following command:
|
You can find general information on how to build an image using the
|
||||||
|
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
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||||
|
Yocto Project Quick Start</ulink>.
|
||||||
|
This section provides a summary of the build process and provides information
|
||||||
|
for less obvious aspects of the build process.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
|
||||||
<literallayout class='monospaced'>
|
<section id='build-overview'>
|
||||||
|
<title>Build Overview</title>
|
||||||
|
|
||||||
|
<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>
|
|
||||||
The build_dir is the dir containing all the build's object files. The default
|
<para>
|
||||||
build dir is poky-dir/build. A different build_dir can be used for each of the targets.
|
The <filename>build_dir</filename> is optional and specifies the directory Yocto Project
|
||||||
For example, ~/build/x86 for a qemux86 target, and ~/build/arm for a qemuarm target.
|
uses for the build.
|
||||||
Please refer to <link linkend="structure-core-script">oe-init-build-env</link>
|
If you do not specify a build directory it defaults to <filename>build</filename>
|
||||||
for more detailed information.
|
in your current working directory.
|
||||||
</para>
|
A common practice is to use a different build directory for different targets.
|
||||||
<para>
|
For example, <filename>~/build/x86</filename> for a <filename>qemux86</filename>
|
||||||
Once the Poky build environment is set up, a target can be built using:
|
target, and <filename>~/build/arm</filename> for a <filename>qemuarm</filename> target.
|
||||||
</para>
|
See <link linkend="structure-core-script">oe-init-build-env</link>
|
||||||
<para>
|
for more information on this script.
|
||||||
<literallayout class='monospaced'>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Once the Yocto Project build environment is set up, you can build a target using:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
$ bitbake <target>
|
$ bitbake <target>
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
|
||||||
The target is the name of the recipe you want to build.
|
<para>
|
||||||
Common targets are the images in <filename>meta/recipes-core/images</filename>,
|
The <filename>target</filename> is the name of the recipe you want to build.
|
||||||
<filename>/meta/recipes-sato/images</filename>, etc.
|
Common targets are the images in <filename>meta/recipes-core/images</filename>,
|
||||||
Or, the target can be the name of a recipe for a specific piece of software such as
|
<filename>/meta/recipes-sato/images</filename>, etc. all found in the Yocto Project
|
||||||
<application>busybox</application>.
|
files.
|
||||||
For more details about the standard images available, see the
|
Or, the target can be the name of a recipe for a specific piece of software such as
|
||||||
<link linkend="ref-images">'Reference: Images'</link> appendix.
|
<application>busybox</application>.
|
||||||
</para>
|
For more details about the images Yocto Project supports, see the
|
||||||
<note>
|
<link linkend="ref-images">'Reference: Images'</link> appendix.
|
||||||
Building an image without GNU Public License Version 3 (GPLv3) components is
|
</para>
|
||||||
only supported for minimal and base images.
|
|
||||||
See <link linkend='ref-images'>'Reference: Images'</link> for more information.
|
<note>
|
||||||
</note>
|
Building an image without GNU Public License Version 3 (GPLv3) components is
|
||||||
<note>
|
only supported for minimal and base images.
|
||||||
When building an image using GPL components you need to maintain your original
|
See <link linkend='ref-images'>'Reference: Images'</link> for more information.
|
||||||
settings and not switch back and forth applying different versions of the GNU
|
</note>
|
||||||
Public License. If you rebuild using different versions of GPL you can get
|
</section>
|
||||||
dependency errors due to some components not being rebuilt.
|
|
||||||
</note>
|
<section id='building-an-image-using-gpl-components'>
|
||||||
|
<title>Building an Image Using GPL Components</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
When building an image using GPL components, you need to maintain your original
|
||||||
|
settings and not switch back and forth applying different versions of the GNU
|
||||||
|
Public License.
|
||||||
|
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'>
|
||||||
<title>Installing and Using the Result</title>
|
<title>Installing and Using the Result</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Once an image has been built it often needs to be installed.
|
Once an image has been built, it often needs to be installed.
|
||||||
The images/kernels built by Poky are placed in the
|
The images and kernels built by the Yocto Project are placed in the build directory in
|
||||||
<filename class="directory">tmp/deploy/images</filename> directory.
|
<filename class="directory">tmp/deploy/images</filename>.
|
||||||
Running qemux86 and qemuarm images is described in the
|
For information on how to run pre-built images such as <filename>qemux86</filename>
|
||||||
'Using Pre-Built Binaries and QEMU' section of the Yocto Project Quick Start.
|
and <filename>qemuarm</filename>, see the
|
||||||
See <ulink url="http://www.yoctoproject.org//docs/yocto-quick-start/yocto-project-qs.html"/>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html#using-pre-built'>
|
||||||
for the guide.
|
Using Pre-Built Binaries and QEMU</ulink> section in the
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||||
|
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.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='usingpoky-debugging'>
|
<section id='usingpoky-debugging'>
|
||||||
<title>Debugging Build Failures</title>
|
<title>Debugging Build Failures</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The exact method for debugging Poky depends on the nature of the
|
The exact method for debugging Yocto Project build failures depends on the nature of the
|
||||||
problem and on the system's area from which the bug originates.
|
problem and on the system's area from which the bug originates.
|
||||||
Standard debugging practices such as comparison against the last
|
Standard debugging practices such as comparison against the last
|
||||||
known working version with examination of the changes and the re-application of steps
|
known working version with examination of the changes and the re-application of steps
|
||||||
to identify the one causing the problem are
|
to identify the one causing the problem are
|
||||||
valid for Poky just as they are for any other system.
|
valid for Yocto Project just as they are for any other system.
|
||||||
Even though it is impossible to detail every possible potential failure,
|
Even though it is impossible to detail every possible potential failure,
|
||||||
here are some general tips to aid in debugging:
|
this section provides some general tips to aid in debugging.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='usingpoky-debugging-taskfailures'>
|
<section id='usingpoky-debugging-taskfailures'>
|
||||||
<title>Task Failures</title>
|
<title>Task Failures</title>
|
||||||
|
|
||||||
<para>The log file for shell tasks is available in <filename>${WORKDIR}/temp/log.do_taskname.pid</filename>.
|
<para>The log file for shell tasks is available in
|
||||||
For example, the "compile" task of busybox 1.01 on the ARM spitz machine might be
|
<filename>${WORKDIR}/temp/log.do_taskname.pid</filename>.
|
||||||
<filename>tmp/work/armv5te-poky-linux-gnueabi/busybox-1.01/temp/log.do_compile.1234</filename>.
|
For example, the <filename>compile</filename> task for the QEMU minimal image for the x86
|
||||||
|
machine (<filename>qemux86</filename>) might be
|
||||||
|
<filename>tmp/work/qemux86-poky-linux/core-image-minimal-1.0-r0/temp/log.do_compile.20830</filename>.
|
||||||
To see what BitBake runs to generate that log, look at the corresponding
|
To see what BitBake runs to generate that log, look at the corresponding
|
||||||
<filename>run.do_taskname.pid </filename> file located in the same directory.
|
<filename>run.do_taskname.pid</filename> file located in the same directory.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Presently, the output from python tasks is sent directly to the console.
|
Presently, the output from Python tasks is sent directly to the console.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -230,28 +138,33 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Any given package consists of a set of tasks.
|
Any given package consists of a set of tasks.
|
||||||
In most cases the series is: fetch, unpack, patch, configure,
|
The standard BitBake behavior in most cases is: <filename>fetch</filename>,
|
||||||
compile, install, package, package_write and build.
|
<filename>unpack</filename>,
|
||||||
The default task is "build" and any tasks on which it depends build first - hence,
|
<filename>patch</filename>, <filename>configure</filename>,
|
||||||
the standard BitBake behaviour.
|
<filename>compile</filename>, <filename>install</filename>, <filename>package</filename>,
|
||||||
Some tasks exist, such as devshell, that are not part of the default build chain.
|
<filename>package_write</filename>, and <filename>build</filename>.
|
||||||
If you wish to run a task that is not part of the default build chain you can use the
|
The default task is <filename>build</filename> and any tasks on which it depends
|
||||||
"-c" option in BitBake as follows:
|
build first.
|
||||||
|
Some tasks exist, such as <filename>devshell</filename>, that are not part of the
|
||||||
|
default build chain.
|
||||||
|
If you wish to run a task that is not part of the default build chain, you can use the
|
||||||
|
<filename>-c</filename> option in BitBake as follows:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ bitbake matchbox-desktop -c devshell
|
$ bitbake matchbox-desktop -c devshell
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you wish to rerun a task use the force option "-f".
|
If you wish to rerun a task, use the <filename>-f</filename> force option.
|
||||||
For example, the following sequence forces recompilation after changing files in the
|
For example, the following sequence forces recompilation after changing files in the
|
||||||
working directory.
|
working directory.
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ bitbake matchbox-desktop
|
$ bitbake matchbox-desktop
|
||||||
[make some changes to the source code in the WORKDIR]
|
.
|
||||||
|
.
|
||||||
|
[make some changes to the source code in the working directory]
|
||||||
|
.
|
||||||
|
.
|
||||||
$ bitbake matchbox-desktop -c compile -f
|
$ bitbake matchbox-desktop -c compile -f
|
||||||
$ bitbake matchbox-desktop
|
$ bitbake matchbox-desktop
|
||||||
</literallayout>
|
</literallayout>
|
||||||
@@ -259,14 +172,14 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
This sequence first builds <filename>matchbox-desktop</filename> and then recompiles it.
|
This sequence first builds <filename>matchbox-desktop</filename> and then recompiles it.
|
||||||
The last command reruns all tasks, basically the packaging tasks, after the compile.
|
The last command reruns all tasks (basically the packaging tasks) after the compile.
|
||||||
BitBake recognizes that the "compile" task was rerun and therefore understands that the other
|
BitBake recognizes that the <filename>compile</filename> task was rerun and therefore
|
||||||
tasks also need to be run again.
|
understands that the other tasks also need to be run again.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can view a list of tasks in a given package by running the "listtasks" task.
|
You can view a list of tasks in a given package by running the
|
||||||
For example:
|
<filename>listtasks</filename> task as follows:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ bitbake matchbox-desktop -c
|
$ bitbake matchbox-desktop -c
|
||||||
</literallayout>
|
</literallayout>
|
||||||
@@ -279,12 +192,13 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Sometimes it can be hard to see why BitBake wants to build some other packages before a given
|
Sometimes it can be hard to see why BitBake wants to build some other packages before a given
|
||||||
package you've specified.
|
package you have specified.
|
||||||
The <filename>bitbake -g targetname</filename> command creates the <filename>depends.dot</filename> and
|
The <filename>bitbake -g targetname</filename> command creates the
|
||||||
<filename>task-depends.dot</filename> files in the current directory.
|
<filename>depends.dot</filename> and <filename>task-depends.dot</filename> files
|
||||||
|
in the current directory.
|
||||||
These files show the package and task dependencies and are useful for debugging problems.
|
These files show the package and task dependencies and are useful for debugging problems.
|
||||||
You can use the <filename>bitbake -g -u depexp targetname</filename> command to display the results
|
You can use the <filename>bitbake -g -u depexp targetname</filename> command to
|
||||||
in a more human-readable form.
|
display the results in a more human-readable form.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -292,10 +206,10 @@
|
|||||||
<title>General BitBake Problems</title>
|
<title>General BitBake Problems</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can see debug output from BitBake by using the "-D" option.
|
You can see debug output from BitBake by using the <filename>-D</filename> option.
|
||||||
The debug output gives more information about what BitBake
|
The debug output gives more information about what BitBake
|
||||||
is doing and the reason behind it.
|
is doing and the reason behind it.
|
||||||
Each "-D" option you use increases the logging level.
|
Each <filename>-D</filename> option you use increases the logging level.
|
||||||
The most common usage is <filename>-DDD</filename>.
|
The most common usage is <filename>-DDD</filename>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -312,41 +226,137 @@
|
|||||||
<title>Building with No Dependencies</title>
|
<title>Building with No Dependencies</title>
|
||||||
<para>
|
<para>
|
||||||
If you really want to build a specific <filename>.bb</filename> file, you can use
|
If you really want to build a specific <filename>.bb</filename> file, you can use
|
||||||
the command form <filename>bitbake -b somepath/somefile.bb</filename>.
|
the command form <filename>bitbake -b <somepath/somefile.bb></filename>.
|
||||||
This command form does not check for dependencies so you should use it
|
This command form does not check for dependencies so you should use it
|
||||||
only when you know its dependencies already exist.
|
only when you know its dependencies already exist.
|
||||||
You can also specify fragments of the filename and BitBake checks for a unique match.
|
You can also specify fragments of the filename.
|
||||||
|
In this case, BitBake checks for a unique match.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='usingpoky-debugging-variables'>
|
<section id='usingpoky-debugging-variables'>
|
||||||
<title>Variables</title>
|
<title>Variables</title>
|
||||||
<para>
|
<para>
|
||||||
The "-e" option dumps the resulting environment for
|
The <filename>-e</filename> option dumps the resulting environment for
|
||||||
either the configuration (no package specified) or for a
|
either the configuration (no package specified) or for a
|
||||||
specific package when specified with the "-b" option.
|
specific package when specified; or <filename>-b recipename</filename>
|
||||||
|
to show the environment from parsing a single recipe file only.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section id='recipe-logging-mechanisms'>
|
||||||
|
<title>Recipe Logging Mechanisms</title>
|
||||||
|
<para>
|
||||||
|
Best practices exist while writing recipes that both log build progress and
|
||||||
|
act on build conditions such as warnings and errors.
|
||||||
|
Both Python and Bash language bindings exist for the logging mechanism:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><emphasis>Python:</emphasis> For Python functions, BitBake
|
||||||
|
supports several loglevels: <filename>bb.fatal</filename>,
|
||||||
|
<filename>bb.error</filename>, <filename>bb.warn</filename>,
|
||||||
|
<filename>bb.note</filename>, <filename>bb.plain</filename>,
|
||||||
|
and <filename>bb.debug</filename>.</para></listitem>
|
||||||
|
<listitem><para><emphasis>Bash:</emphasis> For Bash functions, the same set
|
||||||
|
of loglevels exist and are accessed with a similar syntax:
|
||||||
|
<filename>bbfatal</filename>, <filename>bberror</filename>,
|
||||||
|
<filename>bbwarn</filename>, <filename>bbnote</filename>,
|
||||||
|
<filename>bbplain</filename>, and <filename>bbdebug</filename>.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For guidance on how logging is handled
|
||||||
|
in both Python and Bash recipes, see the
|
||||||
|
<filename>logging.bbclass</filename> file in the
|
||||||
|
<filename>meta/classes</filename> directory of the Yocto Project files.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<section id='logging-with-python'>
|
||||||
|
<title>Logging With Python</title>
|
||||||
|
<para>
|
||||||
|
When creating recipes using Python and inserting code that handles build logs
|
||||||
|
keep in mind the goal is to have informative logs while keeping the console as
|
||||||
|
"silent" as possible.
|
||||||
|
Also, if you want status messages in the log use the "debug" loglevel.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Following is an example written in Python.
|
||||||
|
The code handles logging for a function that determines the number of tasks
|
||||||
|
needed to be run:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
python do_listtasks() {
|
||||||
|
bb.debug(2, "Starting to figure out the task list")
|
||||||
|
if noteworthy_condition:
|
||||||
|
bb.note("There are 47 tasks to run")
|
||||||
|
bb.debug(2, "Got to point xyz")
|
||||||
|
if warning_trigger:
|
||||||
|
bb.warn("Detected warning_trigger, this might be a problem later.")
|
||||||
|
if recoverable_error:
|
||||||
|
bb.error("Hit recoverable_error, you really need to fix this!")
|
||||||
|
if fatal_error:
|
||||||
|
bb.fatal("fatal_error detected, unable to print the task list")
|
||||||
|
bb.plain("The tasks present are abc")
|
||||||
|
bb.debug(2, "Finished figureing out the tasklist")
|
||||||
|
}
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='logging-with-bash'>
|
||||||
|
<title>Logging With Bash</title>
|
||||||
|
<para>
|
||||||
|
When creating recipes using Bash and inserting code that handles build
|
||||||
|
logs you have the same goals - informative with minimal console output.
|
||||||
|
The syntax you use for recipes written in Bash is similar to that of
|
||||||
|
recipes written in Python described in the previous section.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Following is an example written in Bash.
|
||||||
|
The code logs the progress of the <filename>do_my_function</filename> function.
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
do_my_function() {
|
||||||
|
bbdebug 2 "Running do_my_function"
|
||||||
|
if [ exceptional_condition ]; then
|
||||||
|
bbnote "Hit exceptional_condition"
|
||||||
|
fi
|
||||||
|
bbdebug 2 "Got to point xyz"
|
||||||
|
if [ warning_trigger ]; then
|
||||||
|
bbwarn "Detected warning_trigger, this might cause a problem later."
|
||||||
|
fi
|
||||||
|
if [ recoverable_error ]; then
|
||||||
|
bberror "Hit recoverable_error, correcting"
|
||||||
|
fi
|
||||||
|
if [ fatal_error ]; then
|
||||||
|
bbfatal "fatal_error detected"
|
||||||
|
fi
|
||||||
|
bbdebug 2 "Completed do_my_function"
|
||||||
|
}
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section id='usingpoky-debugging-others'>
|
<section id='usingpoky-debugging-others'>
|
||||||
<title>Other Tips</title>
|
<title>Other Tips</title>
|
||||||
<tip>
|
|
||||||
<para>
|
<para>
|
||||||
When adding new packages it is worth watching for undesireable items making their way
|
Here are some other tips that you might find useful:
|
||||||
into compiler command lines.
|
<itemizedlist>
|
||||||
For example, you do not want references to local system files like
|
<listitem><para>When adding new packages, it is worth watching for
|
||||||
<filename>/usr/lib/</filename> or <filename>/usr/include/</filename>.
|
undesirable items making their way into compiler command lines.
|
||||||
|
For example, you do not want references to local system files like
|
||||||
|
<filename>/usr/lib/</filename> or <filename>/usr/include/</filename>.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>If you want to remove the psplash boot splashscreen,
|
||||||
|
add <filename>psplash=false</filename> to the kernel command line.
|
||||||
|
Doing so prevents psplash from loading and thus allows you to see the console.
|
||||||
|
It is also possible to switch out of the splashscreen by
|
||||||
|
switching the virtual console (e.g. Fn+Left or Fn+Right on a Zaurus).
|
||||||
|
</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
</tip>
|
|
||||||
<tip>
|
|
||||||
<para>
|
|
||||||
If you want to remove the psplash boot splashscreen, add "psplash=false"
|
|
||||||
to the kernel command line.
|
|
||||||
Doing so prevents psplash from loading thus allowing you to see the console.
|
|
||||||
It is also possible to switch out of the splashscreen by
|
|
||||||
switching the virtual console (e.g. Fn+Left or Fn+Right on a Zaurus).
|
|
||||||
</para>
|
|
||||||
</tip>
|
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 9.4 KiB |
@@ -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'>
|
||||||
@@ -15,13 +15,13 @@
|
|||||||
Welcome to the Yocto Project!
|
Welcome to the Yocto Project!
|
||||||
The Yocto Project is an open-source collaboration project focused on embedded Linux
|
The Yocto Project is an open-source collaboration project focused on embedded Linux
|
||||||
developers.
|
developers.
|
||||||
Amongst other things, the Yocto Project uses the Poky build tool to
|
Amongst other things, the Yocto Project uses the Poky build system to
|
||||||
construct complete Linux images.
|
construct complete Linux images.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
This short document will give you some basic information about the environment as well
|
This short document will give you some basic information about the environment as well
|
||||||
as let you experience it in its simplest form.
|
as let you experience it in its simplest form.
|
||||||
After reading this document you will have a basic understanding of what the Yocto Project is
|
After reading this document, you will have a basic understanding of what the Yocto Project is
|
||||||
and how to use some of its core components.
|
and how to use some of its core components.
|
||||||
This document steps you through a simple example showing you how to build a small image
|
This document steps you through a simple example showing you how to build a small image
|
||||||
and run it using the QEMU emulator.
|
and run it using the QEMU emulator.
|
||||||
@@ -29,22 +29,31 @@
|
|||||||
<para>
|
<para>
|
||||||
For complete information on the Yocto Project, you should check out the
|
For complete information on the Yocto Project, you should check out the
|
||||||
<ulink url='http://www.yoctoproject.org'>Yocto Project Website</ulink>.
|
<ulink url='http://www.yoctoproject.org'>Yocto Project Website</ulink>.
|
||||||
You can find the latest builds, breaking news, full development documentation, and a
|
Through the website, you can find the latest builds, breaking news, full development
|
||||||
|
documentation, and a
|
||||||
rich Yocto Project Development Community into which you can tap.
|
rich Yocto Project Development Community into which you can tap.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
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
|
the FAQ appendix located in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/poky-ref-manual/poky-ref-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||||
Poky Reference Manual</ulink> helpful.
|
The Yocto Project Reference Manual</ulink> helpful.
|
||||||
</para>
|
</para>
|
||||||
|
<note>
|
||||||
|
Due to production processes, there could be differences between the Yocto Project
|
||||||
|
documentation bundled in the release tarball and the
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||||
|
Yocto Project Quick Start</ulink> on
|
||||||
|
the <ulink url='http://www.yoctoproject.org'>Yocto Project</ulink> website.
|
||||||
|
For the latest version of this manual, see the manual on the website.
|
||||||
|
</note>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='yp-intro'>
|
<section id='yp-intro'>
|
||||||
<title>Introducing the Yocto Project Development Environment</title>
|
<title>Introducing the Yocto Project Development Environment</title>
|
||||||
<para>
|
<para>
|
||||||
The Yocto Project through the Poky build tool provides an open source development
|
The Yocto Project through the Poky build system provides an open source development
|
||||||
environment targeting the ARM, MIPS, PowerPC and x86 architectures for a variety of
|
environment targeting the ARM, MIPS, PowerPC and x86 architectures for a variety of
|
||||||
platforms including x86-64 and emulated ones.
|
platforms including x86-64 and emulated ones.
|
||||||
You can use components from the Yocto Project to design, develop, build, debug, simulate,
|
You can use components from the Yocto Project to design, develop, build, debug, simulate,
|
||||||
@@ -66,7 +75,7 @@
|
|||||||
</mediaobject>
|
</mediaobject>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Yocto Project:
|
Here are some highlights for the Yocto Project:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
@@ -77,7 +86,7 @@
|
|||||||
<para>Makes available system components such as X11, Matchbox, GTK+, Pimlico, Clutter,
|
<para>Makes available system components such as X11, Matchbox, GTK+, Pimlico, Clutter,
|
||||||
GuPNP and Qt (among others) so you can create a richer user interface experience on
|
GuPNP and Qt (among others) so you can create a richer user interface experience on
|
||||||
devices that use displays or have a GUI.
|
devices that use displays or have a GUI.
|
||||||
For devices that don't have a GUI or display you simply would not employ these
|
For devices that don't have a GUI or display, you simply would not employ these
|
||||||
components.</para>
|
components.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
@@ -92,9 +101,9 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The Yocto Project can generate images for many kinds of devices.
|
The Yocto Project can generate images for many kinds of devices.
|
||||||
However, the standard example machines target QEMU full system emulation for x86, ARM, MIPS,
|
However, the standard example machines target QEMU full-system emulation for x86, x86-64, ARM, MIPS,
|
||||||
and PPC-based architectures as well as specific hardware such as the Intel Desktop Board
|
and PPC-based architectures as well as specific hardware such as the
|
||||||
DH55TC.
|
<trademark class='registered'>Intel</trademark> Desktop Board DH55TC.
|
||||||
Because an image developed with the Yocto Project can boot inside a QEMU emulator, the
|
Because an image developed with the Yocto Project can boot inside a QEMU emulator, the
|
||||||
development environment works nicely as a test platform for developing embedded software.
|
development environment works nicely as a test platform for developing embedded software.
|
||||||
</para>
|
</para>
|
||||||
@@ -105,7 +114,7 @@
|
|||||||
restricted screen sizes, sits neatly on top of a device using the
|
restricted screen sizes, sits neatly on top of a device using the
|
||||||
GNOME Mobile Stack and provides a well-defined user experience.
|
GNOME Mobile Stack and provides a well-defined user experience.
|
||||||
Implemented in its own layer, it makes it clear to developers how they can implement
|
Implemented in its own layer, it makes it clear to developers how they can implement
|
||||||
their own UIs on top of Yocto Linux.
|
their own user interface on top of Yocto Linux.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -120,11 +129,10 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>A host system running a supported Linux distribution (i.e. recent releases of
|
<para>A host system running a supported Linux distribution (i.e. recent releases of
|
||||||
Fedora, openSUSE, Debian, and Ubuntu).
|
Fedora, openSUSE, Debian, and Ubuntu).
|
||||||
<note>
|
If the host system supports multiple cores and threads, you can configure the
|
||||||
For notes about using the Yocto Project on development systems that use
|
Yocto Project build system to decrease the time needed to build images
|
||||||
older Linux distributions see
|
significantly.
|
||||||
<ulink url='https://wiki.yoctoproject.org/wiki/BuildingOnRHEL4'></ulink>
|
</para>
|
||||||
</note></para>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>The right packages.</para>
|
<para>The right packages.</para>
|
||||||
@@ -138,15 +146,23 @@
|
|||||||
<title>The Linux Distribution</title>
|
<title>The Linux Distribution</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The Yocto Project has been tested and is known to work on the current releases minus one
|
The Yocto Project team is continually verifying more and more Linux
|
||||||
of the following distributions.
|
distributions with each release.
|
||||||
Follow this <ulink url='https://wiki.pokylinux.org/wiki/Distro_Test'>link </ulink> for more
|
In general, if you have the current release minus one of the following
|
||||||
information on distribution testing.
|
distributions you should have no problems.
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>Ubuntu</para></listitem>
|
<listitem><para>Ubuntu</para></listitem>
|
||||||
<listitem><para>Fedora</para></listitem>
|
<listitem><para>Fedora</para></listitem>
|
||||||
<listitem><para>openSUSE</para></listitem>
|
<listitem><para>openSUSE</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
For a list of the distributions under validation and their status, see the
|
||||||
|
<ulink url='https://wiki.yoctoproject.org/wiki/Distribution_Support'>Distribution
|
||||||
|
Support</ulink> wiki page.
|
||||||
|
<note>
|
||||||
|
For notes about using the Yocto Project on a RHEL 4-based host, see the
|
||||||
|
<ulink url='https://wiki.yoctoproject.org/wiki/BuildingOnRHEL4'>BuildingOnRHEL4</ulink>
|
||||||
|
wiki page.
|
||||||
|
</note>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The build system should be able to run on any modern distribution with Python 2.6 or 2.7.
|
The build system should be able to run on any modern distribution with Python 2.6 or 2.7.
|
||||||
@@ -160,7 +176,7 @@
|
|||||||
Refer to
|
Refer to
|
||||||
<ulink url='http://openembedded.net/index.php?title=OEandYourDistro&action=historysubmit&diff=4309&okdid=4225'>OE and Your Distro</ulink> and
|
<ulink url='http://openembedded.net/index.php?title=OEandYourDistro&action=historysubmit&diff=4309&okdid=4225'>OE and Your Distro</ulink> and
|
||||||
<ulink url='http://openembedded.net/index.php?title=Required_software&action=historysubmit&diff=4311&oldid=4251'>Required Software</ulink>
|
<ulink url='http://openembedded.net/index.php?title=Required_software&action=historysubmit&diff=4311&oldid=4251'>Required Software</ulink>
|
||||||
for information for other distributions used with the Open Embedded project, which might be
|
for information for other distributions used with the OpenEmbedded project, which might be
|
||||||
a starting point for exploration.
|
a starting point for exploration.
|
||||||
If you go down this path, you should expect problems.
|
If you go down this path, you should expect problems.
|
||||||
When you do, please go to <ulink url='http://bugzilla.yoctoproject.org'>Yocto Project Bugzilla</ulink>
|
When you do, please go to <ulink url='http://bugzilla.yoctoproject.org'>Yocto Project Bugzilla</ulink>
|
||||||
@@ -175,56 +191,85 @@
|
|||||||
<para>
|
<para>
|
||||||
Packages and package installation vary depending on your development system.
|
Packages and package installation vary depending on your development system.
|
||||||
In general, you need to have root access and then install the required packages.
|
In general, you need to have root access and then install the required packages.
|
||||||
|
The next few sections show you how to get set up with the right packages for
|
||||||
|
Ubuntu, Fedora, and openSUSE.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<section id='ubuntu'>
|
||||||
|
<title>Ubuntu</title>
|
||||||
|
|
||||||
<note><para>
|
<para>
|
||||||
If you are using a Fedora version prior to version 15 you will need to take some
|
If your distribution is Ubuntu, you need to be running the bash shell.
|
||||||
extra steps to enable <filename>sudo</filename>.
|
You can be sure you are running this shell by entering the following command and
|
||||||
See <ulink url='https://fedoraproject.org/wiki/Configuring_Sudo'></ulink> for details.
|
selecting "No" at the prompt:
|
||||||
</para></note>
|
<literallayout class='monospaced'>
|
||||||
|
$ sudo dpkg-reconfigure dash
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The packages you need for a Debian-based host are shown in the following command:
|
The packages you need for a supported Ubuntu distribution are shown in the following command:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ sudo apt-get install sed wget cvs subversion git-core coreutils \
|
$ sudo apt-get install sed wget cvs subversion git-core coreutils \
|
||||||
unzip texi2html texinfo libsdl1.2-dev docbook-utils gawk \
|
unzip texi2html texinfo libsdl1.2-dev docbook-utils gawk \
|
||||||
python-pysqlite2 diffstat help2man make gcc build-essential \
|
python-pysqlite2 diffstat help2man make gcc build-essential \
|
||||||
g++ desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev \
|
g++ desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev \
|
||||||
mercurial autoconf automake groff libtool
|
mercurial autoconf automake groff libtool xterm
|
||||||
</literallayout>
|
</literallayout>
|
||||||
|
</section>
|
||||||
|
|
||||||
<para>
|
<section id='fedora'>
|
||||||
The packages you need for an RPM-based host like Fedora and openSUSE,
|
<title>Fedora</title>
|
||||||
respectively, are as follows:
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<literallayout class='monospaced'>
|
<para>
|
||||||
|
The packages you need for a supported Fedora distribution are shown in the following
|
||||||
|
commands:
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<literallayout class='monospaced'>
|
||||||
$ sudo yum groupinstall "development tools"
|
$ sudo yum groupinstall "development tools"
|
||||||
$ sudo yum install python m4 make wget curl ftp hg tar bzip2 gzip \
|
$ sudo yum install python m4 make wget curl ftp hg tar bzip2 gzip \
|
||||||
unzip python-psyco perl texinfo texi2html diffstat openjade \
|
unzip python-psyco perl texinfo texi2html diffstat openjade \
|
||||||
docbook-style-dsssl sed docbook-style-xsl docbook-dtds \
|
docbook-style-dsssl sed docbook-style-xsl docbook-dtds \
|
||||||
docbook-utils sed bc glibc-devel ccache pcre pcre-devel quilt \
|
docbook-utils sed bc eglibc-devel ccache pcre pcre-devel quilt \
|
||||||
groff linuxdoc-tools patch linuxdoc-tools cmake help2man \
|
groff linuxdoc-tools patch linuxdoc-tools cmake help2man \
|
||||||
perl-ExtUtils-MakeMaker tcl-devel gettext chrpath ncurses apr \
|
perl-ExtUtils-MakeMaker tcl-devel gettext chrpath ncurses apr \
|
||||||
SDL-devel mesa-libGL-devel mesa-libGLU-devel gnome-doc-utils \
|
SDL-devel mesa-libGL-devel mesa-libGLU-devel gnome-doc-utils \
|
||||||
autoconf automake libtool
|
autoconf automake libtool xterm
|
||||||
</literallayout>
|
</literallayout>
|
||||||
|
|
||||||
<literallayout class='monospaced'>
|
<note><para>
|
||||||
|
If you are using a Fedora version prior to version 15, you will need to take some
|
||||||
|
extra steps to enable <filename>sudo</filename>, or you will need to run
|
||||||
|
the commands as root user.
|
||||||
|
See the <ulink url='https://fedoraproject.org/wiki/Configuring_Sudo'>Configuring Sudo</ulink>
|
||||||
|
wiki page for details.
|
||||||
|
</para></note>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='opensuse'>
|
||||||
|
<title>openSUSE</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The packages you need for a supported openSUSE distribution are shown in the following
|
||||||
|
command:
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<literallayout class='monospaced'>
|
||||||
$ sudo zypper install python gcc gcc-c++ libtool \
|
$ sudo zypper install python gcc gcc-c++ libtool \
|
||||||
subversion git chrpath automake \
|
subversion git chrpath automake make wget help2man \
|
||||||
help2man diffstat texinfo mercurial wget
|
diffstat texinfo mercurial freeglut-devel libSDL-devel
|
||||||
</literallayout>
|
</literallayout>
|
||||||
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='releases'>
|
<section id='releases'>
|
||||||
<title>Yocto Project Release</title>
|
<title>Yocto Project Release</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can download the latest release images for the Yocto Project on the
|
You can download the latest Yocto Project release by going to the
|
||||||
<ulink url="http://yoctoproject.org/download">Yocto Project Download page</ulink>.
|
<ulink url="http://yoctoproject.org/download">Yocto Project Download page</ulink>.
|
||||||
Just go to the page and click the "Yocto Downloads" link found in the "Download"
|
Just go to the page and click the "Yocto Downloads" link found in the "Download"
|
||||||
navigation pane to the right to view all available Yocto Project releases.
|
navigation pane to the right to view all available Yocto Project releases.
|
||||||
@@ -234,6 +279,17 @@
|
|||||||
<ulink url="http://autobuilder.yoctoproject.org/nightly/"></ulink>.
|
<ulink url="http://autobuilder.yoctoproject.org/nightly/"></ulink>.
|
||||||
However, for this document a released version of Yocto Project is used.
|
However, for this document a released version of Yocto Project is used.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You can also get the Yocto Project files by setting up a Git repository on your host
|
||||||
|
development system.
|
||||||
|
Doing so allows you to contribute back to the project.
|
||||||
|
For information on how to get set up using this method, see the
|
||||||
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#local-yp-release'>Yocto
|
||||||
|
Project Release</ulink>" item in
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>The Yocto Project
|
||||||
|
Development Manual</ulink>.
|
||||||
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -241,16 +297,16 @@
|
|||||||
<title>A Quick Test Run</title>
|
<title>A Quick Test Run</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Now that you have your system requirements in order you can give Yocto Project a try.
|
Now that you have your system requirements in order, you can give Yocto Project a try.
|
||||||
This section presents some steps that let you do the following:
|
This section presents some steps that let you do the following:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Build an image and run it in the emulator</para>
|
<para>Build an image and run it in the QEMU emulator</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Or, use a pre-built image and run it in the emulator</para>
|
<para>Use a pre-built image and run it in the QEMU emulator</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
@@ -258,7 +314,8 @@
|
|||||||
<title>Building an Image</title>
|
<title>Building an Image</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
In the development environment you will need to build an image whenever you change hardware support, add or change system libraries, or add or change services that have dependencies.
|
In the development environment you will need to build an image whenever you change hardware
|
||||||
|
support, add or change system libraries, or add or change services that have dependencies.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<mediaobject>
|
<mediaobject>
|
||||||
@@ -283,26 +340,27 @@
|
|||||||
</para></note>
|
</para></note>
|
||||||
|
|
||||||
<note><para>
|
<note><para>
|
||||||
By default, Poky searches for source code using a pre-determined order
|
By default, the Yocto Project searches for source code using a pre-determined order
|
||||||
through a set of locations.
|
through a set of locations.
|
||||||
If you encounter problems with Poky 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 the
|
firewall or proxy server?" in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/poky-ref-manual/poky-ref-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||||
Poky Reference Manual</ulink>.
|
The Yocto Project Reference Manual</ulink>.
|
||||||
</para></note>
|
</para></note>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ wget http://www.yoctoproject.org/downloads/poky/poky-bernard-5.0.1.tar.bz2
|
$ wget http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/poky-edison-6.0.1.tar.bz2
|
||||||
$ tar xjf poky-bernard-5.0.1.tar.bz2
|
$ tar xjf poky-edison-6.0.1.tar.bz2
|
||||||
$ source poky-bernard-5.0.1/poky-init-build-env poky-5.0.1-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 <filename>local.conf</filename> file.
|
to your project's configuration file, which for this example
|
||||||
|
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'>
|
||||||
@@ -311,44 +369,86 @@
|
|||||||
</para></tip>
|
</para></tip>
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>The first two commands extract the Yocto Project files from the
|
<listitem><para>In the previous example, the first command retrieves the Yocto Project
|
||||||
release tarball and place them into a subdirectory of your current directory.</para></listitem>
|
release tarball from the source repositories using the
|
||||||
<listitem><para>The <command>source</command> command creates the
|
<filename>wget</filename> command.
|
||||||
<filename>poky-5.0.1-build</filename> directory and executes the <command>cd</command>
|
Alternatively, you can go to the
|
||||||
command to make <filename>poky-5.0.1-build</filename> the working directory.
|
<ulink url='http://www.yoctoproject.org/download'>Yocto Project website</ulink>
|
||||||
The resulting build directory contains all the files created during the build.
|
Downloads page to retrieve the tarball.</para></listitem>
|
||||||
By default the target architecture is qemux86.
|
<listitem><para>The second command extracts the files from the tarball and places
|
||||||
To change this default, edit the value of the MACHINE variable in the
|
them into a directory named <filename>poky-edison-6.0.1</filename> in the current
|
||||||
<filename>conf/local.conf</filename> file.</para></listitem>
|
directory.</para></listitem>
|
||||||
|
<listitem><para>The third command runs the Yocto Project environment setup script.
|
||||||
|
Running this script defines Yocto Project build environment settings needed to
|
||||||
|
complete the build.
|
||||||
|
The script also creates the Yocto Project
|
||||||
|
build directory, which is <filename>edison-6.0.1-build</filename> in this case.
|
||||||
|
After the script runs, your current working directory is set
|
||||||
|
to the build directory.
|
||||||
|
Later, when the build completes, the build directory contains all the files
|
||||||
|
created during the build.
|
||||||
|
</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
<para>
|
<para>
|
||||||
Take some time to examine your <filename>conf/local.conf</filename> file.
|
Take some time to examine your <filename>local.conf</filename> file
|
||||||
The defaults should work fine.
|
in your project's configuration directory.
|
||||||
However, if you have a multi-core CPU you might want to set the variable
|
The defaults in that file should work fine.
|
||||||
BB_NUMBER_THREADS equal to twice the number of processor cores your system has.
|
However, there are some variables of interest at which you might look.
|
||||||
And, set the variable PARALLEL_MAKE equal to the number of processor cores.
|
|
||||||
Setting these variables can significantly shorten your build time.
|
|
||||||
By default, these variables are commented out.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
By default, the target architecture for the build is <filename>qemux86</filename>,
|
||||||
|
which produces an image that can be used in the QEMU emulator and is targeted at an
|
||||||
|
<trademark class='registered'>Intel</trademark> 32-bit based architecture.
|
||||||
|
To change this default, edit the value of the <filename>MACHINE</filename> variable
|
||||||
|
in the configuration file before launching the build.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Another couple of variables of interest are 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/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.
|
||||||
|
However, if you have a multi-core CPU you might want to uncomment
|
||||||
|
the lines and set the variable
|
||||||
|
<filename>BB_NUMBER_THREADS</filename> equal to twice the number of your
|
||||||
|
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.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Another consideration before you build is the package manager used when creating
|
||||||
|
the image.
|
||||||
|
By default, the Yocto Project build system uses the RPM package manager.
|
||||||
|
You can control this configuration by using the
|
||||||
|
<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
|
||||||
|
"<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/1.1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||||
|
The Yocto Project Reference Manual</ulink>.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Continue with the following command to build an OS image for the target, which is
|
Continue with the following command to build an OS image for the target, which is
|
||||||
<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
|
<filename>bitbake --help</filename> command or see the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/poky-ref-manual/poky-ref-manual.html#usingpoky-components-bitbake'>
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html#usingpoky-components-bitbake'>BitBake</ulink>" section in
|
||||||
BitBake</ulink> section in the Poky Reference Manual.
|
<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 the
|
see the FAQ appendix in
|
||||||
<ulink url='http://www.yoctoproject.org/docs/poky-ref-manual/poky-ref-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||||
Poky 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:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ poky-qemu qemux86
|
$ runqemu qemux86
|
||||||
</literallayout>
|
</literallayout>
|
||||||
<note><para>
|
<note><para>
|
||||||
Depending on the number of processors and cores, the amount or RAM, the speed of your
|
Depending on the number of processors and cores, the amount or RAM, the speed of your
|
||||||
@@ -361,16 +461,13 @@
|
|||||||
|
|
||||||
<section id='using-pre-built'>
|
<section id='using-pre-built'>
|
||||||
<title>Using Pre-Built Binaries and QEMU</title>
|
<title>Using Pre-Built Binaries and QEMU</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If hardware, libraries and services are stable you can get started by using a pre-built binary
|
If hardware, libraries and services are stable, you can get started by using a pre-built binary
|
||||||
of the image, kernel and toolchain and run it using the emulator QEMU.
|
of the filesystem image, kernel, and toolchain and run it using the QEMU emulator.
|
||||||
This scenario is useful for developing application software.
|
This scenario is useful for developing application software.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para></para>
|
|
||||||
<para></para>
|
|
||||||
<para></para>
|
|
||||||
|
|
||||||
<mediaobject>
|
<mediaobject>
|
||||||
<imageobject>
|
<imageobject>
|
||||||
<imagedata fileref="figures/using-a-pre-built-image.png" format="PNG" align='center' scalefit='1'/>
|
<imagedata fileref="figures/using-a-pre-built-image.png" format="PNG" align='center' scalefit='1'/>
|
||||||
@@ -378,197 +475,205 @@
|
|||||||
<caption>
|
<caption>
|
||||||
<para>Using a Pre-Built Image</para>
|
<para>Using a Pre-Built Image</para>
|
||||||
</caption>
|
</caption>
|
||||||
</mediaobject>
|
</mediaobject>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
For this scenario you need to do several things:
|
For this scenario, you need to do several things:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem><para>Install the stand-alone Yocto toolchain tarball.</para></listitem>
|
||||||
<para>
|
<listitem><para>Download the pre-built image that will boot with QEMU.
|
||||||
Install the stand-alone Yocto toolchain tarball.
|
You need to be sure to get the QEMU image that matches your target machine’s
|
||||||
</para>
|
architecture (e.g. x86, ARM, etc.).</para></listitem>
|
||||||
</listitem>
|
<listitem><para>Download the filesystem image for your target machine's architecture.
|
||||||
<listitem>
|
</para></listitem>
|
||||||
<para>
|
<listitem><para>Set up the environment to emulate the hardware and then start the QEMU emulator.
|
||||||
Download the pre-built kernel that will boot with QEMU.
|
</para></listitem>
|
||||||
You need to be sure to get the QEMU image that matches your target machine’s
|
</itemizedlist>
|
||||||
architecture (e.g. x86, ARM, etc.).
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Download the filesystem image for your target machine's architecture.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Set up the environment to emulate the hardware and then start the QEMU emulator.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
|
|
||||||
</itemizedlist>
|
|
||||||
|
|
||||||
<section id='installing-the-toolchain'>
|
<section id='installing-the-toolchain'>
|
||||||
<title>Installing the Toolchain</title>
|
<title>Installing the Toolchain</title>
|
||||||
<para>
|
<para>
|
||||||
You can download the pre-built toolchain, which includes the poky-qemu script and
|
You can download the pre-built toolchain, which includes the <filename>runqemu</filename>
|
||||||
support files, from
|
script and support files, from the appropriate directory under
|
||||||
<ulink url='http://yoctoproject.org/downloads/yocto-1.0/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> folders, 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.
|
||||||
The tarball files are named such that a string representing the host system appears
|
The tarball files are named such that a string representing the host system appears
|
||||||
first in the filename and then is immediately followed by a string representing
|
first in the filename and then is immediately followed by a string representing
|
||||||
the target architecture.
|
the target architecture.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
yocto-eglibc<<emphasis>host_system</emphasis>>-<<emphasis>arch</emphasis>>-toolchain-gmae-<<emphasis>release</emphasis>>.tar.bz2
|
poky-eglibc<<emphasis>host_system</emphasis>>-<<emphasis>arch</emphasis>>-toolchain-gmae-<<emphasis>release</emphasis>>.tar.bz2
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
<<emphasis>host_system</emphasis>> is a string representing your development system:
|
<<emphasis>host_system</emphasis>> is a string representing your development system:
|
||||||
i686 or x86_64.
|
i686 or x86_64.
|
||||||
|
|
||||||
<<emphasis>arch</emphasis>> is a string representing the target architecture:
|
<<emphasis>arch</emphasis>> is a string representing the target architecture:
|
||||||
i686, x86_64, powerpc, mips, or arm.
|
i586, x86_64, powerpc, mips, or arm.
|
||||||
|
|
||||||
<<emphasis>release</emphasis>> is the version of Yocto Project.
|
<<emphasis>release</emphasis>> is the version of Yocto Project.
|
||||||
</literallayout>
|
</literallayout>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
For example, the following toolchain tarball is for a 64-bit development
|
For example, the following toolchain tarball is for a 64-bit development
|
||||||
host system and a 32-bit target architecture:
|
host system and a 32-bit target architecture:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
yocto-eglibc-x86_64-i686-toolchain-gmae-1.0.tar.bz2
|
poky-eglibc-x86_64-i586-toolchain-gmae-1.1.1.tar.bz2
|
||||||
</literallayout>
|
</literallayout>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The toolchain tarballs are self-contained and must be installed into <filename>/opt/poky</filename>.
|
The toolchain tarballs are self-contained and must be installed into <filename>/opt/poky</filename>.
|
||||||
The following commands show how you install the toolchain tarball given a 64-bit development host system
|
The following commands show how you install the toolchain tarball given a 64-bit development host system
|
||||||
and a 32-bit target architecture.
|
and a 32-bit target architecture.
|
||||||
</para>
|
The example assumes the toolchain tarball is located in <filename>~/toolchains/</filename>:
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ cd /
|
$ cd /
|
||||||
$ sudo tar -xvjf yocto-eglibc-x86_64-i686-toolchain-gmae-1.0.tar.bz2
|
$ sudo tar -xvjf ~/toolchains/poky-eglibc-x86_64-i586-toolchain-gmae-1.1.1.tar.bz2
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
|
||||||
|
<para>
|
||||||
|
For more information on how to install tarballs, see the
|
||||||
|
"<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/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/1.1.1/adt-manual/adt-manual.html'>The Yocto Project
|
||||||
|
Application Development Toolkit (ADT) User's Guide</ulink>.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section id='downloading-the-pre-built-linux-kernel'>
|
<section id='downloading-the-pre-built-linux-kernel'>
|
||||||
<title>Downloading the Pre-Built Linux Kernel</title>
|
<title>Downloading the Pre-Built Linux Kernel</title>
|
||||||
<para>
|
|
||||||
You can download the pre-built Linux kernel and the filesystem image suitable for
|
<para>
|
||||||
running in the emulator QEMU from
|
You can download the pre-built Linux kernel suitable for running in the QEMU emulator from
|
||||||
<ulink url='http://yoctoproject.org/downloads/yocto-1.0/machines/qemu'></ulink>.
|
<ulink url='http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/machines/qemu'></ulink>.
|
||||||
Be sure to use the kernel and filesystem image that matches the architecture you want
|
Be sure to use the kernel that matches the architecture you want to simulate.
|
||||||
to simulate.
|
Download areas exist for the five supported machine architectures:
|
||||||
</para>
|
<filename>qemuarm</filename>, <filename>qemumips</filename>, <filename>qemuppc</filename>,
|
||||||
|
<filename>qemux86</filename>, and <filename>qemux86_64</filename>.
|
||||||
<para>
|
</para>
|
||||||
Most kernel files have one of the following forms:
|
|
||||||
</para>
|
<para>
|
||||||
|
Most kernel files have one of the following forms:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
*zImage-<<emphasis>kernel-rev</emphasis>>-qemu<<emphasis>arch</emphasis>>*.bin
|
*zImage-qemu<<emphasis>arch</emphasis>>.bin
|
||||||
vmlinux-<<emphasis>kernel-rev</emphasis>>-<<emphasis>arch</emphasis>>*.bin
|
vmlinux-qemu<<emphasis>arch</emphasis>>.bin
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
<<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.
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
<<emphasis>kernel-rev</emphasis>> is the base Linux kernel revision
|
<para>
|
||||||
(e.g. 2.6.37).
|
You can learn more about downloading a Yocto Project kernel in the
|
||||||
</literallayout>
|
"<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html#local-kernel-files'>Linux Yocto Kernel</ulink>" section of
|
||||||
</section>
|
<ulink url='http://www.yoctoproject.org/docs/1.1.1/dev-manual/dev-manual.html'>The
|
||||||
|
Yocto Project Development Manual</ulink>.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section id='downloading-the-filesystem'>
|
<section id='downloading-the-filesystem'>
|
||||||
<title>Downloading the Filesystem</title>
|
<title>Downloading the Filesystem</title>
|
||||||
<para>
|
|
||||||
The filesystem image has two forms.
|
|
||||||
One form is an <filename>ext3</filename> filesystem image.
|
|
||||||
The other form is a tarball of the filesystem and is booted using user-space NFS.
|
|
||||||
Here are the respective forms:
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<literallayout class='monospaced'>
|
<para>
|
||||||
yocto-image-<<emphasis>profile</emphasis>>-qemu<<emphasis>arch</emphasis>>.rootfs.ext3.bz2
|
You can also download the filesystem image suitable for your target architecture from
|
||||||
yocto-image-<<emphasis>profile</emphasis>>-qemu<<emphasis>arch</emphasis>>.rootfs.tar.bz2
|
<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
|
||||||
|
to simulate.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The filesystem image has two tarball forms: <filename>ext3</filename> and
|
||||||
|
<filename>tar</filename>.
|
||||||
|
You must use the <filename>ext3</filename> form when booting an image using the
|
||||||
|
QEMU emulator.
|
||||||
|
The <filename>tar</filename> form can be flattened out in your host development system
|
||||||
|
and used for Yocto Project build purposes.
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
core-image-<<emphasis>profile</emphasis>>-qemu<<emphasis>arch</emphasis>>.ext3
|
||||||
|
core-image-<<emphasis>profile</emphasis>>-qemu<<emphasis>arch</emphasis>>.tar.bz2
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
<<emphasis>profile</emphasis>> is the filesystem image's profile:
|
<<emphasis>profile</emphasis>> is the filesystem image's profile:
|
||||||
sdk, sato, minimal, or lsb.
|
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
|
||||||
|
<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.
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</section>
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section id='setting-up-the-environment-and-starting-the-qemu-emulator'>
|
<section id='setting-up-the-environment-and-starting-the-qemu-emulator'>
|
||||||
<title>Setting Up the Environment and Starting the QEMU Emulator</title>
|
<title>Setting Up the Environment and Starting the QEMU Emulator</title>
|
||||||
<para>
|
|
||||||
Before you start the QEMU emulator you need to set up the emulation environment.
|
<para>
|
||||||
The following command form sets up the emulation environment.
|
Before you start the QEMU emulator, you need to set up the emulation environment.
|
||||||
</para>
|
The following command form sets up the emulation environment.
|
||||||
|
<literallayout class='monospaced'>
|
||||||
<literallayout class='monospaced'>
|
$ source /opt/poky/1.1.1/environment-setup-<<emphasis>arch</emphasis>>-poky-linux-<<emphasis>if</emphasis>>
|
||||||
$ source /opt/poky/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:
|
||||||
i686, x86_64, ppc603e, mips, or armv5te.
|
i586, x86_64, ppc603e, mips, or armv5te.
|
||||||
|
|
||||||
<<emphasis>if</emphasis>> is a string representing an embedded application binary interface.
|
<<emphasis>if</emphasis>> is a string representing an embedded application binary interface.
|
||||||
Not all setup scripts include this string.
|
Not all setup scripts include this string.
|
||||||
</literallayout>
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Finally, this command form invokes the QEMU emulator
|
Finally, this command form invokes the QEMU emulator
|
||||||
</para>
|
<literallayout class='monospaced'>
|
||||||
|
$ runqemu <<emphasis>qemuarch</emphasis>> <<emphasis>kernel-image</emphasis>> <<emphasis>filesystem-image</emphasis>>
|
||||||
<literallayout class='monospaced'>
|
|
||||||
$ poky-qemu <<emphasis>qemuarch</emphasis>> <<emphasis>kernel</emphasis>> <<emphasis>filesystem_image</emphasis>>
|
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
<<emphasis>qemuarch</emphasis>> is a string representing the target architecture: qemux86, qemux86-64,
|
<<emphasis>qemuarch</emphasis>> is a string representing the target architecture: qemux86, qemux86-64,
|
||||||
qemuppc, qemumips, or qemuarm.
|
qemuppc, qemumips, or qemuarm.
|
||||||
|
|
||||||
<<emphasis>kernel</emphasis>> is the architecture-specific kernel.
|
<<emphasis>kernel-image</emphasis>> is the architecture-specific kernel image.
|
||||||
|
|
||||||
<<emphasis>filesystem_image</emphasis>> is the .ext3 filesystem image.
|
<<emphasis>filesystem-image</emphasis>> is the .ext3 filesystem image.
|
||||||
|
|
||||||
</literallayout>
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
<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
|
||||||
that the kernel and filesystem are for a 32-bit target architecture.
|
into <filename>/opt/poky</filename> and
|
||||||
</para>
|
that the kernel and filesystem are for a 32-bit target architecture.
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ source /opt/poky/1.1.1/environment-setup-i586-poky-linux
|
||||||
|
$ runqemu qemux86 bzImage-3.0-qemux86-1.1.1.bin \
|
||||||
|
core-image-sato-qemux86.ext3
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
<literallayout class='monospaced'>
|
<para>
|
||||||
$ source /opt/poky/1.0/environment-setup-i686-poky-linux
|
The environment in which QEMU launches varies depending on the filesystem image and on the
|
||||||
$ poky-qemu qemux86 bzImage-2.6.37-qemux86-1.0.bin \
|
target architecture.
|
||||||
yocto-image-sato-qemux86-1.0.rootfs.ext3
|
For example, if you source the environment for the ARM target
|
||||||
</literallayout>
|
architecture and then boot the minimal QEMU image, the emulator comes up in a new
|
||||||
|
shell in command-line mode.
|
||||||
<para>
|
However, if you boot the SDK image, QEMU comes up with a GUI.
|
||||||
The environment in which QEMU launches varies depending on the filesystem image and on the
|
<note>Booting the PPC image results in QEMU launching in the same shell in
|
||||||
target architecture. For example, if you source the environment for the ARM target
|
command-line mode.</note>
|
||||||
architecture and then boot the minimal QEMU image, the emulator comes up in a new
|
</para>
|
||||||
shell in command-line mode. However, if you boot the SDK image QEMU comes up with
|
</section>
|
||||||
a GUI.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<note><para>
|
|
||||||
Booting the PPC image results in QEMU launching in the same shell in command-line mode.
|
|
||||||
</para></note>
|
|
||||||
</section>
|
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ FILES_${PN} += " \
|
|||||||
${datadir}/abiword-${SHRT_VER}/scripts \
|
${datadir}/abiword-${SHRT_VER}/scripts \
|
||||||
${datadir}/abiword-${SHRT_VER}/system.profile-en \
|
${datadir}/abiword-${SHRT_VER}/system.profile-en \
|
||||||
${datadir}/abiword-${SHRT_VER}/system.profile-en_GB \
|
${datadir}/abiword-${SHRT_VER}/system.profile-en_GB \
|
||||||
# ${datadir}/abiword-${SHRT_VER}/templates/A4.awt \
|
|
||||||
# ${datadir}/abiword-${SHRT_VER}/templates/US-Letter.awt \
|
|
||||||
${datadir}/abiword-${SHRT_VER}/templates/normal.awt \
|
${datadir}/abiword-${SHRT_VER}/templates/normal.awt \
|
||||||
${datadir}/abiword-${SHRT_VER}/templates/normal.awt-en_GB \
|
${datadir}/abiword-${SHRT_VER}/templates/normal.awt-en_GB \
|
||||||
${datadir}/abiword-${SHRT_VER}/templates/Employee-Directory.awt \
|
${datadir}/abiword-${SHRT_VER}/templates/Employee-Directory.awt \
|
||||||
@@ -29,6 +27,9 @@ FILES_${PN} += " \
|
|||||||
${datadir}/abiword-${SHRT_VER}/templates/Memo.awt \
|
${datadir}/abiword-${SHRT_VER}/templates/Memo.awt \
|
||||||
${datadir}/abiword-${SHRT_VER}/templates/Press-Release.awt "
|
${datadir}/abiword-${SHRT_VER}/templates/Press-Release.awt "
|
||||||
|
|
||||||
|
# ${datadir}/abiword-${SHRT_VER}/templates/A4.awt \
|
||||||
|
# ${datadir}/abiword-${SHRT_VER}/templates/US-Letter.awt \
|
||||||
|
|
||||||
inherit autotools pkgconfig
|
inherit autotools pkgconfig
|
||||||
|
|
||||||
PARALLEL_MAKE = ""
|
PARALLEL_MAKE = ""
|
||||||
|
|||||||
@@ -25,9 +25,10 @@ FILES_${PN} += " \
|
|||||||
${datadir}/abiword-${SHRT_VER}/glade \
|
${datadir}/abiword-${SHRT_VER}/glade \
|
||||||
${datadir}/abiword-${SHRT_VER}/system.profile-en \
|
${datadir}/abiword-${SHRT_VER}/system.profile-en \
|
||||||
${datadir}/abiword-${SHRT_VER}/system.profile-en-GB \
|
${datadir}/abiword-${SHRT_VER}/system.profile-en-GB \
|
||||||
|
"
|
||||||
|
|
||||||
# ${datadir}/abiword-${SHRT_VER}/templates/normal.awt \
|
# ${datadir}/abiword-${SHRT_VER}/templates/normal.awt \
|
||||||
# ${datadir}/abiword-${SHRT_VER}/templates/normal.awt-en_GB \
|
# ${datadir}/abiword-${SHRT_VER}/templates/normal.awt-en_GB \
|
||||||
"
|
|
||||||
|
|
||||||
inherit autotools pkgconfig
|
inherit autotools pkgconfig
|
||||||
|
|
||||||
|
|||||||