Compare commits
1062 Commits
1.1_M2.rc3
...
1.1_M4.rc2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
bfb25ea462 | ||
|
|
20f2857282 | ||
|
|
e5d2249476 | ||
|
|
bb5a3ff0b0 | ||
|
|
06d4cf01ff | ||
|
|
f9da3c269f | ||
|
|
0d5dfb29c3 | ||
|
|
be2a2764d8 | ||
|
|
68bd81506f | ||
|
|
46cf540e63 | ||
|
|
990b587652 | ||
|
|
42fe3c6131 | ||
|
|
a10fb4f72a | ||
|
|
6243fb5004 | ||
|
|
d8ddc1a3e5 | ||
|
|
79e7c68542 | ||
|
|
d774facc29 | ||
|
|
f4788dff79 | ||
|
|
977ea55c4d | ||
|
|
180937a888 | ||
|
|
f481486287 | ||
|
|
ca6740eb12 | ||
|
|
09b382a76f | ||
|
|
43d3061b17 | ||
|
|
7dc2732b28 | ||
|
|
e464fb9a28 | ||
|
|
8685aa52d1 | ||
|
|
f1d3a94e81 | ||
|
|
2d94347b59 | ||
|
|
1d6333aec8 | ||
|
|
50f021e270 | ||
|
|
f94b781695 | ||
|
|
4a83fb1c26 | ||
|
|
63bd98855e | ||
|
|
36bfaaaf67 | ||
|
|
5d3538554b | ||
|
|
965fbe483b | ||
|
|
daed107ce1 | ||
|
|
60218d19f7 | ||
|
|
cd4141f1a7 | ||
|
|
b004d8ef0f | ||
|
|
6b109860bf | ||
|
|
052f04e460 | ||
|
|
7fcb8b50c2 | ||
|
|
8e864c55e5 | ||
|
|
1ab1c8be6c | ||
|
|
b943b055a5 | ||
|
|
28543c5780 | ||
|
|
af1cd61210 | ||
|
|
44b3590509 | ||
|
|
fae195515f | ||
|
|
0960f3e050 | ||
|
|
7a63a98f74 | ||
|
|
6c936b4b1a | ||
|
|
6d82688589 | ||
|
|
687efa2c63 | ||
|
|
350a8916c3 | ||
|
|
9b227ae991 | ||
|
|
c18aa8d065 | ||
|
|
f5e9a398b9 | ||
|
|
cec3932fb8 | ||
|
|
4130931694 | ||
|
|
4a75a370fd | ||
|
|
ebfe9cd012 | ||
|
|
54da9dcc85 | ||
|
|
9f54793089 | ||
|
|
f06bce4882 | ||
|
|
6afd21bced | ||
|
|
30ddd02277 | ||
|
|
19715dafa5 | ||
|
|
ac236b02d9 | ||
|
|
e17f834f16 | ||
|
|
eb7cd0c271 | ||
|
|
911dc39eef | ||
|
|
5aef1898a5 | ||
|
|
a447c3e859 | ||
|
|
ba8a726b7d | ||
|
|
39130137e4 | ||
|
|
a029f81ed0 | ||
|
|
7550be2538 | ||
|
|
5068a8befd | ||
|
|
4193d0e542 | ||
|
|
85a49c9ed6 | ||
|
|
9bb070ce40 | ||
|
|
3944034936 | ||
|
|
2abeecdc83 | ||
|
|
b39491ef8c | ||
|
|
07db8ce627 | ||
|
|
b876708afd | ||
|
|
cec1bc74c0 | ||
|
|
f491a7ea0c | ||
|
|
a601df4fec | ||
|
|
7772a8893d | ||
|
|
0eac98e900 | ||
|
|
4e489a02e0 | ||
|
|
27b2d3dc1c | ||
|
|
03bf55e6a4 | ||
|
|
b1a020621c | ||
|
|
066f06c978 | ||
|
|
73387f23b3 | ||
|
|
ee3304b8b0 | ||
|
|
89b30c36b1 | ||
|
|
70059b83da | ||
|
|
6228e72c51 | ||
|
|
0590ed10fc | ||
|
|
9321db3fc6 | ||
|
|
c30e58cbc9 | ||
|
|
9545c8bc64 | ||
|
|
40c887a279 | ||
|
|
9a90556f17 | ||
|
|
860a41bae6 | ||
|
|
49c01a89b5 | ||
|
|
30a2ac4882 | ||
|
|
b169dadb5f | ||
|
|
c884b52dd0 | ||
|
|
20101e9544 | ||
|
|
9e6f220a54 | ||
|
|
40f0e6dbd4 | ||
|
|
2d608f837d | ||
|
|
6d76379af8 | ||
|
|
5c3f42dbcf | ||
|
|
f7233d7612 | ||
|
|
7b441c2f3f | ||
|
|
ac3c03b997 | ||
|
|
be8f985d2c | ||
|
|
922eaae5d4 | ||
|
|
ba3aef9b06 | ||
|
|
0828e6c481 | ||
|
|
50016106ad | ||
|
|
3300065035 | ||
|
|
b163a0bca6 | ||
|
|
819f18f8bc | ||
|
|
255719f023 | ||
|
|
d7c67a1a05 | ||
|
|
5aa96bd0ef | ||
|
|
4cb97ca18c | ||
|
|
05ca275693 | ||
|
|
3fddac4ee9 | ||
|
|
e9e77799a1 | ||
|
|
f9fe0ae3c8 | ||
|
|
afa695fd31 | ||
|
|
d43437307d | ||
|
|
9af2b2f6fc | ||
|
|
7f576fae2d | ||
|
|
e51d542e78 | ||
|
|
72e0b43e01 | ||
|
|
d7e17ee92f | ||
|
|
27edc7c1a9 | ||
|
|
bc4aefff98 | ||
|
|
638f8ca408 | ||
|
|
93cc53f842 | ||
|
|
9adf01d7be | ||
|
|
1f4e6d62f2 | ||
|
|
bb5c7d5b94 | ||
|
|
9cf5190679 | ||
|
|
52e0be44e0 | ||
|
|
95d7895986 | ||
|
|
bcd622906e | ||
|
|
bd1b9d6cd2 | ||
|
|
3e0eb8a317 | ||
|
|
4a7ddff183 | ||
|
|
04efff115c | ||
|
|
d74176473a | ||
|
|
039a2d006b | ||
|
|
dffe253336 | ||
|
|
eea4bd731e | ||
|
|
ac704918e4 | ||
|
|
14f3bab4d1 | ||
|
|
cf927d85ce | ||
|
|
b42372a414 | ||
|
|
69c0b35020 | ||
|
|
960e1e6d46 | ||
|
|
5fde492894 | ||
|
|
fcb865a0ec | ||
|
|
616d711c48 | ||
|
|
81773aec30 | ||
|
|
dcedeff5fe | ||
|
|
f0b017950c | ||
|
|
ea82abad76 | ||
|
|
da07669b02 | ||
|
|
9d4f709a45 | ||
|
|
a70c1f6f78 | ||
|
|
5151e2ae00 | ||
|
|
6904f75831 | ||
|
|
e3e32fb76e | ||
|
|
5136320708 | ||
|
|
42c3974dc1 | ||
|
|
48966d90f2 | ||
|
|
a9aa45ce9e | ||
|
|
c9610a3e43 | ||
|
|
a7d38bca9c | ||
|
|
40b4ac7d7a | ||
|
|
2dd9a8ff00 | ||
|
|
d5b665bb18 | ||
|
|
f352f1ba03 | ||
|
|
c9c14a198d | ||
|
|
e803c58ffb | ||
|
|
c97f136a94 | ||
|
|
97fb1fea9b | ||
|
|
e2d2377257 | ||
|
|
2bdd51854f | ||
|
|
4eeabbe7a0 | ||
|
|
accd46c65f | ||
|
|
a1e18b913f | ||
|
|
a78a99daff | ||
|
|
1df5ab5ee2 | ||
|
|
9070e745c0 | ||
|
|
7170fe0f08 | ||
|
|
a220e421f9 | ||
|
|
be0aaef24f | ||
|
|
6c2a07b36e | ||
|
|
028a37cf1b | ||
|
|
86a63fd801 | ||
|
|
ca967534f6 | ||
|
|
43cf166765 | ||
|
|
1523da3564 | ||
|
|
c112670e58 | ||
|
|
4b6d42f629 | ||
|
|
a0ff15aa3d | ||
|
|
387ed5934e | ||
|
|
55d9b846cc | ||
|
|
3e4c27cb2d | ||
|
|
e925bb268a | ||
|
|
702eb2f170 | ||
|
|
23fe5fe13a | ||
|
|
635ea7bc3d | ||
|
|
46bbeeee6d | ||
|
|
4dc92fcc39 | ||
|
|
73107a7ae4 | ||
|
|
7741e10f70 | ||
|
|
3b706163ae | ||
|
|
eefc83bd03 | ||
|
|
79b846f28f | ||
|
|
7643666b44 | ||
|
|
03f6b16a8c | ||
|
|
6efaa95758 | ||
|
|
eb7ce5b00b | ||
|
|
6289e8d4ff | ||
|
|
3b76aa4b49 | ||
|
|
df44891f45 | ||
|
|
df7b4f1648 | ||
|
|
0a29457396 | ||
|
|
762c0d001f | ||
|
|
651119a4ef | ||
|
|
51b3a231b0 | ||
|
|
0a7b3f8fdd | ||
|
|
11ec9760ae | ||
|
|
96ab5a7678 | ||
|
|
5e6f7fb24d | ||
|
|
dc96712c53 | ||
|
|
72054b8f83 | ||
|
|
00d2062bd5 | ||
|
|
74c120f273 | ||
|
|
65d74d6a9d | ||
|
|
6c70216f55 | ||
|
|
7dbabd85ea | ||
|
|
e179c0b1c5 | ||
|
|
7c12513fec | ||
|
|
fb71e5092a | ||
|
|
3120247447 | ||
|
|
fe438753ba | ||
|
|
1316648ae6 | ||
|
|
f79f929bf3 | ||
|
|
893fa5bd19 | ||
|
|
a0abef4533 | ||
|
|
51ff9bae5b | ||
|
|
1e261aee43 | ||
|
|
760139ceae | ||
|
|
dda8265b4b | ||
|
|
b6cba4732c | ||
|
|
997b1fc7f7 | ||
|
|
fe7db148c2 | ||
|
|
6a52bad2f4 | ||
|
|
27ba6fbda8 | ||
|
|
57f771164d | ||
|
|
198581ffdd | ||
|
|
29ea036ea6 | ||
|
|
8af2868853 | ||
|
|
f19e54c671 | ||
|
|
76942c0080 | ||
|
|
5608570089 | ||
|
|
e6971672fd | ||
|
|
c0192fb73e | ||
|
|
daad28c2a6 | ||
|
|
bc48729ee2 | ||
|
|
5fdc8ab37e | ||
|
|
73bc4c2211 | ||
|
|
28d52d9ae9 | ||
|
|
1ad8852892 | ||
|
|
07fb4265c9 | ||
|
|
c19d858d01 | ||
|
|
3eb49d2492 | ||
|
|
59da55b9f1 | ||
|
|
08bfdf909a | ||
|
|
00463a3343 | ||
|
|
e182d21361 | ||
|
|
cbcb798b88 | ||
|
|
33467f8455 | ||
|
|
b2c8f9320a | ||
|
|
caf22e3ba2 | ||
|
|
0de9f32aee | ||
|
|
98615f6387 | ||
|
|
627a2f5cbf | ||
|
|
4e774836a4 | ||
|
|
ef2c0ef14c | ||
|
|
eb83c44761 | ||
|
|
30c9f6c933 | ||
|
|
b2e49a6b70 | ||
|
|
44f59d24d9 | ||
|
|
94a6e47402 | ||
|
|
aa18b3cc98 | ||
|
|
676e3e903f | ||
|
|
2097906db6 | ||
|
|
9f952b2349 | ||
|
|
350431d860 | ||
|
|
cc8a2a0ff3 | ||
|
|
e10a1d6cd3 | ||
|
|
0db8fe9a48 | ||
|
|
47245e49e6 | ||
|
|
b5d5a1330e | ||
|
|
0f44c1862d | ||
|
|
160d0055e8 | ||
|
|
d87bedce38 | ||
|
|
78396c1719 | ||
|
|
9fa68e8aea | ||
|
|
16e29ba77d | ||
|
|
3f3cd73f50 | ||
|
|
f7b344edf0 | ||
|
|
1dd5095ff7 | ||
|
|
114960a7c4 | ||
|
|
0931e855ed | ||
|
|
f1d3dae747 | ||
|
|
35f20c5aac | ||
|
|
3c9206f97d | ||
|
|
34cd3f70af | ||
|
|
e47c1cfe71 | ||
|
|
96329f3ae0 | ||
|
|
498ec5029d | ||
|
|
2c472d38ec | ||
|
|
49b37438cd | ||
|
|
a17adf1c8a | ||
|
|
012c4a47ef | ||
|
|
238ea4e679 | ||
|
|
ed5e3f11e2 | ||
|
|
d8a3cd5630 | ||
|
|
e6cf0ba96a | ||
|
|
e375da8e74 | ||
|
|
51128384a7 | ||
|
|
5ec2132cdf | ||
|
|
97098f307d | ||
|
|
32ca3e0798 |
12
.gitignore
vendored
@@ -1,11 +1,11 @@
|
||||
*.pyc
|
||||
*.pyo
|
||||
build/conf/local.conf
|
||||
build/conf/bblayers.conf
|
||||
build/downloads
|
||||
build/tmp/
|
||||
build/sstate-cache
|
||||
build/pyshtables.py
|
||||
build*/conf/local.conf
|
||||
build*/conf/bblayers.conf
|
||||
build*/downloads
|
||||
build*/tmp/
|
||||
build*/sstate-cache
|
||||
build*/pyshtables.py
|
||||
pstage/
|
||||
scripts/oe-git-proxy-socks
|
||||
sources/
|
||||
|
||||
@@ -239,30 +239,57 @@ software development of network attached storage (NAS) and digital media server
|
||||
applications. The MPC8315E-RDB features the PowerQUICC II Pro processor, which
|
||||
includes a built-in security accelerator.
|
||||
|
||||
(Note: you may find it easier to order MPC8315E-RDBA; this appears to be the
|
||||
same board in an enclosure with accessories. In any case it is fully
|
||||
compatible with the instructions given here.)
|
||||
|
||||
Setup instructions
|
||||
------------------
|
||||
|
||||
You will need the following:
|
||||
* nfs root setup on your workstation
|
||||
* tftp server installed on your workstation
|
||||
* NFS root setup on your workstation
|
||||
* TFTP server installed on your workstation
|
||||
* Null modem cable connected from your workstation to the first serial port
|
||||
on the board
|
||||
* Ethernet connected to the first ethernet port on the board
|
||||
|
||||
Load the kernel and boot it as follows:
|
||||
--- Preparation ---
|
||||
|
||||
1. Get the kernel (uImage.mpc8315erdb) and dtb (mpc8315erdb.dtb) files from
|
||||
the Poky build tmp/deploy directory, and make them available on your tftp
|
||||
server.
|
||||
Note: if you have altered your board's ethernet MAC address(es) from the
|
||||
defaults, or you need to do so because you want multiple boards on the same
|
||||
network, then you will need to change the values in the dts file (patch
|
||||
linux/arch/powerpc/boot/dts/mpc8315erdb.dts within the kernel source). If
|
||||
you have left them at the factory default then you shouldn't need to do
|
||||
anything here.
|
||||
|
||||
2. Set up the environment in U-Boot:
|
||||
--- Booting from NFS root ---
|
||||
|
||||
=>setenv ipaddr <board ip>
|
||||
=>setenv serverip <tftp server ip>
|
||||
=>setenv bootargs root=/dev/nfs rw nfsroot=<nfsroot ip>:<rootfs path> ip=<board ip>:<server ip>:<gateway ip>:255.255.255.0:mpc8315e:eth0:off console=ttyS0,115200
|
||||
Load the kernel and dtb (device tree blob), and boot the system as follows:
|
||||
|
||||
3. Download kernel and dtb to boot kernel.
|
||||
1. Get the kernel (uImage-mpc8315e-rdb.bin) and dtb (uImage-mpc8315e-rdb.dtb)
|
||||
files from the Poky build tmp/deploy directory, and make them available on
|
||||
your TFTP server.
|
||||
|
||||
=>tftp 800000 uImage.mpc8315erdb
|
||||
=>tftp 780000 mpc8315erdb.dtb
|
||||
=>bootm 800000 - 780000
|
||||
2. Connect the board's first serial port to your workstation and then start up
|
||||
your favourite serial terminal so that you will be able to interact with
|
||||
the serial console. If you don't have a favourite, picocom is suggested:
|
||||
|
||||
$ picocom /dev/ttyUSB0 -b 115200
|
||||
|
||||
3. Power up or reset the board and press a key on the terminal when prompted
|
||||
to get to the U-Boot command line
|
||||
|
||||
4. Set up the environment in U-Boot:
|
||||
|
||||
=> setenv ipaddr <board ip>
|
||||
=> setenv serverip <tftp server ip>
|
||||
=> setenv bootargs root=/dev/nfs rw nfsroot=<nfsroot ip>:<rootfs path> ip=<board ip>:<server ip>:<gateway ip>:255.255.255.0:mpc8315e:eth0:off console=ttyS0,115200
|
||||
|
||||
5. Download the kernel and dtb, and boot:
|
||||
|
||||
=> tftp 800000 uImage-mpc8315e-rdb.bin
|
||||
=> tftp 780000 uImage-mpc8315e-rdb.dtb
|
||||
=> bootm 800000 - 780000
|
||||
|
||||
|
||||
Ubiquiti Networks RouterStation Pro (routerstationpro)
|
||||
|
||||
@@ -40,7 +40,7 @@ from bb import cooker
|
||||
from bb import ui
|
||||
from bb import server
|
||||
|
||||
__version__ = "1.13.2"
|
||||
__version__ = "1.13.3"
|
||||
logger = logging.getLogger("BitBake")
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ It expects that BBFILES is defined, which is a space separated list of files to
|
||||
be executed. BBFILES does support wildcards.
|
||||
Default BBFILES are the .bb files in the current directory.""")
|
||||
|
||||
parser.add_option("-b", "--buildfile", help = "execute the task against this .bb file, rather than a package from BBFILES.",
|
||||
parser.add_option("-b", "--buildfile", help = "execute the task against this .bb file, rather than a package from BBFILES. Does not handle any dependencies.",
|
||||
action = "store", dest = "buildfile", default = None)
|
||||
|
||||
parser.add_option("-k", "--continue", help = "continue as much as possible after an error. While the target that failed, and those that depend on it, cannot be remade, the other dependencies of these targets can be processed all the same.",
|
||||
@@ -172,8 +172,8 @@ Default BBFILES are the .bb files in the current directory.""")
|
||||
|
||||
ui_main = get_ui(configuration)
|
||||
|
||||
# Server type could be xmlrpc or none currently, if nothing is specified,
|
||||
# default server would be none
|
||||
# Server type can be xmlrpc, process or none currently, if nothing is specified,
|
||||
# the default server is process
|
||||
if configuration.servertype:
|
||||
server_type = configuration.servertype
|
||||
else:
|
||||
@@ -184,19 +184,22 @@ Default BBFILES are the .bb files in the current directory.""")
|
||||
server = getattr(module, server_type)
|
||||
except AttributeError:
|
||||
sys.exit("FATAL: Invalid server type '%s' specified.\n"
|
||||
"Valid interfaces: xmlrpc, process, none [default]." % servertype)
|
||||
"Valid interfaces: xmlrpc, process [default], none." % servertype)
|
||||
|
||||
# Save a logfile for cooker into the current working directory. When the
|
||||
# server is daemonized this logfile will be truncated.
|
||||
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)
|
||||
|
||||
# Ensure logging messages get sent to the UI as events
|
||||
handler = bb.event.LogHandler()
|
||||
logger.addHandler(handler)
|
||||
|
||||
# Before we start modifying the environment we should take a pristine
|
||||
# copy for possible later use
|
||||
initialenv = os.environ.copy()
|
||||
# Clear away any spurious environment variables. But don't wipe the
|
||||
# environment totally. This is necessary to ensure the correct operation
|
||||
# of the UIs (e.g. for DISPLAY, etc.)
|
||||
@@ -207,7 +210,7 @@ Default BBFILES are the .bb files in the current directory.""")
|
||||
server.initServer()
|
||||
idle = server.getServerIdleCB()
|
||||
|
||||
cooker = bb.cooker.BBCooker(configuration, idle)
|
||||
cooker = bb.cooker.BBCooker(configuration, idle, initialenv)
|
||||
cooker.parseCommandLine()
|
||||
|
||||
server.addcooker(cooker)
|
||||
@@ -225,6 +228,7 @@ Default BBFILES are the .bb files in the current directory.""")
|
||||
try:
|
||||
return server.launchUI(ui_main, server_connection.connection, server_connection.events)
|
||||
finally:
|
||||
bb.event.ui_queue = []
|
||||
server_connection.terminate()
|
||||
|
||||
return 1
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
|
||||
# This script has subcommands which operate against your bitbake layers, either
|
||||
# displaying useful information, or acting against them.
|
||||
# Currently, it only provides a show_appends command, which shows you what
|
||||
# bbappends are in effect, and warns you if you have appends which are not being
|
||||
# utilized.
|
||||
# See the help output for details on available commands.
|
||||
|
||||
import cmd
|
||||
import logging
|
||||
import os.path
|
||||
import os
|
||||
import sys
|
||||
|
||||
bindir = os.path.dirname(__file__)
|
||||
@@ -23,32 +21,38 @@ from bb.cooker import state
|
||||
|
||||
|
||||
logger = logging.getLogger('BitBake')
|
||||
default_cmd = 'show_appends'
|
||||
|
||||
|
||||
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()
|
||||
|
||||
cmds = Commands()
|
||||
cmds = Commands(initialenv)
|
||||
if args:
|
||||
cmds.onecmd(' '.join(args))
|
||||
else:
|
||||
cmds.onecmd(default_cmd)
|
||||
cmds.do_help('')
|
||||
return cmds.returncode
|
||||
|
||||
|
||||
class Commands(cmd.Cmd):
|
||||
def __init__(self):
|
||||
def __init__(self, initialenv):
|
||||
cmd.Cmd.__init__(self)
|
||||
|
||||
self.returncode = 0
|
||||
self.config = Config(parse_only=True)
|
||||
self.cooker = bb.cooker.BBCooker(self.config,
|
||||
self.register_idle_function)
|
||||
self.register_idle_function,
|
||||
initialenv)
|
||||
self.config_data = self.cooker.configuration.data
|
||||
bb.providers.logger.setLevel(logging.ERROR)
|
||||
self.prepare_cooker()
|
||||
self.cooker_data = None
|
||||
|
||||
def register_idle_function(self, function, data):
|
||||
pass
|
||||
@@ -71,29 +75,93 @@ class Commands(cmd.Cmd):
|
||||
self.cooker_data = self.cooker.status
|
||||
self.cooker_data.appends = self.cooker.appendlist
|
||||
|
||||
def check_prepare_cooker(self):
|
||||
if not self.cooker_data:
|
||||
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):
|
||||
logger.info(str(self.config_data.getVar('BBLAYERS', True)))
|
||||
"""show current configured layers"""
|
||||
self.check_prepare_cooker()
|
||||
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):
|
||||
"""list overlayed recipes (where there is a recipe in another layer that has a higher layer priority)
|
||||
|
||||
usage: show_overlayed
|
||||
|
||||
Highest priority recipes are listed with the recipes they overlay as subitems.
|
||||
"""
|
||||
self.check_prepare_cooker()
|
||||
if self.cooker.overlayed:
|
||||
logger.info('Overlayed recipes:')
|
||||
logger.plain('Overlayed recipes:')
|
||||
for f in self.cooker.overlayed.iterkeys():
|
||||
logger.info('%s' % f)
|
||||
logger.plain('%s' % f)
|
||||
for of in self.cooker.overlayed[f]:
|
||||
logger.info(' %s' % of)
|
||||
logger.plain(' %s' % of)
|
||||
else:
|
||||
logger.info('No overlayed recipes found')
|
||||
logger.plain('No overlayed recipes found')
|
||||
|
||||
def do_flatten(self, args):
|
||||
"""flattens layer configuration into a separate output directory.
|
||||
|
||||
usage: flatten <outputdir>
|
||||
|
||||
Takes the current layer configuration and builds a "flattened" directory
|
||||
containing the contents of all layers, with any overlayed recipes removed
|
||||
and bbappends appended to the corresponding recipes. Note that some manual
|
||||
cleanup may still be necessary afterwards, in particular:
|
||||
|
||||
* where non-recipe files (such as patches) are overwritten (the flatten
|
||||
command will show a warning for these)
|
||||
* where anything beyond the normal layer setup has been added to
|
||||
layer.conf (only the lowest priority layer's layer.conf is used)
|
||||
* overridden/appended items from bbappends will need to be tidied up
|
||||
"""
|
||||
arglist = args.split()
|
||||
if len(arglist) != 1:
|
||||
logger.error('syntax: flatten <outputdir>')
|
||||
logger.error('Please specify an output directory')
|
||||
self.do_help('flatten')
|
||||
return
|
||||
|
||||
if os.path.exists(arglist[0]) and os.listdir(arglist[0]):
|
||||
logger.error('Directory %s exists and is non-empty, please clear it out first' % arglist[0])
|
||||
return
|
||||
|
||||
self.check_prepare_cooker()
|
||||
layers = (self.config_data.getVar('BBLAYERS', True) or "").split()
|
||||
for layer in layers:
|
||||
overlayed = []
|
||||
@@ -102,12 +170,12 @@ class Commands(cmd.Cmd):
|
||||
if of.startswith(layer):
|
||||
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 f1 in files:
|
||||
f1full = os.sep.join([root, f1])
|
||||
if f1full in overlayed:
|
||||
logger.info(' Skipping overlayed file %s' % f1full )
|
||||
logger.plain(' Skipping overlayed file %s' % f1full )
|
||||
else:
|
||||
ext = os.path.splitext(f1)[1]
|
||||
if ext != '.bbappend':
|
||||
@@ -116,7 +184,7 @@ class Commands(cmd.Cmd):
|
||||
bb.utils.mkdirhier(os.path.dirname(fdest))
|
||||
if os.path.exists(fdest):
|
||||
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
|
||||
else:
|
||||
logger.warn('Overwriting file %s', fdest)
|
||||
@@ -125,7 +193,7 @@ class Commands(cmd.Cmd):
|
||||
if f1 in self.cooker_data.appends:
|
||||
appends = self.cooker_data.appends[f1]
|
||||
if appends:
|
||||
logger.info(' Applying appends to %s' % fdest )
|
||||
logger.plain(' Applying appends to %s' % fdest )
|
||||
for appendname in appends:
|
||||
self.apply_append(appendname, fdest)
|
||||
|
||||
@@ -143,11 +211,18 @@ class Commands(cmd.Cmd):
|
||||
recipefile.writelines(appendfile.readlines())
|
||||
|
||||
def do_show_appends(self, args):
|
||||
"""list bbappend files and recipe files they apply to
|
||||
|
||||
usage: show_appends
|
||||
|
||||
Recipes are listed with the bbappends that apply to them as subitems.
|
||||
"""
|
||||
self.check_prepare_cooker()
|
||||
if not self.cooker_data.appends:
|
||||
logger.info('No append files found')
|
||||
logger.plain('No append files found')
|
||||
return
|
||||
|
||||
logger.info('State of append files:')
|
||||
logger.plain('State of append files:')
|
||||
|
||||
pnlist = list(self.cooker_data.pkg_pn.keys())
|
||||
pnlist.sort()
|
||||
@@ -176,9 +251,9 @@ class Commands(cmd.Cmd):
|
||||
appended, missing = self.get_appends_for_files(filenames)
|
||||
if appended:
|
||||
for basename, appends in appended:
|
||||
logger.info('%s%s:', basename, name_suffix)
|
||||
logger.plain('%s%s:', basename, name_suffix)
|
||||
for append in appends:
|
||||
logger.info(' %s', append)
|
||||
logger.plain(' %s', append)
|
||||
|
||||
if best_filename:
|
||||
if best_filename in missing:
|
||||
@@ -202,9 +277,6 @@ class Commands(cmd.Cmd):
|
||||
notappended.append(basename)
|
||||
return appended, notappended
|
||||
|
||||
def do_EOF(self, line):
|
||||
return True
|
||||
|
||||
|
||||
class Config(object):
|
||||
def __init__(self, **options):
|
||||
|
||||
@@ -430,9 +430,8 @@ Create a set of html pages (documentation) for a bitbake.conf....
|
||||
action = "store_true", dest = "verbose", default = False )
|
||||
|
||||
options, args = parser.parse_args( sys.argv )
|
||||
|
||||
if options.debug:
|
||||
bb.msg.set_debug_level(options.debug)
|
||||
|
||||
bb.msg.init_msgconfig(options.verbose, options.debug)
|
||||
|
||||
return options.config, options.output
|
||||
|
||||
|
||||
@@ -12,9 +12,10 @@
|
||||
<corpauthor>BitBake Team</corpauthor>
|
||||
</authorgroup>
|
||||
<copyright>
|
||||
<year>2004, 2005, 2006</year>
|
||||
<year>2004, 2005, 2006, 2011</year>
|
||||
<holder>Chris Larson</holder>
|
||||
<holder>Phil Blundell</holder>
|
||||
<holder>Richard Purdie</holder>
|
||||
</copyright>
|
||||
<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>
|
||||
@@ -26,7 +27,7 @@
|
||||
<title>Overview</title>
|
||||
<para>BitBake is, at its simplest, a tool for executing
|
||||
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>
|
||||
<title>Background and goals</title>
|
||||
@@ -37,7 +38,7 @@ important functionality, and none of the ad-hoc
|
||||
<emphasis>buildroot</emphasis> systems, prevalent in the
|
||||
embedded space, were scalable or maintainable.</para>
|
||||
|
||||
<para>Some important goals for BitBake were:
|
||||
<para>Some important original goals for BitBake were:
|
||||
<itemizedlist>
|
||||
<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>
|
||||
@@ -53,10 +54,18 @@ between multiple projects using BitBake for their
|
||||
builds.</para></listitem>
|
||||
<listitem><para>Should provide an inheritance mechanism to
|
||||
share common metadata between many packages.</para></listitem>
|
||||
<listitem><para>Et cetera...</para></listitem>
|
||||
</itemizedlist>
|
||||
</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>
|
||||
</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>
|
||||
</section>
|
||||
<section>
|
||||
<title>Setting a default value (??=)</title>
|
||||
<para><screen><varname>A</varname> ??= "somevalue"</screen></para>
|
||||
<para><screen><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>
|
||||
<title>Setting a weak default value (??=)</title>
|
||||
<para><screen><varname>A</varname> ??= "somevalue"
|
||||
<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/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>
|
||||
<title>Immediate variable expansion (:=)</title>
|
||||
@@ -209,6 +218,19 @@ include</literal> directive.</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>
|
||||
</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>
|
||||
<title>Events</title>
|
||||
<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>
|
||||
</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>
|
||||
<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>
|
||||
@@ -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>
|
||||
<section>
|
||||
<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>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>
|
||||
<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"
|
||||
<varname>SRC_URI</varname>= "file://relativefile.patch;this=ignored"
|
||||
<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>
|
||||
<title>CVS file 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.
|
||||
<title>CVS fetcher</title>
|
||||
<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>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>
|
||||
<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>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>
|
||||
<para><screen><varname>SRC_URI</varname> = "http://oe.handhelds.org/not_there.aac;md5sum=12343"
|
||||
<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"
|
||||
<para><screen><varname>SRC_URI</varname> = "http://oe.handhelds.org/not_there.aac"
|
||||
<varname>SRC_URI</varname> = "ftp://oe.handhelds.org/not_there_as_well.aac"
|
||||
<varname>SRC_URI</varname> = "ftp://you@oe.handheld.sorg/home/you/secret.plan"
|
||||
</screen></para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>SVK fetcher</title>
|
||||
<para>
|
||||
<emphasis>Currently NOT supported</emphasis>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>SVN fetcher</title>
|
||||
<para>The URN for the SVN fetcher is <emphasis>svn</emphasis>.
|
||||
</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>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>
|
||||
@@ -361,9 +441,9 @@ SRC_URI_append_1.0.7+ = "file://some_patch_which_the_new_versions_need.patch;pat
|
||||
<title>GIT fetcher</title>
|
||||
<para>The URN for the GIT Fetcher is <emphasis>git</emphasis>.
|
||||
</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>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><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"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
__version__ = "1.13.2"
|
||||
__version__ = "1.13.3"
|
||||
|
||||
import sys
|
||||
if sys.version_info < (2, 6, 0):
|
||||
@@ -56,7 +56,7 @@ logging.setLoggerClass(BBLogger)
|
||||
|
||||
logger = logging.getLogger("BitBake")
|
||||
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
|
||||
# can result in construction of the various loggers.
|
||||
|
||||
@@ -223,7 +223,7 @@ def exec_func_shell(function, d, runfile, cwd=None):
|
||||
|
||||
with open(runfile, 'w') as script:
|
||||
script.write('#!/bin/sh -e\n')
|
||||
if logger.isEnabledFor(logging.DEBUG):
|
||||
if bb.msg.loggerVerbose:
|
||||
script.write("set -x\n")
|
||||
data.emit_func(function, script, d)
|
||||
if cwd:
|
||||
@@ -234,7 +234,7 @@ def exec_func_shell(function, d, runfile, cwd=None):
|
||||
|
||||
cmd = runfile
|
||||
|
||||
if logger.isEnabledFor(logging.DEBUG):
|
||||
if bb.msg.loggerVerbose:
|
||||
logfile = LogTee(logger, sys.stdout)
|
||||
else:
|
||||
logfile = sys.stdout
|
||||
@@ -308,6 +308,8 @@ def _exec_task(fn, task, d, quieterr):
|
||||
# Ensure python logging goes to the logfile
|
||||
handler = logging.StreamHandler(logfile)
|
||||
handler.setFormatter(logformatter)
|
||||
# Always enable full debug output into task logfiles
|
||||
handler.setLevel(logging.DEBUG - 2)
|
||||
bblogger.addHandler(handler)
|
||||
|
||||
localdata.setVar('BB_LOGFILE', logfn)
|
||||
|
||||
@@ -43,7 +43,7 @@ except ImportError:
|
||||
logger.info("Importing cPickle failed. "
|
||||
"Falling back to a very slow implementation.")
|
||||
|
||||
__cache_version__ = "141"
|
||||
__cache_version__ = "142"
|
||||
|
||||
def getCacheFile(path, filename):
|
||||
return os.path.join(path, filename)
|
||||
@@ -99,6 +99,7 @@ class CoreRecipeInfo(RecipeInfoCommon):
|
||||
|
||||
self.skipreason = self.getvar('__SKIPPED', metadata)
|
||||
if self.skipreason:
|
||||
self.pn = self.getvar('PN', metadata) or bb.parse.BBHandler.vars_from_file(filename,metadata)[0]
|
||||
self.skipped = True
|
||||
self.provides = self.depvar('PROVIDES', metadata)
|
||||
self.rprovides = self.depvar('RPROVIDES', metadata)
|
||||
@@ -285,14 +286,14 @@ class Cache(object):
|
||||
old_mtimes.append(newest_mtime)
|
||||
newest_mtime = max(old_mtimes)
|
||||
|
||||
bNeedUpdate = True
|
||||
cache_ok = True
|
||||
if self.caches_array:
|
||||
for cache_class in self.caches_array:
|
||||
if type(cache_class) is type and issubclass(cache_class, RecipeInfoCommon):
|
||||
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)
|
||||
if bNeedUpdate:
|
||||
if cache_ok:
|
||||
self.load_cachefile()
|
||||
elif os.path.isfile(self.cachefile):
|
||||
logger.info("Out of date cache found, rebuilding...")
|
||||
@@ -371,8 +372,9 @@ class Cache(object):
|
||||
fn = virtualfn
|
||||
cls = ""
|
||||
if virtualfn.startswith('virtual:'):
|
||||
cls = virtualfn.split(':', 2)[1]
|
||||
fn = virtualfn.replace('virtual:' + cls + ':', '')
|
||||
elems = virtualfn.split(':')
|
||||
cls = ":".join(elems[1:-1])
|
||||
fn = elems[-1]
|
||||
return (fn, cls)
|
||||
|
||||
@staticmethod
|
||||
@@ -541,7 +543,7 @@ class Cache(object):
|
||||
|
||||
# If any one of the variants is not present, mark as invalid for all
|
||||
if invalid:
|
||||
for cls in info.variants:
|
||||
for cls in info_array[0].variants:
|
||||
virtualfn = self.realfn2virtual(fn, cls)
|
||||
if virtualfn in self.clean:
|
||||
logger.debug(2, "Cache: Removing %s from cache", virtualfn)
|
||||
|
||||
@@ -172,6 +172,13 @@ class CommandsSync:
|
||||
value = params[1]
|
||||
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:
|
||||
"""
|
||||
@@ -311,6 +318,14 @@ class CommandsAsync:
|
||||
command.finishAsyncCommand()
|
||||
parseFiles.needcache = True
|
||||
|
||||
def reparseFiles(self, command, params):
|
||||
"""
|
||||
Reparse .bb files
|
||||
"""
|
||||
command.cooker.reparseFiles()
|
||||
command.finishAsyncCommand()
|
||||
reparseFiles.needcache = True
|
||||
|
||||
def compareRevisions(self, command, params):
|
||||
"""
|
||||
Parse the .bb files
|
||||
|
||||
@@ -59,11 +59,13 @@ class state:
|
||||
|
||||
class SkippedPackage:
|
||||
def __init__(self, info = None, reason = None):
|
||||
self.pn = None
|
||||
self.skipreason = None
|
||||
self.provides = None
|
||||
self.rprovides = None
|
||||
|
||||
if info:
|
||||
self.pn = info.pn
|
||||
self.skipreason = info.skipreason
|
||||
self.provides = info.provides
|
||||
self.rprovides = info.rprovides
|
||||
@@ -78,7 +80,7 @@ class BBCooker:
|
||||
Manages one bitbake build run
|
||||
"""
|
||||
|
||||
def __init__(self, configuration, server_registration_cb):
|
||||
def __init__(self, configuration, server_registration_cb, savedenv={}):
|
||||
self.status = None
|
||||
self.appendlist = {}
|
||||
self.skiplist = {}
|
||||
@@ -87,6 +89,14 @@ class BBCooker:
|
||||
|
||||
self.configuration = configuration
|
||||
|
||||
# Keep a datastore of the initial environment variables and their
|
||||
# values from when BitBake was launched to enable child processes
|
||||
# to use environment variables which have been cleaned from the
|
||||
# BitBake processes env
|
||||
self.savedenv = bb.data.init()
|
||||
for k in savedenv:
|
||||
self.savedenv.setVar(k, savedenv[k])
|
||||
|
||||
self.caches_array = []
|
||||
# Currently, only Image Creator hob ui needs extra cache.
|
||||
# So, we save Extra Cache class name and container file
|
||||
@@ -122,21 +132,8 @@ class BBCooker:
|
||||
logger.critical("Unable to import extra RecipeInfo '%s' from '%s': %s" % (cache_name, module_name, exc))
|
||||
sys.exit("FATAL: Failed to import extra cache class '%s'." % cache_name)
|
||||
|
||||
self.configuration.data = bb.data.init()
|
||||
|
||||
if not self.server_registration_cb:
|
||||
bb.data.setVar("BB_WORKERCONTEXT", "1", self.configuration.data)
|
||||
|
||||
bb.data.inheritFromOS(self.configuration.data)
|
||||
|
||||
try:
|
||||
self.parseConfigurationFiles(self.configuration.prefile,
|
||||
self.configuration.postfile)
|
||||
except SyntaxError:
|
||||
sys.exit(1)
|
||||
except Exception:
|
||||
logger.exception("Error parsing configuration files")
|
||||
sys.exit(1)
|
||||
self.configuration.data = None
|
||||
self.loadConfigurationData()
|
||||
|
||||
if not self.configuration.cmd:
|
||||
self.configuration.cmd = bb.data.getVar("BB_DEFAULT_TASK", self.configuration.data, True) or "build"
|
||||
@@ -166,6 +163,27 @@ class BBCooker:
|
||||
|
||||
self.parser = None
|
||||
|
||||
def loadConfigurationData(self):
|
||||
self.configuration.data = bb.data.init()
|
||||
|
||||
if not self.server_registration_cb:
|
||||
bb.data.setVar("BB_WORKERCONTEXT", "1", self.configuration.data)
|
||||
|
||||
filtered_keys = bb.utils.approved_variables()
|
||||
bb.data.inheritFromOS(self.configuration.data, self.savedenv, filtered_keys)
|
||||
|
||||
try:
|
||||
self.parseConfigurationFiles(self.configuration.prefile,
|
||||
self.configuration.postfile)
|
||||
except SyntaxError:
|
||||
sys.exit(1)
|
||||
except Exception:
|
||||
logger.exception("Error parsing configuration files")
|
||||
sys.exit(1)
|
||||
|
||||
if not self.configuration.cmd:
|
||||
self.configuration.cmd = bb.data.getVar("BB_DEFAULT_TASK", self.configuration.data, True) or "build"
|
||||
|
||||
def parseConfiguration(self):
|
||||
|
||||
|
||||
@@ -259,6 +277,12 @@ class BBCooker:
|
||||
envdata = None
|
||||
|
||||
if 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 = self.matchFile(buildfile)
|
||||
elif len(pkgs_to_build) == 1:
|
||||
self.updateCache()
|
||||
@@ -302,7 +326,6 @@ class BBCooker:
|
||||
"""
|
||||
# Need files parsed
|
||||
self.updateCache()
|
||||
|
||||
# If we are told to do the None task then query the default task
|
||||
if (task == None):
|
||||
task = self.configuration.cmd
|
||||
@@ -314,7 +337,7 @@ class BBCooker:
|
||||
bb.data.expandKeys(localdata)
|
||||
# We set abort to False here to prevent unbuildable targets raising
|
||||
# an exception when we're just generating data
|
||||
taskdata = bb.taskdata.TaskData(False)
|
||||
taskdata = bb.taskdata.TaskData(False, skiplist=self.skiplist)
|
||||
|
||||
runlist = []
|
||||
for k in pkgs_to_build:
|
||||
@@ -322,19 +345,17 @@ class BBCooker:
|
||||
runlist.append([k, "do_%s" % task])
|
||||
taskdata.add_unresolved(localdata, self.status)
|
||||
|
||||
return runlist, taskdata
|
||||
|
||||
def generateTaskDepTreeData(self, pkgs_to_build, task):
|
||||
"""
|
||||
Create a dependency graph of pkgs_to_build including reverse dependency
|
||||
information.
|
||||
"""
|
||||
runlist, taskdata = self.prepareTreeData(pkgs_to_build, task)
|
||||
rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist)
|
||||
rq.rqdata.prepare()
|
||||
|
||||
return taskdata, rq
|
||||
|
||||
def generateDepTreeData(self, pkgs_to_build, task, more_meta=False):
|
||||
"""
|
||||
Create a dependency tree of pkgs_to_build, returning the data.
|
||||
When more_meta is set to True include summary, license and group
|
||||
information in the returned tree.
|
||||
"""
|
||||
taskdata, rq = self.prepareTreeData(pkgs_to_build, task)
|
||||
|
||||
seen_fnids = []
|
||||
depend_tree = {}
|
||||
depend_tree["depends"] = {}
|
||||
@@ -351,18 +372,10 @@ class BBCooker:
|
||||
fn = taskdata.fn_index[fnid]
|
||||
pn = self.status.pkg_fn[fn]
|
||||
version = "%s:%s-%s" % self.status.pkg_pepvpr[fn]
|
||||
if more_meta:
|
||||
summary = self.status.summary[fn]
|
||||
lic = self.status.license[fn]
|
||||
section = self.status.section[fn]
|
||||
if pn not in depend_tree["pn"]:
|
||||
depend_tree["pn"][pn] = {}
|
||||
depend_tree["pn"][pn]["filename"] = fn
|
||||
depend_tree["pn"][pn]["version"] = version
|
||||
if more_meta:
|
||||
depend_tree["pn"][pn]["summary"] = summary
|
||||
depend_tree["pn"][pn]["license"] = lic
|
||||
depend_tree["pn"][pn]["section"] = section
|
||||
for dep in rq.rqdata.runq_depends[task]:
|
||||
depfn = taskdata.fn_index[rq.rqdata.runq_fnid[dep]]
|
||||
deppn = self.status.pkg_fn[depfn]
|
||||
@@ -406,13 +419,74 @@ class BBCooker:
|
||||
|
||||
return depend_tree
|
||||
|
||||
def generatePkgDepTreeData(self, pkgs_to_build, task):
|
||||
"""
|
||||
Create a dependency tree of pkgs_to_build, returning the data.
|
||||
"""
|
||||
_, taskdata = self.prepareTreeData(pkgs_to_build, task)
|
||||
tasks_fnid = []
|
||||
if len(taskdata.tasks_name) != 0:
|
||||
for task in xrange(len(taskdata.tasks_name)):
|
||||
tasks_fnid.append(taskdata.tasks_fnid[task])
|
||||
|
||||
seen_fnids = []
|
||||
depend_tree = {}
|
||||
depend_tree["depends"] = {}
|
||||
depend_tree["pn"] = {}
|
||||
depend_tree["rdepends-pn"] = {}
|
||||
depend_tree["packages"] = {}
|
||||
depend_tree["rdepends-pkg"] = {}
|
||||
|
||||
for task in xrange(len(tasks_fnid)):
|
||||
fnid = tasks_fnid[task]
|
||||
fn = taskdata.fn_index[fnid]
|
||||
pn = self.status.pkg_fn[fn]
|
||||
version = "%s:%s-%s" % self.status.pkg_pepvpr[fn]
|
||||
summary = self.status.summary[fn]
|
||||
lic = self.status.license[fn]
|
||||
section = self.status.section[fn]
|
||||
if pn not in depend_tree["pn"]:
|
||||
depend_tree["pn"][pn] = {}
|
||||
depend_tree["pn"][pn]["filename"] = fn
|
||||
depend_tree["pn"][pn]["version"] = version
|
||||
depend_tree["pn"][pn]["summary"] = summary
|
||||
depend_tree["pn"][pn]["license"] = lic
|
||||
depend_tree["pn"][pn]["section"] = section
|
||||
|
||||
if fnid not in seen_fnids:
|
||||
seen_fnids.append(fnid)
|
||||
packages = []
|
||||
|
||||
depend_tree["depends"][pn] = []
|
||||
for dep in taskdata.depids[fnid]:
|
||||
depend_tree["depends"][pn].append(taskdata.build_names_index[dep])
|
||||
|
||||
depend_tree["rdepends-pn"][pn] = []
|
||||
for rdep in taskdata.rdepids[fnid]:
|
||||
depend_tree["rdepends-pn"][pn].append(taskdata.run_names_index[rdep])
|
||||
|
||||
rdepends = self.status.rundeps[fn]
|
||||
for package in rdepends:
|
||||
depend_tree["rdepends-pkg"][package] = []
|
||||
for rdepend in rdepends[package]:
|
||||
depend_tree["rdepends-pkg"][package].append(rdepend)
|
||||
packages.append(package)
|
||||
|
||||
for package in packages:
|
||||
if package not in depend_tree["packages"]:
|
||||
depend_tree["packages"][package] = {}
|
||||
depend_tree["packages"][package]["pn"] = pn
|
||||
depend_tree["packages"][package]["filename"] = fn
|
||||
depend_tree["packages"][package]["version"] = version
|
||||
|
||||
return depend_tree
|
||||
|
||||
def generateDepTreeEvent(self, pkgs_to_build, task):
|
||||
"""
|
||||
Create a task dependency graph of pkgs_to_build.
|
||||
Generate an event with the result
|
||||
"""
|
||||
depgraph = self.generateDepTreeData(pkgs_to_build, task)
|
||||
depgraph = self.generateTaskDepTreeData(pkgs_to_build, task)
|
||||
bb.event.fire(bb.event.DepTreeGenerated(depgraph), self.configuration.data)
|
||||
|
||||
def generateDotGraphFiles(self, pkgs_to_build, task):
|
||||
@@ -421,7 +495,7 @@ class BBCooker:
|
||||
Save the result to a set of .dot files.
|
||||
"""
|
||||
|
||||
depgraph = self.generateDepTreeData(pkgs_to_build, task)
|
||||
depgraph = self.generateTaskDepTreeData(pkgs_to_build, task)
|
||||
|
||||
# Prints a flattened form of package-depends below where subpackages of a package are merged into the main pn
|
||||
depends_file = file('pn-depends.dot', 'w' )
|
||||
@@ -511,7 +585,7 @@ class BBCooker:
|
||||
bb.data.expandKeys(localdata)
|
||||
|
||||
# Handle PREFERRED_PROVIDERS
|
||||
for p in (bb.data.getVar('PREFERRED_PROVIDERS', localdata, 1) or "").split():
|
||||
for p in (bb.data.getVar('PREFERRED_PROVIDERS', localdata, True) or "").split():
|
||||
try:
|
||||
(providee, provider) = p.split(':')
|
||||
except:
|
||||
@@ -548,9 +622,33 @@ class BBCooker:
|
||||
collectlog.warn("No bb files matched BBFILE_PATTERN_%s '%s'" % (collection, pattern))
|
||||
|
||||
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)
|
||||
if path:
|
||||
bb.event.fire(bb.event.ConfigFilePathFound(path), self.configuration.data)
|
||||
if not path:
|
||||
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):
|
||||
"""
|
||||
@@ -628,7 +726,7 @@ class BBCooker:
|
||||
pkgs = pkgs + extra_pkgs
|
||||
|
||||
# generate a dependency tree for all our packages
|
||||
tree = self.generateDepTreeData(pkgs, 'build', more_meta=True)
|
||||
tree = self.generatePkgDepTreeData(pkgs, 'build')
|
||||
bb.event.fire(bb.event.TargetsTreeGenerated(tree), self.configuration.data)
|
||||
|
||||
def buildWorldTargetList(self):
|
||||
@@ -859,6 +957,10 @@ class BBCooker:
|
||||
Build the file matching regexp buildfile
|
||||
"""
|
||||
|
||||
# Too many people use -b because they think it's how you normally
|
||||
# specify a target to be built, so show a warning
|
||||
bb.warn("Buildfile specified, dependencies will not be handled. If this is not what you want, do not use -b / --buildfile.")
|
||||
|
||||
# Parse the configuration here. We need to do it explicitly here since
|
||||
# buildFile() doesn't use the cache
|
||||
self.parseConfiguration()
|
||||
@@ -991,7 +1093,7 @@ class BBCooker:
|
||||
bb.data.update_data(localdata)
|
||||
bb.data.expandKeys(localdata)
|
||||
|
||||
taskdata = bb.taskdata.TaskData(self.configuration.abort)
|
||||
taskdata = bb.taskdata.TaskData(self.configuration.abort, skiplist=self.skiplist)
|
||||
|
||||
runlist = []
|
||||
for k in targets:
|
||||
@@ -1014,6 +1116,8 @@ class BBCooker:
|
||||
if self.state != state.parsing:
|
||||
self.parseConfiguration ()
|
||||
|
||||
if self.status:
|
||||
del self.status
|
||||
self.status = bb.cache.CacheData(self.caches_array)
|
||||
|
||||
ignore = bb.data.getVar("ASSUME_PROVIDED", self.configuration.data, 1) or ""
|
||||
@@ -1087,7 +1191,7 @@ class BBCooker:
|
||||
|
||||
collectlog.debug(1, "collecting .bb files")
|
||||
|
||||
files = (data.getVar( "BBFILES", self.configuration.data, 1 ) or "").split()
|
||||
files = (data.getVar( "BBFILES", self.configuration.data, True) or "").split()
|
||||
data.setVar("BBFILES", " ".join(files), self.configuration.data)
|
||||
|
||||
# Sort files by priority
|
||||
@@ -1144,7 +1248,8 @@ class BBCooker:
|
||||
base = os.path.basename(f).replace('.bbappend', '.bb')
|
||||
if not base in self.appendlist:
|
||||
self.appendlist[base] = []
|
||||
self.appendlist[base].append(f)
|
||||
if f not in self.appendlist[base]:
|
||||
self.appendlist[base].append(f)
|
||||
|
||||
# Find overlayed recipes
|
||||
# bbfiles will be in priority order which makes this easy
|
||||
@@ -1185,6 +1290,13 @@ class BBCooker:
|
||||
def stop(self):
|
||||
self.state = state.stop
|
||||
|
||||
def reparseFiles(self):
|
||||
return
|
||||
|
||||
def reset(self):
|
||||
self.state = state.initial
|
||||
self.loadConfigurationData()
|
||||
|
||||
def server_main(cooker, func, *args):
|
||||
cooker.pre_serve()
|
||||
|
||||
@@ -1246,7 +1358,7 @@ def catch_parse_error(func):
|
||||
return wrapped
|
||||
|
||||
@catch_parse_error
|
||||
def _parse(fn, data, include=False):
|
||||
def _parse(fn, data, include=True):
|
||||
return bb.parse.handle(fn, data, include)
|
||||
|
||||
@catch_parse_error
|
||||
|
||||
@@ -159,16 +159,17 @@ def expandKeys(alterdata, readdata = None):
|
||||
ekey = todolist[key]
|
||||
renameVar(key, ekey, alterdata)
|
||||
|
||||
def inheritFromOS(d):
|
||||
"""Inherit variables from the environment."""
|
||||
def inheritFromOS(d, savedenv, permitted):
|
||||
"""Inherit variables from the initial environment."""
|
||||
exportlist = bb.utils.preserved_envvars_exported()
|
||||
for s in os.environ.keys():
|
||||
try:
|
||||
setVar(s, os.environ[s], d)
|
||||
if s in exportlist:
|
||||
setVarFlag(s, "export", True, d)
|
||||
except TypeError:
|
||||
pass
|
||||
for s in savedenv.keys():
|
||||
if s in permitted:
|
||||
try:
|
||||
setVar(s, getVar(s, savedenv, True), d)
|
||||
if s in exportlist:
|
||||
setVarFlag(s, "export", True, d)
|
||||
except TypeError:
|
||||
pass
|
||||
|
||||
def emit_var(var, o=sys.__stdout__, d = init(), all=False):
|
||||
"""Emit a variable to be sourced by a shell."""
|
||||
|
||||
@@ -268,7 +268,12 @@ class DataSmart(MutableMapping):
|
||||
self.dict[var]["content"] = value
|
||||
|
||||
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):
|
||||
"""
|
||||
|
||||
@@ -65,6 +65,8 @@ def execute_handler(name, handler, event, d):
|
||||
event.data = d
|
||||
try:
|
||||
ret = handler(event)
|
||||
except bb.parse.SkipPackage:
|
||||
raise
|
||||
except Exception:
|
||||
etype, value, tb = sys.exc_info()
|
||||
logger.error("Execution of event handler '%s' failed" % name,
|
||||
@@ -102,8 +104,7 @@ def print_ui_queue():
|
||||
console = logging.StreamHandler(sys.stdout)
|
||||
console.setFormatter(BBLogFormatter("%(levelname)s: %(message)s"))
|
||||
logger.handlers = [console]
|
||||
while ui_queue:
|
||||
event = ui_queue.pop()
|
||||
for event in ui_queue:
|
||||
if isinstance(event, logging.LogRecord):
|
||||
logger.handle(event)
|
||||
|
||||
@@ -288,11 +289,12 @@ class BuildCompleted(BuildBase):
|
||||
class NoProvider(Event):
|
||||
"""No Provider for an Event"""
|
||||
|
||||
def __init__(self, item, runtime=False, dependees=None):
|
||||
def __init__(self, item, runtime=False, dependees=None, reasons=[]):
|
||||
Event.__init__(self)
|
||||
self._item = item
|
||||
self._runtime = runtime
|
||||
self._dependees = dependees
|
||||
self._reasons = reasons
|
||||
|
||||
def getItem(self):
|
||||
return self._item
|
||||
|
||||
@@ -956,7 +956,7 @@ class Fetch(object):
|
||||
raise
|
||||
|
||||
except BBFetchException as e:
|
||||
logger.debug(1, str(e))
|
||||
logger.warn(str(e))
|
||||
# Remove any incomplete fetch
|
||||
if os.path.isfile(ud.localpath):
|
||||
bb.utils.remove(ud.localpath)
|
||||
|
||||
@@ -88,7 +88,7 @@ class Git(FetchMethod):
|
||||
else:
|
||||
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)
|
||||
|
||||
ud.nocheckout = ud.parm.get("nocheckout","0") == "1"
|
||||
@@ -168,10 +168,11 @@ class Git(FetchMethod):
|
||||
os.chdir(ud.clonedir)
|
||||
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 not os.path.exists(ud.clonedir):
|
||||
clone_cmd = "%s clone --bare --mirror %s://%s%s%s %s" % \
|
||||
(ud.basecmd, ud.proto, username, ud.host, ud.path, ud.clonedir)
|
||||
clone_cmd = "%s clone --bare --mirror %s %s" % (ud.basecmd, repourl, ud.clonedir)
|
||||
bb.fetch2.check_network_access(d, clone_cmd)
|
||||
runfetchcmd(clone_cmd, d)
|
||||
|
||||
@@ -187,9 +188,9 @@ class Git(FetchMethod):
|
||||
runfetchcmd("%s remote rm origin" % ud.basecmd, d)
|
||||
except bb.fetch2.FetchError:
|
||||
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)
|
||||
fetch_cmd = "%s fetch --all -t" % ud.basecmd
|
||||
|
||||
runfetchcmd("%s remote add --mirror=fetch origin %s" % (ud.basecmd, repourl), d)
|
||||
fetch_cmd = "%s fetch --prune %s refs/*:refs/*" % (ud.basecmd, repourl)
|
||||
bb.fetch2.check_network_access(d, fetch_cmd, ud.url)
|
||||
runfetchcmd(fetch_cmd, d)
|
||||
runfetchcmd("%s prune-packed" % ud.basecmd, d)
|
||||
@@ -212,7 +213,8 @@ class Git(FetchMethod):
|
||||
else:
|
||||
readpathspec = ""
|
||||
|
||||
destdir = os.path.join(destdir, "git/")
|
||||
destsuffix = ud.parm.get("destsuffix", "git/")
|
||||
destdir = os.path.join(destdir, destsuffix)
|
||||
if os.path.exists(destdir):
|
||||
bb.utils.prunedir(destdir)
|
||||
|
||||
@@ -298,3 +300,11 @@ class Git(FetchMethod):
|
||||
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)
|
||||
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
|
||||
|
||||
@@ -75,130 +75,69 @@ class BBLogFormatter(logging.Formatter):
|
||||
msg += '\n' + ''.join(formatted)
|
||||
return msg
|
||||
|
||||
class Loggers(dict):
|
||||
def __getitem__(self, key):
|
||||
if key in self:
|
||||
return dict.__getitem__(self, key)
|
||||
else:
|
||||
log = logging.getLogger("BitBake.%s" % domain._fields[key])
|
||||
dict.__setitem__(self, key, log)
|
||||
return log
|
||||
class BBLogFilter(object):
|
||||
def __init__(self, handler, level, debug_domains):
|
||||
self.stdlevel = level
|
||||
self.debug_domains = debug_domains
|
||||
loglevel = level
|
||||
for domain in debug_domains:
|
||||
if debug_domains[domain] < loglevel:
|
||||
loglevel = debug_domains[domain]
|
||||
handler.setLevel(loglevel)
|
||||
handler.addFilter(self)
|
||||
|
||||
class DebugLevel(dict):
|
||||
def __getitem__(self, key):
|
||||
if key == "default":
|
||||
key = domain.Default
|
||||
return get_debug_level(key)
|
||||
def filter(self, record):
|
||||
if record.levelno >= self.stdlevel:
|
||||
return True
|
||||
if record.name in self.debug_domains and record.levelno >= self.debug_domains[record.name]:
|
||||
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
|
||||
#
|
||||
|
||||
def set_debug_level(level):
|
||||
for log in loggers.itervalues():
|
||||
log.setLevel(logging.NOTSET)
|
||||
loggerDefaultDebugLevel = 0
|
||||
loggerDefaultVerbose = False
|
||||
loggerDefaultDomains = []
|
||||
|
||||
if level:
|
||||
logger.setLevel(logging.DEBUG - level + 1)
|
||||
def init_msgconfig(verbose, debug, debug_domains = []):
|
||||
"""
|
||||
Set default verbosity and debug levels config the logger
|
||||
"""
|
||||
bb.msg.loggerDebugLevel = debug
|
||||
bb.msg.loggerVerbose = 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:
|
||||
logger.setLevel(logging.INFO)
|
||||
level = BBLogFormatter.NOTE
|
||||
|
||||
def get_debug_level(msgdomain = domain.Default):
|
||||
if not msgdomain:
|
||||
level = logger.getEffectiveLevel()
|
||||
else:
|
||||
level = loggers[msgdomain].getEffectiveLevel()
|
||||
return max(0, logging.DEBUG - level + 1)
|
||||
debug_domains = {}
|
||||
for (domainarg, iterator) in groupby(domains):
|
||||
dlevel = len(tuple(iterator))
|
||||
debug_domains["BitBake.%s" % domainarg] = logging.DEBUG - dlevel + 1
|
||||
|
||||
def set_verbose(level):
|
||||
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)
|
||||
BBLogFilter(handler, level, debug_domains)
|
||||
|
||||
#
|
||||
# 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):
|
||||
if not msgdomain:
|
||||
logger.critical(msg)
|
||||
if msgdomain:
|
||||
logger = logging.getLogger("BitBake.%s" % msgdomain)
|
||||
else:
|
||||
loggers[msgdomain].critical(msg)
|
||||
logger = logging.getLogger("BitBake")
|
||||
logger.critical(msg)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -427,17 +427,19 @@ def multi_finalize(fn, d):
|
||||
|
||||
extended = d.getVar("BBCLASSEXTEND", True) or ""
|
||||
if extended:
|
||||
# the following is to support bbextends with argument, for e.g. multilib
|
||||
# an example is as follow:
|
||||
# the following is to support bbextends with arguments, for e.g. multilib
|
||||
# an example is as follows:
|
||||
# BBCLASSEXTEND = "multilib:lib32"
|
||||
# it will create foo-lib32, inheriting multilib.bbclass and set
|
||||
# CURRENTEXTEND to "lib32"
|
||||
# BBEXTENDCURR to "multilib" and BBEXTENDVARIANT to "lib32"
|
||||
extendedmap = {}
|
||||
variantmap = {}
|
||||
|
||||
for ext in extended.split():
|
||||
eext = ext.split(':')
|
||||
eext = ext.split(':', 2)
|
||||
if len(eext) > 1:
|
||||
extendedmap[eext[1]] = eext[0]
|
||||
extendedmap[ext] = eext[0]
|
||||
variantmap[ext] = eext[1]
|
||||
else:
|
||||
extendedmap[ext] = ext
|
||||
|
||||
@@ -445,7 +447,7 @@ def multi_finalize(fn, d):
|
||||
def extendfunc(name, d):
|
||||
if name != extendedmap[name]:
|
||||
d.setVar("BBEXTENDCURR", extendedmap[name])
|
||||
d.setVar("BBEXTENDVARIANT", name)
|
||||
d.setVar("BBEXTENDVARIANT", variantmap[name])
|
||||
else:
|
||||
d.setVar("PN", "%s-%s" % (pn, name))
|
||||
bb.parse.BBHandler.inherit([extendedmap[name]], d)
|
||||
|
||||
@@ -194,21 +194,21 @@ def feeder(lineno, s, fn, root, statements):
|
||||
return
|
||||
|
||||
|
||||
# Skip empty lines
|
||||
if s == '':
|
||||
return
|
||||
|
||||
if s[0] == '#':
|
||||
if s and s[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))
|
||||
|
||||
if s[-1] == '\\':
|
||||
if s and s[-1] == '\\':
|
||||
__residue__.append(s[:-1])
|
||||
return
|
||||
|
||||
s = "".join(__residue__) + s
|
||||
__residue__ = []
|
||||
|
||||
# Skip empty lines
|
||||
if s == '':
|
||||
return
|
||||
|
||||
# Skip comments
|
||||
if s[0] == '#':
|
||||
return
|
||||
|
||||
@@ -96,7 +96,7 @@ def handle(fn, data, include):
|
||||
s = s.rstrip()
|
||||
if s[0] == '#': continue # skip comments
|
||||
while s[-1] == '\\':
|
||||
s2 = f.readline()[:-1].strip()
|
||||
s2 = f.readline().strip()
|
||||
lineno = lineno + 1
|
||||
s = s[:-1] + s2
|
||||
feeder(lineno, s, fn, statements)
|
||||
|
||||
@@ -124,6 +124,18 @@ def findPreferredProvider(pn, cfgData, dataCache, pkg_pn = None, item = None):
|
||||
itemstr = " (for item %s)" % item
|
||||
if preferred_file is None:
|
||||
logger.info("preferred version %s of %s not available%s", pv_str, pn, itemstr)
|
||||
available_vers = []
|
||||
for file_set in pkg_pn:
|
||||
for f in file_set:
|
||||
pe, pv, pr = dataCache.pkg_pepvpr[f]
|
||||
ver_str = pv
|
||||
if pe:
|
||||
ver_str = "%s:%s" % (pe, ver_str)
|
||||
if not ver_str in available_vers:
|
||||
available_vers.append(ver_str)
|
||||
if available_vers:
|
||||
available_vers.sort()
|
||||
logger.info("versions of %s available: %s", pn, ' '.join(available_vers))
|
||||
else:
|
||||
logger.debug(1, "selecting %s as PREFERRED_VERSION %s of package %s%s", preferred_file, pv_str, pn, itemstr)
|
||||
|
||||
@@ -275,7 +287,7 @@ def filterProvidersRunTime(providers, item, cfgData, dataCache):
|
||||
provides = dataCache.pn_provides[pn]
|
||||
for provide in provides:
|
||||
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:
|
||||
var = "PREFERRED_PROVIDER_%s = %s" % (provide, prefervar)
|
||||
logger.verbose("selecting %s to satisfy runtime %s due to %s", prefervar, item, var)
|
||||
|
||||
@@ -362,7 +362,7 @@ class RunQueueData:
|
||||
message = "\n"
|
||||
for msg in msgs:
|
||||
message = message + msg
|
||||
bb.msg.fatal(bb.msg.domain.RunQueue, message)
|
||||
bb.msg.fatal("RunQueue", message)
|
||||
|
||||
return weight
|
||||
|
||||
@@ -470,7 +470,7 @@ class RunQueueData:
|
||||
dep = taskData.fn_index[depdata]
|
||||
taskid = taskData.gettask_id(dep, idependtask, False)
|
||||
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)
|
||||
if depdata != fnid:
|
||||
tdepends_fnid[fnid].add(taskid)
|
||||
@@ -587,7 +587,7 @@ class RunQueueData:
|
||||
continue
|
||||
|
||||
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]]
|
||||
|
||||
@@ -619,9 +619,9 @@ class RunQueueData:
|
||||
# Check to make sure we still have tasks to run
|
||||
if len(self.runq_fnid) == 0:
|
||||
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:
|
||||
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))
|
||||
|
||||
@@ -632,7 +632,7 @@ class RunQueueData:
|
||||
origdeps = self.runq_depends[listid]
|
||||
for origdep in origdeps:
|
||||
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])
|
||||
self.runq_depends[listid] = set(newdeps)
|
||||
|
||||
@@ -653,7 +653,7 @@ class RunQueueData:
|
||||
for dep in revdeps:
|
||||
if dep in self.runq_depends[listid]:
|
||||
#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))
|
||||
|
||||
@@ -861,7 +861,7 @@ class RunQueue:
|
||||
#print "Not current: %s" % notcurrent
|
||||
|
||||
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
|
||||
|
||||
def check_stamp_task(self, task, taskname = None):
|
||||
@@ -1072,6 +1072,7 @@ class RunQueueExecute:
|
||||
# a fork() or exec*() activates PSEUDO...
|
||||
|
||||
envbackup = {}
|
||||
fakeenv = {}
|
||||
umask = None
|
||||
|
||||
taskdep = self.rqdata.dataCache.task_deps[fn]
|
||||
@@ -1087,6 +1088,7 @@ class RunQueueExecute:
|
||||
for key, value in (var.split('=') for var in envvars):
|
||||
envbackup[key] = os.environ.get(key)
|
||||
os.environ[key] = value
|
||||
fakeenv[key] = value
|
||||
|
||||
fakedirs = (self.rqdata.dataCache.fakerootdirs[fn] or "").split()
|
||||
for p in fakedirs:
|
||||
@@ -1103,7 +1105,7 @@ class RunQueueExecute:
|
||||
pipeout = os.fdopen(pipeout, 'wb', 0)
|
||||
pid = os.fork()
|
||||
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:
|
||||
pipein.close()
|
||||
@@ -1136,7 +1138,15 @@ class RunQueueExecute:
|
||||
for h in self.rqdata.hash_deps:
|
||||
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:
|
||||
the_data.setVarFlag(taskname, "quieterrors", "1")
|
||||
@@ -1436,7 +1446,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
|
||||
deps.add(self.rqdata.runq_setscene.index(dep))
|
||||
sq_revdeps_squash.append(deps)
|
||||
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)):
|
||||
# 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])
|
||||
|
||||
@@ -39,7 +39,7 @@ class SignatureGenerator(object):
|
||||
return
|
||||
|
||||
def get_taskhash(self, fn, task, deps, dataCache):
|
||||
return 0
|
||||
return "0"
|
||||
|
||||
def set_taskdata(self, hashes, deps):
|
||||
return
|
||||
|
||||
@@ -41,7 +41,7 @@ class TaskData:
|
||||
"""
|
||||
BitBake Task Data implementation
|
||||
"""
|
||||
def __init__(self, abort = True, tryaltconfigs = False):
|
||||
def __init__(self, abort = True, tryaltconfigs = False, skiplist = None):
|
||||
self.build_names_index = []
|
||||
self.run_names_index = []
|
||||
self.fn_index = []
|
||||
@@ -70,6 +70,8 @@ class TaskData:
|
||||
self.abort = abort
|
||||
self.tryaltconfigs = tryaltconfigs
|
||||
|
||||
self.skiplist = skiplist
|
||||
|
||||
def getbuild_id(self, name):
|
||||
"""
|
||||
Return an ID number for the build target name.
|
||||
@@ -151,7 +153,7 @@ class TaskData:
|
||||
fnid = self.getfn_id(fn)
|
||||
|
||||
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
|
||||
if fnid in self.tasks_fnid:
|
||||
@@ -173,7 +175,7 @@ class TaskData:
|
||||
for dep in task_deps['depends'][task].split():
|
||||
if 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, dependency %s does not contain ':' character\n. Task 'depends' should be specified in the form 'packagename:task'" % (dep, fn))
|
||||
ids.append(((self.getbuild_id(dep.split(":")[0])), dep.split(":")[1]))
|
||||
self.tasks_idepends[taskid].extend(ids)
|
||||
|
||||
@@ -348,6 +350,22 @@ class TaskData:
|
||||
dependees.append(self.fn_index[fnid])
|
||||
return dependees
|
||||
|
||||
def get_reasons(self, item, runtime=False):
|
||||
"""
|
||||
Get the reason(s) for an item not being provided, if any
|
||||
"""
|
||||
reasons = []
|
||||
if self.skiplist:
|
||||
for fn in self.skiplist:
|
||||
skipitem = self.skiplist[fn]
|
||||
if skipitem.pn == item:
|
||||
reasons.append("%s was skipped: %s" % (skipitem.pn, skipitem.skipreason))
|
||||
elif runtime and item in skipitem.rprovides:
|
||||
reasons.append("%s RPROVIDES %s but was skipped: %s" % (skipitem.pn, item, skipitem.skipreason))
|
||||
elif not runtime and item in skipitem.provides:
|
||||
reasons.append("%s PROVIDES %s but was skipped: %s" % (skipitem.pn, item, skipitem.skipreason))
|
||||
return reasons
|
||||
|
||||
def add_provider(self, cfgData, dataCache, item):
|
||||
try:
|
||||
self.add_provider_internal(cfgData, dataCache, item)
|
||||
@@ -369,7 +387,7 @@ class TaskData:
|
||||
return
|
||||
|
||||
if not item in dataCache.providers:
|
||||
bb.event.fire(bb.event.NoProvider(item, dependees=self.get_rdependees_str(item)), cfgData)
|
||||
bb.event.fire(bb.event.NoProvider(item, dependees=self.get_dependees_str(item), reasons=self.get_reasons(item)), cfgData)
|
||||
raise bb.providers.NoProvider(item)
|
||||
|
||||
if self.have_build_target(item):
|
||||
@@ -381,7 +399,7 @@ class TaskData:
|
||||
eligible = [p for p in eligible if not self.getfn_id(p) in self.failed_fnids]
|
||||
|
||||
if not eligible:
|
||||
bb.event.fire(bb.event.NoProvider(item, dependees=self.get_dependees_str(item)), cfgData)
|
||||
bb.event.fire(bb.event.NoProvider(item, dependees=self.get_dependees_str(item), reasons=["No eligible PROVIDERs exist for '%s'" % item]), cfgData)
|
||||
raise bb.providers.NoProvider(item)
|
||||
|
||||
if len(eligible) > 1 and foundUnique == False:
|
||||
@@ -418,14 +436,14 @@ class TaskData:
|
||||
all_p = bb.providers.getRuntimeProviders(dataCache, item)
|
||||
|
||||
if not all_p:
|
||||
bb.event.fire(bb.event.NoProvider(item, runtime=True, dependees=self.get_rdependees_str(item)), cfgData)
|
||||
bb.event.fire(bb.event.NoProvider(item, runtime=True, dependees=self.get_rdependees_str(item), reasons=self.get_reasons(item, True)), cfgData)
|
||||
raise bb.providers.NoRProvider(item)
|
||||
|
||||
eligible, numberPreferred = bb.providers.filterProvidersRunTime(all_p, item, cfgData, dataCache)
|
||||
eligible = [p for p in eligible if not self.getfn_id(p) in self.failed_fnids]
|
||||
|
||||
if not eligible:
|
||||
bb.event.fire(bb.event.NoProvider(item, runtime=True, dependees=self.get_rdependees_str(item)), cfgData)
|
||||
bb.event.fire(bb.event.NoProvider(item, runtime=True, dependees=self.get_rdependees_str(item), reasons=["No eligible RPROVIDERs exist for '%s'" % item]), cfgData)
|
||||
raise bb.providers.NoRProvider(item)
|
||||
|
||||
if len(eligible) > 1 and numberPreferred == 0:
|
||||
|
||||
@@ -40,12 +40,13 @@ class Configurator(gobject.GObject):
|
||||
|
||||
def __init__(self):
|
||||
gobject.GObject.__init__(self)
|
||||
self.local = None
|
||||
self.bblayers = None
|
||||
self.enabled_layers = {}
|
||||
self.loaded_layers = {}
|
||||
self.config = {}
|
||||
self.orig_config = {}
|
||||
self.preconf = None
|
||||
self.postconf = None
|
||||
|
||||
# NOTE: cribbed from the cooker...
|
||||
def _parse(self, f, data, include=False):
|
||||
@@ -55,18 +56,16 @@ class Configurator(gobject.GObject):
|
||||
parselog.critical("Unable to parse %s: %s" % (f, exc))
|
||||
sys.exit(1)
|
||||
|
||||
def _loadLocalConf(self, path):
|
||||
def _loadConf(self, path):
|
||||
def getString(var):
|
||||
return bb.data.getVar(var, data, True) or ""
|
||||
|
||||
self.local = path
|
||||
|
||||
if self.orig_config:
|
||||
del self.orig_config
|
||||
self.orig_config = {}
|
||||
|
||||
data = bb.data.init()
|
||||
data = self._parse(self.local, data)
|
||||
data = self._parse(path, data)
|
||||
|
||||
# We only need to care about certain variables
|
||||
mach = getString('MACHINE')
|
||||
@@ -76,6 +75,8 @@ class Configurator(gobject.GObject):
|
||||
if sdkmach and sdkmach != self.config.get('SDKMACHINE', ''):
|
||||
self.config['SDKMACHINE'] = sdkmach
|
||||
distro = getString('DISTRO')
|
||||
if not distro:
|
||||
distro = "defaultsetup"
|
||||
if distro and distro != self.config.get('DISTRO', ''):
|
||||
self.config['DISTRO'] = distro
|
||||
bbnum = getString('BB_NUMBER_THREADS')
|
||||
@@ -84,18 +85,39 @@ class Configurator(gobject.GObject):
|
||||
pmake = getString('PARALLEL_MAKE')
|
||||
if pmake and pmake != self.config.get('PARALLEL_MAKE', ''):
|
||||
self.config['PARALLEL_MAKE'] = pmake
|
||||
incompat = getString('INCOMPATIBLE_LICENSE')
|
||||
if incompat and incompat != self.config.get('INCOMPATIBLE_LICENSE', ''):
|
||||
self.config['INCOMPATIBLE_LICENSE'] = incompat
|
||||
pclass = getString('PACKAGE_CLASSES')
|
||||
if pclass and pclass != self.config.get('PACKAGE_CLASSES', ''):
|
||||
self.config['PACKAGE_CLASSES'] = pclass
|
||||
fstypes = getString('IMAGE_FSTYPES')
|
||||
if fstypes and fstypes != self.config.get('IMAGE_FSTYPES', ''):
|
||||
self.config['IMAGE_FSTYPES'] = fstypes
|
||||
|
||||
# Values which aren't always set in the conf must be explicitly
|
||||
# loaded as empty values for save to work
|
||||
incompat = getString('INCOMPATIBLE_LICENSE')
|
||||
if incompat and incompat != self.config.get('INCOMPATIBLE_LICENSE', ''):
|
||||
self.config['INCOMPATIBLE_LICENSE'] = incompat
|
||||
else:
|
||||
self.config['INCOMPATIBLE_LICENSE'] = ""
|
||||
|
||||
# Non-standard, namespaces, variables for GUI preferences
|
||||
toolchain = getString('HOB_BUILD_TOOLCHAIN')
|
||||
if toolchain and toolchain != self.config.get('HOB_BUILD_TOOLCHAIN', ''):
|
||||
self.config['HOB_BUILD_TOOLCHAIN'] = toolchain
|
||||
header = getString('HOB_BUILD_TOOLCHAIN_HEADERS')
|
||||
if header and header != self.config.get('HOB_BUILD_TOOLCHAIN_HEADERS', ''):
|
||||
self.config['HOB_BUILD_TOOLCHAIN_HEADERS'] = header
|
||||
|
||||
self.orig_config = copy.deepcopy(self.config)
|
||||
|
||||
def setLocalConfVar(self, var, val):
|
||||
def setConfVar(self, var, val):
|
||||
self.config[var] = val
|
||||
|
||||
def getConfVar(self, var):
|
||||
if var in self.config:
|
||||
self.config[var] = val
|
||||
return self.config[var]
|
||||
else:
|
||||
return ""
|
||||
|
||||
def _loadLayerConf(self, path):
|
||||
self.bblayers = path
|
||||
@@ -114,9 +136,17 @@ class Configurator(gobject.GObject):
|
||||
self.emit("layers-loaded")
|
||||
|
||||
def _addConfigFile(self, path):
|
||||
conffiles = ["local.conf", "hob-pre.conf", "hob-post.conf"]
|
||||
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":
|
||||
self._loadLayerConf(path)
|
||||
|
||||
@@ -137,9 +167,14 @@ class Configurator(gobject.GObject):
|
||||
def addLayerConf(self, confpath):
|
||||
layerpath = self._splitLayer(confpath)
|
||||
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)
|
||||
return name, layerpath
|
||||
return name, layerpath
|
||||
else:
|
||||
return name, None
|
||||
|
||||
def addLayer(self, name, path):
|
||||
self.enabled_layers[name] = path
|
||||
@@ -181,26 +216,21 @@ class Configurator(gobject.GObject):
|
||||
|
||||
return "".join(layer_entry)
|
||||
|
||||
def writeLocalConf(self):
|
||||
# Dictionary containing only new or modified variables
|
||||
changed_values = {}
|
||||
for var in self.config:
|
||||
val = self.config[var]
|
||||
if self.orig_config.get(var, None) != val:
|
||||
changed_values[var] = val
|
||||
def writeConfFile(self, conffile, contents):
|
||||
"""
|
||||
Make a backup copy of conffile and write a new file in its stead with
|
||||
the lines in the contents list.
|
||||
"""
|
||||
# Create a backup of the conf file
|
||||
bkup = "%s~" % conffile
|
||||
os.rename(conffile, bkup)
|
||||
|
||||
if not len(changed_values):
|
||||
return
|
||||
# Write the contents list object to the conf file
|
||||
with open(conffile, "w") as new:
|
||||
new.write("".join(contents))
|
||||
|
||||
# Create a backup of the local.conf
|
||||
bkup = "%s~" % self.local
|
||||
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"]
|
||||
def updateConf(self, orig_lines, changed_values):
|
||||
new_config_lines = []
|
||||
for var in changed_values:
|
||||
# Convenience function for re.subn(). If the pattern matches
|
||||
# return a string which contains an assignment using the same
|
||||
@@ -219,27 +249,74 @@ class Configurator(gobject.GObject):
|
||||
# Iterate over the local.conf lines and if they are a match
|
||||
# for the pattern comment out the line and append a new line
|
||||
# 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)
|
||||
if replacements:
|
||||
config_lines[cnt] = "#%s" % line
|
||||
orig_lines[cnt] = "#%s" % line
|
||||
new_config_lines.append(new_line)
|
||||
replaced = True
|
||||
cnt = cnt + 1
|
||||
|
||||
if not replaced:
|
||||
new_config_lines.append("%s = \"%s\"" % (var, changed_values[var]))
|
||||
new_config_lines.append("%s = \"%s\"\n" % (var, changed_values[var]))
|
||||
|
||||
# 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
|
||||
with open(self.local, "w") as n:
|
||||
n.write("".join(config_lines))
|
||||
def writeConf(self):
|
||||
pre_vars = ["MACHINE", "SDKMACHINE", "DISTRO",
|
||||
"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
|
||||
self.orig_config = copy.deepcopy(self.config)
|
||||
|
||||
def insertTempBBPath(self, bbpath, bbfiles):
|
||||
# read the original conf into a list
|
||||
with open(self.postconf, 'r') as config:
|
||||
config_lines = config.readlines()
|
||||
|
||||
if bbpath:
|
||||
config_lines.append("BBPATH := \"${BBPATH}:%s\"\n" % bbpath)
|
||||
if bbfiles:
|
||||
config_lines.append("BBFILES := \"${BBFILES} %s\"\n" % bbfiles)
|
||||
|
||||
self.writeConfFile(self.postconf, config_lines)
|
||||
|
||||
def writeLayerConf(self):
|
||||
# If we've not added/removed new layers don't write
|
||||
if not self._isLayerConfDirty():
|
||||
@@ -248,23 +325,14 @@ class Configurator(gobject.GObject):
|
||||
# This pattern should find the existing BBLAYERS
|
||||
pattern = 'BBLAYERS\s=\s\".*\"'
|
||||
|
||||
# Backup the users bblayers.conf
|
||||
bkup = "%s~" % self.bblayers
|
||||
os.rename(self.bblayers, bkup)
|
||||
|
||||
replacement = self._constructLayerEntry()
|
||||
|
||||
with open(bkup, "r") as f:
|
||||
with open(self.bblayers, "r") as f:
|
||||
contents = f.read()
|
||||
p = re.compile(pattern, re.DOTALL)
|
||||
new = p.sub(replacement, contents)
|
||||
|
||||
with open(self.bblayers, "w") as n:
|
||||
n.write(new)
|
||||
|
||||
# At some stage we should remove the backup we've created
|
||||
# though we should probably verify it first
|
||||
#os.remove(bkup)
|
||||
self.writeConfFile(self.bblayers, new)
|
||||
|
||||
# set loaded_layers for dirtiness tracking
|
||||
self.loaded_layers = copy.deepcopy(self.enabled_layers)
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
import gobject
|
||||
import logging
|
||||
import tempfile
|
||||
import datetime
|
||||
|
||||
progress_total = 0
|
||||
|
||||
@@ -49,55 +52,89 @@ class HobHandler(gobject.GObject):
|
||||
"data-generated" : (gobject.SIGNAL_RUN_LAST,
|
||||
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_STRING,)),
|
||||
"build-complete" : (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
()),
|
||||
"reload-triggered" : (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
(gobject.TYPE_STRING,
|
||||
gobject.TYPE_STRING)),
|
||||
gobject.TYPE_STRING,)),
|
||||
}
|
||||
|
||||
(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):
|
||||
gobject.GObject.__init__(self)
|
||||
|
||||
self.current_command = None
|
||||
self.building = None
|
||||
self.gplv3_excluded = False
|
||||
self.build_toolchain = False
|
||||
self.build_toolchain_headers = False
|
||||
self.generating = False
|
||||
self.build_queue = []
|
||||
self.current_phase = None
|
||||
self.bbpath_ok = False
|
||||
self.bbfiles_ok = False
|
||||
self.image_dir = os.path.join(tempfile.gettempdir(), 'hob-images')
|
||||
|
||||
self.model = taskmodel
|
||||
self.server = server
|
||||
|
||||
self.command_map = {
|
||||
"findConfigFilePathLocal" : ("findConfigFilePath", ["hob.local.conf"], "findConfigFilePathHobLocal"),
|
||||
"findConfigFilePathHobLocal" : ("findConfigFilePath", ["bblayers.conf"], "findConfigFilePathLayers"),
|
||||
"findConfigFilePathLayers" : ("findConfigFiles", ["DISTRO"], "findConfigFilesDistro"),
|
||||
"findConfigFilesDistro" : ("findConfigFiles", ["MACHINE"], "findConfigFilesMachine"),
|
||||
"findConfigFilesMachine" : ("findConfigFiles", ["MACHINE-SDK"], "findConfigFilesSdkMachine"),
|
||||
"findConfigFilesSdkMachine" : ("findFilesMatchingInDir", ["rootfs_", "classes"], "findFilesMatchingPackage"),
|
||||
"findFilesMatchingPackage" : ("generateTargetsTree", ["classes/image.bbclass"], None),
|
||||
"generateTargetsTree" : (None, [], None),
|
||||
}
|
||||
self.image_output_types = self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]).split(" ")
|
||||
|
||||
def run_next_command(self):
|
||||
# FIXME: this is ugly and I *will* replace it
|
||||
if self.current_command:
|
||||
if not self.generating:
|
||||
self.emit("generating-data")
|
||||
self.generating = True
|
||||
next_cmd = self.command_map[self.current_command]
|
||||
command = next_cmd[0]
|
||||
argument = next_cmd[1]
|
||||
self.current_command = next_cmd[2]
|
||||
args = [command]
|
||||
args.extend(argument)
|
||||
self.server.runCommand(args)
|
||||
if self.current_command and not self.generating:
|
||||
self.emit("generating-data")
|
||||
self.generating = True
|
||||
|
||||
if self.current_command == self.CFG_PATH_LOCAL:
|
||||
self.current_command = self.CFG_PATH_PRE
|
||||
self.server.runCommand(["findConfigFilePath", "hob-pre.conf"])
|
||||
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.server.runCommand(["findConfigFilePath", "bblayers.conf"])
|
||||
elif self.current_command == self.CFG_PATH_LAYERS:
|
||||
self.current_command = self.CFG_FILES_DISTRO
|
||||
self.server.runCommand(["findConfigFiles", "DISTRO"])
|
||||
elif self.current_command == self.CFG_FILES_DISTRO:
|
||||
self.current_command = self.CFG_FILES_MACH
|
||||
self.server.runCommand(["findConfigFiles", "MACHINE"])
|
||||
elif self.current_command == self.CFG_FILES_MACH:
|
||||
self.current_command = self.CFG_FILES_SDK
|
||||
self.server.runCommand(["findConfigFiles", "MACHINE-SDK"])
|
||||
elif self.current_command == self.CFG_FILES_SDK:
|
||||
self.current_command = self.FILES_MATCH_CLASS
|
||||
self.server.runCommand(["findFilesMatchingInDir", "rootfs_", "classes"])
|
||||
elif self.current_command == self.FILES_MATCH_CLASS:
|
||||
self.current_command = self.GENERATE_TGTS
|
||||
self.server.runCommand(["generateTargetsTree", "classes/image.bbclass"])
|
||||
elif self.current_command == self.GENERATE_TGTS:
|
||||
if self.generating:
|
||||
self.emit("data-generated")
|
||||
self.generating = False
|
||||
self.current_command = None
|
||||
elif self.current_command == self.REPARSE_FILES:
|
||||
if self.build_queue:
|
||||
self.current_command = self.BUILD_IMAGE
|
||||
else:
|
||||
self.current_command = self.CFG_PATH_LAYERS
|
||||
self.server.runCommand(["resetCooker"])
|
||||
self.server.runCommand(["reparseFiles"])
|
||||
elif self.current_command == self.BUILD_IMAGE:
|
||||
self.building = "image"
|
||||
if self.generating:
|
||||
self.emit("data-generated")
|
||||
self.generating = False
|
||||
self.server.runCommand(["buildTargets", self.build_queue, "build"])
|
||||
self.build_queue = []
|
||||
self.current_command = None
|
||||
|
||||
def handle_event(self, event, running_build, pbar):
|
||||
if not event:
|
||||
@@ -105,13 +142,14 @@ class HobHandler(gobject.GObject):
|
||||
|
||||
# If we're running a build, use the RunningBuild event handler
|
||||
if self.building:
|
||||
self.current_phase = "building"
|
||||
running_build.handle_event(event)
|
||||
elif isinstance(event, bb.event.TargetsTreeGenerated):
|
||||
self.emit("data-generated")
|
||||
self.generating = False
|
||||
self.current_phase = "data generation"
|
||||
if event._model:
|
||||
self.model.populate(event._model)
|
||||
elif isinstance(event, bb.event.ConfigFilesFound):
|
||||
self.current_phase = "configuration lookup"
|
||||
var = event._variable
|
||||
if var == "distro":
|
||||
distros = event._values
|
||||
@@ -126,9 +164,11 @@ class HobHandler(gobject.GObject):
|
||||
sdk_machines.sort()
|
||||
self.emit("sdk-machines-updated", sdk_machines)
|
||||
elif isinstance(event, bb.event.ConfigFilePathFound):
|
||||
self.current_phase = "configuration lookup"
|
||||
path = event._path
|
||||
self.emit("config-found", path)
|
||||
elif isinstance(event, bb.event.FilesMatchingFound):
|
||||
self.current_phase = "configuration lookup"
|
||||
# FIXME: hard coding, should at least be a variable shared between
|
||||
# here and the caller
|
||||
if event._pattern == "rootfs_":
|
||||
@@ -140,25 +180,37 @@ class HobHandler(gobject.GObject):
|
||||
formats.sort()
|
||||
self.emit("package-formats-found", formats)
|
||||
elif isinstance(event, bb.command.CommandCompleted):
|
||||
self.current_phase = None
|
||||
self.run_next_command()
|
||||
elif isinstance(event, bb.command.CommandFailed):
|
||||
self.emit("error", event.error)
|
||||
self.emit("command-failed", event.error)
|
||||
elif isinstance(event, bb.event.CacheLoadStarted):
|
||||
self.current_phase = "cache loading"
|
||||
bb.ui.crumbs.hobeventhandler.progress_total = event.total
|
||||
pbar.set_text("Loading cache: %s/%s" % (0, bb.ui.crumbs.hobeventhandler.progress_total))
|
||||
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))
|
||||
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):
|
||||
self.current_phase = "recipe parsing"
|
||||
if event.total == 0:
|
||||
return
|
||||
bb.ui.crumbs.hobeventhandler.progress_total = event.total
|
||||
pbar.set_text("Processing recipes: %s/%s" % (0, bb.ui.crumbs.hobeventhandler.progress_total))
|
||||
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))
|
||||
elif isinstance(event, bb.event.ParseCompleted):
|
||||
self.current_phase = None
|
||||
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
|
||||
|
||||
def event_handle_idle_func (self, eventHandler, running_build, pbar):
|
||||
@@ -185,8 +237,7 @@ class HobHandler(gobject.GObject):
|
||||
img = self.model.selected_image
|
||||
selected_packages, _ = self.model.get_selected_packages()
|
||||
self.emit("reload-triggered", img, " ".join(selected_packages))
|
||||
self.server.runCommand(["reparseFiles"])
|
||||
self.current_command = "findConfigFilePathLayers"
|
||||
self.current_command = self.REPARSE_FILES
|
||||
self.run_next_command()
|
||||
|
||||
def set_bbthreads(self, threads):
|
||||
@@ -196,27 +247,47 @@ class HobHandler(gobject.GObject):
|
||||
pmake = "-j %s" % threads
|
||||
self.server.runCommand(["setVariable", "BB_NUMBER_THREADS", pmake])
|
||||
|
||||
def run_build(self, tgts):
|
||||
self.building = "image"
|
||||
def build_image(self, image, configurator):
|
||||
targets = []
|
||||
targets.append(tgts)
|
||||
nbbp = None
|
||||
nbbf = None
|
||||
targets.append(image)
|
||||
if self.build_toolchain and self.build_toolchain_headers:
|
||||
targets = ["meta-toolchain-sdk"] + targets
|
||||
targets.append("meta-toolchain-sdk")
|
||||
elif self.build_toolchain:
|
||||
targets = ["meta-toolchain"] + targets
|
||||
self.server.runCommand(["buildTargets", targets, "build"])
|
||||
targets.append("meta-toolchain")
|
||||
self.build_queue = targets
|
||||
|
||||
if not self.bbpath_ok:
|
||||
bbpath = self.server.runCommand(["getVariable", "BBPATH"])
|
||||
if self.image_dir in bbpath.split(":"):
|
||||
self.bbpath_ok = True
|
||||
else:
|
||||
nbbp = self.image_dir
|
||||
|
||||
if not self.bbfiles_ok:
|
||||
import re
|
||||
pattern = "%s/\*.bb" % self.image_dir
|
||||
bbfiles = self.server.runCommand(["getVariable", "BBFILES"]).split(" ")
|
||||
for files in bbfiles:
|
||||
if re.match(pattern, files):
|
||||
self.bbfiles_ok = True
|
||||
|
||||
if not self.bbfiles_ok:
|
||||
nbbf = "%s/*.bb" % self.image_dir
|
||||
|
||||
if nbbp or nbbf:
|
||||
configurator.insertTempBBPath(nbbp, nbbf)
|
||||
self.bbpath_ok = True
|
||||
self.bbfiles_ok = True
|
||||
|
||||
self.current_command = self.REPARSE_FILES
|
||||
self.run_next_command()
|
||||
|
||||
def build_packages(self, pkgs):
|
||||
self.building = "packages"
|
||||
if 'meta-toolchain' in self.build_queue:
|
||||
self.build_queue.remove('meta-toolchain')
|
||||
pkgs.extend('meta-toolchain')
|
||||
self.server.runCommand(["buildTargets", pkgs, "build"])
|
||||
|
||||
def build_file(self, image):
|
||||
self.building = "image"
|
||||
self.server.runCommand(["buildFile", image, "build"])
|
||||
|
||||
def cancel_build(self, force=False):
|
||||
if force:
|
||||
# Force the cooker to stop as quickly as possible
|
||||
@@ -226,13 +297,8 @@ class HobHandler(gobject.GObject):
|
||||
# leave the workdir in a usable state
|
||||
self.server.runCommand(["stateShutdown"])
|
||||
|
||||
def toggle_gplv3(self, excluded):
|
||||
if self.gplv3_excluded != excluded:
|
||||
self.gplv3_excluded = excluded
|
||||
if excluded:
|
||||
self.server.runCommand(["setVariable", "INCOMPATIBLE_LICENSE", "GPLv3"])
|
||||
else:
|
||||
self.server.runCommand(["setVariable", "INCOMPATIBLE_LICENSE", ""])
|
||||
def set_incompatible_license(self, incompatible):
|
||||
self.server.runCommand(["setVariable", "INCOMPATIBLE_LICENSE", incompatible])
|
||||
|
||||
def toggle_toolchain(self, enabled):
|
||||
if self.build_toolchain != enabled:
|
||||
@@ -242,24 +308,35 @@ class HobHandler(gobject.GObject):
|
||||
if self.build_toolchain_headers != enabled:
|
||||
self.build_toolchain_headers = enabled
|
||||
|
||||
def queue_image_recipe_path(self, path):
|
||||
self.build_queue.append(path)
|
||||
def set_fstypes(self, fstypes):
|
||||
self.server.runCommand(["setVariable", "IMAGE_FSTYPES", fstypes])
|
||||
|
||||
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 add_image_output_type(self, output_type):
|
||||
if output_type not in self.image_output_types:
|
||||
self.image_output_types.append(output_type)
|
||||
fstypes = " ".join(self.image_output_types).lstrip(" ")
|
||||
self.set_fstypes(fstypes)
|
||||
return self.image_output_types
|
||||
|
||||
def set_image_output_type(self, output_type):
|
||||
self.server.runCommand(["setVariable", "IMAGE_FSTYPES", output_type])
|
||||
def remove_image_output_type(self, output_type):
|
||||
if output_type in self.image_output_types:
|
||||
ind = self.image_output_types.index(output_type)
|
||||
self.image_output_types.pop(ind)
|
||||
fstypes = " ".join(self.image_output_types).lstrip(" ")
|
||||
self.set_fstypes(fstypes)
|
||||
return self.image_output_types
|
||||
|
||||
def get_image_deploy_dir(self):
|
||||
return self.server.runCommand(["getVariable", "DEPLOY_DIR_IMAGE"])
|
||||
|
||||
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
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
import gtk
|
||||
import glib
|
||||
from bb.ui.crumbs.configurator import Configurator
|
||||
|
||||
class HobPrefs(gtk.Dialog):
|
||||
@@ -29,17 +30,21 @@ class HobPrefs(gtk.Dialog):
|
||||
if model:
|
||||
model.clear()
|
||||
|
||||
def output_type_changed_cb(self, combo, handler):
|
||||
ot = combo.get_active_text()
|
||||
if ot != self.curr_output_type:
|
||||
self.curr_output_type = ot
|
||||
handler.set_image_output_type(ot)
|
||||
def output_type_toggled_cb(self, check, handler):
|
||||
ot = check.get_label()
|
||||
enabled = check.get_active()
|
||||
if enabled:
|
||||
self.selected_image_types = handler.add_image_output_type(ot)
|
||||
else:
|
||||
self.selected_image_types = handler.remove_image_output_type(ot)
|
||||
|
||||
self.configurator.setConfVar('IMAGE_FSTYPES', "%s" % " ".join(self.selected_image_types).lstrip(" "))
|
||||
|
||||
def sdk_machine_combo_changed_cb(self, combo, handler):
|
||||
sdk_mach = combo.get_active_text()
|
||||
if sdk_mach != self.curr_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)
|
||||
|
||||
def update_sdk_machines(self, handler, sdk_machines):
|
||||
@@ -62,7 +67,7 @@ class HobPrefs(gtk.Dialog):
|
||||
distro = combo.get_active_text()
|
||||
if distro != self.curr_distro:
|
||||
self.curr_distro = distro
|
||||
self.configurator.setLocalConfVar('DISTRO', distro)
|
||||
self.configurator.setConfVar('DISTRO', distro)
|
||||
handler.set_distro(distro)
|
||||
self.reload_required = True
|
||||
|
||||
@@ -86,8 +91,9 @@ class HobPrefs(gtk.Dialog):
|
||||
package_format = combo.get_active_text()
|
||||
if package_format != self.curr_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)
|
||||
self.reload_required = True
|
||||
|
||||
def update_package_formats(self, handler, formats):
|
||||
active = 0
|
||||
@@ -107,43 +113,61 @@ class HobPrefs(gtk.Dialog):
|
||||
|
||||
def include_gplv3_cb(self, toggle):
|
||||
excluded = toggle.get_active()
|
||||
self.handler.toggle_gplv3(excluded)
|
||||
orig_incompatible = self.configurator.getConfVar('INCOMPATIBLE_LICENSE')
|
||||
new_incompatible = ""
|
||||
if excluded:
|
||||
self.configurator.setLocalConfVar('INCOMPATIBLE_LICENSE', 'GPLv3')
|
||||
if not orig_incompatible:
|
||||
new_incompatible = "GPLv3"
|
||||
elif not orig_incompatible.find('GPLv3'):
|
||||
new_incompatible = "%s GPLv3" % orig_incompatible
|
||||
else:
|
||||
self.configurator.setLocalConfVar('INCOMPATIBLE_LICENSE', '')
|
||||
self.reload_required = True
|
||||
new_incompatible = orig_incompatible.replace('GPLv3', '')
|
||||
|
||||
if new_incompatible != orig_incompatible:
|
||||
self.handler.set_incompatible_license(new_incompatible)
|
||||
self.configurator.setConfVar('INCOMPATIBLE_LICENSE', new_incompatible)
|
||||
self.reload_required = True
|
||||
|
||||
def change_bb_threads_cb(self, spinner):
|
||||
val = spinner.get_value_as_int()
|
||||
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):
|
||||
val = spinner.get_value_as_int()
|
||||
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):
|
||||
enabled = check.get_active()
|
||||
toolchain = '0'
|
||||
if enabled:
|
||||
toolchain = '1'
|
||||
self.handler.toggle_toolchain(enabled)
|
||||
self.configurator.setConfVar('HOB_BUILD_TOOLCHAIN', toolchain)
|
||||
|
||||
def toggle_headers_cb(self, check):
|
||||
enabled = check.get_active()
|
||||
headers = '0'
|
||||
if enabled:
|
||||
headers = '1'
|
||||
self.handler.toggle_toolchain_headers(enabled)
|
||||
self.configurator.setConfVar('HOB_BUILD_TOOLCHAIN_HEADERS', headers)
|
||||
|
||||
def set_parent_window(self, parent):
|
||||
self.set_transient_for(parent)
|
||||
|
||||
def write_changes(self):
|
||||
self.configurator.writeLocalConf()
|
||||
self.configurator.writeConf()
|
||||
|
||||
def prefs_response_cb(self, dialog, response):
|
||||
if self.reload_required:
|
||||
glib.idle_add(self.handler.reload_data)
|
||||
self.reload_required = False
|
||||
|
||||
def __init__(self, configurator, handler, curr_sdk_mach, curr_distro, pclass,
|
||||
cpu_cnt, pmake, bbthread, image_types):
|
||||
pmake, bbthread, selected_image_types, all_image_types,
|
||||
gplv3disabled, build_toolchain, build_toolchain_headers):
|
||||
"""
|
||||
"""
|
||||
gtk.Dialog.__init__(self, "Preferences", None,
|
||||
@@ -161,10 +185,13 @@ class HobPrefs(gtk.Dialog):
|
||||
self.curr_sdk_mach = curr_sdk_mach
|
||||
self.curr_distro = curr_distro
|
||||
self.curr_package_format = pclass
|
||||
self.curr_output_type = None
|
||||
self.cpu_cnt = cpu_cnt
|
||||
self.pmake = pmake
|
||||
self.bbthread = bbthread
|
||||
self.selected_image_types = selected_image_types.split(" ")
|
||||
self.gplv3disabled = gplv3disabled
|
||||
self.build_toolchain = build_toolchain
|
||||
self.build_toolchain_headers = build_toolchain_headers
|
||||
|
||||
self.reload_required = False
|
||||
self.distro_handler_id = None
|
||||
self.sdk_machine_handler_id = None
|
||||
@@ -199,6 +226,7 @@ class HobPrefs(gtk.Dialog):
|
||||
check = gtk.CheckButton("Exclude GPLv3 packages")
|
||||
check.set_tooltip_text("Check this box to prevent GPLv3 packages from being included in your image")
|
||||
check.show()
|
||||
check.set_active(self.gplv3disabled)
|
||||
check.connect("toggled", self.include_gplv3_cb)
|
||||
hbox.pack_start(check, expand=False, fill=False, padding=6)
|
||||
hbox = gtk.HBox(False, 12)
|
||||
@@ -209,22 +237,29 @@ class HobPrefs(gtk.Dialog):
|
||||
label.show()
|
||||
hbox.pack_start(label, expand=False, fill=False, padding=6)
|
||||
self.package_combo = gtk.combo_box_new_text()
|
||||
self.package_combo.set_tooltip_text("Select the package format you would like to use in your image")
|
||||
self.package_combo.set_tooltip_text("""The package format is that used in creation
|
||||
of the root filesystem and also dictates the package manager used in your image""")
|
||||
self.package_combo.show()
|
||||
hbox.pack_start(self.package_combo, expand=False, fill=False, padding=6)
|
||||
# Image output type selector
|
||||
label = gtk.Label("Image output type:")
|
||||
label.show()
|
||||
hbox.pack_start(label, expand=False, fill=False, padding=6)
|
||||
output_combo = gtk.combo_box_new_text()
|
||||
if image_types:
|
||||
for it in image_types.split(" "):
|
||||
output_combo.append_text(it)
|
||||
output_combo.connect("changed", self.output_type_changed_cb, handler)
|
||||
else:
|
||||
output_combo.set_sensitive(False)
|
||||
output_combo.show()
|
||||
hbox.pack_start(output_combo)
|
||||
if all_image_types:
|
||||
# Image output type selector
|
||||
label = gtk.Label("Image output types:")
|
||||
label.show()
|
||||
hbox.pack_start(label, expand=False, fill=False, padding=6)
|
||||
chk_cnt = 3
|
||||
for it in all_image_types.split(" "):
|
||||
chk_cnt = chk_cnt + 1
|
||||
if chk_cnt % 6 == 0:
|
||||
hbox = gtk.HBox(False, 12)
|
||||
hbox.show()
|
||||
pbox.pack_start(hbox, expand=False, fill=False, padding=6)
|
||||
chk = gtk.CheckButton(it)
|
||||
if it in self.selected_image_types:
|
||||
chk.set_active(True)
|
||||
chk.set_tooltip_text("Build an %s image" % it)
|
||||
chk.connect("toggled", self.output_type_toggled_cb, handler)
|
||||
chk.show()
|
||||
hbox.pack_start(chk, expand=False, fill=False, padding=3)
|
||||
# BitBake
|
||||
label = gtk.Label()
|
||||
label.set_markup("<b>BitBake</b>")
|
||||
@@ -242,7 +277,11 @@ class HobPrefs(gtk.Dialog):
|
||||
pbox.pack_start(hbox, expand=False, fill=False, padding=6)
|
||||
label = gtk.Label("BitBake threads:")
|
||||
label.show()
|
||||
spin_max = 9 #self.cpu_cnt * 3
|
||||
# NOTE: may be a good idea in future to intelligently cap the maximum
|
||||
# values but we need more data to make an educated decision, for now
|
||||
# set a high maximum as a value for upper bounds is required by the
|
||||
# gtk.Adjustment
|
||||
spin_max = 30 # seems like a high enough arbitrary number
|
||||
hbox.pack_start(label, expand=False, fill=False, padding=6)
|
||||
bbadj = gtk.Adjustment(value=self.bbthread, lower=1, upper=spin_max, step_incr=1)
|
||||
bbspinner = gtk.SpinButton(adjustment=bbadj, climb_rate=1, digits=0)
|
||||
@@ -274,6 +313,7 @@ class HobPrefs(gtk.Dialog):
|
||||
pbox.pack_start(hbox, expand=False, fill=False, padding=6)
|
||||
toolcheck = gtk.CheckButton("Build external development toolchain with image")
|
||||
toolcheck.show()
|
||||
toolcheck.set_active(self.build_toolchain)
|
||||
toolcheck.connect("toggled", self.toggle_toolchain_cb)
|
||||
hbox.pack_start(toolcheck, expand=False, fill=False, padding=6)
|
||||
hbox = gtk.HBox(False, 12)
|
||||
@@ -286,8 +326,9 @@ class HobPrefs(gtk.Dialog):
|
||||
self.sdk_machine_combo.set_tooltip_text("Select the host architecture of the external machine")
|
||||
self.sdk_machine_combo.show()
|
||||
hbox.pack_start(self.sdk_machine_combo, expand=False, fill=False, padding=6)
|
||||
headerscheck = gtk.CheckButton("Include development headers with toolchain")
|
||||
headerscheck.show()
|
||||
headerscheck.connect("toggled", self.toggle_headers_cb)
|
||||
hbox.pack_start(headerscheck, expand=False, fill=False, padding=6)
|
||||
self.connect("response", self.prefs_response_cb)
|
||||
# headerscheck = gtk.CheckButton("Include development headers with toolchain")
|
||||
# headerscheck.show()
|
||||
# headerscheck.set_active(self.build_toolchain_headers)
|
||||
# headerscheck.connect("toggled", self.toggle_headers_cb)
|
||||
# hbox.pack_start(headerscheck, expand=False, fill=False, padding=6)
|
||||
# self.connect("response", self.prefs_response_cb)
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
import gobject
|
||||
import gtk
|
||||
from bb.ui.crumbs.configurator import Configurator
|
||||
from bb.ui.crumbs.hig import CrumbsDialog
|
||||
|
||||
class LayerEditor(gtk.Dialog):
|
||||
"""
|
||||
@@ -117,6 +118,12 @@ class LayerEditor(gtk.Dialog):
|
||||
self.find_layer(self)
|
||||
|
||||
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,
|
||||
gtk.FILE_CHOOSER_ACTION_OPEN,
|
||||
(gtk.STOCK_CANCEL, gtk.RESPONSE_NO,
|
||||
@@ -128,9 +135,19 @@ class LayerEditor(gtk.Dialog):
|
||||
path = dialog.get_filename()
|
||||
dialog.destroy()
|
||||
|
||||
lbl = "<b>Error</b>\nUnable to load layer <i>%s</i> because " % path
|
||||
if response == gtk.RESPONSE_YES:
|
||||
# FIXME: verify we've actually got a layer conf?
|
||||
if path.endswith(".conf"):
|
||||
if path.endswith("layer.conf"):
|
||||
name, layerpath = self.configurator.addLayerConf(path)
|
||||
self.newly_added[name] = layerpath
|
||||
self.layer_store.append([name, layerpath, True])
|
||||
if name and layerpath:
|
||||
self.newly_added[name] = layerpath
|
||||
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 = {}
|
||||
tasks_to_iter = {}
|
||||
|
||||
def __init__ (self):
|
||||
def __init__ (self, sequential=False):
|
||||
gobject.GObject.__init__ (self)
|
||||
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):
|
||||
# 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)]
|
||||
|
||||
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
|
||||
|
||||
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.
|
||||
# otherwise, we'll jump to the top of the master list
|
||||
if parent:
|
||||
if self.sequential or not parent:
|
||||
tree_add = self.model.append
|
||||
else:
|
||||
tree_add = self.model.prepend
|
||||
tree_add(parent,
|
||||
(None,
|
||||
package,
|
||||
task,
|
||||
event.getMessage(),
|
||||
icon,
|
||||
color,
|
||||
0))
|
||||
(None,
|
||||
package,
|
||||
task,
|
||||
event.getMessage(),
|
||||
icon,
|
||||
color,
|
||||
0))
|
||||
|
||||
elif isinstance(event, bb.build.TaskStarted):
|
||||
(package, task) = (event._package, event._task)
|
||||
@@ -130,13 +143,17 @@ class RunningBuild (gobject.GObject):
|
||||
if ((package, None) in self.tasks_to_iter):
|
||||
parent = self.tasks_to_iter[(package, None)]
|
||||
else:
|
||||
parent = self.model.prepend(None, (None,
|
||||
package,
|
||||
None,
|
||||
"Package: %s" % (package),
|
||||
None,
|
||||
Colors.OK,
|
||||
0))
|
||||
if self.sequential:
|
||||
add = self.model.append
|
||||
else:
|
||||
add = self.model.prepend
|
||||
parent = add(None, (None,
|
||||
package,
|
||||
None,
|
||||
"Package: %s" % (package),
|
||||
None,
|
||||
Colors.OK,
|
||||
0))
|
||||
self.tasks_to_iter[(package, None)] = parent
|
||||
|
||||
# Because this parent package now has an active child mark it as
|
||||
@@ -234,6 +251,12 @@ class RunningBuild (gobject.GObject):
|
||||
else:
|
||||
self.emit ("build-succeeded")
|
||||
|
||||
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:
|
||||
pbar.set_title("Loading cache")
|
||||
self.progress_total = event.total
|
||||
@@ -242,7 +265,7 @@ class RunningBuild (gobject.GObject):
|
||||
pbar.update(event.current, self.progress_total)
|
||||
elif isinstance(event, bb.event.CacheLoadCompleted) and pbar:
|
||||
pbar.update(self.progress_total, self.progress_total)
|
||||
|
||||
pbar.hide()
|
||||
elif isinstance(event, bb.event.ParseStarted) and pbar:
|
||||
if event.total == 0:
|
||||
return
|
||||
@@ -272,8 +295,9 @@ class RunningBuildTreeView (gtk.TreeView):
|
||||
__gsignals__ = {
|
||||
"button_press_event" : "override"
|
||||
}
|
||||
def __init__ (self):
|
||||
def __init__ (self, readonly=False):
|
||||
gtk.TreeView.__init__ (self)
|
||||
self.readonly = readonly
|
||||
|
||||
# The icon that indicates whether we're building or failed.
|
||||
renderer = gtk.CellRendererPixbuf ()
|
||||
@@ -285,7 +309,7 @@ class RunningBuildTreeView (gtk.TreeView):
|
||||
self.message_renderer = gtk.CellRendererText ()
|
||||
self.message_column = gtk.TreeViewColumn ("Message", self.message_renderer, text=3)
|
||||
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)
|
||||
|
||||
def do_button_press_event(self, event):
|
||||
@@ -293,31 +317,49 @@ class RunningBuildTreeView (gtk.TreeView):
|
||||
|
||||
if event.button == 3:
|
||||
selection = super(RunningBuildTreeView, self).get_selection()
|
||||
(model, iter) = selection.get_selected()
|
||||
if iter is not None:
|
||||
can_paste = model.get(iter, model.COL_LOG)[0]
|
||||
(model, it) = selection.get_selected()
|
||||
if it is not None:
|
||||
can_paste = model.get(it, model.COL_LOG)[0]
|
||||
if can_paste == 'pastebin':
|
||||
# build a simple menu with a pastebin option
|
||||
menu = gtk.Menu()
|
||||
menuitem = gtk.MenuItem("Copy")
|
||||
menu.append(menuitem)
|
||||
menuitem.connect("activate", self.copy_handler, (model, it))
|
||||
menuitem.show()
|
||||
menuitem = gtk.MenuItem("Send log to pastebin")
|
||||
menu.append(menuitem)
|
||||
menuitem.connect("activate", self.pastebin_handler, (model, iter))
|
||||
menuitem.connect("activate", self.pastebin_handler, (model, it))
|
||||
menuitem.show()
|
||||
menu.show()
|
||||
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):
|
||||
"""
|
||||
Send the log data to pastebin, then add the new paste url to the
|
||||
clipboard.
|
||||
"""
|
||||
(model, iter) = data
|
||||
paste_url = do_pastebin(model.get(iter, model.COL_MESSAGE)[0])
|
||||
(model, it) = data
|
||||
paste_url = do_pastebin(model.get(it, model.COL_MESSAGE)[0])
|
||||
|
||||
# @todo Provide visual feedback to the user that it is done and that
|
||||
# it worked.
|
||||
print paste_url
|
||||
|
||||
clipboard = gtk.clipboard_get()
|
||||
clipboard.set_text(paste_url)
|
||||
clipboard.store()
|
||||
self._add_to_clipboard(paste_url)
|
||||
|
||||
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:
|
||||
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)"
|
||||
|
||||
for line in contents:
|
||||
@@ -60,9 +60,19 @@ require %s
|
||||
|
||||
IMAGE_INSTALL += "%s"
|
||||
"""
|
||||
meta_path = model.find_image_path(self.base_image)
|
||||
|
||||
recipe = template % (meta_path, self.userpkgs)
|
||||
empty_template = """
|
||||
# Recipe generated by the HOB
|
||||
|
||||
inherit core-image
|
||||
|
||||
IMAGE_INSTALL = "%s"
|
||||
"""
|
||||
if self.base_image and not self.base_image == "empty":
|
||||
meta_path = model.find_image_path(self.base_image)
|
||||
recipe = template % (meta_path, self.userpkgs)
|
||||
else:
|
||||
recipe = empty_template % self.allpkgs
|
||||
|
||||
if os.path.exists(writepath):
|
||||
os.rename(writepath, "%s~" % writepath)
|
||||
@@ -79,7 +89,7 @@ class TaskListModel(gtk.ListStore):
|
||||
providing convenience functions to access gtk.TreeModel subclasses which
|
||||
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__ = {
|
||||
"tasklist-populated" : (gobject.SIGNAL_RUN_LAST,
|
||||
@@ -112,8 +122,17 @@ class TaskListModel(gtk.ListStore):
|
||||
gobject.TYPE_STRING,
|
||||
gobject.TYPE_BOOLEAN,
|
||||
gobject.TYPE_BOOLEAN,
|
||||
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):
|
||||
pkg_cnt = self.contents.iter_n_children(None)
|
||||
self.emit("contents-changed", pkg_cnt)
|
||||
@@ -122,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':
|
||||
return False
|
||||
name = model.get_value(it, self.COL_NAME)
|
||||
if name.endswith('-native') or name.endswith('-cross'):
|
||||
if self.non_target_name(name):
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
@@ -185,6 +204,9 @@ class TaskListModel(gtk.ListStore):
|
||||
if model.get_value(it, self.COL_TYPE) != 'package':
|
||||
return False
|
||||
else:
|
||||
name = model.get_value(it, self.COL_NAME)
|
||||
if self.non_target_name(name):
|
||||
return False
|
||||
return True
|
||||
|
||||
"""
|
||||
@@ -213,28 +235,39 @@ class TaskListModel(gtk.ListStore):
|
||||
lic = event_model["pn"][item]["license"]
|
||||
group = event_model["pn"][item]["section"]
|
||||
filename = event_model["pn"][item]["filename"]
|
||||
depends = event_model["depends"].get(item, "")
|
||||
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:
|
||||
if ('task-' in name):
|
||||
atype = 'task'
|
||||
elif name.count('-image-') > 0:
|
||||
elif ('-image-' in name):
|
||||
atype = 'image'
|
||||
|
||||
self.set(self.append(), self.COL_NAME, name, self.COL_DESC, summary,
|
||||
self.COL_LIC, lic, self.COL_GROUP, group,
|
||||
self.COL_DEPS, deps, self.COL_BINB, "",
|
||||
self.COL_TYPE, atype, self.COL_INC, False,
|
||||
self.COL_IMG, False, self.COL_PATH, filename)
|
||||
# Create a combined list of build and runtime dependencies and
|
||||
# then remove any duplicate entries and any entries for -dev
|
||||
# packages
|
||||
depends = event_model["depends"].get(item, [])
|
||||
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")
|
||||
|
||||
@@ -262,13 +295,13 @@ class TaskListModel(gtk.ListStore):
|
||||
it = self.images.iter_next(it)
|
||||
|
||||
# Mark all of the additional packages for inclusion
|
||||
packages = rep.packages.split(" ")
|
||||
packages = rep.userpkgs.split(" ")
|
||||
it = self.get_iter_first()
|
||||
while it:
|
||||
path = self.get_path(it)
|
||||
name = self[path][self.COL_NAME]
|
||||
if name in packages:
|
||||
self.include_item(path)
|
||||
self.include_item(path, binb="User Selected")
|
||||
packages.remove(name)
|
||||
it = self.iter_next(it)
|
||||
|
||||
@@ -293,33 +326,67 @@ class TaskListModel(gtk.ListStore):
|
||||
self[path][self.COL_INC] = False
|
||||
|
||||
"""
|
||||
recursively called to mark the item at opath and any package which
|
||||
depends on it for removal
|
||||
Recursively called to mark the item at opath and any package which
|
||||
depends on it for removal.
|
||||
NOTE: This method dumbly removes user selected packages and since we don't
|
||||
do significant reverse dependency tracking it's easier and simpler to save
|
||||
the items marked as user selected and re-add them once the removal sweep is
|
||||
complete.
|
||||
"""
|
||||
def mark(self, opath):
|
||||
removals = []
|
||||
it = self.get_iter_first()
|
||||
name = self[opath][self.COL_NAME]
|
||||
usersel = {}
|
||||
removed = []
|
||||
|
||||
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)
|
||||
|
||||
# Remove all dependent packages, update binb
|
||||
while it:
|
||||
path = self.get_path(it)
|
||||
inc = self[path][self.COL_INC]
|
||||
deps = self[path][self.COL_DEPS]
|
||||
binb = self[path][self.COL_BINB]
|
||||
|
||||
# FIXME: need to ensure partial name matching doesn't happen
|
||||
if inc and deps.count(name):
|
||||
# found a dependency, remove it
|
||||
self.mark(path)
|
||||
if inc and binb.count(name):
|
||||
bib = self.find_alt_dependency(name)
|
||||
self[path][self.COL_BINB] = bib
|
||||
|
||||
it = self.iter_next(it)
|
||||
|
||||
inc = self[path][self.COL_INC]
|
||||
deps = self[path][self.COL_DEPS]
|
||||
binb = self[path][self.COL_BINB].split(', ')
|
||||
itype = self[path][self.COL_TYPE]
|
||||
itname = self[path][self.COL_NAME]
|
||||
|
||||
# We ignore anything that isn't a package
|
||||
if not itype == "package":
|
||||
continue
|
||||
|
||||
# If the user added this item and it's not the item we're removing
|
||||
# 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
|
||||
# processing is complete
|
||||
if "User Selected" in binb:
|
||||
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
|
||||
if inc and marked_name in deps and itname not in removed:
|
||||
# found a dependency, remove it
|
||||
removed.append(itname)
|
||||
self.mark(path)
|
||||
|
||||
# If the iterated item was brought in by the removed (passed) item
|
||||
# try and find an alternative dependee and update the binb column
|
||||
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
|
||||
for u in usersel:
|
||||
npath = self.find_path_for_item(u)
|
||||
self.include_item(item_path=npath,
|
||||
binb="User Selected",
|
||||
image_contents=usersel[u])
|
||||
"""
|
||||
Remove items from contents if the have an empty COL_BINB (brought in by)
|
||||
caused by all packages they are a dependency of being removed.
|
||||
@@ -350,86 +417,66 @@ class TaskListModel(gtk.ListStore):
|
||||
it = self.contents.iter_next(it)
|
||||
|
||||
"""
|
||||
Find the name of an item in the image contents which depends on the item
|
||||
at contents_path returns either an item name (str) or None
|
||||
NOTE:
|
||||
contents_path must be a path in the self.contents gtk.TreeModel
|
||||
Check whether the item at item_path is included or not
|
||||
"""
|
||||
def find_alt_dependency(self, name):
|
||||
it = self.get_iter_first()
|
||||
while it:
|
||||
# iterate all items in the model
|
||||
path = self.get_path(it)
|
||||
deps = self[path][self.COL_DEPS]
|
||||
itname = self[path][self.COL_NAME]
|
||||
inc = self[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.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
|
||||
def contents_includes_path(self, item_path):
|
||||
return self[item_path][self.COL_INC]
|
||||
|
||||
"""
|
||||
Add this item, and any of its dependencies, to the image contents
|
||||
"""
|
||||
def include_item(self, item_path, binb="", image_contents=False):
|
||||
name = self[item_path][self.COL_NAME]
|
||||
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_BINB] = binb
|
||||
item_name = self[item_path][self.COL_NAME]
|
||||
item_deps = self[item_path][self.COL_DEPS]
|
||||
|
||||
self[item_path][self.COL_INC] = True
|
||||
|
||||
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
|
||||
# base image so tag them as so
|
||||
if image_contents:
|
||||
self[item_path][self.COL_IMG] = True
|
||||
if self[item_path][self.COL_TYPE] == 'image':
|
||||
self.selected_image = name
|
||||
self.selected_image = item_name
|
||||
|
||||
if deps:
|
||||
# add all of the deps and set their binb to this item
|
||||
for dep in deps.split(" "):
|
||||
if item_deps:
|
||||
# Ensure all of the items deps are included and, where appropriate,
|
||||
# add this item to their COL_BINB
|
||||
for dep in item_deps.split(" "):
|
||||
# If the contents model doesn't already contain dep, add it
|
||||
# We only care to show things which will end up in the
|
||||
# resultant image, so filter cross and native recipes
|
||||
dep_included = self.contents_includes_name(dep)
|
||||
path = self.find_path_for_item(dep)
|
||||
if not dep_included and not dep.endswith("-native") and not dep.endswith("-cross"):
|
||||
if path:
|
||||
self.include_item(path, name, image_contents)
|
||||
else:
|
||||
pass
|
||||
# Set brought in by for any no longer orphan packages
|
||||
elif dep_included and path:
|
||||
if not self[path][self.COL_BINB]:
|
||||
self[path][self.COL_BINB] = name
|
||||
dep_path = self.find_path_for_item(dep)
|
||||
if not dep_path:
|
||||
continue
|
||||
dep_included = self.contents_includes_path(dep_path)
|
||||
|
||||
if dep_included and not dep in item_bin:
|
||||
# don't set the COL_BINB to this item if the target is an
|
||||
# item in our own COL_BINB
|
||||
dep_bin = self[dep_path][self.COL_BINB].split(', ')
|
||||
if not item_name in dep_bin:
|
||||
dep_bin.append(item_name)
|
||||
self[dep_path][self.COL_BINB] = ', '.join(dep_bin).lstrip(', ')
|
||||
elif not dep_included:
|
||||
self.include_item(dep_path, binb=item_name, image_contents=image_contents)
|
||||
|
||||
"""
|
||||
Find the model path for the item_name
|
||||
Returns the path in the model or None
|
||||
"""
|
||||
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()
|
||||
path = None
|
||||
while it:
|
||||
path = self.get_path(it)
|
||||
if (self[path][self.COL_NAME] == item_name):
|
||||
return path
|
||||
if (self.get_value(it, self.COL_NAME) == item_name):
|
||||
return self.get_path(it)
|
||||
else:
|
||||
it = self.iter_next(it)
|
||||
return None
|
||||
@@ -469,7 +516,7 @@ class TaskListModel(gtk.ListStore):
|
||||
|
||||
it = self.contents.get_iter_first()
|
||||
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)
|
||||
allpkgs.append(name)
|
||||
if sel:
|
||||
@@ -477,9 +524,37 @@ class TaskListModel(gtk.ListStore):
|
||||
it = self.contents.iter_next(it)
|
||||
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):
|
||||
it = self.get_iter_first()
|
||||
while it:
|
||||
sel = self.get_value(it, self.COL_INC)
|
||||
img = self.get_value(it, self.COL_IMG)
|
||||
if img and not sel:
|
||||
return True
|
||||
it = self.iter_next(it)
|
||||
return False
|
||||
|
||||
def get_build_rep(self):
|
||||
userpkgs, allpkgs = self.get_selected_packages()
|
||||
image = self.selected_image
|
||||
# If base image contents have been removed start from an empty rootfs
|
||||
if not self.selected_image or self.image_contents_removed():
|
||||
image = "empty"
|
||||
else:
|
||||
image = self.selected_image
|
||||
|
||||
return BuildRep(" ".join(userpkgs), " ".join(allpkgs), image)
|
||||
|
||||
@@ -488,10 +563,18 @@ class TaskListModel(gtk.ListStore):
|
||||
it = self.contents.get_iter_first()
|
||||
|
||||
while it:
|
||||
if self.contents.get_value(it, self.COL_DEPS).count(pn) != 0:
|
||||
revdeps.append(self.contents.get_value(it, self.COL_NAME))
|
||||
name = self.contents.get_value(it, self.COL_NAME)
|
||||
itype = self.contents.get_value(it, self.COL_TYPE)
|
||||
deps = self.contents.get_value(it, self.COL_DEPS)
|
||||
|
||||
it = self.contents.iter_next(it)
|
||||
|
||||
if not itype == 'package':
|
||||
continue
|
||||
|
||||
if pn in deps:
|
||||
revdeps.append(name)
|
||||
|
||||
if pn in revdeps:
|
||||
revdeps.remove(pn)
|
||||
return revdeps
|
||||
|
||||
@@ -46,6 +46,7 @@ class MainWindow (gtk.Window):
|
||||
self.files_to_clean = []
|
||||
self.selected_image = None
|
||||
self.selected_packages = None
|
||||
self.stopping = False
|
||||
|
||||
self.model = taskmodel
|
||||
self.model.connect("tasklist-populated", self.update_model)
|
||||
@@ -56,18 +57,18 @@ class MainWindow (gtk.Window):
|
||||
self.layers = layers
|
||||
self.save_path = None
|
||||
self.dirty = False
|
||||
self.build_succeeded = False
|
||||
|
||||
self.connect("delete-event", self.destroy_window)
|
||||
self.set_title("Image Creator")
|
||||
self.set_icon_name("applications-development")
|
||||
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-complete", self.handler.build_complete_cb)
|
||||
self.build.connect("build-succeeded", self.running_build_succeeded_cb)
|
||||
self.build.connect("build-started", self.build_started_cb)
|
||||
|
||||
self.handler.connect("build-complete", self.build_complete_cb)
|
||||
self.build.connect("build-complete", self.build_complete_cb)
|
||||
|
||||
vbox = gtk.VBox(False, 0)
|
||||
vbox.set_border_width(0)
|
||||
@@ -109,16 +110,45 @@ class MainWindow (gtk.Window):
|
||||
rep = self.model.get_build_rep()
|
||||
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()
|
||||
|
||||
def scroll_tv_cb(self, model, path, it, view):
|
||||
view.scroll_to_cell(path)
|
||||
|
||||
def running_build_succeeded_cb(self, running_build):
|
||||
self.build_succeeded = True
|
||||
|
||||
def running_build_failed_cb(self, running_build):
|
||||
# FIXME: handle this
|
||||
print("Build failed")
|
||||
self.build_succeeded = False
|
||||
|
||||
def image_changed_string_cb(self, model, new_image):
|
||||
self.selected_image = new_image
|
||||
# disconnect the image combo's signal handler
|
||||
if self.image_combo_id:
|
||||
self.image_combo.disconnect(self.image_combo_id)
|
||||
self.image_combo_id = None
|
||||
cnt = 0
|
||||
it = self.model.images.get_iter_first()
|
||||
while it:
|
||||
@@ -128,6 +158,9 @@ class MainWindow (gtk.Window):
|
||||
break
|
||||
it = self.model.images.iter_next(it)
|
||||
cnt = cnt + 1
|
||||
# Reconnect the signal handler
|
||||
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):
|
||||
model = self.image_combo.get_model()
|
||||
@@ -142,6 +175,7 @@ class MainWindow (gtk.Window):
|
||||
self.toggle_package(path, model, image=True)
|
||||
if len(userp):
|
||||
self.model.set_selected_packages(userp)
|
||||
self.selected_image = model[path][self.model.COL_NAME]
|
||||
|
||||
def reload_triggered_cb(self, handler, image, packages):
|
||||
if image:
|
||||
@@ -151,9 +185,6 @@ class MainWindow (gtk.Window):
|
||||
|
||||
def data_generated(self, handler):
|
||||
self.generating = False
|
||||
self.image_combo.set_model(self.model.images_model())
|
||||
if not self.image_combo_id:
|
||||
self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb)
|
||||
self.enable_widgets()
|
||||
|
||||
def machine_combo_changed_cb(self, combo, handler):
|
||||
@@ -162,8 +193,8 @@ class MainWindow (gtk.Window):
|
||||
self.curr_mach = mach
|
||||
# Flush this straight to the file as MACHINE is changed
|
||||
# independently of other 'Preferences'
|
||||
self.configurator.setLocalConfVar('MACHINE', mach)
|
||||
self.configurator.writeLocalConf()
|
||||
self.configurator.setConfVar('MACHINE', mach)
|
||||
self.configurator.writeConf()
|
||||
handler.set_machine(mach)
|
||||
handler.reload_data()
|
||||
|
||||
@@ -205,7 +236,6 @@ class MainWindow (gtk.Window):
|
||||
|
||||
def busy_idle_func(self):
|
||||
if self.generating:
|
||||
self.progress.set_text("Loading...")
|
||||
self.progress.pulse()
|
||||
return True
|
||||
else:
|
||||
@@ -218,12 +248,13 @@ class MainWindow (gtk.Window):
|
||||
|
||||
def busy(self, handler):
|
||||
self.generating = True
|
||||
self.progress.set_text("Loading...")
|
||||
self.set_busy_cursor()
|
||||
if self.image_combo_id:
|
||||
self.image_combo.disconnect(self.image_combo_id)
|
||||
self.image_combo_id = None
|
||||
self.progress.pulse()
|
||||
gobject.timeout_add (200, self.busy_idle_func)
|
||||
gobject.timeout_add (100, self.busy_idle_func)
|
||||
self.disable_widgets()
|
||||
|
||||
def enable_widgets(self):
|
||||
@@ -250,6 +281,14 @@ class MainWindow (gtk.Window):
|
||||
pkgsaz_model.set_default_sort_func(None)
|
||||
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
|
||||
# use in the view
|
||||
contents_model = gtk.TreeModelSort(self.model.contents_model())
|
||||
@@ -282,14 +321,17 @@ class MainWindow (gtk.Window):
|
||||
dialog.destroy()
|
||||
if response == gtk.RESPONSE_OK:
|
||||
self.reset_build()
|
||||
self.search.set_text("")
|
||||
return
|
||||
|
||||
def reset_build(self):
|
||||
self.image_combo.disconnect(self.image_combo_id)
|
||||
self.image_combo_id = None
|
||||
if self.image_combo_id:
|
||||
self.image_combo.disconnect(self.image_combo_id)
|
||||
self.image_combo_id = None
|
||||
self.image_combo.set_active(-1)
|
||||
self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb)
|
||||
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):
|
||||
resp = self.layers.run()
|
||||
@@ -298,6 +340,7 @@ class MainWindow (gtk.Window):
|
||||
|
||||
def add_layer_cb(self, action):
|
||||
self.layers.find_layer(self)
|
||||
self.layers.save_current_layers()
|
||||
|
||||
def preferences_cb(self, action):
|
||||
resp = self.prefs.run()
|
||||
@@ -361,26 +404,60 @@ class MainWindow (gtk.Window):
|
||||
self.dirty = False
|
||||
|
||||
def bake_clicked_cb(self, button):
|
||||
build_image = True
|
||||
|
||||
rep = self.model.get_build_rep()
|
||||
if not rep.base_image:
|
||||
lbl = "<b>Build only packages?</b>\n\nAn image has not been selected, so only the selected packages will be built."
|
||||
|
||||
# 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 = lbl + " has not been selected.\n\'Empty image' will build"
|
||||
lbl = lbl + " an image with only the selected packages as its"
|
||||
lbl = lbl + " contents.\n'Packages Only' will build only the"
|
||||
lbl = lbl + " selected packages, no image will be created"
|
||||
dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
|
||||
dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
|
||||
dialog.add_button("Build", gtk.RESPONSE_YES)
|
||||
dialog.add_button("Empty Image", gtk.RESPONSE_OK)
|
||||
dialog.add_button("Packages Only", gtk.RESPONSE_YES)
|
||||
response = dialog.run()
|
||||
dialog.destroy()
|
||||
if response == gtk.RESPONSE_CANCEL:
|
||||
return
|
||||
else:
|
||||
# TODO: show a confirmation dialog ?
|
||||
if not self.save_path:
|
||||
import tempfile, datetime
|
||||
image_name = "hob-%s-variant-%s.bb" % (rep.base_image, datetime.date.today().isoformat())
|
||||
image_dir = os.path.join(tempfile.gettempdir(), 'hob-images')
|
||||
bb.utils.mkdirhier(image_dir)
|
||||
recipepath = os.path.join(image_dir, image_name)
|
||||
else:
|
||||
recipepath = self.save_path
|
||||
elif response == gtk.RESPONSE_YES:
|
||||
build_image = False
|
||||
elif response == gtk.RESPONSE_OK:
|
||||
rep.base_image = "empty"
|
||||
|
||||
# Ensure at least one value is set in IMAGE_FSTYPES.
|
||||
have_selected_fstype = False
|
||||
if (len(self.prefs.selected_image_types) and
|
||||
len(self.prefs.selected_image_types[0])):
|
||||
have_selected_fstype = True
|
||||
|
||||
if build_image and not have_selected_fstype:
|
||||
lbl = "<b>No image output type selected</b>\nThere is no image output"
|
||||
lbl = lbl + " selected for the build. Please set an output image type"
|
||||
lbl = lbl + " in the preferences (Edit -> Preferences)."
|
||||
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("/")
|
||||
|
||||
rep.writeRecipe(recipepath, self.model)
|
||||
# In the case where we saved the file for the purpose of building
|
||||
@@ -389,32 +466,50 @@ class MainWindow (gtk.Window):
|
||||
if not self.save_path:
|
||||
self.files_to_clean.append(recipepath)
|
||||
|
||||
self.handler.queue_image_recipe_path(recipepath)
|
||||
self.handler.build_image(image_name, self.configurator)
|
||||
else:
|
||||
self.handler.build_packages(self.model.get_selected_pn())
|
||||
|
||||
self.handler.build_packages(rep.allpkgs.split(" "))
|
||||
# Disable parts of the menu which shouldn't be used whilst building
|
||||
self.set_menus_sensitive(False)
|
||||
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):
|
||||
self.toggle_createview()
|
||||
|
||||
def toggle_createview(self):
|
||||
self.build.model.clear()
|
||||
self.set_menus_sensitive(True)
|
||||
self.build.reset()
|
||||
self.nb.set_current_page(0)
|
||||
|
||||
def build_complete_cb(self, running_build):
|
||||
# Have the handler process BB events again
|
||||
self.handler.building = None
|
||||
self.stopping = False
|
||||
self.back.connect("clicked", self.back_button_clicked_cb)
|
||||
self.back.set_sensitive(True)
|
||||
self.cancel.set_sensitive(False)
|
||||
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 Log' to view the build log."
|
||||
if self.handler.building == "image":
|
||||
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:
|
||||
deploy = self.handler.get_image_deploy_dir()
|
||||
lbl = lbl + "\n<a href=\"file://%s\" title=\"%s\">Browse folder of built images</a>." % (deploy, deploy)
|
||||
|
||||
dialog = CrumbsDialog(self, lbl)
|
||||
dialog.add_button("View Log", gtk.RESPONSE_CANCEL)
|
||||
dialog.add_button("View Messages", gtk.RESPONSE_CANCEL)
|
||||
dialog.add_button("Edit Image", gtk.RESPONSE_OK)
|
||||
response = dialog.run()
|
||||
dialog.destroy()
|
||||
@@ -455,14 +550,17 @@ class MainWindow (gtk.Window):
|
||||
"""
|
||||
# Whether the item is currently included
|
||||
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
|
||||
# the sweep_up() method finds affected items and marks them
|
||||
# appropriately
|
||||
if inc:
|
||||
self.model.mark(opath)
|
||||
self.model.sweep_up()
|
||||
# If the item isn't included, mark it for inclusion
|
||||
else:
|
||||
# if inc:
|
||||
# self.model.mark(opath)
|
||||
# self.model.sweep_up()
|
||||
# # If the item isn't included, mark it for inclusion
|
||||
# else:
|
||||
if not inc:
|
||||
self.model.include_item(item_path=opath,
|
||||
binb="User Selected",
|
||||
image_contents=image)
|
||||
@@ -474,19 +572,22 @@ class MainWindow (gtk.Window):
|
||||
inc = model[path][self.model.COL_INC]
|
||||
# Warn user before removing included packages
|
||||
if inc:
|
||||
pn = model[path][self.model.COL_NAME]
|
||||
revdeps = self.model.find_reverse_depends(pn)
|
||||
if len(revdeps):
|
||||
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(","))
|
||||
else:
|
||||
lbl = "<b>Remove %s?</b>\n\nThis action cannot be undone." % pn
|
||||
dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
|
||||
dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
|
||||
dialog.add_button("Remove", gtk.RESPONSE_OK)
|
||||
response = dialog.run()
|
||||
dialog.destroy()
|
||||
if response == gtk.RESPONSE_CANCEL:
|
||||
return
|
||||
# FIXME: due to inpredictability of the removal of packages we are
|
||||
# temporarily disabling this feature
|
||||
return
|
||||
# pn = model[path][self.model.COL_NAME]
|
||||
# revdeps = self.model.find_reverse_depends(pn)
|
||||
# if len(revdeps):
|
||||
# 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(","))
|
||||
# else:
|
||||
# lbl = "<b>Remove %s?</b>\n\nThis action cannot be undone." % pn
|
||||
# dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
|
||||
# dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
|
||||
# dialog.add_button("Remove", gtk.RESPONSE_OK)
|
||||
# response = dialog.run()
|
||||
# dialog.destroy()
|
||||
# if response == gtk.RESPONSE_CANCEL:
|
||||
# return
|
||||
|
||||
self.set_busy_cursor()
|
||||
# Convert path to path in original model
|
||||
@@ -576,12 +677,12 @@ class MainWindow (gtk.Window):
|
||||
|
||||
hb = gtk.HBox(False, 0)
|
||||
hb.show()
|
||||
search = gtk.Entry()
|
||||
search.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY, "gtk-clear")
|
||||
search.connect("icon-release", self.search_entry_clear_cb)
|
||||
search.show()
|
||||
self.pkgsaz_tree.set_search_entry(search)
|
||||
hb.pack_end(search, False, False, 0)
|
||||
self.search = gtk.Entry()
|
||||
self.search.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY, "gtk-clear")
|
||||
self.search.connect("icon-release", self.search_entry_clear_cb)
|
||||
self.search.show()
|
||||
self.pkgsaz_tree.set_search_entry(self.search)
|
||||
hb.pack_end(self.search, False, False, 0)
|
||||
label = gtk.Label("Search packages:")
|
||||
label.show()
|
||||
hb.pack_end(label, False, False, 6)
|
||||
@@ -602,7 +703,7 @@ class MainWindow (gtk.Window):
|
||||
self.tasks_tree.set_search_column(0)
|
||||
self.tasks_tree.get_selection().set_mode(gtk.SELECTION_SINGLE)
|
||||
|
||||
col = gtk.TreeViewColumn('Package')
|
||||
col = gtk.TreeViewColumn('Package Collection')
|
||||
col.set_min_width(430)
|
||||
col1 = gtk.TreeViewColumn('Description')
|
||||
col1.set_min_width(430)
|
||||
@@ -650,13 +751,32 @@ class MainWindow (gtk.Window):
|
||||
return vbox
|
||||
|
||||
def cancel_build(self, button):
|
||||
lbl = "<b>Stop build?</b>\n\nAre you sure you want to stop this build?"
|
||||
dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
|
||||
dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
|
||||
dialog.add_button("Stop", gtk.RESPONSE_OK)
|
||||
dialog.add_button("Force Stop", gtk.RESPONSE_YES)
|
||||
if self.stopping:
|
||||
lbl = "<b>Force Stop build?</b>\nYou've already selected Stop once,"
|
||||
lbl = lbl + " would you like to 'Force Stop' the build?\n\n"
|
||||
lbl = lbl + "This will stop the build as quickly as possible but may"
|
||||
lbl = lbl + " well leave your build directory in an unusable state"
|
||||
lbl = lbl + " that requires manual steps to fix.\n"
|
||||
dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
|
||||
dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
|
||||
dialog.add_button("Force Stop", gtk.RESPONSE_YES)
|
||||
else:
|
||||
lbl = "<b>Stop build?</b>\n\nAre you sure you want to stop this"
|
||||
lbl = lbl + " build?\n\n'Force Stop' will stop the build as quickly as"
|
||||
lbl = lbl + " possible but may well leave your build directory in an"
|
||||
lbl = lbl + " unusable state that requires manual steps to fix.\n\n"
|
||||
lbl = lbl + "'Stop' will stop the build as soon as all in"
|
||||
lbl = lbl + " progress build tasks are finished. However if a"
|
||||
lbl = lbl + " lengthy compilation phase is in progress this may take"
|
||||
lbl = lbl + " some time."
|
||||
dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
|
||||
dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
|
||||
dialog.add_button("Stop", gtk.RESPONSE_OK)
|
||||
dialog.add_button("Force Stop", gtk.RESPONSE_YES)
|
||||
response = dialog.run()
|
||||
dialog.destroy()
|
||||
if response != gtk.RESPONSE_CANCEL:
|
||||
self.stopping = True
|
||||
if response == gtk.RESPONSE_OK:
|
||||
self.handler.cancel_build()
|
||||
elif response == gtk.RESPONSE_YES:
|
||||
@@ -666,7 +786,7 @@ class MainWindow (gtk.Window):
|
||||
vbox = gtk.VBox(False, 12)
|
||||
vbox.set_border_width(6)
|
||||
vbox.show()
|
||||
build_tv = RunningBuildTreeView()
|
||||
build_tv = RunningBuildTreeView(readonly=True)
|
||||
build_tv.show()
|
||||
build_tv.set_model(self.build.model)
|
||||
self.build.model.connect("row-inserted", self.scroll_tv_cb, build_tv)
|
||||
@@ -717,18 +837,27 @@ class MainWindow (gtk.Window):
|
||||
|
||||
actions = gtk.ActionGroup('ImageCreator')
|
||||
self.actions = actions
|
||||
actions.add_actions([('Quit', gtk.STOCK_QUIT, None, None,
|
||||
None, self.menu_quit,),
|
||||
actions.add_actions([('Quit', gtk.STOCK_QUIT, None, None, None, self.menu_quit,),
|
||||
('File', None, '_File'),
|
||||
('Save', gtk.STOCK_SAVE, None, None, None, self.save_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'),
|
||||
('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)])
|
||||
|
||||
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.add_ui_from_string(menu_items)
|
||||
|
||||
@@ -736,6 +865,14 @@ class MainWindow (gtk.Window):
|
||||
menubar.show_all()
|
||||
|
||||
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):
|
||||
vbox = gtk.VBox(False, 12)
|
||||
@@ -779,11 +916,19 @@ class MainWindow (gtk.Window):
|
||||
ins.set_current_page(0)
|
||||
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)
|
||||
label.set_property("xalign", 0.00)
|
||||
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.show()
|
||||
vbox.pack_start(con, expand=True, fill=True)
|
||||
@@ -805,7 +950,7 @@ class MainWindow (gtk.Window):
|
||||
return vbox
|
||||
|
||||
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)
|
||||
|
||||
def contents(self):
|
||||
@@ -847,11 +992,29 @@ class MainWindow (gtk.Window):
|
||||
return scroll
|
||||
|
||||
def main (server, eventHandler):
|
||||
import multiprocessing
|
||||
cpu_cnt = multiprocessing.cpu_count()
|
||||
|
||||
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()
|
||||
configurator = Configurator()
|
||||
handler = HobHandler(taskmodel, server)
|
||||
@@ -862,23 +1025,24 @@ def main (server, eventHandler):
|
||||
if not sdk_mach:
|
||||
sdk_mach = server.runCommand(["getVariable", "SDK_ARCH"])
|
||||
distro = server.runCommand(["getVariable", "DISTRO"])
|
||||
if not distro:
|
||||
distro = "defaultsetup"
|
||||
bbthread = server.runCommand(["getVariable", "BB_NUMBER_THREADS"])
|
||||
if not bbthread:
|
||||
bbthread = cpu_cnt
|
||||
handler.set_bbthreads(cpu_cnt)
|
||||
bbthread = 1
|
||||
else:
|
||||
bbthread = int(bbthread)
|
||||
pmake = server.runCommand(["getVariable", "PARALLEL_MAKE"])
|
||||
if not pmake:
|
||||
pmake = cpu_cnt
|
||||
handler.set_pmake(cpu_cnt)
|
||||
pmake = 1
|
||||
else:
|
||||
# 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
|
||||
# up to and including the space
|
||||
pmake = int(pmake[pmake.find(" ")+1:])
|
||||
pmake = int(pmake.lstrip("-j "))
|
||||
|
||||
image_types = server.runCommand(["getVariable", "IMAGE_TYPES"])
|
||||
selected_image_types = server.runCommand(["getVariable", "IMAGE_FSTYPES"])
|
||||
all_image_types = server.runCommand(["getVariable", "IMAGE_TYPES"])
|
||||
|
||||
pclasses = server.runCommand(["getVariable", "PACKAGE_CLASSES"]).split(" ")
|
||||
# NOTE: we're only supporting one value for PACKAGE_CLASSES being set
|
||||
@@ -886,8 +1050,19 @@ def main (server, eventHandler):
|
||||
# PACKAGE_CLASSES and that's the package manager used for the rootfs
|
||||
pkg, sep, pclass = pclasses[0].rpartition("_")
|
||||
|
||||
prefs = HobPrefs(configurator, handler, sdk_mach, distro, pclass, cpu_cnt,
|
||||
pmake, bbthread, image_types)
|
||||
incompatible = server.runCommand(["getVariable", "INCOMPATIBLE_LICENSE"])
|
||||
gplv3disabled = False
|
||||
if incompatible and incompatible.lower().find("gplv3") != -1:
|
||||
gplv3disabled = True
|
||||
|
||||
build_toolchain = bool(server.runCommand(["getVariable", "HOB_BUILD_TOOLCHAIN"]))
|
||||
handler.toggle_toolchain(build_toolchain)
|
||||
build_headers = bool(server.runCommand(["getVariable", "HOB_BUILD_TOOLCHAIN_HEADERS"]))
|
||||
handler.toggle_toolchain_headers(build_headers)
|
||||
|
||||
prefs = HobPrefs(configurator, handler, sdk_mach, distro, pclass,
|
||||
pmake, bbthread, selected_image_types, all_image_types,
|
||||
gplv3disabled, build_toolchain, build_headers)
|
||||
layers = LayerEditor(configurator, None)
|
||||
window = MainWindow(taskmodel, handler, configurator, prefs, layers, mach)
|
||||
prefs.set_parent_window(window)
|
||||
@@ -903,10 +1078,11 @@ def main (server, eventHandler):
|
||||
configurator.connect("layers-loaded", layers.load_current_layers)
|
||||
configurator.connect("layers-changed", handler.reload_data)
|
||||
handler.connect("config-found", configurator.configFound)
|
||||
handler.connect("fatal-error", window.fatal_error_cb)
|
||||
|
||||
try:
|
||||
# kick the while thing off
|
||||
handler.current_command = "findConfigFilePathLocal"
|
||||
handler.current_command = handler.CFG_PATH_LOCAL
|
||||
server.runCommand(["findConfigFilePath", "local.conf"])
|
||||
except xmlrpclib.Fault:
|
||||
print("XMLRPC Fault getting commandline:\n %s" % x)
|
||||
|
||||
@@ -74,6 +74,7 @@ def main(server, eventHandler):
|
||||
|
||||
console = logging.StreamHandler(sys.stdout)
|
||||
format = bb.msg.BBLogFormatter("%(levelname)s: %(message)s")
|
||||
bb.msg.addDefaultlogFilter(console)
|
||||
console.setFormatter(format)
|
||||
logger.addHandler(console)
|
||||
|
||||
@@ -120,8 +121,8 @@ def main(server, eventHandler):
|
||||
# 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
|
||||
# include verbose/debug messages
|
||||
if logger.getEffectiveLevel() > format.VERBOSE:
|
||||
if event.taskpid != 0 and event.levelno <= format.NOTE:
|
||||
#if logger.getEffectiveLevel() > format.VERBOSE:
|
||||
if event.taskpid != 0 and event.levelno <= format.NOTE:
|
||||
continue
|
||||
logger.handle(event)
|
||||
continue
|
||||
@@ -188,7 +189,8 @@ def main(server, eventHandler):
|
||||
logger.error("Command execution failed: %s", event.error)
|
||||
break
|
||||
if isinstance(event, bb.command.CommandExit):
|
||||
return_value = event.exitcode
|
||||
if not return_value:
|
||||
return_value = event.exitcode
|
||||
continue
|
||||
if isinstance(event, bb.cooker.CookerExit):
|
||||
break
|
||||
@@ -199,6 +201,7 @@ def main(server, eventHandler):
|
||||
logger.info("consider defining a PREFERRED_PROVIDER entry to match %s", event._item)
|
||||
continue
|
||||
if isinstance(event, bb.event.NoProvider):
|
||||
return_value = 1
|
||||
if event._runtime:
|
||||
r = "R"
|
||||
else:
|
||||
@@ -208,6 +211,9 @@ def main(server, eventHandler):
|
||||
logger.error("Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)", r, event._item, ", ".join(event._dependees), r)
|
||||
else:
|
||||
logger.error("Nothing %sPROVIDES '%s'", r, event._item)
|
||||
if event._reasons:
|
||||
for reason in event._reasons:
|
||||
logger.error("%s", reason)
|
||||
continue
|
||||
|
||||
if isinstance(event, bb.runqueue.runQueueTaskStarted):
|
||||
|
||||
@@ -283,7 +283,7 @@ class NCursesUI:
|
||||
# if isinstance(event, bb.build.TaskFailed):
|
||||
# if event.logfile:
|
||||
# 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)
|
||||
# if number_of_lines:
|
||||
# os.system('tail -n%s %s' % (number_of_lines, logfile))
|
||||
@@ -297,7 +297,7 @@ class NCursesUI:
|
||||
# print '| %s' % l
|
||||
# f.close()
|
||||
# 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):
|
||||
# stop so the user can see the result of the build, but
|
||||
|
||||
@@ -565,18 +565,27 @@ def create_interactive_env(d):
|
||||
for k in preserved_envvars_exported_interactive():
|
||||
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():
|
||||
"""
|
||||
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_ENV_WHITELIST' in os.environ:
|
||||
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())
|
||||
good_vars = approved_variables()
|
||||
filter_environment(good_vars)
|
||||
|
||||
def empty_environment():
|
||||
@@ -830,21 +839,6 @@ def which(path, item, direction = 0):
|
||||
|
||||
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):
|
||||
if not string:
|
||||
return default
|
||||
@@ -856,3 +850,16 @@ def to_boolean(string, default=None):
|
||||
return False
|
||||
else:
|
||||
raise ValueError("Invalid value for to_boolean: %s" % string)
|
||||
|
||||
def contains(variable, checkvalues, truevalue, falsevalue, d):
|
||||
val = d.getVar(variable, True)
|
||||
if not val:
|
||||
return falsevalue
|
||||
val = set(val.split())
|
||||
if isinstance(checkvalues, basestring):
|
||||
checkvalues = set(checkvalues.split())
|
||||
else:
|
||||
checkvalues = set(checkvalues)
|
||||
if checkvalues.issubset(val):
|
||||
return truevalue
|
||||
return falsevalue
|
||||
|
||||
@@ -17,17 +17,20 @@
|
||||
# The command-line argument DOC represents the folder name in which a particular
|
||||
# document is stored. The command-line argument VER represents the distro
|
||||
# version of the Yocto Release for which the manuals are being generated.
|
||||
# You must invoke the Makefile with the DOC and VER arguments.
|
||||
# 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.
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# make DOC=bsp-guide VER=1.1
|
||||
# make DOC=yocto-project-qs VER=1.1
|
||||
# make pdf DOC=yocto-project-qs VER=1.1
|
||||
# make DOC=bsp-guide
|
||||
# make DOC=yocto-project-qs
|
||||
# make pdf DOC=poky-ref-manual
|
||||
#
|
||||
# The first example generates the HTML and PDF versions of the BSP Guide for
|
||||
# the Yocto Project 1.1 Release. The second example generates the HTML version
|
||||
# of the Quick Start. The third example generates an error because you cannot
|
||||
# generate a PDF version of the Quick Start.
|
||||
# The first example generates the HTML and PDF versions of the BSP Guide.
|
||||
# The second example generates the HTML version only of the Quick Start. Note that
|
||||
# the Quick Start only has an HTML version available. The third example generates
|
||||
# both the PDF and HTML versions of the Yocto Project Reference Manual.
|
||||
#
|
||||
# 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
|
||||
@@ -37,6 +40,10 @@
|
||||
# make publish DOC=bsp-guide VER=1.1
|
||||
# make publish DOC=adt-manual VER=1.1
|
||||
#
|
||||
# The first example publishes the 1.1 version of both the PDF and HTML versions of
|
||||
# the BSP Guide. The second example publishes the 1.1 version of both the PDF and
|
||||
# HTML versions of the ADT Manual.
|
||||
#
|
||||
|
||||
ifeq ($(DOC),bsp-guide)
|
||||
XSLTOPTS = --stringparam html.stylesheet style.css \
|
||||
@@ -52,6 +59,23 @@ STYLESHEET = $(DOC)/*.css
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(DOC),dev-manual)
|
||||
XSLTOPTS = --stringparam html.stylesheet style.css \
|
||||
--stringparam chapter.autolabel 1 \
|
||||
--stringparam section.autolabel 1 \
|
||||
--stringparam section.label.includes.component.label 1 \
|
||||
--xinclude
|
||||
ALLPREQ = html pdf tarball
|
||||
TARFILES = style.css dev-manual.html dev-manual.pdf 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
|
||||
MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
|
||||
FIGURES = figures
|
||||
STYLESHEET = $(DOC)/*.css
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(DOC),yocto-project-qs)
|
||||
XSLTOPTS = --stringparam html.stylesheet style.css \
|
||||
--xinclude
|
||||
@@ -70,7 +94,7 @@ XSLTOPTS = --stringparam html.stylesheet style.css \
|
||||
--stringparam section.label.includes.component.label 1 \
|
||||
--xinclude
|
||||
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
|
||||
FIGURES = figures
|
||||
STYLESHEET = $(DOC)/*.css
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
|
||||
<chapter id='using-the-command-line'>
|
||||
<title>Using the Command Line</title>
|
||||
|
||||
<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>,
|
||||
which is outside of the Yocto Project build tree
|
||||
(see <xref linkend='using-an-existing-toolchain-tarball'>
|
||||
“Using an Existing Toolchain Tarball”)</xref>.
|
||||
(see the section "<link linkend='using-an-existing-toolchain-tarball'>Using an Existing
|
||||
Toolchain Tarball)</link>".
|
||||
And, that sourcing your architecture-specific environment setup script
|
||||
initializes a suitable cross-toolchain development environment.
|
||||
This setup occurs by adding the compiler, QEMU scripts, QEMU binary,
|
||||
@@ -20,13 +21,14 @@
|
||||
test results for tests that need target hardware on which to run.
|
||||
These conditions allow you to easily use the toolchain outside of the
|
||||
Yocto Project build environment on both autotools-based projects and
|
||||
makefile-based projects.
|
||||
Makefile-based projects.
|
||||
</para>
|
||||
|
||||
<section id='autotools-based-projects'>
|
||||
<title>Autotools-Based Projects</title>
|
||||
|
||||
<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>.
|
||||
The host option you use is derived from the name of the environment setup
|
||||
script in <filename>/opt/poky</filename> resulting from unpacking the
|
||||
@@ -37,7 +39,8 @@
|
||||
<filename>environment-setup-armv5te-poky-linux-gnueabi</filename>.
|
||||
Thus, the following command works:
|
||||
<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>
|
||||
</para>
|
||||
<para>
|
||||
@@ -48,15 +51,16 @@
|
||||
|
||||
<section id='makefile-based-projects'>
|
||||
<title>Makefile-Based Projects</title>
|
||||
|
||||
<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.
|
||||
You can do this as follows:
|
||||
<literallayout class='monospaced'>
|
||||
CC=arm-poky-linux-gnueabi-gcc
|
||||
LD=arm-poky-linux-gnueabi-ld
|
||||
CFLAGS=”${CFLAGS} ‐‐sysroot=<sysroot-dir>”
|
||||
CXXFLAGS=”${CXXFLAGS} ‐‐sysroot=<sysroot-dir>”
|
||||
CFLAGS=”${CFLAGS} --sysroot=<sysroot-dir>”
|
||||
CXXFLAGS=”${CXXFLAGS} --sysroot=<sysroot-dir>”
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -3,17 +3,18 @@
|
||||
|
||||
<chapter id='adt-eclipse'>
|
||||
<title>Working Within Eclipse</title>
|
||||
|
||||
<para>
|
||||
The Eclipse IDE is a popular development environment and it fully supports
|
||||
development using Yocto Project.
|
||||
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
|
||||
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.
|
||||
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
|
||||
latency data, and collection of performance data.
|
||||
</para>
|
||||
@@ -24,221 +25,285 @@
|
||||
|
||||
<section id='setting-up-the-eclipse-ide'>
|
||||
<title>Setting Up the Eclipse IDE</title>
|
||||
|
||||
<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>
|
||||
<listitem><para>Be sure the optimal version of Eclipse IDE
|
||||
is installed.</para></listitem>
|
||||
<listitem><para>Install Eclipse plug-in requirements prior to installing
|
||||
the Eclipse Yocto Plug-in.</para></listitem>
|
||||
<listitem><para>Be sure the optimal version of the Eclipse IDE
|
||||
is installed.</para></listitem>
|
||||
<listitem><para>Configure the Eclipse IDE.</para></listitem>
|
||||
<listitem><para>Install the Eclipse Yocto Plug-in.</para></listitem>
|
||||
<listitem><para>Configure the Eclipse Yocto Plug-in.</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
|
||||
<section id='installing-eclipse-ide'>
|
||||
<title>Installing Eclipse IDE</title>
|
||||
<title>Installing the Eclipse IDE</title>
|
||||
|
||||
<para>
|
||||
It is recommended that you have the Indigo 3.7 version of the
|
||||
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>.
|
||||
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
|
||||
Tools (JDT), and the Plug-in Development Environment.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Once you have downloaded the tarball, extract it into a clean
|
||||
directory and complete the installation.
|
||||
directory.
|
||||
For example, the following command unpacks and installs the Eclipse IDE
|
||||
into a clean directory named <filename>eclipse</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
$ tar -xzvf ~/Downloads/Eclipse-SDK-3.7-linux-gtk-x86_64.tar.gz
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
One issue exists that you need to be aware of regarding the Java
|
||||
Virtual machine’s garbage collection (GC) process.
|
||||
The GC process does not clean up the permanent generation
|
||||
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
|
||||
out-of-memory error such as the following:
|
||||
<literallayout class='monospaced'>
|
||||
Java.lang.OutOfMemoryError: PermGen space
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This error causes the application to hang.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To fix this issue you can use the ‐‐vmargs option when you start
|
||||
Eclipse to increase the size of the permanent generation space:
|
||||
To fix this issue, you can use the <filename>--vmargs</filename>
|
||||
option when you start Eclipse to increase the size of the permanent generation space:
|
||||
<literallayout class='monospaced'>
|
||||
eclipse ‐‐vmargs ‐‐XX:PermSize=256M
|
||||
eclipse --vmargs --XX:PermSize=256M
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='installing-required-plug-ins-and-the-eclipse-yocto-plug-in'>
|
||||
<title>Installing Required Plug-ins and the Eclipse Yocto Plug-in</title>
|
||||
<section id='configuring-the-eclipse-ide'>
|
||||
<title>Configuring the Eclipse IDE</title>
|
||||
|
||||
<para>
|
||||
Before installing the Yocto Plug-in you need to be sure that the
|
||||
CDT 8.0, RSE 3.2, and Autotools plug-ins are all installed in the
|
||||
following order.
|
||||
After installing these three plug-ins, you can install the
|
||||
Eclipse Yocto Plug-in.
|
||||
Use the following URLs for the plug-ins:
|
||||
Before installing and configuring the Eclipse Yocto Plug-in, you need to configure
|
||||
the Eclipse IDE.
|
||||
Follow these general steps to configure Eclipse:
|
||||
<orderedlist>
|
||||
<listitem><para><emphasis>CDT 8.0</emphasis> –
|
||||
<ulink url='http://download.eclipse.org/tools/cdt/releases/indigo/'></ulink>:
|
||||
For CDT main features select the checkbox so you get all items.
|
||||
For CDT optional features expand the selections and check
|
||||
“C/C++ Remote Launch”.</para></listitem>
|
||||
<listitem><para><emphasis>RSE 3.2</emphasis> –
|
||||
<ulink url='http://download.eclipse.org/tm/updates/3.2'></ulink>:
|
||||
Check the box next to “TM and RSE Main Features” so you select all
|
||||
those items.
|
||||
Note that all items in the main features depend on 3.2.1 version.
|
||||
Expand the items under “TM and RSE Uncategorized 3.2.1” and
|
||||
select the following: “Remote System Explorer End-User Runtime”,
|
||||
“Remote System Explorer Extended SDK”, “Remote System Explorer User Actions”,
|
||||
“RSE Core”, “RSE Terminals UI”, and “Target Management Terminal”.</para></listitem>
|
||||
<listitem><para><emphasis>Autotools</emphasis> –
|
||||
<ulink url='http://download.eclipse.org/technology/linuxtools/update/'></ulink>:
|
||||
Expand the items under “Linux Tools” and select “Autotools support for
|
||||
CDT (Incubation)”.</para></listitem>
|
||||
<listitem><para><emphasis>Yocto Plug-in</emphasis> –
|
||||
<ulink url='http://www.yoctoproject.org/downloads/eclipse-plugin/1.0'></ulink>:
|
||||
Check the box next to “Development tools & SDKs for Yocto Linux”
|
||||
to select all the items.</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
<para>
|
||||
Follow these general steps to install a plug-in:
|
||||
<orderedlist>
|
||||
<listitem><para>From within the Eclipse IDE select the
|
||||
“Install New Software” item from the “Help” menu.</para></listitem>
|
||||
<listitem><para>Click “Add…” in the “Work with:” area.</para></listitem>
|
||||
<listitem><para>Enter the URL for the repository and leave the “Name”
|
||||
field blank.</para></listitem>
|
||||
<listitem><para>Check the boxes next to the software you need to
|
||||
install and then complete the installation.
|
||||
For information on the specific software packages you need to include,
|
||||
see the previous list.</para></listitem>
|
||||
<listitem><para>Start the Eclipse IDE.</para></listitem>
|
||||
<listitem><para>Select "Install New Software" from the "Help" pull-down menu.
|
||||
</para></listitem>
|
||||
<listitem><para>Select <filename>Indego - http://download.eclipse.org/releases/indego</filename>
|
||||
from the "Work with:" pull-down menu.</para></listitem>
|
||||
<listitem><para>Expand the box next to <filename>Programming Languages</filename>
|
||||
and select the <filename>Autotools Support for CDT (incubation)</filename>
|
||||
and <filename>C/C++ Development Tools</filename> boxes.</para></listitem>
|
||||
<listitem><para>Complete the installation and restart the Eclipse IDE.</para></listitem>
|
||||
<listitem><para>Select "Install New Software" from the "Help" pull-down menu.</para></listitem>
|
||||
<listitem><para>After the Eclipse IDE restarts, click the
|
||||
"Available Software Sites" link.</para></listitem>
|
||||
<listitem><para>Check the box next to
|
||||
<filename>http://download.eclipse.org/tm/updates/3.3</filename>
|
||||
and click "OK".</para></listitem>
|
||||
<listitem><para>Select <filename>http://download.eclipse.org/tm/updates/3.3</filename>
|
||||
from the "Work with:" pull-down menu.</para></listitem>
|
||||
<listitem><para>Check the box next to <filename>TM and RSE Main Features</filename>.
|
||||
</para></listitem>
|
||||
<listitem><para>Expand the box next to <filename>TM and RSE Optional Add-ons</filename>
|
||||
and select every item except <filename>RSE Unit Tests</filename> and
|
||||
<filename>RSE WinCE Services (incubation)</filename>.</para></listitem>
|
||||
<listitem><para>Complete the installation and restart the Eclipse IDE.</para></listitem>
|
||||
<listitem><para>After the Eclipse IDE restarts, click the
|
||||
"Available Software Sites" link.</para></listitem>
|
||||
<listitem><para>Check the box next to
|
||||
<filename>http://download.eclipse.org/tools/cdt/releases/indego</filename>
|
||||
and click "OK".</para></listitem>
|
||||
<listitem><para>Select <filename>http://download.eclipse.org/tools/cdt/releases/indego</filename>
|
||||
from the "Work with:" pull-down menu.</para></listitem>
|
||||
<listitem><para>Check the box next to <filename>CDT Main Features</filename>.
|
||||
</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>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='configuring-the-plug-in'>
|
||||
<title>Configuring the Plug-in</title>
|
||||
<section id='installing-the-eclipse-yocto-plug-in'>
|
||||
<title>Installing the Eclipse Yocto Plug-in</title>
|
||||
|
||||
<para>
|
||||
Configuring the Eclipse Yocto Plug-in involves choosing the Cross
|
||||
Compiler Options, selecting the Target Architecture, and choosing
|
||||
the Target Options.
|
||||
These settings are the default settings for all projects.
|
||||
You do have opportunities to change them later if you choose to when
|
||||
you configure the project.
|
||||
See “Configuring the Cross Toolchain” section later in the manual.
|
||||
To install the Eclipse Yocto Plug-in, follow these special steps.
|
||||
The steps are WIP and are not final.
|
||||
Once they are final they will be replaced with the actual steps:
|
||||
<orderedlist>
|
||||
<listitem><para>Open a shell and create a Git repository with:
|
||||
<literallayout class='monospaced'>
|
||||
$ git clone git://git.yoctoproject.org/yocto-eclipse yocto-eclipse
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para>In Eclipse, select "Import" from the "File" menu.</para></listitem>
|
||||
<listitem><para>Expand the "General" box and pick "existing projects into workspace".
|
||||
</para></listitem>
|
||||
<listitem><para>Select the root directory and browse to "~/yocto-eclipse/plugins".
|
||||
</para></listitem>
|
||||
<listitem><para>There will be three things there.
|
||||
Select each one and install one at a time.
|
||||
Do all three.</para></listitem>
|
||||
<listitem><para>Restart everything.</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
At this point I should be able to invoke Eclipse from the shell using the following:
|
||||
<literallayout class='monospaced'>
|
||||
$ cd ~/eclipse
|
||||
$ ./eclipse -vmargs -XX:PermSize=256M
|
||||
</literallayout>
|
||||
What is shown is the default projects in the left pane.
|
||||
I should be able to right-click on one of these and run as an Eclipse application to
|
||||
bring up the Eclipse instance again with the Eclipse Yocto Plug-in working.
|
||||
</para>
|
||||
</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>
|
||||
To start, you need to do the following from within the Eclipse IDE:
|
||||
<itemizedlist>
|
||||
<listitem><para>Choose Windows -> Preferences to display
|
||||
the Preferences Dialog</para></listitem>
|
||||
<listitem><para>Click “Yocto SDK”</para></listitem>
|
||||
<listitem><para>Choose <filename>Windows -> Preferences</filename> to display
|
||||
the Preferences Dialog</para></listitem>
|
||||
<listitem><para>Click <filename>Yocto ADT</filename></para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<section id='configuring-the-cross-compiler-options'>
|
||||
<title>Configuring the Cross-Compiler Options</title>
|
||||
|
||||
<para>
|
||||
Choose between ‘Stand-alone Prebuilt Toolchain’ and ‘Build System Derived Toolchain’ for Cross
|
||||
Compiler Options.
|
||||
To configure the Cross Compiler Options, you must select the type of toolchain,
|
||||
point to the toolchain, specify the sysroot location, and select the target architecture.
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Stand-alone Prebuilt Toolchain</emphasis> – Select this mode
|
||||
when you are not concerned with building a target image or you do not have
|
||||
a Yocto Project build tree on your development system.
|
||||
For example, suppose you are an application developer and do not
|
||||
need to build a target image.
|
||||
Instead, you just want to use an architecture-specific toolchain on an
|
||||
existing kernel and target root filesystem.
|
||||
When you use Stand-alone Prebuilt Toolchain you are using the toolchain installed
|
||||
in the <filename>/opt/poky</filename> directory.</para></listitem>
|
||||
<listitem><para><emphasis>Build System Derived Toolchain</emphasis> – Select this mode
|
||||
if you are building images for target hardware or your
|
||||
development environment already has a Yocto Project build tree.
|
||||
In this case you likely already have a Yocto Project build tree installed on
|
||||
your system or you (or someone else) will be building one.
|
||||
When you select Build System Derived Toolchain you are using the toolchain bundled
|
||||
inside the Yocto Project build tree.
|
||||
If you use this mode you must also supply the Yocto Project build directory
|
||||
in the Preferences Dialog.</para></listitem>
|
||||
<listitem><para><emphasis>Selecting the Toolchain Type:</emphasis>
|
||||
Choose between <filename>Standalone pre-built toolchain</filename>
|
||||
and <filename>Build system derived toolchain</filename> for Cross
|
||||
Compiler Options.
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>
|
||||
<filename>Standalone Pre-built Toolchain:</filename></emphasis>
|
||||
Select this mode when you are using a stand-alone cross-toolchain.
|
||||
For example, suppose you are an application developer and do not
|
||||
need to build a target image.
|
||||
Instead, you just want to use an architecture-specific toolchain on an
|
||||
existing kernel and target root filesystem.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<filename>Build System Derived Toolchain:</filename></emphasis>
|
||||
Select this mode if the cross-toolchain has been installed and built
|
||||
as part of the Yocto Project build tree.
|
||||
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/$SDKVERSION</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/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/yocto-project-qs/yocto-project-qs.html'>
|
||||
The Yocto Project Quick Start</ulink> for more information.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='configuring-the-sysroot'>
|
||||
<title>Configuring the Sysroot</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='configuring-the-target-options'>
|
||||
<title>Configuring the Target Options</title>
|
||||
|
||||
<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>
|
||||
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>
|
||||
<listitem><para><emphasis>External HW</emphasis> – Select this option
|
||||
if you will be using actual hardware.</para></listitem>
|
||||
<listitem><para><emphasis>QEMU</emphasis> – Select this option if
|
||||
you will be using the QEMU emulator.
|
||||
If you are using the emulator you also need to locate the Kernel
|
||||
and specify any custom options.</para>
|
||||
<para>If you select Build System Derived Toolchain the target kernel you built
|
||||
will be located in the
|
||||
Yocto Project build tree in <filename>tmp/deploy/images</filename> directory.
|
||||
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>
|
||||
<para>Most custom options are for advanced QEMU users to further
|
||||
customize their QEMU instance.
|
||||
These options are specified between paired angled brackets.
|
||||
Some options must be specified outside the brackets.
|
||||
In particular, the options <filename>serial</filename>,
|
||||
<filename>nographic</filename>, and <filename>kvm</filename> must all
|
||||
be outside the brackets.
|
||||
Use the <filename>man qemu</filename> command to get help on all the options
|
||||
and their use.
|
||||
The following is an example:
|
||||
<listitem><para><emphasis><filename>QEMU:</filename></emphasis> Select this option if
|
||||
you will be using the QEMU emulator.
|
||||
If you are using the emulator, you also need to locate the kernel
|
||||
and specify any custom options.</para>
|
||||
<para>If you selected <filename>Build system derived toolchain</filename>,
|
||||
the target kernel you built will be located in the
|
||||
Yocto Project build tree in <filename>tmp/deploy/images</filename> directory.
|
||||
If you selected <filename>Standalone pre-built toolchain</filename>, the
|
||||
pre-built image you downloaded is located
|
||||
in the directory you specified when you downloaded the image.</para>
|
||||
<para>Most custom options are for advanced QEMU users to further
|
||||
customize their QEMU instance.
|
||||
These options are specified between paired angled brackets.
|
||||
Some options must be specified outside the brackets.
|
||||
In particular, the options <filename>serial</filename>,
|
||||
<filename>nographic</filename>, and <filename>kvm</filename> must all
|
||||
be outside the brackets.
|
||||
Use the <filename>man qemu</filename> command to get help on all the options
|
||||
and their use.
|
||||
The following is an example:
|
||||
<literallayout class='monospaced'>
|
||||
serial ‘<-m 256 -full-screen>’
|
||||
</literallayout>
|
||||
</para>
|
||||
<para>
|
||||
Regardless of the mode, Sysroot is already defined in the “Sysroot”
|
||||
field.</para></listitem>
|
||||
</literallayout></para>
|
||||
<para>
|
||||
Regardless of the mode, Sysroot is already defined as part of the
|
||||
Cross Compiler Options configuration in the
|
||||
<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>
|
||||
</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>
|
||||
</section>
|
||||
</section>
|
||||
@@ -246,127 +311,136 @@
|
||||
|
||||
<section id='creating-the-project'>
|
||||
<title>Creating the Project</title>
|
||||
|
||||
<para>
|
||||
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.
|
||||
For information on creating projects in a terminal window see
|
||||
<xref linkend='using-the-command-line'> “Using the Command Line”</xref>
|
||||
section.
|
||||
For information on creating Makefile-based projects in a terminal window, see the section
|
||||
"<link linkend='using-the-command-line'>Using the Command Line</link>".
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To create a project based on a Yocto template and then display the source code,
|
||||
follow these steps:
|
||||
<orderedlist>
|
||||
<listitem><para>Select File -> New -> Project.</para></listitem>
|
||||
<listitem><para>Double click “CC++”.</para></listitem>
|
||||
<listitem><para>Double click “C Project” to create the project.</para></listitem>
|
||||
<listitem><para>Double click “Yocto SDK Project”.</para></listitem>
|
||||
<listitem><para>Select “Hello World ANSI C Autotools Project”.
|
||||
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>Click “Next”.</para></listitem>
|
||||
<listitem><para>Add information in the “Author” field.</para></listitem>
|
||||
<listitem><para>Use “GNU General Public License v2.0” for the License.</para></listitem>
|
||||
<listitem><para>Click “Finish”.</para></listitem>
|
||||
<listitem><para>Answer ‘Yes” to the open perspective prompt.</para></listitem>
|
||||
<listitem><para>In the Project Explorer expand your project.</para></listitem>
|
||||
<listitem><para>Expand ‘src’.</para></listitem>
|
||||
<listitem><para>Double click on your source file and the code appears
|
||||
in the window.
|
||||
This is the template.</para></listitem>
|
||||
<listitem><para>Select <filename>File -> New -> Project</filename>.</para></listitem>
|
||||
<listitem><para>Double click <filename>CC++</filename>.</para></listitem>
|
||||
<listitem><para>Double click <filename>C Project</filename> to create the project.</para></listitem>
|
||||
<listitem><para>Expand <filename>Yocto ADT Project</filename>.</para></listitem>
|
||||
<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>
|
||||
<listitem><para>Put a name in the <filename>Project name:</filename> field.
|
||||
Do not use hyphens as part of the name.</para></listitem>
|
||||
<listitem><para>Click <filename>Next</filename>.</para></listitem>
|
||||
<listitem><para>Add information in the <filename>Author</filename> and
|
||||
<filename>Copyright notice</filename> fields.</para></listitem>
|
||||
<listitem><para>Be sure the <filename>License</filename> field is correct.</para></listitem>
|
||||
<listitem><para>Click <filename>Finish</filename>.</para></listitem>
|
||||
<listitem><para>If the "open perspective" prompt appears, click "Yes" so that you
|
||||
in the C/C++ perspective.</para></listitem>
|
||||
<listitem><para>The left-hand navigation pane shows your project.
|
||||
You can display your source by double clicking the project's source file.
|
||||
</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='configuring-the-cross-toolchains'>
|
||||
<title>Configuring the Cross-Toolchains</title>
|
||||
|
||||
<para>
|
||||
The previous section, <xref linkend='configuring-the-cross-compiler-options'>
|
||||
“Configuring the Cross-Compiler Options”</xref>, set up the default project
|
||||
The previous section, "<link linkend='configuring-the-eclipse-yocto-plug-in'>
|
||||
Configuring the Eclipse Yocto Plug-in</link>", set up the default project
|
||||
configurations.
|
||||
You can change these settings for a given project by following these steps:
|
||||
<orderedlist>
|
||||
<listitem><para>Select Project -> Invoke Yocto Tools -> Reconfigure Yocto.
|
||||
This brings up the project's Yocto Settings Dialog.
|
||||
Settings are inherited from the default project configuration.
|
||||
The information in this dialogue is identical to that chosen earlier
|
||||
for the Cross Compiler Option (Stand-alone Prebuilt Toolchain or Build System Derived Toolchain),
|
||||
the Target Architecture, and the Target Options.
|
||||
The settings are inherited from the Yocto Plug-in configuration performed
|
||||
after installing the plug-in.</para></listitem>
|
||||
<listitem><para>Select Project -> Reconfigure Project.
|
||||
This runs the <filename>autogen.sh</filename> in the workspace for your project.
|
||||
The script runs <filename>libtoolize</filename>, <filename>aclocal</filename>,
|
||||
<filename>autoconf</filename>, <filename>autoheader</filename>,
|
||||
<filename>automake ‐‐a</filename>, and
|
||||
<filename>./configure</filename>.</para></listitem>
|
||||
<listitem><para>Select <filename>Window -> Preferences</filename>:
|
||||
This selection brings up the <filename>Preferences</filename> Dialog.
|
||||
If the Yocto ADT Preferences are not automatically displayed, you can navigate to
|
||||
that dialog by selection <filename>Yocto ADT</filename> in the left-hand
|
||||
panel.</para>
|
||||
<para>Yocto ADT Settings are inherited from the default project configuration.
|
||||
The information in this dialog is identical to that chosen earlier
|
||||
for the Cross Compiler Options and Target Options as described in
|
||||
<link linkend='configuring-the-eclipse-yocto-plug-in'>
|
||||
Configuring the Eclipse Yocto Plug-in</link> section.</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>.</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='building-the-project'>
|
||||
<title>Building the Project</title>
|
||||
|
||||
<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.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='starting-qemu-in-user-space-nfs-mode'>
|
||||
<title>Starting QEMU in User Space NFS Mode</title>
|
||||
|
||||
<para>
|
||||
To start the QEMU emulator from within Eclipse, follow these steps:
|
||||
<orderedlist>
|
||||
<listitem><para>Select Run -> External Tools -> External Tools Configurations...
|
||||
This selection brings up the External Tools Configurations Dialogue.</para></listitem>
|
||||
<listitem><para>Go to the left navigation area and expand ‘Program’.
|
||||
You should find the image listed.
|
||||
For example, qemu-x86_64-poky-linux.</para></listitem>
|
||||
<listitem><para>Click on the image.
|
||||
This brings up a new environment in the main area of the External
|
||||
Tools Configurations Dialogue.
|
||||
The Main tab is selected.</para></listitem>
|
||||
<listitem><para>Click “Run” next.
|
||||
This brings up a shell window.</para></listitem>
|
||||
<listitem><para>Expose the <filename>Run -> External Tools -> External Tools
|
||||
Configurations...</filename> menu.
|
||||
Your image should appear as a selectable menu item.
|
||||
</para></listitem>
|
||||
<listitem><para>Select your image from the menu.
|
||||
Doing so launches a new 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>
|
||||
This sets up a <filename>Tap 0</filename> connection needed for running in user-space
|
||||
NFS mode.</para></listitem>
|
||||
<listitem><para>Wait for QEMU to launch.</para></listitem>
|
||||
<listitem><para>Once QEMU launches you need to determine the IP Address
|
||||
for the user-space NFS.
|
||||
You can do that by going to a terminal in the QEMU and entering the
|
||||
<filename>ipconfig</filename> command.</para></listitem>
|
||||
for the user-space NFS.
|
||||
You can do that by going to a terminal in the QEMU and entering the
|
||||
<filename>ifconfig</filename> command.</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='deploying-and-debugging-the-application'>
|
||||
<title>Deploying and Debugging the Application</title>
|
||||
|
||||
<para>
|
||||
Once QEMU is running you can deploy your application and use the emulator
|
||||
Once the QEMU emulator is running the image, you can deploy your application and use the emulator
|
||||
to perform debugging.
|
||||
Follow these steps to deploy the application.
|
||||
<orderedlist>
|
||||
<listitem><para>Select Run -> Debug Configurations...</para></listitem>
|
||||
<listitem><para>In the left area expand “C/C++Remote Application”.</para></listitem>
|
||||
<listitem><para>Select <filename>Run -> Debug Configurations...</filename></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
|
||||
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
|
||||
the application.
|
||||
Use the Remote Absolute File Path for C/C++Application:.
|
||||
For example, enter <filename>/usr/bin/<programname></filename>.</para></listitem>
|
||||
<listitem><para>Click on the Debugger tab to see the cross-tool debugger
|
||||
you are using.</para></listitem>
|
||||
the application.
|
||||
Use the <filename>Remote Absolute File Path for C/C++Application:</filename> field.
|
||||
For example, enter <filename>/usr/bin/<programname></filename>.</para></listitem>
|
||||
<listitem><para>Click on the <filename>Debugger</filename> tab to see the cross-tool debugger
|
||||
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
|
||||
by clicking on “new”.</para></listitem>
|
||||
<listitem><para>Select “TCF, which means Target Communication Framework.</para></listitem>
|
||||
<listitem><para>Click “Next”.</para></listitem>
|
||||
<listitem><para>Clear out the “host name” field and enter the IP Address
|
||||
determined earlier.</para></listitem>
|
||||
<listitem><para>Click Finish to close the new connections dialogue.</para></listitem>
|
||||
<listitem><para>Use the drop-down menu now in the “Connection” field and pick
|
||||
the IP Address you entered.</para></listitem>
|
||||
<listitem><para>Click “Debug” to bring up a login screen and login.</para></listitem>
|
||||
by clicking on <filename>new</filename>.</para></listitem>
|
||||
<listitem><para>Select <filename>TCF</filename>, which means Target Communication
|
||||
Framework.</para></listitem>
|
||||
<listitem><para>Click <filename>Next</filename>.</para></listitem>
|
||||
<listitem><para>Clear out the <filename>host name</filename> field and enter the IP Address
|
||||
determined earlier.</para></listitem>
|
||||
<listitem><para>Click <filename>Finish</filename> to close the new connections
|
||||
Dialog.</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>
|
||||
</orderedlist>
|
||||
</para>
|
||||
@@ -374,58 +448,68 @@
|
||||
|
||||
<section id='running-user-space-tools'>
|
||||
<title>Running User-Space Tools</title>
|
||||
|
||||
<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.
|
||||
These tools are aids in developing and debugging applications and images.
|
||||
You can run these user-space tools from within the Yocto Eclipse
|
||||
Plug-in through the Window -> YoctoTools menu.
|
||||
You can run these user-space tools from within the Eclipse IDE through the
|
||||
<filename>Window -> YoctoTools</filename> menu.
|
||||
</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.
|
||||
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>
|
||||
Here are some specifics about the remote tools:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>OProfile:</emphasis> Selecting this tool causes
|
||||
the oprofile-server on the remote target to launch on the local host machine.
|
||||
The oprofile-viewer must be installed on the local host machine and the
|
||||
oprofile-server must be installed on the remote target, respectively, in order
|
||||
to use.
|
||||
You can locate both the viewer and server from
|
||||
<ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/oprofileui/'></ulink>.
|
||||
You need to compile and install the oprofile-viewer from the source code
|
||||
on your local host machine.
|
||||
The oprofile-server is installed by default in the image.</para></listitem>
|
||||
<listitem><para><emphasis>Lttng-ust:</emphasis> Selecting this tool runs
|
||||
<filename>usttrace</filename> on the remote target, transfers the output data back to the
|
||||
local host machine and uses <filename>lttv-gui</filename> to graphically display the output.
|
||||
The <filename>lttv-gui</filename> must be installed on the local host machine to use this tool.
|
||||
For information on how to use <filename>lttng</filename> to trace an application, see
|
||||
<ulink url='http://lttng.org/files/ust/manual/ust.html'></ulink>.</para>
|
||||
<para>For "Application" you must supply the absolute path name of the
|
||||
application to be traced by user mode lttng.
|
||||
For example, typing <filename>/path/to/foo</filename> triggers
|
||||
<filename>usttrace /path/to/foo</filename> on the remote target to trace the
|
||||
program <filename>/path/to/foo</filename>.</para>
|
||||
<para>"Argument" is passed to <filename>usttrace</filename>
|
||||
running on the remote target.</para></listitem>
|
||||
<listitem><para><emphasis>PowerTOP:</emphasis> Selecting this tool runs
|
||||
"PowerTOP" on the remote target machine and displays the results in a
|
||||
new view called "powertop".</para>
|
||||
<para>"Time to gather data(sec):" is the time passed in seconds before data
|
||||
is gathered from the remote target for analysis.</para>
|
||||
<para>"show pids in wakeups list:" corresponds to the <filename>-p</filename> argument
|
||||
passed to <filename>powertop</filename>.</para></listitem>
|
||||
<listitem><para><emphasis>LatencyTOP and Perf:</emphasis> "LatencyTOP"
|
||||
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>
|
||||
<listitem><para><emphasis><filename>OProfile</filename>:</emphasis> Selecting this tool causes
|
||||
the <filename>oprofile-server</filename> on the remote target to launch on
|
||||
the local host machine.
|
||||
The <filename>oprofile-viewer</filename> must be installed on the local host machine and the
|
||||
<filename>oprofile-server</filename> must be installed on the remote target,
|
||||
respectively, in order to use.
|
||||
You must compile and install the <filename>oprofile-viewer</filename> from the source code
|
||||
on your local host machine.
|
||||
Furthermore, in order to convert the target's sample format data into a form that the
|
||||
host can use, you must have <filename>oprofile</filename> version 0.9.4 or
|
||||
greater installed on the host.</para>
|
||||
<para>You can locate both the viewer and server from
|
||||
<ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/oprofileui/'></ulink>.
|
||||
<note>The <filename>oprofile-server</filename> is installed by default on
|
||||
the <filename>core-image-sato-sdk</filename> image.</note></para></listitem>
|
||||
<listitem><para><emphasis><filename>Lttng-ust</filename>:</emphasis> Selecting this tool runs
|
||||
<filename>usttrace</filename> on the remote target, transfers the output data back to the
|
||||
local host machine, and uses <filename>lttv-gui</filename> to graphically display the output.
|
||||
The <filename>lttv-gui</filename> must be installed on the local host machine to use this tool.
|
||||
For information on how to use <filename>lttng</filename> to trace an application, see
|
||||
<ulink url='http://lttng.org/files/ust/manual/ust.html'></ulink>.</para>
|
||||
<para>For <filename>Application</filename>, you must supply the absolute path name of the
|
||||
application to be traced by user mode <filename>lttng</filename>.
|
||||
For example, typing <filename>/path/to/foo</filename> triggers
|
||||
<filename>usttrace /path/to/foo</filename> on the remote target to trace the
|
||||
program <filename>/path/to/foo</filename>.</para>
|
||||
<para><filename>Argument</filename> is passed to <filename>usttrace</filename>
|
||||
running on the remote target.</para></listitem>
|
||||
<listitem><para><emphasis><filename>PowerTOP</filename>:</emphasis> Selecting this tool runs
|
||||
<filename>powertop</filename> on the remote target machine and displays the results in a
|
||||
new view called <filename>powertop</filename>.</para>
|
||||
<para><filename>Time to gather data(sec):</filename> is the time passed in seconds before data
|
||||
is gathered from the remote target for analysis.</para>
|
||||
<para><filename>show pids in wakeups list:</filename> corresponds to the
|
||||
<filename>-p</filename> argument
|
||||
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>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -13,29 +13,41 @@
|
||||
|
||||
<section id='book-intro'>
|
||||
<title>Introducing the Application Development Toolkit (ADT)</title>
|
||||
|
||||
<para>
|
||||
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,
|
||||
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>
|
||||
Additionally, to provide an effective development platform, the Yocto Project
|
||||
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),
|
||||
and various user-space tools that greatly enhance your development experience.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The resulting combination of the architecture-specific cross-toolchain and sysroot
|
||||
along with these additional tools yields a custom-built, cross-development platform
|
||||
for a user-targeted product.
|
||||
</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'>
|
||||
<title>The Cross-Toolchain</title>
|
||||
|
||||
<para>
|
||||
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
|
||||
through a Yocto Project build tree that is based on your metadata
|
||||
configuration or extension for your targeted device.
|
||||
@@ -45,80 +57,76 @@
|
||||
|
||||
<section id='sysroot'>
|
||||
<title>Sysroot</title>
|
||||
|
||||
<para>
|
||||
The matching target sysroot contains needed headers and libraries for generating
|
||||
binaries that run on the target architecture.
|
||||
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>
|
||||
</section>
|
||||
|
||||
<section id='the-qemu-emulator'>
|
||||
<title>The QEMU Emulator</title>
|
||||
|
||||
<para>
|
||||
The QEMU emulator allows you to simulate your hardware while running your
|
||||
application or image.
|
||||
QEMU is made available a number of ways:
|
||||
<itemizedlist>
|
||||
<listitem><para>If you use the ADT Installer script to install ADT you can
|
||||
specify whether or not to install QEMU.</para></listitem>
|
||||
<listitem><para>If you use the ADT Installer script to install ADT, you can
|
||||
specify whether or not to install QEMU.</para></listitem>
|
||||
<listitem><para>If you have downloaded a Yocto Project release and unpacked
|
||||
it to create a Yocto Project source directory followed by sourcing
|
||||
the Yocto Project environment setup script, QEMU is installed and automatically
|
||||
available.</para></listitem>
|
||||
it to create a Yocto Project file structure and you have sourced
|
||||
the Yocto Project environment setup script, QEMU is installed and automatically
|
||||
available.</para></listitem>
|
||||
<listitem><para>If you have installed the cross-toolchain
|
||||
tarball followed by sourcing the toolchain's setup environment script, QEMU
|
||||
is installed and automatically available.</para></listitem>
|
||||
tarball and you have sourcing the toolchain's setup environment script, QEMU
|
||||
is also installed and automatically available.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='user-space-tools'>
|
||||
<title>User-Space Tools</title>
|
||||
|
||||
<para>
|
||||
User-space tools are included as part of the distribution.
|
||||
You will find these tools helpful during development.
|
||||
The tools include LatencyTOP, PowerTOP, OProfile, Perf, SystemTap, and Lttng-ust.
|
||||
These tools are common development tools for the Linux platform.
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>LatencyTOP</emphasis> – LatencyTOP focuses on latency
|
||||
that causes skips in audio,
|
||||
stutters in your desktop experience, or situations that overload your server
|
||||
even when you have plenty of CPU power left.
|
||||
You can find out more about LatencyTOP at
|
||||
<ulink url='http://www.latencytop.org/'></ulink>.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>PowerTOP</emphasis> – Helps you determine what
|
||||
software is using the most power.
|
||||
You can find out more about PowerTOP at
|
||||
<ulink url='http://www.linuxpowertop.org/'></ulink>.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>OProfile</emphasis> – A system-wide profiler for Linux
|
||||
systems that is capable
|
||||
of profiling all running code at low overhead.
|
||||
You can find out more about OProfile at
|
||||
<ulink url='http://oprofile.sourceforge.net/about/'></ulink>.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>Perf</emphasis> – Performance counters for Linux used
|
||||
to keep track of certain
|
||||
types of hardware and software events.
|
||||
For more information on these types of counters see
|
||||
<ulink url='https://perf.wiki.kernel.org/index.php'></ulink> and click
|
||||
on “Perf tools.”
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>SystemTap</emphasis> – A free software infrastructure
|
||||
that simplifies
|
||||
information gathering about a running Linux system.
|
||||
This information helps you diagnose performance or functional problems.
|
||||
SystemTap is not available as a user-space tool through the Yocto Eclipse IDE Plug-in.
|
||||
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>
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>LatencyTOP:</emphasis> LatencyTOP focuses on latency
|
||||
that causes skips in audio,
|
||||
stutters in your desktop experience, or situations that overload your server
|
||||
even when you have plenty of CPU power left.
|
||||
You can find out more about LatencyTOP at
|
||||
<ulink url='http://www.latencytop.org/'></ulink>.</para></listitem>
|
||||
<listitem><para><emphasis>PowerTOP:</emphasis> Helps you determine what
|
||||
software is using the most power.
|
||||
You can find out more about PowerTOP at
|
||||
<ulink url='http://www.linuxpowertop.org/'></ulink>.</para></listitem>
|
||||
<listitem><para><emphasis>OProfile:</emphasis> A system-wide profiler for Linux
|
||||
systems that is capable of profiling all running code at low overhead.
|
||||
You can find out more about OProfile at
|
||||
<ulink url='http://oprofile.sourceforge.net/about/'></ulink>.</para></listitem>
|
||||
<listitem><para><emphasis>Perf:</emphasis> Performance counters for Linux used
|
||||
to keep track of certain types of hardware and software events.
|
||||
For more information on these types of counters see
|
||||
<ulink url='https://perf.wiki.kernel.org/index.php'></ulink> and click
|
||||
on “Perf tools.”</para></listitem>
|
||||
<listitem><para><emphasis>SystemTap:</emphasis> A free software infrastructure
|
||||
that simplifies information gathering about a running Linux system.
|
||||
This information helps you diagnose performance or functional problems.
|
||||
SystemTap is not available as a user-space tool through the Yocto Eclipse IDE Plug-in.
|
||||
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>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
|
||||
<title></title>
|
||||
<title></title>
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
@@ -50,6 +50,15 @@
|
||||
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.
|
||||
</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/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>
|
||||
|
||||
</bookinfo>
|
||||
|
||||
@@ -3,44 +3,47 @@
|
||||
|
||||
<chapter id='adt-package'>
|
||||
<title>Optionally Customizing the Development Packages Installation</title>
|
||||
|
||||
<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.
|
||||
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).
|
||||
Thus, you would like to be able to remove those packages from your target sysroot.
|
||||
</para>
|
||||
|
||||
<section id='package-management-systems'>
|
||||
<title>Package Management Systems</title>
|
||||
|
||||
<para>
|
||||
The Yocto Project supports the generation of sysroot files using
|
||||
three different Package Management Systems (PMS):
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>OPKG</emphasis> – A less well known PMS whose use
|
||||
originated in the OpenEmbedded and OpenWrt embedded Linux projects.
|
||||
This PMS works with files packaged in an <filename>.ipk</filename> format.
|
||||
See <ulink url='http://en.wikipedia.org/wiki/Opkg'></ulink> for more
|
||||
information about OPKG.</para></listitem>
|
||||
<listitem><para><emphasis>RPM</emphasis> – A more widely known PMS intended for GNU/Linux
|
||||
distributions.
|
||||
This PMS works with files packaged in an <filename>.rms</filename> format.
|
||||
The Yocto Project currently installs through this PMS by default.
|
||||
See <ulink url='http://en.wikipedia.org/wiki/RPM_Package_Manager'></ulink>
|
||||
for more information about RPM.</para></listitem>
|
||||
<listitem><para><emphasis>Debian</emphasis> – The PMS for Debian-based systems
|
||||
is built on many PMS tools.
|
||||
The lower-level PMS tool <filename>dpkg</filename> forms the base of the Debian PMS.
|
||||
For information on dpkg see
|
||||
<ulink url='http://en.wikipedia.org/wiki/Dpkg'></ulink>.</para></listitem>
|
||||
</itemizedlist>
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>OPKG:</emphasis> A less well known PMS whose use
|
||||
originated in the OpenEmbedded and OpenWrt embedded Linux projects.
|
||||
This PMS works with files packaged in an <filename>.ipk</filename> format.
|
||||
See <ulink url='http://en.wikipedia.org/wiki/Opkg'></ulink> for more
|
||||
information about OPKG.</para></listitem>
|
||||
<listitem><para><emphasis>RPM:</emphasis> A more widely known PMS intended for GNU/Linux
|
||||
distributions.
|
||||
This PMS works with files packaged in an <filename>.rms</filename> format.
|
||||
The Yocto Project currently installs through this PMS by default.
|
||||
See <ulink url='http://en.wikipedia.org/wiki/RPM_Package_Manager'></ulink>
|
||||
for more information about RPM.</para></listitem>
|
||||
<listitem><para><emphasis>Debian:</emphasis> The PMS for Debian-based systems
|
||||
is built on many PMS tools.
|
||||
The lower-level PMS tool <filename>dpkg</filename> forms the base of the Debian PMS.
|
||||
For information on dpkg see
|
||||
<ulink url='http://en.wikipedia.org/wiki/Dpkg'></ulink>.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='configuring-the-pms'>
|
||||
<title>Configuring the PMS</title>
|
||||
|
||||
<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>
|
||||
file is set to reflect that system.
|
||||
The first value you choose for the variable specifies the package file format for the root
|
||||
@@ -48,31 +51,45 @@
|
||||
Additional values specify additional formats for convenience or testing.
|
||||
See the configuration file for details.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
For build performance information related to the PMS, see
|
||||
<ulink url='http://www.yoctoproject.org/docs/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/poky-ref-manual/poky-ref-manual.html'>
|
||||
The Yocto Project Reference Manual</ulink>.
|
||||
</note>
|
||||
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
First, you should generate the ipk file for the <filename>libglade</filename> package and add it
|
||||
into a working opkg repository.
|
||||
First, you should generate the <filename>ipk</filename> file for the
|
||||
<filename>libglade</filename> package and add it
|
||||
into a working <filename>opkg</filename> repository.
|
||||
Use these commands:
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake libglade
|
||||
$ bitbake package-index
|
||||
</literallayout>
|
||||
</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
|
||||
sysroot as <filename><sysroot_dir></filename>.
|
||||
Finally, have an opkg configuration file <filename><conf_file></filename>
|
||||
that corresponds to the opkg repository you have just created.
|
||||
Finally, have an OPKG configuration file <filename><conf_file></filename>
|
||||
that corresponds to the <filename>opkg</filename> repository you have just created.
|
||||
The following command forms should now work:
|
||||
<literallayout class='monospaced'>
|
||||
$ 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> --force-overwrite install libglade-dbg
|
||||
$ opkg-cl –f <conf_file> -o <sysroot-dir> --force-overwrite install libglade-dev
|
||||
$ 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> \
|
||||
--force-overwrite install libglade-dbg
|
||||
$ opkg-cl –f <conf_file> -o <sysroot_dir> \
|
||||
--force-overwrite install libglade-dev
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -6,72 +6,89 @@
|
||||
<title>Preparing to Use the Application Development Toolkit (ADT)</title>
|
||||
|
||||
<para>
|
||||
In order to use the ADT you must install it, source a script to set up the
|
||||
environment, and be sure the kernel and filesystem image specific to the target architecture
|
||||
exists.
|
||||
In order to use the ADT, you must install it, <filename>source</filename> a script to set up the
|
||||
environment, and be sure both the kernel and filesystem image specific to the target architecture
|
||||
exist.
|
||||
</para>
|
||||
|
||||
<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>
|
||||
This chapter describes two important terms and how to be sure you meet the ADT requirements.
|
||||
</para>
|
||||
|
||||
<section id='yocto-project-files'>
|
||||
<title>Yocto Project Files and Build Areas</title>
|
||||
|
||||
<para>
|
||||
Before learning how to prepare your system for the ADT, you need to understand
|
||||
two important terms used throughout this manual:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>The Yocto Project Files:</emphasis>
|
||||
This term refers to the directory structure created as a result of downloading
|
||||
and unpacking a Yocto Project release tarball or setting up a Git repository
|
||||
by cloning <filename>git://git.yoctoproject.org/poky</filename>.</para>
|
||||
<para>The Yocto Project files contain BitBake, Documentation, metadata and
|
||||
other files that all support the development environment.
|
||||
Consequently, you must have the Yocto Project files in place on your development
|
||||
system in order to do any development using the Yocto Project.</para>
|
||||
<para>The name of the top-level directory of the Yocto Project file structure
|
||||
is derived from the Yocto Project release tarball.
|
||||
For example, downloading and unpacking <filename>poky-edison-6.0.tar.bz2</filename>
|
||||
results in a Yocto Project source tree whose Yocto Project source directory is named
|
||||
<filename>poky-edison-6.0</filename>.
|
||||
If you create a Git repository, then you can name the repository anything you like.</para>
|
||||
<para>You can find instruction on how to set up the Yocto Project files on your
|
||||
host development system by reading the
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/dev-manual/dev-manual.html#getting-setup'>
|
||||
Getting Setup</ulink> section in
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/dev-manual/dev-manual.html'>
|
||||
The Yocto Project Development Manual</ulink>.</para></listitem>
|
||||
<listitem><para><emphasis>Yocto Project Build Tree:</emphasis>
|
||||
This term refers to the area where the Yocto Project builds images.
|
||||
The area is created when you <filename>source</filename> the Yocto Project setup
|
||||
environment script that is found in the Yocto Project files area.
|
||||
(e.g. <filename>oe-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-6.0</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
$ source poky-edison-6.0/oe-init-build-env $HOME/mybuilds/YP-6.0
|
||||
</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>
|
||||
</section>
|
||||
|
||||
<section id='installing-the-adt'>
|
||||
<title>Installing the ADT</title>
|
||||
|
||||
<para>
|
||||
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.
|
||||
See the <xref linkend='setting-up-the-environment'>“Setting Up the Environment”</xref>
|
||||
See the "<link linkend='setting-up-the-environment'>Setting Up the Environment</link>"
|
||||
section for more information.
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Use the ADT Installer Script:</emphasis>
|
||||
This method is the recommended way to install the ADT because it
|
||||
automates much of the process for you.
|
||||
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 define the target sysroot location.
|
||||
</para></listitem>
|
||||
This method is the recommended way to install the ADT because it
|
||||
automates much of the process for you.
|
||||
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 define the target sysroot location.</para></listitem>
|
||||
<listitem><para><emphasis>Use an Existing Toolchain Tarball:</emphasis>
|
||||
Using this method you select and download an architecture-specific
|
||||
toolchain tarball and then hand-install the toolchain.
|
||||
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>
|
||||
<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
|
||||
using that tree.
|
||||
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>
|
||||
Using this method, you select and download an architecture-specific
|
||||
toolchain tarball and then hand-install the toolchain.
|
||||
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>
|
||||
<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
|
||||
using that tree.
|
||||
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>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
@@ -79,7 +96,7 @@
|
||||
<title>Using the ADT Installer</title>
|
||||
|
||||
<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.
|
||||
</para>
|
||||
|
||||
@@ -89,102 +106,99 @@
|
||||
<para>
|
||||
The ADT Installer is contained in the ADT Installer tarball.
|
||||
You can download the tarball into any directory from
|
||||
<ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.0/adt-installer/'></ulink>.
|
||||
Or, you can use Bitbake to generate the tarball inside the existing Yocto Project build tree.
|
||||
<ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.1/adt-installer/'></ulink>.
|
||||
Or, you can use BitBake to generate the tarball inside the existing Yocto Project
|
||||
build tree.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you use Bitbake to generate the ADT Installer tarball, you must
|
||||
source the Yocto Project environment setup script located in the Yocto Project
|
||||
source directory before running the Bitbake command that creates the tarball.
|
||||
If you use BitBake to generate the ADT Installer tarball, you must
|
||||
<filename>source</filename> the Yocto Project environment setup script located
|
||||
in the Yocto Project file structure before running the <filename>bitbake</filename>
|
||||
command that creates the tarball.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The following example commands download the Yocto Project release tarball, create the Yocto
|
||||
Project source tree, set up the environment while also creating the Yocto Project build tree,
|
||||
and finally run the Bitbake command that results in the tarball
|
||||
The following example commands download the Yocto Project release tarball, set up the Yocto
|
||||
Project files structure, set up the environment while also creating the
|
||||
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>:
|
||||
<literallayout class='monospaced'>
|
||||
$ cd ~
|
||||
$ mkdir yocto-project
|
||||
$ cd yocto-project
|
||||
$ wget http://www.yoctoproject.org/downloads/poky/poky-bernard-5.0.1.tar.bz2
|
||||
$ tar xjf poky-bernard-5.0.1.tar.bz2
|
||||
$ source poky-bernard-5.0.1/poky-init-build-env poky-5.0.1-build
|
||||
$ wget http://www.yoctoproject.org/downloads/poky/poky-edison-6.0.tar.bz2
|
||||
$ tar xjf poky-edison-6.0.tar.bz2
|
||||
$ source poky-edison-6.0/oe-init-build-env
|
||||
$ bitbake adt-installer
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section id='configuring-and-running-the-adt-installer-script'>
|
||||
<title>Configuring and Running the ADT Installer Script</title>
|
||||
|
||||
<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.
|
||||
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>
|
||||
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.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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:
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para><filename>YOCTOADT_IPKG_REPO</filename> – This area
|
||||
includes the IPKG-based packages and the root filesystem upon which
|
||||
the installation is based.
|
||||
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
|
||||
directory structure follows the same layout as the reference directory
|
||||
set up at <ulink url='http://adtrepo.yoctoproject.org'></ulink>.
|
||||
Also, your repository needs to be accessible through HTTP.
|
||||
</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT-TARGETS</filename> – The machine
|
||||
target architectures for which you want to set up cross-development
|
||||
environments.
|
||||
</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_QEMU</filename> – Indicates whether
|
||||
or not to install the emulator QEMU.
|
||||
</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_NFS_UTIL</filename> – Indicates whether
|
||||
or not to install user-mode NFS.
|
||||
If you plan to use the Yocto Eclipse IDE plug-in against QEMU,
|
||||
you should install NFS.
|
||||
<note>
|
||||
To boot QEMU images using our userspace NFS server, you need
|
||||
to be running portmap or rpcbind.
|
||||
If you are running rpcbind, you will also need to add the -i
|
||||
option when rpcbind starts up.
|
||||
Please make sure you understand the security implications of doing this.
|
||||
Your firewall settings may also have to be modified to allow
|
||||
NFS booting to work.
|
||||
</note>
|
||||
</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_ROOTFS_<arch></filename> - The root
|
||||
filesystem images you want to download from the <filename>YOCTOADT_IPKG_REPO</filename>
|
||||
repository.
|
||||
</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_TARGET_SYSROOT_IMAGE_<arch></filename> - The
|
||||
particular root filesystem used to extract and create the target sysroot.
|
||||
The value of this variable must have been specified with
|
||||
<filename>YOCTOADT_ROOTFS_<arch></filename>.
|
||||
For example, if you downloaded both <filename>minimal</filename> and
|
||||
<filename>sato-sdk</filename> images by setting <filename>YOCTOADT_ROOTFS_<arch></filename>
|
||||
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>
|
||||
<listitem><para><filename>YOCTOADT_REPO</filename>: This area
|
||||
includes the IPKG-based packages and the root filesystem upon which
|
||||
the installation is based.
|
||||
If you want to set up your own IPKG repository pointed to by
|
||||
<filename>YOCTOADT_REPO</filename>, you need to be sure that the
|
||||
directory structure follows the same layout as the reference directory
|
||||
set up at <ulink url='http://adtrepo.yoctoproject.org'></ulink>.
|
||||
Also, your repository needs to be accessible through HTTP.</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_TARGETS</filename>: The machine
|
||||
target architectures for which you want to set up cross-development
|
||||
environments.</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_QEMU</filename>: Indicates whether
|
||||
or not to install the emulator QEMU.</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_NFS_UTIL</filename>: Indicates whether
|
||||
or not to install user-mode NFS.
|
||||
If you plan to use the Yocto Eclipse IDE plug-in against QEMU,
|
||||
you should install NFS.
|
||||
<note>To boot QEMU images using our userspace NFS server, you need
|
||||
to be running <filename>portmap</filename> or <filename>rpcbind</filename>.
|
||||
If you are running <filename>rpcbind</filename>, you will also need to add the
|
||||
<filename>-i</filename> option when <filename>rpcbind</filename> starts up.
|
||||
Please make sure you understand the security implications of doing this.
|
||||
You might also have to modify your firewall settings to allow
|
||||
NFS booting to work.</note></para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_ROOTFS_<arch></filename>: The root
|
||||
filesystem images you want to download from the
|
||||
<filename>YOCTOADT_IPKG_REPO</filename> repository.</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_TARGET_SYSROOT_IMAGE_<arch></filename>: The
|
||||
particular root filesystem used to extract and create the target sysroot.
|
||||
The value of this variable must have been specified with
|
||||
<filename>YOCTOADT_ROOTFS_<arch></filename>.
|
||||
For example, if you downloaded both <filename>minimal</filename> and
|
||||
<filename>sato-sdk</filename> images by setting
|
||||
<filename>YOCTOADT_ROOTFS_<arch></filename>
|
||||
to "minimal sato-sdk", then <filename>YOCTOADT_ROOTFS_<arch></filename>
|
||||
must be set to either <filename>minimal</filename> or
|
||||
<filename>sato-sdk</filename>.</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_TARGET_SYSROOT_LOC_<arch></filename>: The
|
||||
location on the development host where the target sysroot is created.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
@@ -199,14 +213,16 @@
|
||||
<note>
|
||||
The ADT Installer requires the <filename>libtool</filename> package to complete.
|
||||
If you install the recommended packages as described in the
|
||||
<ulink url='http://www.yoctoproject.org/docs/yocto-project-qs/yocto-project-qs.html'>
|
||||
Yocto Project Quick Start</ulink> then you will have libtool installed.
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html#packages'>
|
||||
Packages</ulink> section of
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||
The Yocto Project Quick Start</ulink>, then you will have libtool installed.
|
||||
</note>
|
||||
|
||||
<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.
|
||||
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.
|
||||
Follow the prompts from the script to complete the installation.
|
||||
</para>
|
||||
@@ -220,99 +236,114 @@
|
||||
according to the <filename>YOCTOADT_TARGET_SYSROOT_LOC_<arch></filename> variable
|
||||
also in your configuration file.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id='using-an-existing-toolchain-tarball'>
|
||||
<title>Using a Cross-Toolchain Tarball</title>
|
||||
|
||||
<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.
|
||||
If you install the cross-toolchain by hand you will have to set up the target sysroot separately.
|
||||
If you install the cross-toolchain by hand, you will have to set up the target sysroot separately.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Follow these steps:
|
||||
<orderedlist>
|
||||
<listitem><para>Go to
|
||||
<ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.0/toolchain'></ulink>
|
||||
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>
|
||||
</listitem>
|
||||
<ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.1/toolchain'></ulink>
|
||||
and find the folder that matches your host development system
|
||||
(i.e. <filename>i686</filename> for 32-bit machines or
|
||||
<filename>x86_64</filename> for 64-bit machines).</para></listitem>
|
||||
<listitem><para>Go into that folder and download the toolchain tarball whose name
|
||||
includes the appropriate target architecture.
|
||||
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
|
||||
<filename>x86_64</filename> folder and download the following tarball:
|
||||
<literallayout class='monospaced'>
|
||||
yocto-eglibc-x86_64-arm-toolchain-gmae-1.0.tar.bz2
|
||||
</literallayout>
|
||||
<note>
|
||||
Alternatively you can build the toolchain tarball if you have a Yocto Project build tree.
|
||||
Use the <filename>bitbake meta-toolchain</filename> command after you have
|
||||
sourced the <filename>poky-build-init script</filename> located in the Yocto Project
|
||||
source directory.
|
||||
When the <filename>bitbake</filename> command completes the toolchain tarball will
|
||||
be in <filename>tmp/deploy/sdk</filename> in the Yocto Project build tree.
|
||||
</note></para></listitem>
|
||||
<listitem><para>Make sure you are in the root directory and then expand
|
||||
the tarball.
|
||||
The tarball expands into <filename>/opt/poky/$SDKVERSION</filename>.
|
||||
Once the tarball in unpacked the cross-toolchain is installed.
|
||||
You will notice environment setup files for the cross-toolchain in the directory.
|
||||
</para></listitem>
|
||||
includes the appropriate target architecture.
|
||||
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-based target, go into the
|
||||
<filename>x86_64</filename> folder and download the following tarball:
|
||||
<literallayout class='monospaced'>
|
||||
yocto-eglibc-x86_64-arm-toolchain-gmae-1.1.tar.bz2
|
||||
</literallayout>
|
||||
<note>As an alternative to steps one and two, you can build the toolchain tarball
|
||||
if you have a Yocto Project build tree.
|
||||
Use the <filename>bitbake meta-toolchain</filename> command after you have
|
||||
sourced the <filename>oe-build-init script</filename> located in the Yocto
|
||||
Project files.
|
||||
When the <filename>bitbake</filename> command completes, the toolchain tarball will
|
||||
be in <filename>tmp/deploy/sdk</filename> in the Yocto Project build tree.
|
||||
</note></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/$SDKVERSION</filename>.
|
||||
Once the tarball in unpacked, the cross-toolchain is installed.
|
||||
You will notice environment setup files for the cross-toolchain in the directory.
|
||||
</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
After installing the toolchain, you must locate the target sysroot tarball and unpack it
|
||||
into a location of your choice.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<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>
|
||||
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 within an existing
|
||||
Yocto Project build tree.
|
||||
Follow these steps:
|
||||
<orderedlist>
|
||||
<listitem><para>Source the environment setup script located in the Yocto Project
|
||||
source directory.
|
||||
The script has the string <filename>init-build-env</filename>
|
||||
as part of the name.</para></listitem>
|
||||
<listitem><para>At this point you should be sure that the
|
||||
<filename>MACHINE</filename> variable
|
||||
in the <filename>local.conf</filename> file is set for the target architecture.
|
||||
You can find the <filename>local.conf</filename> file in the Yocto Project source
|
||||
directory.
|
||||
Comments within the <filename>local.conf</filename> file list the values you
|
||||
can use for the <filename>MACHINE</filename> variable.
|
||||
<note>You can populate the build tree with the cross-toolchains for more
|
||||
than a single architecture.
|
||||
You just need to edit the <filename>MACHINE</filename> variable in the
|
||||
<filename>local.conf</filename> file and re-run the BitBake command.</note></para></listitem>
|
||||
files.
|
||||
The script has the string <filename>init-build-env</filename>
|
||||
as part of the name.</para></listitem>
|
||||
<listitem><para>At this point, you should be sure that the
|
||||
<filename>MACHINE</filename> variable
|
||||
in the <filename>local.conf</filename> file found in the Yocto Project
|
||||
file structure's <filename>conf</filename> directory
|
||||
is set for the target architecture.
|
||||
Comments within the <filename>local.conf</filename> file list the values you
|
||||
can use for the <filename>MACHINE</filename> variable.
|
||||
<note>You can populate the build tree with the cross-toolchains for more
|
||||
than a single architecture.
|
||||
You just need to edit the <filename>MACHINE</filename> variable in the
|
||||
<filename>local.conf</filename> file and re-run the BitBake
|
||||
command.</note></para></listitem>
|
||||
<listitem><para>Run <filename>bitbake meta-ide-support</filename> to complete the
|
||||
cross-toolchain installation.
|
||||
<note>If you change your working directory after you source the environment
|
||||
setup script and before you run the Bitbake command the command will not work.
|
||||
Be sure to run the Bitbake command immediately after checking or editing the
|
||||
<filename>local.conf</filename> but without changing your working directory.</note>
|
||||
Once Bitbake finishes, the cross-toolchain is installed.
|
||||
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>
|
||||
cross-toolchain installation.
|
||||
<note>If you change your working directory after you
|
||||
<filename>source</filename> the environment setup script and before you run
|
||||
the BitBake command, the command will not work.
|
||||
Be sure to run the <filename>bitbake</filename> command immediately
|
||||
after checking or editing the <filename>local.conf</filename> but without
|
||||
changing your working directory.</note>
|
||||
Once BitBake finishes, the cross-toolchain is installed.
|
||||
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>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
After installing the toolchain, you must locate the target sysroot tarball and unpack
|
||||
it in a directory of your choice.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id='setting-up-the-environment'>
|
||||
<title>Setting Up the Environment</title>
|
||||
|
||||
<para>
|
||||
Before you can use the cross-toolchain you need to set up the toolchain environment by
|
||||
Before you can use the cross-toolchain, you need to set up the toolchain environment by
|
||||
sourcing the environment setup script.
|
||||
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>
|
||||
directory.
|
||||
If you used Bitbake and the Yocto Project Build Tree to install the cross-toolchain
|
||||
If you used BitBake and the Yocto Project Build Tree to install the cross-toolchain,
|
||||
then you can find the environment setup scripts in in the Yocto Project build tree
|
||||
in the <filename>tmp</filename> directory.
|
||||
</para>
|
||||
@@ -320,32 +351,43 @@
|
||||
<para>
|
||||
Be sure to run the environment setup script that matches the architecture for
|
||||
which you are developing.
|
||||
Environment setup scripts begin with the string “environment-setup” and include as
|
||||
part of their name the architecture.
|
||||
Environment setup scripts begin with the string “<filename>environment-setup</filename>”
|
||||
and include as part of their name the architecture.
|
||||
For example, the environment setup script for a 64-bit IA-based architecture would
|
||||
be the following:
|
||||
<literallayout class='monospaced'>
|
||||
/opt/poky/1.0/environment-setup-x86_64-poky-linux
|
||||
/opt/poky/1.1/environment-setup-x86_64-poky-linux
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='kernels-and-filesystem-images'>
|
||||
<title>Kernels and Filesystem Images</title>
|
||||
|
||||
<para>
|
||||
You will need to have a kernel and filesystem image to boot using your
|
||||
hardware or the QEMU emulator.
|
||||
That means you either have to build them or know where to get them.
|
||||
You can find lots of details on how to get or build images and kernels for your
|
||||
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.
|
||||
That means you either have to build them or know where to get them.
|
||||
You can find a quick example of how to build an image 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
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||
The Yocto Project Quick Start</ulink>.
|
||||
<note><para>
|
||||
The Yocto Project provides basic kernels 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 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.
|
||||
area - <ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.1/machines/'></ulink>
|
||||
and are ideal for experimentation within Yocto Project.</para>
|
||||
<para>If you plan on remotely deploying and debugging your application from within the
|
||||
Eclipse IDE, you must have an image that supports Sato.
|
||||
For information on the image types you can build using the Yocto Project, see
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/poky-ref-manual/poky-ref-manual.html#ref-images'>
|
||||
Reference: Images</ulink> in
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||
The Yocto Project Reference Manual</ulink>.</para>
|
||||
</note>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 17 KiB |
@@ -56,6 +56,14 @@
|
||||
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.
|
||||
</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/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>
|
||||
|
||||
</bookinfo>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<chapter id='bsp'>
|
||||
|
||||
<title>Board Support Packages (BSP) - Developers Guide</title>
|
||||
<title>Board Support Packages (BSP) - Developer's Guide</title>
|
||||
|
||||
<para>
|
||||
A Board Support Package (BSP) is a collection of information that
|
||||
@@ -27,13 +27,25 @@
|
||||
of software support of hardware.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
The information here does not provide an example of how to create a BSP.
|
||||
For examples on how to create a BSP, see the
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/dev-manual/dev-manual.html#dev-manual-bsp-appendix'>
|
||||
BSP Development Example</ulink> in
|
||||
<ulink url='http://www.yoctoproject.org/docs/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>
|
||||
The proposed format does have elements that are specific to the Poky and
|
||||
The proposed format does have elements that are specific to the Yocto Project and
|
||||
OpenEmbedded build systems.
|
||||
It is intended that this information can be
|
||||
used by other systems besides Poky and OpenEmbedded and that it will be simple
|
||||
used by other systems besides Yocto Project and OpenEmbedded and that it will be simple
|
||||
to extract information and convert it to other formats if required.
|
||||
Poky, through its standard layers mechanism, can directly accept the format
|
||||
Yocto Project, through its standard layers mechanism, can directly accept the format
|
||||
described as a layer.
|
||||
The BSP captures all
|
||||
the hardware-specific details in one place in a standard format, which is
|
||||
@@ -74,8 +86,11 @@
|
||||
|
||||
<para>
|
||||
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>
|
||||
so that the build system recognizes the BSP definition and from it can build an image.
|
||||
This root is what you add to the <filename>BBLAYERS</filename>
|
||||
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:
|
||||
<literallayout class='monospaced'>
|
||||
BBLAYERS = " \
|
||||
@@ -86,7 +101,10 @@
|
||||
</literallayout>
|
||||
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'>
|
||||
BitBake Layers</ulink> section of the Poky 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/dev-manual/dev-manual.html'>
|
||||
The Yocto Project Development Manual</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -94,41 +112,56 @@
|
||||
While you can use this basic form for the standard, realize that the actual structures
|
||||
for specific BSPs could differ.
|
||||
|
||||
<programlisting>
|
||||
meta-<bsp_name>/
|
||||
meta-<bsp_name>/<bsp_license_file>
|
||||
meta-<bsp_name>/README
|
||||
meta-<bsp_name>/binary/<bootable_images>
|
||||
meta-<bsp_name>/conf/layer.conf
|
||||
meta-<bsp_name>/conf/machine/*.conf
|
||||
meta-<bsp_name>/recipes-bsp/*
|
||||
meta-<bsp_name>/recipes-graphics/*
|
||||
meta-<bsp_name>/recipes-kernel/linux/linux-yocto_git.bbappend
|
||||
</programlisting>
|
||||
<literallayout class='monospaced'>
|
||||
meta-<bsp_name>/
|
||||
meta-<bsp_name>/<bsp_license_file>
|
||||
meta-<bsp_name>/README
|
||||
meta-<bsp_name>/binary/<bootable_images>
|
||||
meta-<bsp_name>/conf/layer.conf
|
||||
meta-<bsp_name>/conf/machine/*.conf
|
||||
meta-<bsp_name>/recipes-bsp/*
|
||||
meta-<bsp_name>/recipes-graphics/*
|
||||
meta-<bsp_name>/recipes-kernel/linux/linux-yocto_<kernel_rev>.bbappend
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Below is an example of the crownbay BSP:
|
||||
Below is an example of the Crown Bay BSP:
|
||||
|
||||
<programlisting>
|
||||
meta-crownbay/COPYING.MIT
|
||||
meta-crownbay/README
|
||||
meta-crownbay/binary/.gitignore
|
||||
meta-crownbay/conf/layer.conf
|
||||
meta-crownbay/conf/machine/crownbay.conf
|
||||
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/machconfig
|
||||
meta-crownbay/recipes-bsp/formfactor/formfactor_0.0.bbappend
|
||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/xcorg.conf
|
||||
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-emgd-bin_1.7.99.2.bb
|
||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/crosscompile.patch
|
||||
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
|
||||
meta-crownbay/recipes-kernel/linux/linux-yocto_git.bbappend
|
||||
</programlisting>
|
||||
<literallayout class='monospaced'>
|
||||
meta-crownbay/COPYING.MIT
|
||||
meta-crownbay/README
|
||||
meta-crownbay/binary
|
||||
meta-crownbay/conf/
|
||||
meta-crownbay/conf/layer.conf
|
||||
meta-crownbay/conf/machine/
|
||||
meta-crownbay/conf/machine/crownbay.conf
|
||||
meta-crownbay/conf/machine/crownbay-noemgd.conf
|
||||
meta-crownbay/recipes-bsp/
|
||||
meta-crownbay/recipes-bsp/formfactor/
|
||||
meta-crownbay/recipes-bsp/formfactor/formfactor_0.0.bbappend
|
||||
meta-crownbay/recipes-bsp/formfactor/formfactor/
|
||||
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/
|
||||
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/machconfig
|
||||
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay-noemgd/
|
||||
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay-noemgd/machconfig
|
||||
meta-crownbay/recipes-graphics/
|
||||
meta-crownbay/recipes-graphics/xorg-xserver/
|
||||
meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin_1.6.bb
|
||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
|
||||
meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin-1.6/
|
||||
meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin-1.6/.gitignore
|
||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/
|
||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/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>
|
||||
@@ -137,14 +170,18 @@ meta-crownbay/recipes-kernel/linux/linux-yocto_git.bbappend
|
||||
|
||||
<section id="bsp-filelayout-license">
|
||||
<title>License Files</title>
|
||||
<programlisting>
|
||||
meta-<bsp_name>/<bsp_license_file>
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
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>
|
||||
These optional files satisfy licensing requirements for the BSP.
|
||||
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.
|
||||
</para>
|
||||
|
||||
@@ -156,9 +193,12 @@ meta-<bsp_name>/<bsp_license_file>
|
||||
|
||||
<section id="bsp-filelayout-readme">
|
||||
<title>README File</title>
|
||||
<programlisting>
|
||||
meta-<bsp_name>/README
|
||||
</programlisting>
|
||||
<para>
|
||||
You can find these files in the Yocto Project file's directory structure at:
|
||||
<literallayout class='monospaced'>
|
||||
meta-<bsp_name>/README
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This file provides information on how to boot the live images that are optionally
|
||||
@@ -175,9 +215,12 @@ meta-<bsp_name>/README
|
||||
|
||||
<section id="bsp-filelayout-binary">
|
||||
<title>Pre-built User Binaries</title>
|
||||
<programlisting>
|
||||
meta-<bsp_name>/binary/<bootable_images>
|
||||
</programlisting>
|
||||
<para>
|
||||
You can find these files in the Yocto Project file's directory structure at:
|
||||
<literallayout class='monospaced'>
|
||||
meta-<bsp_name>/binary/<bootable_images>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This optional area contains useful pre-built kernels and user-space filesystem
|
||||
@@ -199,56 +242,64 @@ meta-<bsp_name>/binary/<bootable_images>
|
||||
|
||||
<section id='bsp-filelayout-layer'>
|
||||
<title>Layer Configuration File</title>
|
||||
<programlisting>
|
||||
meta-<bsp_name>/conf/layer.conf
|
||||
</programlisting>
|
||||
<para>
|
||||
You can find this file in the Yocto Project file's directory structure at:
|
||||
<literallayout class='monospaced'>
|
||||
meta-<bsp_name>/conf/layer.conf
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This file identifies the structure as a Poky layer, identifies the
|
||||
contents of the layer, and contains information about how Poky should use it.
|
||||
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.
|
||||
Generally, a standard boilerplate file such as the following works.
|
||||
In the following example you would replace "bsp" and "_bsp" with the actual name
|
||||
of the BSP (i.e. <bsp_name> from the example template).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<programlisting>
|
||||
# We have a conf directory, add to BBPATH
|
||||
BBPATH := "${BBPATH}:${LAYERDIR}"
|
||||
<literallayout class='monospaced'>
|
||||
# We have a conf directory, add to BBPATH
|
||||
BBPATH := "${BBPATH}:${LAYERDIR}"
|
||||
|
||||
# We have a recipes directory containing .bb and .bbappend files, add to BBFILES
|
||||
BBFILES := "${BBFILES} ${LAYERDIR}/recipes/*/*.bb \
|
||||
${LAYERDIR}/recipes/*/*.bbappend"
|
||||
# We have a recipes directory containing .bb and .bbappend files, add to BBFILES
|
||||
BBFILES := "${BBFILES} ${LAYERDIR}/recipes/*/*.bb \
|
||||
${LAYERDIR}/recipes/*/*.bbappend"
|
||||
|
||||
BBFILE_COLLECTIONS += "bsp"
|
||||
BBFILE_PATTERN_bsp := "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_bsp = "5"
|
||||
</programlisting>
|
||||
BBFILE_COLLECTIONS += "bsp"
|
||||
BBFILE_PATTERN_bsp := "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_bsp = "5"
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This file simply makes BitBake aware of the recipes and configuration directories.
|
||||
This file must exist so that Poky can recognize the BSP.
|
||||
This file must exist so that the Yocto Project build system can recognize the BSP.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="bsp-filelayout-machine">
|
||||
<title>Hardware Configuration Options</title>
|
||||
<programlisting>
|
||||
meta-<bsp_name>/conf/machine/*.conf
|
||||
</programlisting>
|
||||
<para>
|
||||
You can find these files in the Yocto Project file's directory structure at:
|
||||
<literallayout class='monospaced'>
|
||||
meta-<bsp_name>/conf/machine/*.conf
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The machine files bind together all the information contained elsewhere
|
||||
in the BSP into a format that Poky 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
|
||||
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>
|
||||
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
|
||||
that are needed, any bootloader information, and also any special image
|
||||
format requirements.
|
||||
@@ -257,49 +308,61 @@ meta-<bsp_name>/conf/machine/*.conf
|
||||
<para>
|
||||
At least one machine file is required for a BSP layer.
|
||||
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>
|
||||
This directory could also contain shared hardware "tuning" definitions that are commonly used to
|
||||
pass specific optimization flags to the compiler.
|
||||
An example is <filename>tune-atom.inc</filename>:
|
||||
This <filename>crownbay.conf</filename> file could also include
|
||||
a hardware "tuning" file that is commonly used to
|
||||
define the the package architecture and specify
|
||||
optimization flags, which are carefully chosen to give best
|
||||
performance on a given processor.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<programlisting>
|
||||
BASE_PACKAGE_ARCH = "core2"
|
||||
TARGET_CC_ARCH = "-m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse"
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
This example defines a new package architecture called "core2" and uses the
|
||||
specified optimization flags, which are carefully chosen to give best
|
||||
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 Poky itself.
|
||||
</para>
|
||||
<para>
|
||||
Both the base package architecture file and the tune file are optional for a Poky BSP layer.
|
||||
Tuning files are found in the <filename>meta/conf/machine/include</filename>
|
||||
directory.
|
||||
To use them, you simply include them in the machine configuration file.
|
||||
For example, the Crown Bay BSP <filename>crownbay.conf</filename> has the
|
||||
following statement:
|
||||
<literallayout class='monospaced'>
|
||||
include conf/machine/include/tune-atom.inc
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='bsp-filelayout-misc-recipes'>
|
||||
<title>Miscellaneous Recipe Files</title>
|
||||
<programlisting>
|
||||
meta-<bsp_name>/recipes-bsp/*
|
||||
</programlisting>
|
||||
<para>
|
||||
You can find these files in the Yocto Project file's directory structure at:
|
||||
<literallayout class='monospaced'>
|
||||
meta-<bsp_name>/recipes-bsp/*
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This optional directory contains miscellaneous recipe files for the BSP.
|
||||
Most notably would be the formfactor files.
|
||||
For example, in the crownbay BSP there is a <filename>machconfig</filename> file and a
|
||||
<filename>formfactor_0.0.bbappend</filename> file:
|
||||
<programlisting>
|
||||
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/machconfig
|
||||
meta-crownbay/recipes-bsp/formfactor/formfactor_0.0.bbappend
|
||||
</programlisting>
|
||||
For example, in the Crown Bay BSP there is the
|
||||
<filename>formfactor_0.0.bbappend</filename> file, which is an append file used
|
||||
to augment the recipe that starts the build.
|
||||
Furthermore, there are machine-specific settings used during the build that are
|
||||
defined by the <filename>machconfig</filename> files.
|
||||
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>
|
||||
|
||||
<note><para>
|
||||
@@ -310,231 +373,177 @@ meta-crownbay/recipes-bsp/formfactor/formfactor_0.0.bbappend
|
||||
|
||||
<section id='bsp-filelayout-recipes-graphics'>
|
||||
<title>Display Support Files</title>
|
||||
<programlisting>
|
||||
meta-<bsp_name>/recipes-graphics/*
|
||||
</programlisting>
|
||||
<para>
|
||||
You can find these files in the Yocto Project file's directory structure at:
|
||||
<literallayout class='monospaced'>
|
||||
meta-<bsp_name>/recipes-graphics/*
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This optional directory contains recipes for the BSP if it has
|
||||
special requirements for graphics support.
|
||||
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:
|
||||
<programlisting>
|
||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/xcorg.conf
|
||||
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-emgd-bin_1.7.99.2.bb
|
||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/crosscompile.patch
|
||||
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>
|
||||
For example, the Crown Bay BSP contains the following files that support
|
||||
building a BSP that supports and does not support the Intel EMGD:
|
||||
<literallayout class='monospaced'>
|
||||
meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin_1.6.bb
|
||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
|
||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/xorg.conf
|
||||
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay-noemgd/xorg.conf
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='bsp-filelayout-kernel'>
|
||||
<title>Linux Kernel Configuration</title>
|
||||
<programlisting>
|
||||
meta-<bsp_name>/recipes-kernel/linux/linux-yocto_git.bbappend
|
||||
</programlisting>
|
||||
<para>
|
||||
You can find these files in the Yocto Project file's directory structure at:
|
||||
<literallayout class='monospaced'>
|
||||
meta-<bsp_name>/recipes-kernel/linux/linux-yocto_*.bbappend
|
||||
</literallayout>
|
||||
</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>
|
||||
For your BSP you typically want to use an existing Poky kernel found in the
|
||||
Poky repository at <filename class='directory'>meta/recipes-kernel/kernel</filename>.
|
||||
You can append your specific changes to the kernel recipe by using an append file,
|
||||
which is located in the
|
||||
<filename class='directory'>meta-<bsp_name>/recipes-kernel/linux</filename>
|
||||
For your BSP, you typically want to use an existing Yocto Project kernel found in the
|
||||
Yocto Project repository at <filename>meta/recipes-kernel/linux</filename>.
|
||||
You can append your specific changes to the kernel recipe by using a
|
||||
similarly named append file, which is located in the
|
||||
<filename>meta-<bsp_name>/recipes-kernel/linux</filename>
|
||||
directory.
|
||||
</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.
|
||||
In other words, you have selected the kernel in your
|
||||
<filename><bsp_name>.conf</filename> file by adding the following statement:
|
||||
<programlisting>
|
||||
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
|
||||
</programlisting>
|
||||
You would use the <filename>linux-yocto_git.bbappend</filename> file to append
|
||||
<filename><bsp_name>.conf</filename> file by adding the following statements:
|
||||
<literallayout class='monospaced'>
|
||||
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
|
||||
PREFERRED_VERSION_linux-yocto = "3.0%"
|
||||
</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.
|
||||
</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:
|
||||
<programlisting>
|
||||
meta-crownbay/recipes-kernel/linux/linux-yocto_git.bbappend
|
||||
</programlisting>
|
||||
<literallayout class='monospaced'>
|
||||
meta-crownbay/recipes-kernel/linux/linux-yocto_3.0.bbappend
|
||||
</literallayout>
|
||||
The file contains the following:
|
||||
<programlisting>
|
||||
FILESEXTRAPATHS := "${THISDIR}/${PN}"
|
||||
COMPATIBLE_MACHINE_crownbay = "crownbay"
|
||||
KMACHINE_crownbay = "yocto/standard/crownbay"
|
||||
</programlisting>
|
||||
This append file adds "crownbay" as a compatible machine,
|
||||
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.
|
||||
<literallayout class='monospaced'>
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
COMPATIBLE_MACHINE_crownbay = "crownbay"
|
||||
KMACHINE_crownbay = "yocto/standard/crownbay"
|
||||
KERNEL_FEATURES_append_crownbay += " cfg/smp.scc"
|
||||
|
||||
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 ?= "6b4b9acde5fb0ff66ae58fa98274bfe631501499"
|
||||
SRCREV_meta_pn-linux-yocto_crownbay ?= "5b535279e61197cb194bb2dfceb8b7a04128387c"
|
||||
|
||||
SRCREV_machine_pn-linux-yocto_crownbay-noemgd ?= "6b4b9acde5fb0ff66ae58fa98274bfe631501499"
|
||||
SRCREV_meta_pn-linux-yocto_crownbay-noemgd ?= "5b535279e61197cb194bb2dfceb8b7a04128387c"
|
||||
</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 ?= "6b4b9acde5fb0ff66ae58fa98274bfe631501499"
|
||||
SRCREV_meta_pn-linux-yocto_crownbay ?= "5b535279e61197cb194bb2dfceb8b7a04128387c"
|
||||
</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>
|
||||
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
|
||||
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
|
||||
inside a directory located at the same level as your append file and having the same name
|
||||
as the kernel.
|
||||
With all these conditions met simply reference those files in a SRC_URI statement in the append
|
||||
file.
|
||||
With all these conditions met simply reference those files in a
|
||||
<filename>SRC_URI</filename> statement in the append file.
|
||||
</para>
|
||||
<para>
|
||||
For example, suppose you had a set of configuration options in a file called
|
||||
<filename>defconfig</filename>.
|
||||
If you put that file inside a directory named
|
||||
<filename class='directory'>/linux-yocto</filename> and then added
|
||||
a SRC_URI statement such as the following to the append file, those configuration
|
||||
<filename>/linux-yocto</filename> and then added
|
||||
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.
|
||||
<programlisting>
|
||||
SRC_URI += "file://defconfig"
|
||||
</programlisting>
|
||||
<literallayout class='monospaced'>
|
||||
SRC_URI += "file://defconfig"
|
||||
</literallayout>
|
||||
</para>
|
||||
<para>
|
||||
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
|
||||
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:
|
||||
<programlisting>
|
||||
SRC_URI += "file://defconfig \
|
||||
<literallayout class='monospaced'>
|
||||
SRC_URI += "file://defconfig \
|
||||
file://eth.cfg \
|
||||
file://gfx.cfg"
|
||||
</programlisting>
|
||||
</literallayout>
|
||||
</para>
|
||||
<para>
|
||||
The FILESEXTRAPATHS variable is in boilerplate form here in order to make it easy
|
||||
to do that.
|
||||
The <filename>FILESEXTRAPATHS</filename> variable is in boilerplate form here
|
||||
in order to make it easy to do that.
|
||||
It basically allows those configuration files to be found by the build process.
|
||||
</para>
|
||||
<note><para>
|
||||
<note>
|
||||
<para>
|
||||
Other methods exist to accomplish grouping and defining configuration options.
|
||||
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
|
||||
added to the Yocto Project.
|
||||
For information on how to add these configurations directly, see the
|
||||
"Yocto Project Kernel Architecture and Use Manual" on the
|
||||
<ulink url="http://yoctoproject.org/community/documentation">Yocto Project website
|
||||
Documentation Page</ulink>
|
||||
</para>
|
||||
<para>
|
||||
In general, however, the Yocto Project maintainers take care of moving the SRC_URI-specified
|
||||
configuration options to the <filename class='directory'>meta</filename> branch.
|
||||
For information on how to add these configurations directly, see
|
||||
<ulink url='http://yoctoproject.org/docs/1.1/kernel-manual/kernel-manual.html'>
|
||||
The Yocto Project Kernel Architecture and Use Manual</ulink>.</para>
|
||||
<para>
|
||||
In general, however, the Yocto Project maintainers take care of moving the
|
||||
<filename>SRC_URI</filename>-specified
|
||||
configuration options to the <filename>meta</filename> branch.
|
||||
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
|
||||
'global' knowledge about the kinds of common configuration options multiple BSPs in
|
||||
the tree are typically using.
|
||||
This allows for promotion of common configurations into common features.
|
||||
</para></note>
|
||||
This allows for promotion of common configurations into common features.</para>
|
||||
</note>
|
||||
</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 id='bsp-click-through-licensing'>
|
||||
<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.
|
||||
Currently, this functionality is not yet implemented.
|
||||
</para></note>
|
||||
</note>
|
||||
|
||||
<para>
|
||||
In some cases, a BSP contains separately licensed IP
|
||||
@@ -542,7 +551,7 @@ FILESEXTRAPATHS := "${THISDIR}/${PN}"
|
||||
upon the user a requirement to accept the terms of a
|
||||
'click-through' license.
|
||||
Once the license is accepted the
|
||||
Poky build system can then build and include the
|
||||
Yocto Project build system can then build and include the
|
||||
corresponding component in the final BSP image.
|
||||
Some affected components might be essential to the normal
|
||||
functioning of the system and have no 'free' replacement
|
||||
@@ -574,7 +583,7 @@ FILESEXTRAPATHS := "${THISDIR}/${PN}"
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Several methods exist within the Poky build system to satisfy the licensing
|
||||
Several methods exist within the Yocto Project build system to satisfy the licensing
|
||||
requirements for an encumbered BSP.
|
||||
The following list describes them in preferential order:
|
||||
</para>
|
||||
@@ -588,19 +597,6 @@ FILESEXTRAPATHS := "${THISDIR}/${PN}"
|
||||
through a web form.
|
||||
</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>
|
||||
After agreeing to any applicable license terms, the
|
||||
BSP key(s) will be immediately sent to the address
|
||||
@@ -608,9 +604,9 @@ FILESEXTRAPATHS := "${THISDIR}/${PN}"
|
||||
environment variables when building the image:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
$ BSPKEY_<keydomain>=<key> bitbake core-image-sato
|
||||
</programlisting>
|
||||
<literallayout class='monospaced'>
|
||||
$ BSPKEY_<keydomain>=<key> bitbake core-image-sato
|
||||
</literallayout>
|
||||
|
||||
<para>
|
||||
These steps allow the encumbered image to be built
|
||||
@@ -620,7 +616,8 @@ FILESEXTRAPATHS := "${THISDIR}/${PN}"
|
||||
<para>
|
||||
Equivalently and probably more conveniently, a line
|
||||
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>
|
||||
@@ -644,7 +641,7 @@ FILESEXTRAPATHS := "${THISDIR}/${PN}"
|
||||
These prompts usually take the form of instructions
|
||||
needed to manually fetch the encumbered package(s)
|
||||
and md5 sums into the required directory
|
||||
(e.g. the <filename>poky/build/downloads</filename>).
|
||||
(e.g. the <filename>yocto/build/downloads</filename>).
|
||||
Once the manual package fetch has been
|
||||
completed, restart the build to continue where
|
||||
it left off.
|
||||
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 17 KiB |
523
documentation/dev-manual/dev-manual-bsp-appendix.xml
Normal file
@@ -0,0 +1,523 @@
|
||||
<!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 from.</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.
|
||||
See the bulleted item
|
||||
<link linkend='local-yp-release'>Yocto Project Release</link> in
|
||||
<xref linkend='getting-setup'>Getting Setup</xref> earlier in this manual
|
||||
for information on how to get these files.
|
||||
</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 Release,
|
||||
which maps to the <filename>1.1</filename> branch in the repository.
|
||||
These commands create a local branch named <filename>1.1</filename>
|
||||
that tracks the remote branch of the same name.
|
||||
<literallayout class='monospaced'>
|
||||
$ cd poky
|
||||
$ git checkout -b 1.1 origin/1.1
|
||||
Switched to a new branch '1.1'
|
||||
</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 Intel Atom 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>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For information on how to choose a base BSP, see
|
||||
<xref linkend='developing-a-board-support-package-bsp'>Developing a Board Support Package (BSP)</xref>
|
||||
earlier in this manual.
|
||||
</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.
|
||||
Like the local Yocto Project files, you can get the BSP
|
||||
layer one of two 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 <xref linkend='getting-setup'>Getting Setup</xref> earlier in this manual
|
||||
for information on how to get the BSP files.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This example assumes a local <filename>meta-intel</filename> Git repository
|
||||
inside the local <filename>poky</filename> Git repository.
|
||||
The <filename>meta-intel</filename> Git repository contains all the metadata
|
||||
that supports BSP creation.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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>1.1</filename> branch.
|
||||
<literallayout class='monospaced'>
|
||||
$ cd meta-intel
|
||||
$ git checkout -b 1.1 origin/1.1
|
||||
Switched to a new branch 'bernard'
|
||||
</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 must follow the BSP layer naming convention, which is
|
||||
<filename>meta-<name></filename>.
|
||||
The following example assumes your working directory is <filename>meta-intel</filename>
|
||||
inside the local Yocto Project files.
|
||||
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.
|
||||
Good practice for a Git repository, however, is to just copy the new layer alongside
|
||||
the existing
|
||||
BSP layers in the <filename>meta-intel</filename> Git repository:
|
||||
<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>
|
||||
The next step makes changes to <filename>mymachine.conf</filename> itself.
|
||||
The only changes needed for this example are changes to the comment lines.
|
||||
Here we simply substitute the Crown Bay name with an appropriate name.
|
||||
</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>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 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-graphics/xorg-xserver/*emgd*
|
||||
$ 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-emgd*
|
||||
$ 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.
|
||||
</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/link</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 ?= \
|
||||
"372c0ab135978bd8ca3a77c88816a25c5ed8f303"
|
||||
SRCREV_meta_pn-linux-yocto_crownbay ?= \
|
||||
"d5d3c6480d61f83503ccef7fbcd765f7aca8b71b"
|
||||
|
||||
SRCREV_machine_pn-linux-yocto_crownbay-noemgd ?= \
|
||||
"372c0ab135978bd8ca3a77c88816a25c5ed8f303"
|
||||
SRCREV_meta_pn-linux-yocto_crownbay-noemgd ?= \
|
||||
"d5d3c6480d61f83503ccef7fbcd765f7aca8b71b"
|
||||
</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.
|
||||
Here are the final <filename>SRCREV</filename> statements:
|
||||
<literallayout class='monospaced'>
|
||||
SRCREV_machine_pn-linux-yocto_mymachine ?= \
|
||||
"fce17f046d3756045e4dfb49221d1cf60fcae329"
|
||||
SRCREV_meta_pn-linux-yocto_mymachine ?= \
|
||||
"84f1a422d7e21fbc23a687035bdf9d42471f19e0"
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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
|
||||
<ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-2.6.37'>here</ulink>
|
||||
[WRITER's NOTE: Need new link to the 3.0 source repo area when it is available].
|
||||
</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>.
|
||||
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/mymachine"
|
||||
KERNEL_FEATURES_append_mymachine += " cfg/smp.scc"
|
||||
|
||||
SRCREV_machine_pn-linux-yocto_mymachine ?= \
|
||||
"fce17f046d3756045e4dfb49221d1cf60fcae329"
|
||||
SRCREV_meta_pn-linux-yocto_mymachine ?= \
|
||||
"84f1a422d7e21fbc23a687035bdf9d42471f19e0"
|
||||
</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/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 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-live
|
||||
</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>
|
||||
</section>
|
||||
</appendix>
|
||||
|
||||
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
-->
|
||||
8
documentation/dev-manual/dev-manual-customization.xsl
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
|
||||
|
||||
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
|
||||
|
||||
<!-- <xsl:param name="generate.toc" select="'article nop'"></xsl:param> -->
|
||||
|
||||
</xsl:stylesheet>
|
||||
183
documentation/dev-manual/dev-manual-intro.xml
Normal file
@@ -0,0 +1,183 @@
|
||||
<!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-intro'>
|
||||
|
||||
<title>The Yocto Project Development Manual</title>
|
||||
|
||||
<para>
|
||||
WRITER NOTE: The goal of this manual is to provide an over-arching development guide for using the Yocto Project.
|
||||
The intent is to give the reader the “big picture” around development.
|
||||
Much of the information in the manual will be detailed in other manuals.
|
||||
For example, detailed information on Git, repositories and open-source in general can be found in many places.
|
||||
Another example is getting set up to use the Yocto Project, which our Yocto Project Quick Start covers.
|
||||
However, this manual needs to at least address it.
|
||||
One might ask “What becomes of the Poky Reference Manual?”
|
||||
This manual, over time, needs to develop into a pure reference manual where all procedural information
|
||||
eventually ends up in an appropriate guide.
|
||||
A good example of information perfect for the Poky Reference Manual is the appendix on variable
|
||||
definitions (glossary).
|
||||
</para>
|
||||
|
||||
<section id='intro'>
|
||||
<title>Introduction</title>
|
||||
|
||||
<para>
|
||||
Welcome to the Yocto Project Development Guide!
|
||||
This guide provides a general view of the development process using 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'>
|
||||
<title>What this Manual Provides</title>
|
||||
|
||||
<para>
|
||||
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>
|
||||
|
||||
<section id='what-this-manual-does-not-provide'>
|
||||
<title>What this Manual Does Not Provide</title>
|
||||
|
||||
<para>
|
||||
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 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 covered better through the
|
||||
Internet than in this manual.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='other-information'>
|
||||
<title>Other Information</title>
|
||||
|
||||
<para>
|
||||
Because this manual presents overview information for many different topics, you will
|
||||
need to supplement it with other information.
|
||||
The following list presents other sources of information you might find helpful:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>The <ulink url='http://www.yoctoproject.org'>Yocto Project Website</ulink>:
|
||||
</emphasis> The home page for the Yocto Project provides lots of information on the project
|
||||
as well as links to software and documentation.</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||
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>
|
||||
<listitem><para><emphasis>
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||
The Yocto Project Reference Manual</ulink>:</emphasis> This manual is a reference
|
||||
guide to the Yocto Project build component known as "Poky."
|
||||
The manual also contains a reference chapter on Board Support Package (BSP)
|
||||
layout.</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/adt-manual/adt-manual.html'>
|
||||
The Yocto Project Application Development Toolkit (ADT) User's Guide</ulink>:</emphasis>
|
||||
This guide provides information that lets you get going with the ADT to
|
||||
develop projects using the Yocto Project.</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/bsp-guide/bsp-guide.html'>
|
||||
The Yocto Project Board Support Package (BSP) Developer's Guide</ulink>:</emphasis>
|
||||
This guide defines the structure for BSP components.
|
||||
Having a commonly understood structure encourages standardization.</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/kernel-manual/kernel-manual.html'>
|
||||
The Yocto Project Kernel Architecture and Use Manual</ulink>:</emphasis>
|
||||
This manual describes the architecture of the Yocto Project kernel and provides
|
||||
some work flow examples.</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<ulink url='http://www.youtube.com/watch?v=3ZlOu-gLsh0'>
|
||||
Yocto Eclipse Plug-in</ulink>:</emphasis> A step-by-step instructional video that
|
||||
demonstrates how an application developer uses Yocto Plug-in features within
|
||||
the Eclipse IDE.</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<ulink url='http://wiki.yoctoproject.org/wiki/FAQ'>FAQ</ulink>:</emphasis>
|
||||
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 Discussions mailing list.</para></listitem>
|
||||
<listitem><para><ulink url='http://lists.yoctoproject.org/listinfo/poky'></ulink> for a
|
||||
Yocto Project 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
|
||||
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>
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
-->
|
||||
1030
documentation/dev-manual/dev-manual-kernel-appendix.xml
Normal file
483
documentation/dev-manual/dev-manual-model.xml
Normal file
@@ -0,0 +1,483 @@
|
||||
<!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-model'>
|
||||
|
||||
<title>Common Development Models</title>
|
||||
|
||||
<para>
|
||||
Many development models exist for which you can use the Yocto Project.
|
||||
However, for the purposes of this manual we are going to focus on two common ones:
|
||||
System Development and User Application Development.
|
||||
System Development covers Board Support Package (BSP) development and kernel modification.
|
||||
User Application Development covers development of applications that you intend to run on some
|
||||
target hardware.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This chapter presents overviews of both system and application models.
|
||||
If you want to reference specific examples of these development models,
|
||||
see <xref linkend='dev-manual-bsp-appendix'>BSP Development Example</xref> and
|
||||
<xref linkend='dev-manual-kernel-appendix'>Kernel Modification Example</xref>.
|
||||
</para>
|
||||
|
||||
<section id='system-development-model'>
|
||||
<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
|
||||
(see <xref linkend='kernel-spot'></xref>).
|
||||
</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 <xref linkend='yocto-project-terms'>Yocto Project Terms</xref> in this manual.
|
||||
</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 <xref linkend='dev-manual-bsp-appendix'>BSP Development Example</xref>
|
||||
for a detailed example that uses the Crown Bay BSP as a base BSP from which to start.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This illustration and the following list summarizes 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
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html#the-linux-distro'>
|
||||
The Linux Distributions</ulink> section and
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html#packages'>
|
||||
The Packages</ulink> section 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
|
||||
<xref linkend='getting-setup'>Getting Setup</xref> section in this manual.</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 information on how to get these files, see
|
||||
<xref linkend='getting-setup'>Getting Setup</xref> earlier in this manual.</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, 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 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 Atom-based BSP to consider is the Crown Bay that does not support
|
||||
the Intel® 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.
|
||||
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 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
|
||||
<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 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> 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
|
||||
<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.</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
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/poky-ref-manual/poky-ref-manual.html#ref-images'>
|
||||
Reference: Images</ulink> in the
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||
Yocto Project Reference Manual</ulink>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/bsp-guide/bsp-guide.html'>
|
||||
The 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>
|
||||
|
||||
<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/kernel-manual/kernel-manual.html'>
|
||||
The Yocto Project Kernel Architecture and Use Manual</ulink>.
|
||||
You can reference <xref linkend='dev-manual-kernel-appendix'>Kernel Modification Example</xref>
|
||||
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.
|
||||
</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 current
|
||||
Linux Yocto kernel that 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.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/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="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
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html#the-linux-distro'>
|
||||
The Linux Distributions</ulink> section and
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html#packages'>
|
||||
The Packages</ulink> section 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> in
|
||||
<xref linkend='getting-setup'>Getting Setup</xref> 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> in
|
||||
<xref linkend='getting-setup'>Getting Setup</xref> 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.
|
||||
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> in
|
||||
<xref linkend='getting-setup'>Getting Setup</xref> 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 then 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 develop and test the
|
||||
configuration changes you are making to the kernel.</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 for the Yocto Project build system in order for it 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/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
|
||||
end of this manual.</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
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/poky-ref-manual/poky-ref-manual.html#ref-images'>
|
||||
Reference: Images</ulink> in the
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||
Yocto Project Reference Manual</ulink> 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.
|
||||
[WRITER'S NOTE: Not sure if the layer is meta-kernel-dev or if it would be
|
||||
a new layer copied from the work done there.]</para></listitem>
|
||||
<listitem><para><emphasis>Push your configuration and recipe changes upstream to the
|
||||
linux Yocto Git repository (in-tree changes)</emphasis>: If the changes you made
|
||||
are suited for all Linux Yocto users you might want to push the changes up into
|
||||
the Linux Yocto Git repository so that they become part of the kernel tree
|
||||
and available to everyone using the kernel.</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id='place-holder-section-two'>
|
||||
<title>Place-Holder Section For Application Development</title>
|
||||
|
||||
<para>
|
||||
Text needed here.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
-->
|
||||
658
documentation/dev-manual/dev-manual-newbie.xml
Normal file
@@ -0,0 +1,658 @@
|
||||
<!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-newbie'>
|
||||
|
||||
<title>The Yocto Project Open Source Development Environment</title>
|
||||
|
||||
<para>
|
||||
This chapter helps you understand the Yocto Project as an open source development project.
|
||||
In general, working in an open-source environment is very different than working in a
|
||||
proprietary environment.
|
||||
Additionally, the Yocto Project uses specific tools and constructs as part of its development
|
||||
environment.
|
||||
The chapter specifically addresses open source philosophy, licensing issues, code repositories,
|
||||
the open source distributed version control system Git, and best practices using Yocto Project.
|
||||
</para>
|
||||
|
||||
<section id='open-source-philosophy'>
|
||||
<title>Open Source Philosophy</title>
|
||||
|
||||
<para>
|
||||
Open source philosophy is characterized by software development directed by peer production
|
||||
and collaboration through a concerned community of developers.
|
||||
Contrast this to the more standard centralized development models used by commercial software
|
||||
companies where a finite set of developers produce a product for sale using a defined set
|
||||
of procedures that ultimately result in an end-product whose architecture and source material
|
||||
are closed to the public.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Open source projects conceptually have differing concurrent agendas, approaches, and production.
|
||||
These facets of the development process can come from anyone in the public (community) that has a
|
||||
stake in the software project.
|
||||
The open source environment contains new copyright, licensing, domain, and consumer issues
|
||||
that differ from the more traditional development environment.
|
||||
In an open source environment the end-product, source material, and documentation are
|
||||
all available to the public at no cost.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A benchmark example of an open source project is the Linux Kernel, which was initially conceived
|
||||
and created by Finnish computer science student Linus Torvalds in 1991.
|
||||
Conversely, a good example of a non-open source project is the Windows family of operating
|
||||
systems developed by Microsoft Corporation.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Wikipedia has a good historical description of the Open Source Philosophy
|
||||
<ulink url='http://en.wikipedia.org/wiki/Open_source'>here</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can also find helpful information on how to participate in the Linux Community
|
||||
<ulink url='http://ldn.linuxfoundation.org/book/how-participate-linux-community'>here</ulink>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='yocto-project-repositories'>
|
||||
<title>Yocto Project Source Repositories</title>
|
||||
|
||||
<para>
|
||||
The Yocto Project team maintains complete source repositories for all Yocto Project files
|
||||
<ulink url='http://git.yoctoproject.org/cgit/cgit.cgi'>here</ulink>.
|
||||
This web-based source code browser is organized into categories by function such as
|
||||
IDE Plugins, Matchbox, Poky, Yocto Linux Kernel, and so forth.
|
||||
From the interface, you can click on any particular item in the "Name" column and
|
||||
see the URL at the bottom of the page that you need to set up a Git repository for
|
||||
that particular item.
|
||||
The ability to create Git repositories of the Yocto Project source allows you to
|
||||
make changes, contribute to the history, and ultimately enhance the Yocto Project's
|
||||
tools, Board Support Packages, and so forth.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Conversely, if you are a developer that is not interested in contributing back to the
|
||||
Yocto Project you have the ability to simply download and extract release tarballs
|
||||
and use them within the Yocto Project environment.
|
||||
All that is required is a particular release of Yocto Project, a kernel, and
|
||||
your application source code.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For any supported release of Yocto Project you can go to the Yocto Project website’s
|
||||
<ulink url='http://www.yoctoproject.org/download'>download page</ulink> and get a
|
||||
tarball of the release.
|
||||
You can also go to this site to download any supported BSP tarballs.
|
||||
Unpacking the tarball gives you a hierarchical directory structure of Yocto Project
|
||||
files that lets you develop using the Yocto Project.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Once you are set up through either tarball extraction or creation of Git repositories,
|
||||
you are ready to develop.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In summary, here is where you can get the Yocto Project files needed for development:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis><ulink url='http://git.yoctoproject.org/cgit/cgit.cgi'>Source Repositories:</ulink></emphasis>
|
||||
This area contains IDE Plugins, Matchbox, Poky, Poky Support, Tools, Yocto Linux Kernel, and Yocto
|
||||
Metadata Layers.
|
||||
You can create Git repositories for each of these areas.</para>
|
||||
<para>
|
||||
<imagedata fileref="figures/source-repos.png" align="center" width="6in" depth="4in" />
|
||||
</para></listitem>
|
||||
<listitem><para><anchor id='index-downloads' /><emphasis><ulink url='http://autobuilder.yoctoproject.org/downloads/'>Index of /downloads:</ulink></emphasis>
|
||||
This area contains an index of the Eclipse-plugin, miscellaneous support, poky, pseudo, and
|
||||
all released versions of Yocto Project in the form of images or tarballs.
|
||||
Downloading and extracting these files does not produce a Git repository but rather
|
||||
a snapshot of a particular release or image.
|
||||
[WRITER NOTE: link will be http://downloads.yoctoproject.org.]</para>
|
||||
<para>
|
||||
<imagedata fileref="figures/index-downloads.png" align="center" width="6in" depth="4in" />
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis><ulink url='http://www.yoctoproject.org/download'>Yocto Project Download Page</ulink></emphasis>
|
||||
This page on the Yocto Project website allows you to download any Yocto Project
|
||||
release or Board Support Package (BSP) in tarball form.
|
||||
The tarballs are similar to those found in the
|
||||
<ulink url='http://autobuilder.yoctoproject.org/downloads/'>Index of /downloads:</ulink> area.</para>
|
||||
<para>
|
||||
<imagedata fileref="figures/yp-download.png" align="center" width="6in" depth="4in" />
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='yocto-project-terms'>
|
||||
<title>Yocto Project Terms</title>
|
||||
|
||||
<para>
|
||||
Following is a list of terms and definitions users new to the Yocto Project development
|
||||
environment might find helpful.
|
||||
Some terms are universal but are included here just in case:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Image</emphasis> - An image is the result produced when
|
||||
BitBake processes a given collection of recipes and related metadata.
|
||||
Images are the binary output that runs on specific hardware and for specific
|
||||
use cases.
|
||||
For a list of the supported image types that the Yocto Project provides, see the
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/poky-ref-manual/poky-ref-manual.html#ref-images'>
|
||||
Reference: Images</ulink> appendix in
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/poky-ref-manual/poky-ref-manual.html'>
|
||||
The Yocto Project Reference Manual</ulink>.</para></listitem>
|
||||
<listitem><para><emphasis>Recipe</emphasis> - A set of instructions for building packages.
|
||||
A recipe describes where you get source code and which patches to apply.
|
||||
Recipes describe dependencies for libraries or for other recipes and they
|
||||
also contain configuration and compilation options.
|
||||
Recipes contain the logical unit of execution, the software/images to build, and
|
||||
use the <filename>.bb</filename> file extension.</para></listitem>
|
||||
<listitem><para><emphasis>BitBake</emphasis> - The task executor and scheduler used by Yocto Project
|
||||
to build images.
|
||||
For more information on BitBake, see the <ulink url='http://bitbake.berlios.de/manual/'>
|
||||
BitBake documentation</ulink>.</para></listitem>
|
||||
<listitem><para><emphasis>Package</emphasis> - The packaged output from a baked recipe.
|
||||
A package is generally the compiled binaries produced from the recipe's sources.
|
||||
You ‘bake’ something by running it through BitBake.</para></listitem>
|
||||
<listitem><para><emphasis>Layer</emphasis> - A collection of recipes representing the core,
|
||||
a BSP, or an application stack.</para></listitem>
|
||||
<listitem><para><emphasis>Metadata</emphasis> - A term used throughout the Yocto Project
|
||||
documentation that refers to the files that BitBake parses when building an image.
|
||||
Metadata includes recipes, classes, and configuration files.</para></listitem>
|
||||
<listitem><para><emphasis>Meta-Toolchain</emphasis> - A collection of software development
|
||||
tools and utilities that allow you to develop software for targeted architectures.
|
||||
These toolchains contain cross-compilers, linkers, and debuggers that are specific to
|
||||
an architecure.
|
||||
You can use the Yocto Project to build meta-toolchains in tarball form that when
|
||||
unpacked contain the development tools you need to cross-compile and test your software.
|
||||
The Yocto Project ships with images that contain toolchains for supported architectures
|
||||
as well.</para></listitem>
|
||||
<listitem><para><emphasis>Configuration File</emphasis>: Configuration information in the
|
||||
<filename>.conf</filename> files provides global definitions of variables.
|
||||
The <filename>build/conf/local.conf</filename> configuration file defines user-defined variables
|
||||
that effect each build.
|
||||
The <filename>distro/poky.conf</filename> configuration file defines Yocto ‘distro’ configuration
|
||||
variables used only when building with this policy.
|
||||
The <filename>machine/beagleboard.conf</filename> configuration file defines variables
|
||||
for the Beagleboard and are only used when building for that target
|
||||
(i.e. Texas Instruments ARM Cortex-A8 development board).
|
||||
Configuration files end with a <filename>.conf</filename> filename extension.</para></listitem>
|
||||
<listitem><para><emphasis>Classes</emphasis> - Files that provide for logic encapsulation
|
||||
and inheritance allowing commonly used patterns to be defined once and easily used
|
||||
in multiple recipes.
|
||||
Class files end with the <filename>.bbclass</filename> filename extension.</para></listitem>
|
||||
<listitem><para><emphasis>Append Files</emphasis> - Files that append build information to
|
||||
a recipe file.
|
||||
Information in append files override the information in the similarly-named recipe file.
|
||||
Append files use the <filename>.bbappend</filename> filename suffix.</para></listitem>
|
||||
<listitem><para><emphasis>Tasks</emphasis> - Arbitrary groups of software Recipes.
|
||||
You simply use Tasks to hold recipes that when built usually accomplish a single task.
|
||||
For example, a task could contain the recipes for a company’s proprietary or value-add software.
|
||||
Or the task could contain the recipes that enable graphics.
|
||||
A task is really just another recipe.
|
||||
Because task files are recipes, they end with the <filename>.bb</filename> filename
|
||||
extension.</para></listitem>
|
||||
<listitem><para><emphasis>OE-Core</emphasis> - A core set of metadata originating
|
||||
with OpenEmbedded (OE) that is shared between OE and the Yocto Project.
|
||||
This metadata is found in the <filename>meta</filename> directory of the Yocto Project
|
||||
files.</para></listitem>
|
||||
<listitem><para><emphasis>Upstream</emphasis> - A reference to source code or repositories
|
||||
that are not local to the development system but located in a master area that is controlled
|
||||
by the maintainer of the source code.
|
||||
For example, in order for a developer to work on a particular piece of code they need to
|
||||
first get a copy of it from an "upstream" source.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='licensing'>
|
||||
<title>Licensing</title>
|
||||
|
||||
<para>
|
||||
Because open source projects are open to the public they have different licensing structures in place.
|
||||
License evolution for both Open Source and Free Software has an interesting history.
|
||||
If you are interested in the history you can find basic information here:
|
||||
<itemizedlist>
|
||||
<listitem><para><ulink url='http://en.wikipedia.org/wiki/Open-source_license'>Open source license history</ulink>
|
||||
</para></listitem>
|
||||
<listitem><para><ulink url='http://en.wikipedia.org/wiki/Free_software_license'>Free software license
|
||||
history</ulink></para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In general, the Yocto Project is broadly licensed under the Massachusetts Institute of Technology
|
||||
(MIT) License.
|
||||
MIT licensing permits the reuse of software within proprietary software as long as the
|
||||
license is distributed with that software.
|
||||
MIT is also compatible with the GNU General Public License (GPL).
|
||||
Patches to the Yocto Project follow the upstream licensing scheme.
|
||||
You can find information on the MIT license at
|
||||
<ulink url='http://www.opensource.org/licenses/mit-license.php'>here</ulink>.
|
||||
You can find information on the GNU GPL <ulink url='http://www.opensource.org/licenses/LGPL-3.0'>
|
||||
here</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When you build an image using Yocto Project, the build process uses a known list of licenses to
|
||||
ensure compliance.
|
||||
Once the build completes, the list of all licenses found and used during the build are
|
||||
kept in the resulting build directory at
|
||||
<filename><build_directory>/tmp/deploy/images/licenses</filename>.
|
||||
If a module requires a license that is not in the base list, the build process
|
||||
generates a warning during the build.
|
||||
These tools make it easier for a developer to be certain of the licenses with which
|
||||
their shipped products must comply.
|
||||
However, it is still up to the developer to resolve potential licensing issues.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The base list of licenses used by the build process is a combination of the Software Package
|
||||
Data Exchange (SPDX) list and the Open Source Initiative (OSI) projects.
|
||||
<ulink url='http://spdx.org'>SPDX Group</ulink> is a working group of the Linux Foundation
|
||||
that maintains a specification
|
||||
for a standard format for communicating the components, licenses, and copyrights
|
||||
associated with a software package.
|
||||
<ulink url='http://opensource.org'>OSI</ulink> is a corporation dedicated to the Open Source
|
||||
Definition and the effort for reviewing
|
||||
and approving licenses that are OSD-conformant.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can find a list of the combined SPDX and OSI licenses that the Yocto Project uses
|
||||
<ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/files/common-licenses'>here</ulink>.
|
||||
The wiki page discusses the license infrastructure used by the Yocto Project.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='git'>
|
||||
<title>Git</title>
|
||||
|
||||
<para>
|
||||
The Yocto Project uses Git, which is a free, open source distributed version control system.
|
||||
Git supports distributed development, non-linear development, and can handle large projects.
|
||||
It is best that you know how to work with Git if you are going to use Yocto Project for development.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Git has an extensive set of commands that lets you manage changes and perform
|
||||
collaboration over the life of a project.
|
||||
Conveniently though, you can manage with a small set of basic operations and workflows
|
||||
once you understand the basic philosophy behind Git.
|
||||
You do not have to be an expert in Git to be functional.
|
||||
A good place to look for instruction on a minimal set of Git commands is
|
||||
<ulink url='http://git-scm.com/documentation'>here</ulink>.
|
||||
If you need to download Git you can do so
|
||||
<ulink url='http://git-scm.com/download'>here</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Git works by using branching techniques that track content change (not files)
|
||||
within a project (e.g. a new feature or updated documentation).
|
||||
Creating a tree-like structure based on project divergence allows for excellent historical
|
||||
information over the life of a project.
|
||||
This methodology also allows for an environment in which you can do lots of
|
||||
experimentation on your project as you develop changes or new features.
|
||||
For example, you can create a “branch”, experiment with some feature, and then
|
||||
if you like the feature you incorporate the branch into the tree.
|
||||
If you don’t, you cut the branch off by deleting it.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you don’t know much about Git, we suggest you educate
|
||||
yourself by visiting the links previously mentioned.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The following list briefly describes some basic Git operations as a way to get started.
|
||||
As with any set of commands, this list (in most cases) simply shows the base command and
|
||||
omits the many arguments they support.
|
||||
See the Git documentation for complete descriptions and strategies on how to use these commands:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis><filename>git init</filename></emphasis> – Initializes an empty Git repository.
|
||||
You cannot use Git commands unless you have a <filename>.git</filename> repository.</para></listitem>
|
||||
<listitem><para><emphasis><filename>git clone</filename></emphasis> – Creates a clone of a repository.
|
||||
During collaboration this command allows you to create a local repository that is on
|
||||
equal footing with a fellow developer’s repository.</para></listitem>
|
||||
<listitem><para><emphasis><filename>git add</filename></emphasis> – Adds updated file contents to the index that
|
||||
Git uses to track changes.
|
||||
All files that have changed must be added before they can be committed.</para></listitem>
|
||||
<listitem><para><emphasis><filename>git commit</filename></emphasis> – Creates a “commit” that documents
|
||||
the changes you made.
|
||||
Commits are used for historical purposes, for determining if a maintainer of a project
|
||||
will allow the change, and for ultimately pushing the change from your local Git repository
|
||||
into the project’s upstream (or master) repository.</para></listitem>
|
||||
<listitem><para><emphasis><filename>git status</filename></emphasis> – Reports any modified files that
|
||||
possibly need added and committed.</para></listitem>
|
||||
<listitem><para><emphasis><filename>git checkout <branch-name></filename></emphasis> - Changes
|
||||
your working branch. This command is analogous to “cd”.</para></listitem>
|
||||
<listitem><para><emphasis><filename>git checkout –b <working-branch></filename></emphasis> - Creates
|
||||
a working branch on your local machine where you can isolate work.
|
||||
It is a good idea to use local branches when adding specific features or changes.
|
||||
This way if you don’t like what you have done you can easily get rid of the work.</para></listitem>
|
||||
<listitem><para><emphasis><filename>git branch</filename></emphasis> – Reports existing branches and
|
||||
tells you which branch in which you are currently working.</para></listitem>
|
||||
<listitem><para><emphasis><filename>git branch -D <branch-name></filename></emphasis> –
|
||||
Deletes an existing branch. You need to be in a branch other than the one you are deleting
|
||||
in order to delete <branch-name>.</para></listitem>
|
||||
<listitem><para><emphasis><filename>git pull</filename></emphasis> – Retrieves information from an upstream Git
|
||||
repository and places it in your local Git repository.
|
||||
You use this command to make sure you are synchronized with the upstream repository
|
||||
from which the project’s maintainer uses to pull changes into the master repository.</para></listitem>
|
||||
<listitem><para><emphasis><filename>git push</filename></emphasis> – Sends all your local changes you
|
||||
have committed to an upstream Git repository.
|
||||
The maintainer of the project draws from these repositories when adding your changes to the
|
||||
project’s master repository.</para></listitem>
|
||||
<listitem><para><emphasis><filename>git merge</filename></emphasis> – Combines or adds changes from one
|
||||
local branch of your repository with another branch.
|
||||
When you create a local Git repository the default branch is named “master”.
|
||||
A typical workflow is to create a temporary branch for isolated work, make and commit your
|
||||
changes, switch to the master branch, merge the changes from the temporary branch into the
|
||||
master branch, and then delete the temporary branch</para></listitem>
|
||||
<listitem><para><emphasis><filename>git cherry-pick</filename></emphasis> – Choose and apply specific
|
||||
commits from one branch into another branch.
|
||||
There are times when you might not be able to merge all the changes in one branch with
|
||||
another but need to pick out certain ones.</para></listitem>
|
||||
<listitem><para><emphasis><filename>gitk</filename></emphasis> – Provides a GUI view of the branches
|
||||
and changes in your local Git repository.
|
||||
This command is a good way to see where things have diverged in your local repository.</para></listitem>
|
||||
<listitem><para><emphasis><filename>git log</filename></emphasis> – Reports a history of your changes to the
|
||||
repository.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='workflows'>
|
||||
<title>Workflows</title>
|
||||
|
||||
<para>
|
||||
This section provides some overview on workflows using Git.
|
||||
In particular, the information covers basic practices that describe roles and actions in a
|
||||
collaborative development environment.
|
||||
Again, if you are familiar with this type of development environment you might want to just skip the section.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The Yocto Project files are maintained using Git in a "master" branch whose Git history
|
||||
tracks every change and whose structure provides branches for all diverging functionality.
|
||||
Although there is no need to use Git, This practice is typical for open-source projects.
|
||||
For the Yocto Project a key individual called the "maintainer" is responsible for "master".
|
||||
The "master" branch is the “upstream” repository where the final builds of the project occur.
|
||||
The maintainer is responsible for allowing changes in from other developers and for
|
||||
organizing the underlying branch structure to reflect release strategies and so forth.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The project also has contribution repositories known as “contrib” areas.
|
||||
These areas temporarily hold changes to the project that have been submitted or committed
|
||||
by the Yocto Project development team and by community members that contribute to the project.
|
||||
The maintainer determines if the changes are qualified to be moved from the "contrib" areas
|
||||
into the "master" branch of the Git repository.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Developers (including contributing community members) create and maintain cloned repositories
|
||||
of the upstream "master" branch.
|
||||
These repositories are local to their development platforms and are used to develop changes.
|
||||
When a developer is satisfied with a particular feature or change they “push” the changes
|
||||
to the appropriate "contrib" repository.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Developers are responsible for keeping their local repository up-to-date with "master".
|
||||
They are also responsible for straightening out any conflicts that might arise within files
|
||||
that are being worked on simultaneously by more than one person.
|
||||
All this work is done locally on the developer’s machine before anything is pushed to a
|
||||
"contrib" area and examined at the maintainer’s level.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A somewhat formal method exists by which developers commit changes and push them into the
|
||||
"contrib" area and subsequently request that the maintainer include them into "master"
|
||||
This process is called “submitting a patch” or “submitting a change.”
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To summarize the environment: we have a single point of entry for changes into the project’s
|
||||
"master" branch of the Git repository, which is controlled by the project’s maintainer.
|
||||
And, we have a set of developers who independently develop, test, and submit changes
|
||||
to "contrib" areas for the maintainer to examine.
|
||||
The maintainer then chooses which changes are going to become permanently a part of the project.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<imagedata fileref="figures/git-workflow.png" width="6in" depth="3in" align="left" scalefit="1" />
|
||||
</para>
|
||||
|
||||
<para>
|
||||
While each development environment is unique, there are some best practices or methods
|
||||
that help development run smoothly.
|
||||
The following list describes some of these practices.
|
||||
For more detailed information about these strategies see
|
||||
<ulink url='http://www.kernel.org/pub/software/scm/git/docs/gitworkflows.html'>Git Workflows</ulink>.
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Make Small Changes</emphasis> - It is best to keep your changes you commit
|
||||
small as compared to bundling many disparate changes into a single commit.
|
||||
This practice not only keeps things manageable but also allows the maintainer
|
||||
to more easily include or refuse changes.</para>
|
||||
<para>It is also good practice to leave the repository in a state that allows you to
|
||||
still successfully build your project.</para></listitem>
|
||||
<listitem><para><emphasis>Use Branches Liberally</emphasis> - It is very easy to create, use, and
|
||||
delete local branches in your working Git repository.
|
||||
You can name these branches anything you like.
|
||||
It is helpful to give them names associated with the particular feature or change
|
||||
on which you are working.
|
||||
Once you are done with a feature or change you simply discard the branch.</para></listitem>
|
||||
<listitem><para><emphasis>Merge Changes</emphasis> - The <filename>git merge</filename>
|
||||
command allows you to take the
|
||||
changes from one branch and fold them into another branch.
|
||||
This process is especially helpful when more than a single developer might be working
|
||||
on different parts of the same feature.
|
||||
Merging changes also automatically identifies any collisions or “conflicts”
|
||||
that might happen resulting from the same lines of code being altered by two different
|
||||
developers.</para></listitem>
|
||||
<listitem><para><emphasis>Manage Branches</emphasis> - Because branches are easy to use, you should
|
||||
use a system where branches indicate varying levels of code readiness.
|
||||
For example, you can have a “work” branch to develop in, a “test” branch where the code or
|
||||
change is tested, a “stage” branch where changes are ready to be committed, and so forth.
|
||||
As your project develops, you can merge code across the branches to reflect ever-increasing
|
||||
stable states of the development.</para></listitem>
|
||||
<listitem><para><emphasis>Use Push and Pull</emphasis> - The push-pull workflow is based on the
|
||||
concept of developers “pushing” local commits to a remote repository, which is
|
||||
usually a contribution repository.
|
||||
It is also based on the developers “pulling” known states of the project down into their
|
||||
local development repositories.
|
||||
This workflow easily allows you to pull changes submitted by other developers from the
|
||||
upstream repository into your work area ensuring that you have the most recent software
|
||||
on which to develop.
|
||||
The Yocto Project has two scripts named <filename>create-pull-request</filename> and
|
||||
<filename>send-pull-request</filename> that ship with the release to facilitate this
|
||||
workflow.
|
||||
You can find these scripts in the local Yocto Project files Git repository in
|
||||
<filename>scripts</filename>.</para></listitem>
|
||||
<listitem><para><emphasis>Patch Workflow</emphasis> - This workflow allows you to notify the
|
||||
maintainer through an email that you have a change (or patch) you would like considered
|
||||
for the "master" branch of the Git repository.
|
||||
To send this type of change you format the patch and then send the email using the Git commands
|
||||
<filename>git format-patch</filename> and <filename>git send-email</filename>.
|
||||
You can find information on how to submit later in this chapter.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='tracking-bugs'>
|
||||
<title>Tracking Bugs</title>
|
||||
|
||||
<para>
|
||||
The Yocto Project uses <ulink url='http://www.bugzilla.org/about/'>Bugzilla</ulink> to track bugs.
|
||||
This bug-tracking application works well for group development because it tracks bugs and code
|
||||
changes, can be used to communicate changes and problems with developers, can be used to
|
||||
submit and review patches, and can be used to manage quality assurance.
|
||||
You can find a good overview of Bugzilla <ulink url='http://www.bugzilla.org/about/'>here</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Sometimes it is helpful to submit, investigate, or track a bug against the Yocto Project itself
|
||||
such as when discovering an issue with some component of the build system that acts contrary
|
||||
to the documentation or expectations.
|
||||
You can find information
|
||||
for Bugzilla configuration and bug tracking procedures specific to the Yocto Project
|
||||
<ulink url='https://wiki.yoctoproject.org/wiki/Bugzilla_Configuration_and_Bug_Tracking'>here</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The Yocto Project uses its own version of the Bugzilla application.
|
||||
You can find the home page <ulink url='http://bugzilla.yoctoproject.org'>here</ulink>.
|
||||
You need to use this implementation of Bugzilla when logging a defect against anything released
|
||||
by the Yocto Project team.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Here are some things to remember when dealing with bugs against the Yocto Project:
|
||||
<itemizedlist>
|
||||
<listitem><para>The Yocto Project follows a naming bug-naming convention:
|
||||
<filename>[YOCTO #<number>]</filename>, where <filename><number></filename> is the
|
||||
assigned defect ID used in Bugzilla.
|
||||
So, for example, a valid way to refer to a defect when creating a commit comment
|
||||
would be <filename>[YOCTO 1011]</filename>.
|
||||
This convention becomes important if you are submitting patches against the Yocto Project
|
||||
code itself.
|
||||
See the following section for more information.</para></listitem>
|
||||
<listitem><para>Defects for Yocto Project fall into one of four classifications: Yocto Projects,
|
||||
Infrastructure, Poky, and Yocto Metadata Layers.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='how-to-submit-a-change'>
|
||||
<title>How to Submit a Change</title>
|
||||
|
||||
<para>
|
||||
Contributions to the Yocto Project are very welcome.
|
||||
You should send patches to the Yocto Project mailing list to get it in front of the
|
||||
Yocto Project Maintainer.
|
||||
When you send your patch, be sure to include a "signed-off-by:"
|
||||
line in the same style as required by the Linux kernel.
|
||||
Adding this line signifies the developer has agreed to the Developer's Certificate of Origin 1.1
|
||||
as follows:
|
||||
<literallayout class='monospaced'>
|
||||
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.
|
||||
</literallayout>
|
||||
A Poky contributions tree (<filename>poky-contrib</filename>,
|
||||
<filename>git://git.yoctoproject.org/poky-contrib.git</filename>)
|
||||
exists for contributors to stage contributions.
|
||||
If people desire such access, please ask on the mailing list.
|
||||
Usually, the Yocto Project team will grant access to anyone with a proven track
|
||||
record of good patches.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In a collaborative environment, it is necessary to have some sort of standard
|
||||
or method through which you submit changes.
|
||||
Otherwise, things would get quite chaotic.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When you submit a change or patch to the Yocto Project, you must follow certain procedures.
|
||||
In particular, the headers in patches and the commit messages must follow a certain standard.
|
||||
The general process is the same as described earlier in this chapter.
|
||||
For complete details on how to create proper commit messages and patch headers see
|
||||
[WRITER NOTE: I need the link to Mark's wiki page here that describes the process.]
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Following are general instructions for both pushing changes upstream and for submitting changes as patches.
|
||||
</para>
|
||||
|
||||
<section id='pushing-a-change-upstream'>
|
||||
<title>Pushing a Change Upstream</title>
|
||||
|
||||
<para>
|
||||
The basic flow for pushing a change to an upstream "contrib" Git repository is as follows:
|
||||
<itemizedlist>
|
||||
<listitem><para>Make your changes in your local Git repository.</para></listitem>
|
||||
<listitem><para>Stage your commit (or change) by using the <filename>git add</filename>
|
||||
command.</para></listitem>
|
||||
<listitem><para>Commit the change by using the <filename>git commit</filename>
|
||||
command and push it to the upstream "contrib" repository.
|
||||
Be sure to provide a commit message that follows the project’s commit standards.</para></listitem>
|
||||
<listitem><para>Notify the maintainer that you have pushed a change.</para></listitem>
|
||||
</itemizedlist>
|
||||
You can find general Git information on how to push a change upstream
|
||||
<ulink url='http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#Developing-With-git'>
|
||||
here</ulink>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='submitting-a-patch'>
|
||||
<title>Submitting a Patch</title>
|
||||
|
||||
<para>
|
||||
If you have a just a few changes you can commit them and then submit them as an email to the maintainer.
|
||||
Here is a general procedure:
|
||||
<itemizedlist>
|
||||
<listitem><para>Make your changes in your local Git repository.</para></listitem>
|
||||
<listitem><para>Stage your commit (or change) by using the <filename>git add</filename>
|
||||
command.</para></listitem>
|
||||
<listitem><para>Commit the change by using the <filename>git commit</filename> command.
|
||||
Be sure to provide a commit message that follows the project’s commit standards.</para></listitem>
|
||||
<listitem><para>Format the commit by using the <filename>git format-patch</filename>
|
||||
command.
|
||||
This step produces a numbered series of files in the current directory – one for
|
||||
each commit.</para></listitem>
|
||||
<listitem><para>Import the files into your mail client by using the
|
||||
<filename>git-send-email</filename> command.</para></listitem>
|
||||
<listitem><para>Send the email by hand to the maintainer.</para></listitem>
|
||||
</itemizedlist>
|
||||
Be aware that there could be protocols and standards that you need to follow for your particular
|
||||
project.
|
||||
You can find general Git information for submitting a patch
|
||||
<ulink url='http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#sharing-development'>
|
||||
here</ulink>.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</chapter>
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
-->
|
||||
278
documentation/dev-manual/dev-manual-start.xml
Normal file
@@ -0,0 +1,278 @@
|
||||
<!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-start'>
|
||||
|
||||
<title>Getting Started with the Yocto Project</title>
|
||||
|
||||
<para>
|
||||
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
|
||||
hardware supported by the Yocto Project by reading the
|
||||
<ulink url='http://www.yoctoproject.org/docs/yocto-quick-start/yocto-project-qs.html'>
|
||||
Yocto Project Quick Start</ulink> located on the <ulink url='http://www.yoctoproject.org'>
|
||||
Yocto Project website</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
|
||||
<section id='introducing-the-yocto-project'>
|
||||
<title>Introducing the Yocto Project</title>
|
||||
|
||||
<para>
|
||||
The Yocto Project is an open-source collaboration project focused on embedded Linux development.
|
||||
The project currently provides a build system and various ancillary tools suitable for the
|
||||
embedded developer.
|
||||
The Yocto Project also features the Sato reference User Interface, which is optimized for
|
||||
stylus driven, low-resolution screens.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can use the Yocto Project, which uses the BitBake build tool, to develop complete Linux
|
||||
images and associated user-space applications for architectures based on ARM, MIPS, PowerPC,
|
||||
x86 and x86-64.
|
||||
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 Eclipse user, you can install an Eclipse Yocto Plug-in to allow you to
|
||||
develop within that familiar environment.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='getting-setup'>
|
||||
<title>Getting Setup</title>
|
||||
|
||||
<para>
|
||||
Here is what you need to get set up to use the Yocto Project:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Host System:</emphasis> You should have a reasonably current
|
||||
Linux-based host system.
|
||||
You will have the best results with a recent release of Fedora,
|
||||
OpenSUSE, or Ubuntu as these releases are frequently tested and officially supported
|
||||
host systems.
|
||||
You should also have about 100 gigabytes of free disk space for building images.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>Packages:</emphasis> The Yocto Project requires certain packages
|
||||
exist on your development system (e.g. Python 2.6 or 2.7).
|
||||
See <ulink url='http://www.yoctoproject.org/docs/yocto-quick-start/yocto-project-qs.html#packages'>
|
||||
The Packages</ulink> section in the Yocto Project Quick start for the exact package
|
||||
requirements and the installation commands 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 will refer to the resulting
|
||||
hierarchical set of files as "the local Yocto Project files."
|
||||
</note>
|
||||
<itemizedlist>
|
||||
<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
|
||||
from the website’s <ulink url='http://yoctoproject.org/download'>download page</ulink>.
|
||||
Once you have the tarball, just extract it into a directory of your choice.</para>
|
||||
|
||||
<para>For example, the following command extracts the Yocto Project 1.1 release tarball
|
||||
into the current working directory and sets up a file structure whose top-level
|
||||
directory is named <filename>poky-1.1</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
$ tar xfj poky-1.1.tar.bz2
|
||||
</literallayout></para>
|
||||
<para>This method does not produce a <filename>poky</filename> Git repository.
|
||||
You end up simply with a local snapshot of Yocto Project files that are based on the
|
||||
particular release in the 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
|
||||
<filename>poky</filename> Git repository of the Yocto Project.
|
||||
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 <filename>poky</filename>
|
||||
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
|
||||
<xref linkend='git'>Git</xref> in
|
||||
<xref linkend='dev-manual-newbie'>Working with Open Source Code</xref>.
|
||||
<literallayout class='monospaced'>
|
||||
$ git clone git://git.yoctoproject.org/poky
|
||||
Initialized empty Git repository in /home/scottrif/poky/.git/
|
||||
remote: Counting objects: 107624, done.
|
||||
remote: Compressing objects: 100% (37128/37128), done.
|
||||
remote: Total 107624 (delta 73393), reused 99851 (delta 67287)
|
||||
Receiving objects: 100% (107624/107624), 69.74 MiB | 483 KiB/s, done.
|
||||
Resolving deltas: 100% (73393/73393), 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'>
|
||||
wiki page</ulink>, which describes how to create both <filename>poky</filename>
|
||||
and <filename>meta-intel</filename> Git repositories.</para></listitem>
|
||||
</itemizedlist></para></listitem>
|
||||
<listitem id='local-kernel-files'><para><emphasis>Linux Yocto Kernel:</emphasis>
|
||||
If you are going to be making modifications to a supported Linux Yocto kernel you
|
||||
need to get set up so that you can edit 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</filename> kernel and then create a copy of
|
||||
that clone.
|
||||
<note>If you currently have a local Linux Yocto kernel Git repository, you can
|
||||
reference this local repository rather than the upstream Git repository as
|
||||
part of the <filename>clone</filename> command.
|
||||
Doing so can speed up the process.</note>
|
||||
The bare clone is named <filename>linux-yocto-3.0.git</filename>, while the
|
||||
copy is named <filename>linux-yocto-3.0</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
$ git clone --bare git://git.yoctoproject.org/linux-yocto-3.0 linux-yocto-3.0.git
|
||||
Initialized empty Git repository in /home/scottrif/poky/linux-yocto-3.0.git/
|
||||
remote: Counting objects: 1886034, done.
|
||||
remote: Compressing objects: 100% (314326/314326), done.
|
||||
remote: Total 1886034 (delta 1570200), reused 1870337 (delta 1554798)
|
||||
Receiving objects: 100% (1886034/1886034), 401.51 MiB | 3.27 MiB/s, done.
|
||||
Resolving deltas: 100% (1570200/1570200), done.
|
||||
</literallayout></para>
|
||||
<para>Now create a clone of the bare clone just created:
|
||||
<literallayout class='monospaced'>
|
||||
$ git clone linux-yocto-3.0.git linux-yocto-3.0
|
||||
Initialized empty Git repository in /home/scottrif/poky/linux-yocto-3.0/.git/
|
||||
Checking out files: 100% (35188/35188), 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 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: 531, done.
|
||||
remote: Compressing objects: 100% (471/471), done.
|
||||
remote: Total 531 (delta 138), reused 307 (delta 39)
|
||||
Receiving objects: 100% (531/531), 517.86 KiB, done.
|
||||
Resolving deltas: 100% (138/138), done.
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Supported Board Support Packages (BSPs):</emphasis> The same 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>
|
||||
<listitem><para><emphasis>Tarball Extraction:</emphasis> You can download any released
|
||||
BSP tarball from the same
|
||||
<ulink url='http://yoctoproject.org/download'>download site</ulink>.
|
||||
Once you have the tarball just extract it into a directory of your choice.
|
||||
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 <filename>poky</filename> 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 <filename>poky</filename> 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: 1325, done.
|
||||
remote: Compressing objects: 100% (1078/1078), done.
|
||||
remote: Total 1325 (delta 546), reused 85 (delta 27)
|
||||
Receiving objects: 100% (1325/1325), 1.56 MiB | 330 KiB/s, done.
|
||||
Resolving deltas: 100% (546/546), done.
|
||||
</literallayout></para>
|
||||
|
||||
<para>The same
|
||||
<ulink url='https://wiki.yoctoproject.org/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>
|
||||
wiki page</ulink> referenced earlier covers how to
|
||||
set up the <filename>meta-intel</filename> Git repository.</para></listitem>
|
||||
</itemizedlist></para></listitem>
|
||||
<listitem><para><emphasis>Eclipse Yocto Plug-in:</emphasis> If you are developing
|
||||
applications using the
|
||||
Eclipse Integrated Development Environment (IDE) you will need this plug-in.
|
||||
See the
|
||||
<ulink url='http://www.yoctoproject.org/docs/adt-manual/adt-manual.html#setting-up-the-eclipse-ide'>
|
||||
Setting up the Eclipse IDE</ulink> section in the Yocto Application Development Toolkit (ADT)
|
||||
User’s Guide for more information.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='building-images'>
|
||||
<title>Building Images</title>
|
||||
|
||||
<para>
|
||||
The build process creates an entire Linux distribution, including the toolchain, from source.
|
||||
For more information on this topic, see the
|
||||
<ulink url='http://www.yoctoproject.org/docs/yocto-quick-start/yocto-project-qs.html#building-image'>
|
||||
Building an Image</ulink> section in the Yocto Project Quick Start.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The build process is as follows:
|
||||
<orderedlist>
|
||||
<listitem><para>Make sure you have the Yocto Project files as described in the
|
||||
previous section.</para></listitem>
|
||||
<listitem><para>Initialize the build environment by sourcing a build environment
|
||||
script.</para></listitem>
|
||||
<listitem><para>Optionally ensure the <filename>conf/local.conf</filename> configuration file is set
|
||||
up how you want it.
|
||||
This file defines the target machine architecture and and other build options.</para></listitem>
|
||||
<listitem><para>Build the image using the BitBake command.
|
||||
If you want information on Bitbake, see the user manual at
|
||||
<ulink url='http://docs.openembedded.org/bitbake/html'></ulink>.</para></listitem>
|
||||
<listitem><para>Run the image either on the actual hardware or using the QEMU
|
||||
emulator.</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='using-pre-built-binaries-and-qemu'>
|
||||
<title>Using Pre-Built Binaries and QEMU</title>
|
||||
|
||||
<para>
|
||||
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.
|
||||
To do this you need to install the stand-alone Yocto toolchain tarball and then download the
|
||||
pre-built kernel that you will boot using the QEMU emulator.
|
||||
Next, you must download the filesystem for your target machine’s architecture.
|
||||
Finally, you set up the environment to emulate the hardware then start the emulator.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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'>
|
||||
Using Pre-Built Binaries and QEMU</ulink> section in the Yocto Project Quick Start.
|
||||
</para>
|
||||
</section>
|
||||
</chapter>
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
-->
|
||||
79
documentation/dev-manual/dev-manual.xml
Normal file
@@ -0,0 +1,79 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||
|
||||
<book id='dev-manual' lang='en'
|
||||
xmlns:xi="http://www.w3.org/2003/XInclude"
|
||||
xmlns="http://docbook.org/ns/docbook"
|
||||
>
|
||||
<bookinfo>
|
||||
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref='figures/dev-title.png'
|
||||
format='SVG'
|
||||
align='left' scalefit='1' width='100%'/>
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
|
||||
<title></title>
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Scott</firstname> <surname>Rifenbark</surname>
|
||||
<affiliation>
|
||||
<orgname>Intel Corporation</orgname>
|
||||
</affiliation>
|
||||
<email>scott.m.rifenbark@intel.com</email>
|
||||
</author>
|
||||
</authorgroup>
|
||||
|
||||
<revhistory>
|
||||
<revision>
|
||||
<revnumber>1.1</revnumber>
|
||||
<date>TBD 2011</date>
|
||||
<revremark>This revision is the initial document draft and corresponds with
|
||||
the Yocto Project 1.1 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<copyright>
|
||||
<year>2010-2011</year>
|
||||
<holder>Linux Foundation</holder>
|
||||
</copyright>
|
||||
|
||||
<legalnotice>
|
||||
<para>
|
||||
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.
|
||||
</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/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>
|
||||
|
||||
</bookinfo>
|
||||
|
||||
<xi:include href="dev-manual-intro.xml"/>
|
||||
|
||||
<xi:include href="dev-manual-start.xml"/>
|
||||
|
||||
<xi:include href="dev-manual-newbie.xml"/>
|
||||
|
||||
<xi:include href="dev-manual-model.xml"/>
|
||||
|
||||
<xi:include href="dev-manual-bsp-appendix.xml"/>
|
||||
|
||||
<xi:include href="dev-manual-kernel-appendix.xml"/>
|
||||
|
||||
</book>
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
-->
|
||||
BIN
documentation/dev-manual/figures/bsp-dev-flow.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
documentation/dev-manual/figures/dev-title.png
Normal file
|
After Width: | Height: | Size: 12 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: 96 KiB |
BIN
documentation/dev-manual/figures/kernel-dev-flow.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
documentation/dev-manual/figures/kernel-example-repos.png
Normal file
|
After Width: | Height: | Size: 24 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.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
documentation/dev-manual/figures/source-repos.png
Normal file
|
After Width: | Height: | Size: 185 KiB |
BIN
documentation/dev-manual/figures/yp-download.png
Normal file
|
After Width: | Height: | Size: 116 KiB |
968
documentation/dev-manual/style.css
Normal file
@@ -0,0 +1,968 @@
|
||||
/*
|
||||
Generic XHTML / DocBook XHTML CSS Stylesheet.
|
||||
|
||||
Browser wrangling and typographic design by
|
||||
Oyvind Kolas / pippin@gimp.org
|
||||
|
||||
Customised for Poky by
|
||||
Matthew Allum / mallum@o-hand.com
|
||||
|
||||
Thanks to:
|
||||
Liam R. E. Quin
|
||||
William Skaggs
|
||||
Jakub Steiner
|
||||
|
||||
Structure
|
||||
---------
|
||||
|
||||
The stylesheet is divided into the following sections:
|
||||
|
||||
Positioning
|
||||
Margins, paddings, width, font-size, clearing.
|
||||
Decorations
|
||||
Borders, style
|
||||
Colors
|
||||
Colors
|
||||
Graphics
|
||||
Graphical backgrounds
|
||||
Nasty IE tweaks
|
||||
Workarounds needed to make it work in internet explorer,
|
||||
currently makes the stylesheet non validating, but up until
|
||||
this point it is validating.
|
||||
Mozilla extensions
|
||||
Transparency for footer
|
||||
Rounded corners on boxes
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*************** /
|
||||
/ Positioning /
|
||||
/ ***************/
|
||||
|
||||
body {
|
||||
font-family: Verdana, Sans, sans-serif;
|
||||
|
||||
min-width: 640px;
|
||||
width: 80%;
|
||||
margin: 0em auto;
|
||||
padding: 2em 5em 5em 5em;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.reviewer {
|
||||
color: red;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4,h5,h6,h7 {
|
||||
font-family: Arial, Sans;
|
||||
color: #00557D;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
text-align: left;
|
||||
padding: 0em 0em 0em 0em;
|
||||
margin: 2em 0em 0em 0em;
|
||||
}
|
||||
|
||||
h2.subtitle {
|
||||
margin: 0.10em 0em 3.0em 0em;
|
||||
padding: 0em 0em 0em 0em;
|
||||
font-size: 1.8em;
|
||||
padding-left: 20%;
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 2em 0em 0.66em 0em;
|
||||
padding: 0.5em 0em 0em 0em;
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h3.subtitle {
|
||||
margin: 0em 0em 1em 0em;
|
||||
padding: 0em 0em 0em 0em;
|
||||
font-size: 142.14%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 1em 0em 0.5em 0em;
|
||||
padding: 1em 0em 0em 0em;
|
||||
font-size: 140%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin: 1em 0em 0.5em 0em;
|
||||
padding: 1em 0em 0em 0em;
|
||||
font-size: 120%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h5 {
|
||||
margin: 1em 0em 0.5em 0em;
|
||||
padding: 1em 0em 0em 0em;
|
||||
font-size: 110%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h6 {
|
||||
margin: 1em 0em 0em 0em;
|
||||
padding: 1em 0em 0em 0em;
|
||||
font-size: 80%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.authorgroup {
|
||||
background-color: transparent;
|
||||
background-repeat: no-repeat;
|
||||
padding-top: 256px;
|
||||
background-image: url("figures/dev-title.png");
|
||||
background-position: left top;
|
||||
margin-top: -256px;
|
||||
padding-right: 50px;
|
||||
margin-left: 0px;
|
||||
text-align: right;
|
||||
width: 740px;
|
||||
}
|
||||
|
||||
h3.author {
|
||||
margin: 0em 0me 0em 0em;
|
||||
padding: 0em 0em 0em 0em;
|
||||
font-weight: normal;
|
||||
font-size: 100%;
|
||||
color: #333;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.author tt.email {
|
||||
font-size: 66%;
|
||||
}
|
||||
|
||||
.titlepage hr {
|
||||
width: 0em;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.revhistory {
|
||||
padding-top: 2em;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.toc,
|
||||
.list-of-tables,
|
||||
.list-of-examples,
|
||||
.list-of-figures {
|
||||
padding: 1.33em 0em 2.5em 0em;
|
||||
color: #00557D;
|
||||
}
|
||||
|
||||
.toc p,
|
||||
.list-of-tables p,
|
||||
.list-of-figures p,
|
||||
.list-of-examples p {
|
||||
padding: 0em 0em 0em 0em;
|
||||
padding: 0em 0em 0.3em;
|
||||
margin: 1.5em 0em 0em 0em;
|
||||
}
|
||||
|
||||
.toc p b,
|
||||
.list-of-tables p b,
|
||||
.list-of-figures p b,
|
||||
.list-of-examples p b{
|
||||
font-size: 100.0%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.toc dl,
|
||||
.list-of-tables dl,
|
||||
.list-of-figures dl,
|
||||
.list-of-examples dl {
|
||||
margin: 0em 0em 0.5em 0em;
|
||||
padding: 0em 0em 0em 0em;
|
||||
}
|
||||
|
||||
.toc dt {
|
||||
margin: 0em 0em 0em 0em;
|
||||
padding: 0em 0em 0em 0em;
|
||||
}
|
||||
|
||||
.toc dd {
|
||||
margin: 0em 0em 0em 2.6em;
|
||||
padding: 0em 0em 0em 0em;
|
||||
}
|
||||
|
||||
div.glossary dl,
|
||||
div.variablelist dl {
|
||||
}
|
||||
|
||||
.glossary dl dt,
|
||||
.variablelist dl dt,
|
||||
.variablelist dl dt span.term {
|
||||
font-weight: normal;
|
||||
width: 20em;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.variablelist dl dt {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
.glossary dl dd,
|
||||
.variablelist dl dd {
|
||||
margin-top: -1em;
|
||||
margin-left: 25.5em;
|
||||
}
|
||||
|
||||
.glossary dd p,
|
||||
.variablelist dd p {
|
||||
margin-top: 0em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
|
||||
div.calloutlist table td {
|
||||
padding: 0em 0em 0em 0em;
|
||||
margin: 0em 0em 0em 0em;
|
||||
}
|
||||
|
||||
div.calloutlist table td p {
|
||||
margin-top: 0em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
div p.copyright {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.legalnotice p.legalnotice-title {
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: 1.5em;
|
||||
margin-top: 0em;
|
||||
|
||||
}
|
||||
|
||||
dl {
|
||||
padding-top: 0em;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: solid 1px;
|
||||
}
|
||||
|
||||
|
||||
.mediaobject,
|
||||
.mediaobjectco {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding: 0em 0em 0em 1.5em;
|
||||
}
|
||||
|
||||
ul li {
|
||||
padding: 0em 0em 0em 0em;
|
||||
}
|
||||
|
||||
ul li p {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
table {
|
||||
width :100%;
|
||||
}
|
||||
|
||||
th {
|
||||
padding: 0.25em;
|
||||
text-align: left;
|
||||
font-weight: normal;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 0.25em;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
p a[id] {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
display: inline;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: underline;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
pre {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
/*font-weight: bold;*/
|
||||
}
|
||||
|
||||
|
||||
div.informalfigure,
|
||||
div.informalexample,
|
||||
div.informaltable,
|
||||
div.figure,
|
||||
div.table,
|
||||
div.example {
|
||||
margin: 1em 0em;
|
||||
padding: 1em;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
|
||||
div.informalfigure p.title b,
|
||||
div.informalexample p.title b,
|
||||
div.informaltable p.title b,
|
||||
div.figure p.title b,
|
||||
div.example p.title b,
|
||||
div.table p.title b{
|
||||
padding-top: 0em;
|
||||
margin-top: 0em;
|
||||
font-size: 100%;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.mediaobject .caption,
|
||||
.mediaobject .caption p {
|
||||
text-align: center;
|
||||
font-size: 80%;
|
||||
padding-top: 0.5em;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.epigraph {
|
||||
padding-left: 55%;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.epigraph p {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.epigraph .quote {
|
||||
font-style: italic;
|
||||
}
|
||||
.epigraph .attribution {
|
||||
font-style: normal;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
span.application {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.programlisting {
|
||||
font-family: monospace;
|
||||
font-size: 80%;
|
||||
white-space: pre;
|
||||
margin: 1.33em 0em;
|
||||
padding: 1.33em;
|
||||
}
|
||||
|
||||
.tip,
|
||||
.warning,
|
||||
.caution,
|
||||
.note {
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
|
||||
}
|
||||
|
||||
/* force full width of table within div */
|
||||
.tip table,
|
||||
.warning table,
|
||||
.caution table,
|
||||
.note table {
|
||||
border: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
.tip table th,
|
||||
.warning table th,
|
||||
.caution table th,
|
||||
.note table th {
|
||||
padding: 0.8em 0.0em 0.0em 0.0em;
|
||||
margin : 0em 0em 0em 0em;
|
||||
}
|
||||
|
||||
.tip p,
|
||||
.warning p,
|
||||
.caution p,
|
||||
.note p {
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
padding-right: 1em;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.acronym {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
b.keycap,
|
||||
.keycap {
|
||||
padding: 0.09em 0.3em;
|
||||
margin: 0em;
|
||||
}
|
||||
|
||||
.itemizedlist li {
|
||||
clear: none;
|
||||
}
|
||||
|
||||
.filename {
|
||||
font-size: medium;
|
||||
font-family: Courier, monospace;
|
||||
}
|
||||
|
||||
|
||||
div.navheader, div.heading{
|
||||
position: absolute;
|
||||
left: 0em;
|
||||
top: 0em;
|
||||
width: 100%;
|
||||
background-color: #cdf;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.navfooter, div.footing{
|
||||
position: fixed;
|
||||
left: 0em;
|
||||
bottom: 0em;
|
||||
background-color: #eee;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
div.navheader td,
|
||||
div.navfooter td {
|
||||
font-size: 66%;
|
||||
}
|
||||
|
||||
div.navheader table th {
|
||||
/*font-family: Georgia, Times, serif;*/
|
||||
/*font-size: x-large;*/
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
div.navheader table {
|
||||
border-left: 0em;
|
||||
border-right: 0em;
|
||||
border-top: 0em;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.navfooter table {
|
||||
border-left: 0em;
|
||||
border-right: 0em;
|
||||
border-bottom: 0em;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.navheader table td a,
|
||||
div.navfooter table td a {
|
||||
color: #777;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* normal text in the footer */
|
||||
div.navfooter table td {
|
||||
color: black;
|
||||
}
|
||||
|
||||
div.navheader table td a:visited,
|
||||
div.navfooter table td a:visited {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
|
||||
/* links in header and footer */
|
||||
div.navheader table td a:hover,
|
||||
div.navfooter table td a:hover {
|
||||
text-decoration: underline;
|
||||
background-color: transparent;
|
||||
color: #33a;
|
||||
}
|
||||
|
||||
div.navheader hr,
|
||||
div.navfooter hr {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.qandaset tr.question td p {
|
||||
margin: 0em 0em 1em 0em;
|
||||
padding: 0em 0em 0em 0em;
|
||||
}
|
||||
|
||||
.qandaset tr.answer td p {
|
||||
margin: 0em 0em 1em 0em;
|
||||
padding: 0em 0em 0em 0em;
|
||||
}
|
||||
.answer td {
|
||||
padding-bottom: 1.5em;
|
||||
}
|
||||
|
||||
.emphasis {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/************* /
|
||||
/ decorations /
|
||||
/ *************/
|
||||
|
||||
.titlepage {
|
||||
}
|
||||
|
||||
.part .title {
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/*
|
||||
h1 {
|
||||
border: none;
|
||||
}
|
||||
|
||||
h2 {
|
||||
border-top: solid 0.2em;
|
||||
border-bottom: solid 0.06em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
border-top: 0em;
|
||||
border-bottom: solid 0.06em;
|
||||
}
|
||||
|
||||
h4 {
|
||||
border: 0em;
|
||||
border-bottom: solid 0.06em;
|
||||
}
|
||||
|
||||
h5 {
|
||||
border: 0em;
|
||||
}
|
||||
*/
|
||||
|
||||
.programlisting {
|
||||
border: solid 1px;
|
||||
}
|
||||
|
||||
div.figure,
|
||||
div.table,
|
||||
div.informalfigure,
|
||||
div.informaltable,
|
||||
div.informalexample,
|
||||
div.example {
|
||||
border: 1px solid;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.tip,
|
||||
.warning,
|
||||
.caution,
|
||||
.note {
|
||||
border: 1px solid;
|
||||
}
|
||||
|
||||
.tip table th,
|
||||
.warning table th,
|
||||
.caution table th,
|
||||
.note table th {
|
||||
border-bottom: 1px solid;
|
||||
}
|
||||
|
||||
.question td {
|
||||
border-top: 1px solid black;
|
||||
}
|
||||
|
||||
.answer {
|
||||
}
|
||||
|
||||
|
||||
b.keycap,
|
||||
.keycap {
|
||||
border: 1px solid;
|
||||
}
|
||||
|
||||
|
||||
div.navheader, div.heading{
|
||||
border-bottom: 1px solid;
|
||||
}
|
||||
|
||||
|
||||
div.navfooter, div.footing{
|
||||
border-top: 1px solid;
|
||||
}
|
||||
|
||||
/********* /
|
||||
/ colors /
|
||||
/ *********/
|
||||
|
||||
body {
|
||||
color: #333;
|
||||
background: white;
|
||||
}
|
||||
|
||||
a {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
background-color: #dedede;
|
||||
}
|
||||
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
h7,
|
||||
h8 {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
hr {
|
||||
border-color: #aaa;
|
||||
}
|
||||
|
||||
|
||||
.tip, .warning, .caution, .note {
|
||||
border-color: #aaa;
|
||||
}
|
||||
|
||||
|
||||
.tip table th,
|
||||
.warning table th,
|
||||
.caution table th,
|
||||
.note table th {
|
||||
border-bottom-color: #aaa;
|
||||
}
|
||||
|
||||
|
||||
.warning {
|
||||
background-color: #fea;
|
||||
}
|
||||
|
||||
.caution {
|
||||
background-color: #fea;
|
||||
}
|
||||
|
||||
.tip {
|
||||
background-color: #eff;
|
||||
}
|
||||
|
||||
.note {
|
||||
background-color: #dfc;
|
||||
}
|
||||
|
||||
.glossary dl dt,
|
||||
.variablelist dl dt,
|
||||
.variablelist dl dt span.term {
|
||||
color: #044;
|
||||
}
|
||||
|
||||
div.figure,
|
||||
div.table,
|
||||
div.example,
|
||||
div.informalfigure,
|
||||
div.informaltable,
|
||||
div.informalexample {
|
||||
border-color: #aaa;
|
||||
}
|
||||
|
||||
pre.programlisting {
|
||||
color: black;
|
||||
background-color: #fff;
|
||||
border-color: #aaa;
|
||||
border-width: 2px;
|
||||
}
|
||||
|
||||
.guimenu,
|
||||
.guilabel,
|
||||
.guimenuitem {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
|
||||
b.keycap,
|
||||
.keycap {
|
||||
background-color: #eee;
|
||||
border-color: #999;
|
||||
}
|
||||
|
||||
|
||||
div.navheader {
|
||||
border-color: black;
|
||||
}
|
||||
|
||||
|
||||
div.navfooter {
|
||||
border-color: black;
|
||||
}
|
||||
|
||||
|
||||
/*********** /
|
||||
/ graphics /
|
||||
/ ***********/
|
||||
|
||||
/*
|
||||
body {
|
||||
background-image: url("images/body_bg.jpg");
|
||||
background-attachment: fixed;
|
||||
}
|
||||
|
||||
.navheader,
|
||||
.note,
|
||||
.tip {
|
||||
background-image: url("images/note_bg.jpg");
|
||||
background-attachment: fixed;
|
||||
}
|
||||
|
||||
.warning,
|
||||
.caution {
|
||||
background-image: url("images/warning_bg.jpg");
|
||||
background-attachment: fixed;
|
||||
}
|
||||
|
||||
.figure,
|
||||
.informalfigure,
|
||||
.example,
|
||||
.informalexample,
|
||||
.table,
|
||||
.informaltable {
|
||||
background-image: url("images/figure_bg.jpg");
|
||||
background-attachment: fixed;
|
||||
}
|
||||
|
||||
*/
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
h7{
|
||||
}
|
||||
|
||||
/*
|
||||
Example of how to stick an image as part of the title.
|
||||
|
||||
div.article .titlepage .title
|
||||
{
|
||||
background-image: url("figures/white-on-black.png");
|
||||
background-position: center;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
*/
|
||||
|
||||
div.preface .titlepage .title,
|
||||
div.colophon .title,
|
||||
div.chapter .titlepage .title,
|
||||
div.article .titlepage .title
|
||||
{
|
||||
}
|
||||
|
||||
div.section div.section .titlepage .title,
|
||||
div.sect2 .titlepage .title {
|
||||
background: none;
|
||||
}
|
||||
|
||||
|
||||
h1.title {
|
||||
background-color: transparent;
|
||||
background-image: url("figures/yocto-project-bw.png");
|
||||
background-repeat: no-repeat;
|
||||
height: 256px;
|
||||
text-indent: -9000px;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
h2.subtitle {
|
||||
background-color: transparent;
|
||||
text-indent: -9000px;
|
||||
overflow:hidden;
|
||||
width: 0px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*************************************** /
|
||||
/ pippin.gimp.org specific alterations /
|
||||
/ ***************************************/
|
||||
|
||||
/*
|
||||
div.heading, div.navheader {
|
||||
color: #777;
|
||||
font-size: 80%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
text-align: left;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
background: url('/gfx/heading_bg.png') transparent;
|
||||
background-repeat: repeat-x;
|
||||
background-attachment: fixed;
|
||||
border: none;
|
||||
}
|
||||
|
||||
div.heading a {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
div.footing, div.navfooter {
|
||||
border: none;
|
||||
color: #ddd;
|
||||
font-size: 80%;
|
||||
text-align:right;
|
||||
|
||||
width: 100%;
|
||||
padding-top: 10px;
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
|
||||
background: url('/gfx/footing_bg.png') transparent;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/****************** /
|
||||
/ nasty ie tweaks /
|
||||
/ ******************/
|
||||
|
||||
/*
|
||||
div.heading, div.navheader {
|
||||
width:expression(document.body.clientWidth + "px");
|
||||
}
|
||||
|
||||
div.footing, div.navfooter {
|
||||
width:expression(document.body.clientWidth + "px");
|
||||
margin-left:expression("-5em");
|
||||
}
|
||||
body {
|
||||
padding:expression("4em 5em 0em 5em");
|
||||
}
|
||||
*/
|
||||
|
||||
/**************************************** /
|
||||
/ mozilla vendor specific css extensions /
|
||||
/ ****************************************/
|
||||
/*
|
||||
div.navfooter, div.footing{
|
||||
-moz-opacity: 0.8em;
|
||||
}
|
||||
|
||||
div.figure,
|
||||
div.table,
|
||||
div.informalfigure,
|
||||
div.informaltable,
|
||||
div.informalexample,
|
||||
div.example,
|
||||
.tip,
|
||||
.warning,
|
||||
.caution,
|
||||
.note {
|
||||
-moz-border-radius: 0.5em;
|
||||
}
|
||||
|
||||
b.keycap,
|
||||
.keycap {
|
||||
-moz-border-radius: 0.3em;
|
||||
}
|
||||
*/
|
||||
|
||||
table tr td table tr td {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
hr {
|
||||
display: none;
|
||||
}
|
||||
|
||||
table {
|
||||
border: 0em;
|
||||
}
|
||||
|
||||
.photo {
|
||||
float: right;
|
||||
margin-left: 1.5em;
|
||||
margin-bottom: 1.5em;
|
||||
margin-top: 0em;
|
||||
max-width: 17em;
|
||||
border: 1px solid gray;
|
||||
padding: 3px;
|
||||
background: white;
|
||||
}
|
||||
.seperator {
|
||||
padding-top: 2em;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#validators {
|
||||
margin-top: 5em;
|
||||
text-align: right;
|
||||
color: #777;
|
||||
}
|
||||
@media print {
|
||||
body {
|
||||
font-size: 8pt;
|
||||
}
|
||||
.noprint {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.tip,
|
||||
.note {
|
||||
background: #666666;
|
||||
color: #fff;
|
||||
padding: 20px;
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
.tip h3,
|
||||
.note h3 {
|
||||
padding: 0em;
|
||||
margin: 0em;
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tip a,
|
||||
.note a {
|
||||
color: #fff;
|
||||
text-decoration: underline;
|
||||
}
|
||||
@@ -46,11 +46,11 @@
|
||||
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
|
||||
strategy.</para></listitem>
|
||||
<listitem><para>Present a git tree, that just like the upstream kernel.org tree, has a
|
||||
<listitem><para>Present a Git tree, that just like the upstream kernel.org tree, has a
|
||||
clear and continuous history.</para></listitem>
|
||||
<listitem><para>Deliver a key set of supported kernel types, where each type is tailored
|
||||
to a specific use case (i.g. networking, consumer, devices, and so forth).</para></listitem>
|
||||
<listitem><para>Employ a git branching strategy that from a customer's point of view
|
||||
to a specific use case (i.e. networking, consumer, devices, and so forth).</para></listitem>
|
||||
<listitem><para>Employ a Git branching strategy that from a customer's point of view
|
||||
results in a linear path from the baseline kernel.org, through a select group of features and
|
||||
ends with their BSP-specific commits.</para></listitem>
|
||||
</itemizedlist>
|
||||
@@ -170,7 +170,7 @@
|
||||
You can think of the Yocto Project kernel as consisting of a baseline kernel with
|
||||
added features logically structured on top of the baseline.
|
||||
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.
|
||||
The result is that the user has the ability to see the added features and
|
||||
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
|
||||
@@ -279,15 +279,20 @@
|
||||
</section>
|
||||
|
||||
<section id='source-code-manager-git'>
|
||||
<title>Source Code Manager - git</title>
|
||||
<title>Source Code Manager - Git</title>
|
||||
<para>
|
||||
The Source Code Manager (SCM) is git and it is the obvious mechanism for meeting the
|
||||
The Source Code Manager (SCM) is Git and it 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 kernel.org but Git continues to grow in popularity and
|
||||
supports many different work flows, front-ends and management techniques.
|
||||
</para>
|
||||
<para>
|
||||
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
|
||||
minimal set of commands that allow you to be functional with Git.
|
||||
</para>
|
||||
<note><para>
|
||||
It should be noted that you can use as much, or as little, of what git has to offer
|
||||
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>
|
||||
@@ -296,21 +301,22 @@
|
||||
<section id='kernel-tools'>
|
||||
<title>Kernel Tools</title>
|
||||
<para>
|
||||
Since most standard workflows involve moving forward with an existing tree by
|
||||
continuing to add and alter the underlying baseline, the tools that manage
|
||||
Yocto Project's kernel construction are largely hidden from the developer to
|
||||
present a simplified view of the kernel for ease of use.
|
||||
</para>
|
||||
<para>
|
||||
The fundamental properties of the tools that manage and construct the
|
||||
kernel are:
|
||||
<itemizedlist>
|
||||
<listitem><para>the ability to group patches into named, reusable features</para></listitem>
|
||||
<listitem><para>to allow top down control of included features</para></listitem>
|
||||
<listitem><para>the binding of kernel configuration to kernel patches/features</para></listitem>
|
||||
<listitem><para>the presentation of a seamless git repository that blends Yocto Project value with the kernel.org history and development</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
Since most standard workflows involve moving forward with an existing tree by
|
||||
continuing to add and alter the underlying baseline, the tools that manage
|
||||
the Yocto Project's kernel construction are largely hidden from the developer to
|
||||
present a simplified view of the kernel for ease of use.
|
||||
</para>
|
||||
<para>
|
||||
The fundamental properties of the tools that manage and construct the
|
||||
Yocto Project kernel are:
|
||||
<itemizedlist>
|
||||
<listitem><para>Group patches into named, reusable 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>Present a seamless Git repository that blends Yocto Project value
|
||||
with the kernel.org history and development.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<!--<para>
|
||||
The tools that construct a kernel tree will be discussed later in this
|
||||
document. The following tools form the foundation of the Yocto Project
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
<section id='book-intro'>
|
||||
<title>Introduction</title>
|
||||
<para>
|
||||
The Yocto Project presents the kernel as a fully patched, history-clean git
|
||||
The Yocto Project presents the kernel as a fully patched, history-clean Git
|
||||
repository.
|
||||
The git tree represents the selected features, board support,
|
||||
The Git tree represents the selected features, board support,
|
||||
and configurations extensively tested by Yocto Project.
|
||||
The Yocto Project kernel allows the end user to leverage community
|
||||
best practices to seamlessly manage the development, build and debug cycles.
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
<title>Introduction</title>
|
||||
<para>
|
||||
This chapter describes how to accomplish tasks involving the kernel's tree structure.
|
||||
This information is designed to help the developer that wants to modify the Yocto Project kernel
|
||||
and contribute changes upstream to the Yocto Project.
|
||||
The information covers the following:
|
||||
<itemizedlist>
|
||||
<listitem><para>Tree construction</para></listitem>
|
||||
@@ -38,19 +40,31 @@
|
||||
in the product.
|
||||
Those feature descriptions list all necessary patches,
|
||||
configuration, branching, tagging and feature divisions found in the kernel.
|
||||
Thus, the Yocto Project kernel repository (or tree) is built.
|
||||
The existence of this tree allows you to build images based on your configurations
|
||||
and features.
|
||||
</para>
|
||||
<para>
|
||||
You can find the files used to describe all the valid features and BSPs in the Yocto Project
|
||||
kernel in any clone of the kernel git tree.
|
||||
The directory <filename>meta/cfg/kernel-cache/</filename> is a snapshot of all the kernel
|
||||
configuration and feature descriptions (.scc) used to build the kernel repository.
|
||||
kernel in any clone of the kernel Git tree.
|
||||
For example, the following command clones the Yocto Project baseline kernel that
|
||||
branched off of linux.org version 2.6.37:
|
||||
<literallayout class='monospaced'>
|
||||
$ git clone http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-2.6.37
|
||||
</literallayout>
|
||||
After you switch to the <filename>meta</filename> branch within the repository
|
||||
you can see a snapshot of all the kernel configuration and feature descriptions that are
|
||||
used to build the kernel repository.
|
||||
These descriptions are in the form of <filename>.scc</filename> files.
|
||||
</para>
|
||||
<para>
|
||||
You should realize, however, that browsing the snapshot of feature
|
||||
descriptions and patches is not an effective way to determine what is in a
|
||||
particular kernel branch.
|
||||
Instead, you should use git directly to discover the changes
|
||||
Instead, you should use Git directly to discover the changes
|
||||
in a branch.
|
||||
Using git is a efficient and flexible way to inspect changes to the kernel.
|
||||
For examples showing how to use git to inspect kernel commits, see the following sections
|
||||
Using Git is an efficient and flexible way to inspect changes to the kernel.
|
||||
For examples showing how to use Git to inspect kernel commits, see the following sections
|
||||
in this chapter.
|
||||
</para>
|
||||
<note><para>
|
||||
@@ -60,46 +74,56 @@
|
||||
and development.
|
||||
</para></note>
|
||||
<para>
|
||||
The general flow for constructing a project-specific kernel tree is as follows:
|
||||
<orderedlist>
|
||||
<listitem><para>A top-level kernel feature is passed to the kernel build subsystem.
|
||||
Normally, this is a BSP for a particular kernel type.</para></listitem>
|
||||
The following steps describe what happens during tree construction given the introduction
|
||||
of a new top-level kernel feature or BSP.
|
||||
These are the actions that effectively create the tree that includes the new feature, patch,
|
||||
or BSP:
|
||||
<orderedlist>
|
||||
<listitem><para>A top-level kernel feature is passed to the kernel build subsystem.
|
||||
Normally, this is a BSP for a particular kernel type.</para></listitem>
|
||||
|
||||
<listitem><para>The file that describes the top-level feature is located by searching
|
||||
these system directories:</para>
|
||||
<listitem><para>The file that describes the top-level feature is located by searching
|
||||
these system directories:
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>The in-tree kernel-cache directories</para></listitem>
|
||||
<itemizedlist>
|
||||
<listitem><para>The in-tree kernel-cache directories, which are located
|
||||
in <filename>meta/cfg/kernel-cache</filename></para></listitem>
|
||||
<!-- <listitem><para>kernel-*-cache directories in layers</para></listitem> -->
|
||||
<listitem><para>Recipe SRC_URIs</para></listitem>
|
||||
<listitem><para>Areas pointed to by <filename>SRC_URI</filename> statements
|
||||
found in recipes</para></listitem>
|
||||
<!-- <listitem><para>configured and default templates</para></listitem> -->
|
||||
</itemizedlist>
|
||||
</itemizedlist>
|
||||
|
||||
<para>For a typical build a feature description of the format:
|
||||
<bsp name>-<kernel type>.scc is the target of the search.
|
||||
</para></listitem>
|
||||
For a typical build, the target of the search is a
|
||||
feature description in an <filename>.scc</filename> file
|
||||
whose name follows this format:
|
||||
<literallayout class='monospaced'>
|
||||
<bsp_name>-<kernel_type>.scc
|
||||
</literallayout>
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>Once located, the feature description is either compiled into a simple script
|
||||
of actions, or an existing equivalent script that was part of the
|
||||
shipped kernel is located.</para></listitem>
|
||||
<listitem><para>Once located, the feature description is either compiled into a simple script
|
||||
of actions, or into an existing equivalent script that is already part of the
|
||||
shipped kernel.</para></listitem>
|
||||
|
||||
<listitem><para>Extra features are appended to the top-level feature description.
|
||||
These features can come from the KERNEL_FEATURES variable in recipes.</para></listitem>
|
||||
<listitem><para>Extra features are appended to the top-level feature description.
|
||||
These features can come from the <filename>KERNEL_FEATURES</filename> variable in
|
||||
recipes.</para></listitem>
|
||||
|
||||
<listitem><para>Each extra feature is located, compiled and appended to the script from
|
||||
step #3</para></listitem>
|
||||
<listitem><para>Each extra feature is located, compiled and appended to the script
|
||||
as described in step three.</para></listitem>
|
||||
|
||||
<listitem><para>The script is executed, and a meta-series is produced.
|
||||
The meta-series is a description of all the branches, tags, patches and configuration that
|
||||
needs to be applied to the base git repository to completely create the
|
||||
BSP source (build) branch.</para></listitem>
|
||||
<listitem><para>The script is executed to produce a meta-series.
|
||||
The meta-series is a description of all the branches, tags, patches and configurations that
|
||||
need to be applied to the base Git repository to completely create the
|
||||
source (build) branch for the new BSP or feature.</para></listitem>
|
||||
|
||||
<listitem><para>The base repository is cloned, and the actions
|
||||
listed in the meta-series are applied to the tree.</para></listitem>
|
||||
<listitem><para>The base repository is cloned, and the actions
|
||||
listed in the meta-series are applied to the tree.</para></listitem>
|
||||
|
||||
<listitem><para>The git repository is left with the desired branch checked out and any
|
||||
required branching, patching and tagging has been performed.</para></listitem>
|
||||
</orderedlist>
|
||||
<listitem><para>The Git repository is left with the desired branch checked out and any
|
||||
required branching, patching and tagging has been performed.</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -113,7 +137,7 @@
|
||||
official Yocto Project kernel repositories is the combination of all
|
||||
supported boards and configurations.</para>
|
||||
|
||||
<para>This technique is flexible and allows the seamless blending of an immutable
|
||||
<para>This technique is flexible and allows for seamless blending of an immutable
|
||||
history with additional deployment specific patches.
|
||||
Any additions to the kernel become an integrated part of the branches.
|
||||
</para></note>
|
||||
@@ -137,7 +161,7 @@ A summary of end user tree construction activities follow:
|
||||
<itemizedlist>
|
||||
<listitem><para>compile and link a full top-down kernel description from feature descriptions</para></listitem>
|
||||
<listitem><para>execute the complete description to generate a meta-series</para></listitem>
|
||||
<listitem><para>interpret the meta-series to create a customized git repository for the
|
||||
<listitem><para>interpret the meta-series to create a customized Git repository for the
|
||||
board</para></listitem>
|
||||
<listitem><para>migrate configuration fragments and configure the kernel</para></listitem>
|
||||
<listitem><para>checkout the BSP branch and build</para></listitem>
|
||||
@@ -153,7 +177,7 @@ A summary of end user tree construction activities follow:
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>There must be a kernel git repository indicated in the SRC_URI.</para></listitem>
|
||||
<listitem><para>There must be a kernel Git repository indicated in the SRC_URI.</para></listitem>
|
||||
<listitem><para>There must be a BSP build branch - <bsp name>-<kernel type> in 0.9 or
|
||||
<kernel type>/<bsp name> in 1.0.</para></listitem>
|
||||
</itemizedlist>
|
||||
@@ -168,12 +192,14 @@ A summary of end user tree construction activities follow:
|
||||
|
||||
<para>
|
||||
Before building a kernel it is configured by processing all of the
|
||||
configuration "fragments" specified by the scc feature descriptions.
|
||||
configuration "fragments" specified by feature descriptions in the <filename>scc</filename>
|
||||
files.
|
||||
As the features are compiled, associated kernel configuration fragments are noted
|
||||
and recorded in the meta-series in their compilation order.
|
||||
The fragments are migrated, pre-processed and passed to the Linux Kernel
|
||||
Configuration subsystem (lkc) as raw input in the form of a <filename>.config</filename> file.
|
||||
The lkc uses its own internal dependency constraints to do the final
|
||||
Configuration subsystem (<filename>lkc</filename>) as raw input in the form
|
||||
of a <filename>.config</filename> file.
|
||||
The <filename>lkc</filename> uses its own internal dependency constraints to do the final
|
||||
processing of that information and generates the final <filename>.config</filename> file
|
||||
that is used during compilation.
|
||||
</para>
|
||||
@@ -184,7 +210,7 @@ A summary of end user tree construction activities follow:
|
||||
</para>
|
||||
|
||||
<para>The other thing that you will first see once you configure a kernel is that
|
||||
it will generate a build tree that is separate from your git source tree.
|
||||
it will generate a build tree that is separate from your Git source tree.
|
||||
This build tree has the name using the following form:
|
||||
<literallayout class='monospaced'>
|
||||
linux-<BSPname>-<kerntype>-build
|
||||
@@ -201,7 +227,7 @@ A summary of end user tree construction activities follow:
|
||||
The files include the final <filename>.config</filename>, all the <filename>.o</filename>
|
||||
files, the <filename>.a</filename> files, and so forth.
|
||||
Since each BSP has its own separate build directory in its own separate branch
|
||||
of the git tree you can easily switch between different BSP builds.
|
||||
of the Git tree you can easily switch between different BSP builds.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -220,7 +246,7 @@ to be used or not. The 2.0 release already made use of some stateful
|
||||
construction of series files, but since the delivery mechanism was unchanged
|
||||
(tar + patches + series files), most people were not aware of anything really
|
||||
different. The 3.0 release continues with this stateful construction of
|
||||
series files, but since the delivery mechanism is changed (git + branches) it
|
||||
series files, but since the delivery mechanism is changed (Git + branches) it
|
||||
now is more apparent to people.
|
||||
</para>
|
||||
<para>
|
||||
@@ -229,7 +255,7 @@ compiler". Its role is to combine feature descriptions into a format that can
|
||||
be used to generate a meta-series. A meta series contains all the required
|
||||
information to construct a complete set of branches that are required to
|
||||
build a desired board and feature set. The meta series is interpreted by the
|
||||
kgit tools to create a git repository that could be built.
|
||||
kgit tools to create a Git repository that could be built.
|
||||
</para>
|
||||
<para>
|
||||
To illustrate how scc works, a feature description must first be understood.
|
||||
@@ -246,7 +272,7 @@ Each feature description can use any of the following valid scc commands:
|
||||
<listitem><para>shell constructs: bash conditionals and other utilities can be used in a feature
|
||||
description. During compilation, the working directory is the feature
|
||||
description itself, so any command that is "raw shell" and not from the
|
||||
list of supported commands, can not directly modify a git repository.</para></listitem>
|
||||
list of supported commands, can not directly modify a Git repository.</para></listitem>
|
||||
|
||||
<listitem><para>patch <relative path>/<patch name>: outputs a patch to be included in a feature's patch set. Only the name of
|
||||
the patch is supplied, the path is calculated from the currently set
|
||||
@@ -297,9 +323,9 @@ Each feature description can use any of the following valid scc commands:
|
||||
include is processed, so is normally only used by a new top level feature
|
||||
to modify the order of features in something it is including.</para></listitem>
|
||||
|
||||
<listitem><para>git <command>: Issues any git command during tree construction. Note: this command is
|
||||
<listitem><para>git <command>: Issues any Git command during tree construction. Note: this command is
|
||||
not validated/sanitized so care must be taken to not damage the
|
||||
tree. This can be used to script branching, tagging, pulls or other git
|
||||
tree. This can be used to script branching, tagging, pulls or other Git
|
||||
operations.</para></listitem>
|
||||
|
||||
<listitem><para>dir <directory>: changes the working directory for "patch" directives. This can be used to
|
||||
@@ -349,17 +375,17 @@ kgit-meta is the actual application of feature description(s) to a kernel repo.
|
||||
In other words, it is responsible for interpreting the meta series generated
|
||||
from a scc compiled script. As a result, kgit-meta is coupled to the set of
|
||||
commands permitted in a .scc feature description (listed in the scc section).
|
||||
kgit-meta understands both the meta series format and how to use git and
|
||||
guilt to modify a base git repository. It processes a meta-series line by
|
||||
kgit-meta understands both the meta series format and how to use Git and
|
||||
guilt to modify a base Git repository. It processes a meta-series line by
|
||||
line, branching, tagging, patching and tracking changes that are made to the
|
||||
base git repository.
|
||||
base Git repository.
|
||||
</para>
|
||||
<para>
|
||||
Once kgit-meta has processed a meta-series, it leaves the repository with the
|
||||
last branch checked out, and creates the necessary guilt infrastructure to
|
||||
inspect the tree, or add to it via using guilt. As was previously mentioned,
|
||||
guilt is not required, but is provided as a convenience. Other utilities such
|
||||
as quilt, stgit, git or others can also be used to manipulate the git
|
||||
as quilt, stgit, Git or others can also be used to manipulate the Git
|
||||
repository.
|
||||
</para>
|
||||
</section> -->
|
||||
@@ -368,12 +394,12 @@ repository.
|
||||
<title>Workflow Examples</title>
|
||||
|
||||
<para>
|
||||
As previously noted, the Yocto Project kernel has built in git integration.
|
||||
As previously noted, the Yocto Project kernel has built in Git integration.
|
||||
However, these utilities are not the only way to work with the kernel repository.
|
||||
Yocto Project has not made changes to git or to other tools that
|
||||
Yocto Project has not made changes to Git or to other tools that
|
||||
would invalidate alternate workflows.
|
||||
Additionally, the way the kernel repository is constructed results in using
|
||||
only core git functionality thus allowing any number of tools or front ends to use the
|
||||
only core Git functionality thus allowing any number of tools or front ends to use the
|
||||
resulting tree.
|
||||
</para>
|
||||
|
||||
@@ -402,7 +428,7 @@ repository.
|
||||
|
||||
<para>
|
||||
A more efficient way to determine what has changed in the kernel is to use
|
||||
git and inspect or search the kernel tree.
|
||||
Git and inspect or search the kernel tree.
|
||||
This method gives you a full view of not only the source code modifications,
|
||||
but also provides the reasons for the changes.
|
||||
</para>
|
||||
@@ -411,8 +437,8 @@ repository.
|
||||
<title>What Changed in a BSP?</title>
|
||||
|
||||
<para>
|
||||
Following are a few examples that show how to use git to examine changes.
|
||||
Note that because the Yocto Project git repository does not break existing git
|
||||
Following are a few examples that show how to use Git to examine changes.
|
||||
Note that because the Yocto Project Git repository does not break existing Git
|
||||
functionality and because there exists many permutations of these types of
|
||||
commands there are many more methods to discover changes.
|
||||
</para>
|
||||
@@ -475,7 +501,7 @@ repository.
|
||||
<para>
|
||||
You can use many other comparisons to isolate BSP changes.
|
||||
For example, you can compare against kernel.org tags (e.g. v2.6.27.18, etc), or
|
||||
you can compare against subsystems (e.g. git whatchanged mm).
|
||||
you can compare against subsystems (e.g. <filename>git whatchanged mm</filename>).
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
@@ -490,9 +516,9 @@ repository.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Since the Yocto Project kernel source tree is backed by git, this activity is
|
||||
Since the Yocto Project kernel source tree is backed by Git, this activity is
|
||||
much easier as compared to with previous releases.
|
||||
Because git tracks file modifications, additions and deletions, it is easy
|
||||
Because Git tracks file modifications, additions and deletions, it is easy
|
||||
to modify the code and later realize that the changes should be saved.
|
||||
It is also easy to determine what has changed.
|
||||
This method also provides many tools to commit, undo and export those modifications.
|
||||
@@ -505,7 +531,7 @@ repository.
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>Bulk storage</para></listitem>
|
||||
<listitem><para>Internal sharing either through patches or by using git</para></listitem>
|
||||
<listitem><para>Internal sharing either through patches or by using Git</para></listitem>
|
||||
<listitem><para>External submissions</para></listitem>
|
||||
<listitem><para>Exporting for integration into another SCM</para></listitem>
|
||||
</itemizedlist>
|
||||
@@ -553,7 +579,7 @@ repository.
|
||||
|
||||
<para>
|
||||
The previous operations capture all the local changes in the project source
|
||||
tree in a single git commit.
|
||||
tree in a single Git commit.
|
||||
And, that commit is also stored in the project's source tree.
|
||||
</para>
|
||||
|
||||
@@ -573,12 +599,12 @@ repository.
|
||||
The examples in this section assume that changes have been incrementally committed
|
||||
to the tree during development and now need to be exported. The sections that follow
|
||||
describe how you can export your changes internally through either patches or by
|
||||
using git commands.
|
||||
using Git commands.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
During development the following commands are of interest.
|
||||
For full git documentation, refer to the git man pages or to an online resource such
|
||||
For full Git documentation, refer to the Git man pages or to an online resource such
|
||||
as <ulink url='http://github.com'></ulink>.
|
||||
|
||||
<literallayout class='monospaced'>
|
||||
@@ -617,15 +643,15 @@ repository.
|
||||
associated with development by using the following commands:
|
||||
|
||||
<literallayout class='monospaced'>
|
||||
> git add >path</file
|
||||
> git commit --amend
|
||||
> git rebase or git rebase -i
|
||||
> Git add >path</file
|
||||
> Git commit --amend
|
||||
> Git rebase or Git rebase -i
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Again, assuming that the changes have not been pushed upstream, and that
|
||||
no pending works-in-progress exist (use "git status" to check) then
|
||||
no pending works-in-progress exist (use <filename>git status</filename> to check) then
|
||||
you can revert (undo) commits by using the following commands:
|
||||
|
||||
<literallayout class='monospaced'>
|
||||
@@ -640,13 +666,13 @@ repository.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can create branches, "cherry-pick" changes or perform any number of git
|
||||
You can create branches, "cherry-pick" changes or perform any number of Git
|
||||
operations until the commits are in good order for pushing upstream
|
||||
or for pull requests.
|
||||
After a push or pull, commits are normally considered
|
||||
"permanent" and you should not modify them.
|
||||
If they need to be changed you can incrementally do so with new commits.
|
||||
These practices follow the standard "git" workflow and the kernel.org best
|
||||
These practices follow the standard Git workflow and the kernel.org best
|
||||
practices, which Yocto Project recommends.
|
||||
</para>
|
||||
|
||||
@@ -715,7 +741,7 @@ repository.
|
||||
</section>
|
||||
|
||||
<section id='export-internally-via-git'>
|
||||
<title>Exporting Changes Internally by Using git</title>
|
||||
<title>Exporting Changes Internally by Using Git</title>
|
||||
|
||||
<para>
|
||||
This section describes how you can export changes from a working directory
|
||||
@@ -727,7 +753,8 @@ repository.
|
||||
<para>
|
||||
Use this command form to push the changes:
|
||||
<literallayout class='monospaced'>
|
||||
git push ssh://<master server>/<path to repo> <local branch>:<remote branch>
|
||||
> git push ssh://<master_server>/<path_to_repo>
|
||||
<local_branch>:<remote_branch>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
@@ -736,25 +763,26 @@ repository.
|
||||
<filename>yocto/standard/common-pc/base</filename> to the remote branch with the same name
|
||||
in the master repository <filename>//git.mycompany.com/pub/git/kernel-2.6.37</filename>.
|
||||
<literallayout class='monospaced'>
|
||||
> push ssh://git.mycompany.com/pub/git/kernel-2.6.37 yocto/standard/common-pc/base:yocto/standard/common-pc/base
|
||||
> git push ssh://git.mycompany.com/pub/git/kernel-2.6.37 \
|
||||
yocto/standard/common-pc/base:yocto/standard/common-pc/base
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A pull request entails using "git request-pull" to compose an email to the
|
||||
A pull request entails using <filename>git request-pull</filename> to compose an email to the
|
||||
maintainer requesting that a branch be pulled into the master repository, see
|
||||
<ulink url='http://github.com/guides/pull-requests'></ulink> for an example.
|
||||
</para>
|
||||
|
||||
<note><para>
|
||||
Other commands such as 'git stash' or branching can also be used to save
|
||||
Other commands such as <filename>git stash</filename> or branching can also be used to save
|
||||
changes, but are not covered in this document.
|
||||
</para></note>
|
||||
|
||||
<!--<para>
|
||||
See the section "importing from another SCM" for how a git push to the
|
||||
See the section "importing from another SCM" for how a Git push to the
|
||||
default_kernel, can be used to automatically update the builds of all users
|
||||
of a central git repository.
|
||||
of a central Git repository.
|
||||
</para>-->
|
||||
</section>
|
||||
</section>
|
||||
@@ -785,7 +813,7 @@ repository.
|
||||
The messages used to commit changes are a large part of these standards.
|
||||
Consequently, be sure that the headers for each commit have the required information.
|
||||
If the initial commits were not properly documented or do not meet those standards,
|
||||
you can re-base by using the "git rebase -i" command to manipulate the commits and
|
||||
you can re-base by using the <filename>git rebase -i</filename> command to manipulate the commits and
|
||||
get them into the required format.
|
||||
Other techniques such as branching and cherry-picking commits are also viable options.
|
||||
</para>
|
||||
@@ -793,7 +821,7 @@ repository.
|
||||
<para>
|
||||
Once you complete the commits, you can generate the email that sends the patches
|
||||
to the maintainer(s) or lists that review and integrate changes.
|
||||
The command "git send-email" is commonly used to ensure that patches are properly
|
||||
The command <filename>git send-email</filename> is commonly used to ensure that patches are properly
|
||||
formatted for easy application and avoid mailer-induced patch damage.
|
||||
</para>
|
||||
|
||||
@@ -825,7 +853,7 @@ repository.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Many SCMs can directly import git commits, or can translate git patches so that
|
||||
Many SCMs can directly import Git commits, or can translate Git patches so that
|
||||
information is not lost.
|
||||
Those facilities are SCM-dependent and you should use them whenever possible.
|
||||
</para>
|
||||
@@ -854,7 +882,7 @@ repository.
|
||||
|
||||
<para>
|
||||
Depending on the SCM it might be possible to export the entire Yocto Project
|
||||
kernel git repository, branches and all, into a new environment.
|
||||
kernel Git repository, branches and all, into a new environment.
|
||||
This method is preferred because it has the most flexibility and potential to maintain
|
||||
the meta data associated with each commit.
|
||||
</para>
|
||||
@@ -900,14 +928,14 @@ repository.
|
||||
automatically apply them to the kernel during patching.
|
||||
</para>
|
||||
<!--<para>
|
||||
If changes are imported directly into git, they must be propagated to the
|
||||
If changes are imported directly into Git, they must be propagated to the
|
||||
wrll-linux-2.6.27/git/default_kernel bare clone of each individual build
|
||||
to be present when the kernel is checked out.
|
||||
</para>
|
||||
<para>
|
||||
The following example illustrates one variant of this workflow:
|
||||
<literallayout class='monospaced'>
|
||||
# on master git repository
|
||||
# on master Git repository
|
||||
> cd linux-2.6.27
|
||||
> git tag -d common_pc-standard-mark
|
||||
> git pull ssh://<foo>@<bar>/pub/git/kernel-2.6.27 common_pc-standard:common_pc-standard
|
||||
@@ -928,7 +956,7 @@ The following example illustrates one variant of this workflow:
|
||||
<!-- <section id='bsp-template-migration-from-2'>
|
||||
<title>BSP: Template Migration from 2.0</title>
|
||||
<para>
|
||||
The move to a git-backed kernel build system in 3.0 introduced a small new
|
||||
The move to a Git-backed kernel build system in 3.0 introduced a small new
|
||||
requirement for any BSP that is not integrated into the GA release of the
|
||||
product: branching information.
|
||||
</para>
|
||||
@@ -1006,204 +1034,60 @@ That's it. Configure and build.
|
||||
<title>Creating a BSP Based on an Existing Similar BSP</title>
|
||||
|
||||
<para>
|
||||
This section provides an example for creating a BSP
|
||||
that is based on an existing, and hopefully, similar
|
||||
one. It assumes you will be using a local kernel
|
||||
repository and will be pointing the kernel recipe at
|
||||
that. Follow these steps and keep in mind your
|
||||
particular situation and differences:
|
||||
This section overviews the process of creating a BSP based on an
|
||||
existing similar BSP.
|
||||
The information is introductory in nature and does not provide step-by-step examples.
|
||||
For detailed information on how to create a BSP given an existing similar BSP
|
||||
see the Yocto Project Development Manual [NEED LINK] or the
|
||||
<ulink url='https://wiki.yoctoproject.org/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another'></ulink>
|
||||
wiki page.
|
||||
</para>
|
||||
|
||||
<orderedlist>
|
||||
<listitem><para>
|
||||
Identify a machine configuration file that matches your machine.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can start with something in <filename>meta/conf/machine</filename> - <filename>
|
||||
meta/conf/machine/atom-pc.conf</filename> for example. Or, you can start with a machine
|
||||
configuration from any of the BSP layers in the meta-intel repository at
|
||||
<ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel/'></ulink>, such as
|
||||
<filename>meta-intel/meta-emenlow/conf/machine/emenlow.conf</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The main difference between the two is that "emenlow" is in its own layer.
|
||||
It is in its own layer because it needs extra machine-specific packages such as its
|
||||
own video driver and other supporting packages.
|
||||
The "atom-pc" is simpler and does not need any special packages - everything it needs can
|
||||
be specified in the configuration file.
|
||||
The "atom-pc" machine also supports all of Asus eee901, Acer Aspire One, Toshiba NB305,
|
||||
and the Intel® Embedded Development Board 1-N450 with no changes.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you want to make minor changes to support a slightly different machine, you can
|
||||
create a new configuration file for it and add it alongside the others.
|
||||
You might consider keeping the common information separate and including it.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Similarly, you can also use multiple configuration files for different machines even
|
||||
if you do it as a separate layer like meta-emenlow.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
As an example consider this:
|
||||
<itemizedlist>
|
||||
<listitem><para>Copy meta-emenlow to meta-mymachine</para></listitem>
|
||||
<listitem><para>Fix or remove anything you do not need.
|
||||
For this example the only thing left was the kernel directory with a
|
||||
<filename>linux-yocto_git.bbappend</filename>
|
||||
file
|
||||
and <filename>meta-mymachine/conf/machine/mymachine.conf</filename>
|
||||
(linux-yocto is the kernel listed in
|
||||
<filename>meta-emenlow/conf/machine/emenlow.conf</filename>)</para></listitem>.
|
||||
<listitem><para>Add a new entry in the <filename>build/conf/bblayers.conf</filename>
|
||||
so the new layer can be found by BitBake.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
Create a machine branch for your machine.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For the kernel to compile successfully, you need to create a branch in the git repository
|
||||
specifically named for your machine.
|
||||
To create this branch first create a bare clone of the Yocto Project git repository.
|
||||
Next, create a local clone of that:
|
||||
<literallayout class='monospaced'>
|
||||
$ git clone --bare git://git.yoctoproject.org/linux-yocto-2.6.37.git
|
||||
linux-yocto-2.6.37.git
|
||||
$ git clone linux-yocto-2.6.37.git linux-yocto-2.6.37
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Now create a branch in the local clone and push it to the bare clone:
|
||||
<literallayout class='monospaced'>
|
||||
$ git checkout -b yocto/standard/mymachine origin/yocto/standard/base
|
||||
$ git push origin yocto/standard/mymachine:yocto/standard/mymachine
|
||||
</literallayout>
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
In a layer, create a <filename>linux-yocto_git.bbappend</filename>
|
||||
file with the following:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<literallayout class='monospaced'>
|
||||
FILESEXTRAPATHS := "${THISDIR}/${PN}"
|
||||
COMPATIBLE_MACHINE_mymachine = "mymachine"
|
||||
|
||||
# It is often nice to have a local clone of the kernel repository, to
|
||||
# allow patches to be staged, branches created, and so forth. Modify
|
||||
# KSRC to point to your local clone as appropriate.
|
||||
|
||||
KSRC ?= /path/to/your/bare/clone/for/example/linux-yocto-2.6.37.git
|
||||
|
||||
# KMACHINE is the branch to be built, or alternatively
|
||||
# KBRANCH can be directly set.
|
||||
# KBRANCH is set to KMACHINE in the main linux-yocto_git.bb
|
||||
# KBRANCH ?= "${LINUX_KERNEL_TYPE}/${KMACHINE}"
|
||||
|
||||
KMACHINE_mymachine = "yocto/standard/mymachine"
|
||||
|
||||
SRC_URI = "git://${KSRC};nocheckout=1;branch=${KBRANCH},meta;name=machine,meta"
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
After doing that, select the machine in <filename>build/conf/local.conf</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
#
|
||||
MACHINE ?= "mymachine"
|
||||
#
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You should now be able to build and boot an image with the new kernel:
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake core-image-sato-live
|
||||
</literallayout>
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
Modify the kernel configuration for your machine.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Of course, that will give you a kernel with the default configuration file, which is probably
|
||||
not what you want.
|
||||
If you just want to set some kernel configuration options, you can do that by
|
||||
putting them in a file.
|
||||
For example, inserting the following into some <filename>.cfg</filename> file:
|
||||
<literallayout class='monospaced'>
|
||||
CONFIG_NETDEV_1000=y
|
||||
CONFIG_E1000E=y
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
And, another <filename>.cfg</filename> file would contain:
|
||||
<literallayout class='monospaced'>
|
||||
CONFIG_LOG_BUF_SHIFT=18
|
||||
</literallayout>
|
||||
|
||||
<para>
|
||||
These config fragments could then be picked up and
|
||||
applied to the kernel .config by appending them to the kernel SRC_URI:
|
||||
</para>
|
||||
|
||||
<literallayout class='monospaced'>
|
||||
SRC_URI_append_mymachine = " file://some.cfg \
|
||||
file://other.cfg \
|
||||
"
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You could also add these directly to the git repository <filename>meta</filename>
|
||||
branch as well.
|
||||
However, the former method is a simple starting point.
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
If you're also adding patches to the kernel, you can do the same thing.
|
||||
Put your patches in the SRC_URI as well (plus <filename>.cfg</filename> for their kernel
|
||||
configuration options if needed).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Practically speaking, to generate the patches, you'd go to the source in the build tree:
|
||||
<literallayout class='monospaced'>
|
||||
build/tmp/work/mymachine-poky-linux/linux-yocto-2.6.37+git0+d1cd5c80ee97e81e130be8c3de3965b770f320d6_0+
|
||||
0431115c9d720fee5bb105f6a7411efb4f851d26-r13/linux
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Then, modify the code there, using quilt to save the changes, and recompile until
|
||||
it works:
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake -c compile -f linux-yocto
|
||||
</literallayout>
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
Once you have the final patch from quilt, copy it to the
|
||||
SRC_URI location.
|
||||
The patch is applied the next time you do a clean build.
|
||||
Of course, since you have a branch for the BSP in git, it would be better to put it there instead.
|
||||
For example, in this case, commit the patch to the "yocto/standard/mymachine" branch, and during the
|
||||
next build it is applied from there.
|
||||
</para></listitem>
|
||||
</orderedlist>
|
||||
<para>
|
||||
The basic steps you need to follow are:
|
||||
<orderedlist>
|
||||
<listitem><para>Make sure you have the Yocto Project source tree available.
|
||||
You should either create a Yocto Project Git repository (recommended), or
|
||||
you should get the Yocto Project release tarball and extract it.</para></listitem>
|
||||
<listitem><para>Choose an existing BSP available with the Yocto Project.
|
||||
Try to map your board features as closely to the features of a BSP that is
|
||||
already supported and exists in the Yocto Project.
|
||||
Starting with something as close as possible to your board makes developing
|
||||
your BSP easier.
|
||||
You can find all the BSPs that are supported and ship with the Yocto Project
|
||||
on the Yocto Project's Download page at
|
||||
<ulink url='http://www.yoctoproject.org/download'></ulink>.</para></listitem>
|
||||
<listitem><para>Be sure you have the Base BSP.
|
||||
You need to either have the Yocto Project Git repository set up or download
|
||||
the tarball of the base BSP.
|
||||
Either method gives you access to the BSP source files.</para></listitem>
|
||||
<listitem><para>Make a copy of the existing BSP, thus isolating your new BSP work.
|
||||
Copying the existing BSP structure gives you a new area in which to work.</para></listitem>
|
||||
<listitem><para>Make configuration and recipe changes to your new BSP.
|
||||
Configuration changes involve the files in the BSP's <filename>conf</filename>
|
||||
directory.
|
||||
Changes include creating a machine-specific configuration file and editing the
|
||||
<filename>layer.conf</filename> file.
|
||||
The configuration changes identify the kernel you will be using.
|
||||
Recipe changes include removing, modifying, or adding new recipe files that
|
||||
instruct the build process on what features to include in the image.</para></listitem>
|
||||
<listitem><para>Prepare for the build.
|
||||
Before you actually initiate the build you need to set up the build environment
|
||||
by sourcing the environment initialization script.
|
||||
After setting up the environment you need to make some build configuration
|
||||
changes to the <filename>local.conf</filename> and <filename>bblayers.conf</filename>
|
||||
files.</para></listitem>
|
||||
<listitem><para>Build the image.
|
||||
The Yocto Project uses the BitBake tool to create the image.
|
||||
You need to decide on the type of image you are going to build (e.g. minimal, base,
|
||||
core, sato, and so forth) and then start the build using the <filename>bitbake</filename>
|
||||
command.</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
||||
<!--
|
||||
<section id='bsp-creating-bsp-without-a-local-kernel-repo'>
|
||||
<title>Creating a BSP Based on an Existing Similar BSP Without a Local Kernel Repository</title>
|
||||
|
||||
@@ -1236,7 +1120,8 @@ That's it. Configure and build.
|
||||
</section>
|
||||
|
||||
|
||||
<!-- <section id='bsp-creating-a-new-bsp'>
|
||||
|
||||
<section id='bsp-creating-a-new-bsp'>
|
||||
<title>BSP: Creating a New BSP</title>
|
||||
<para>
|
||||
Although it is obvious that the structure of a new BSP uses the migrated
|
||||
@@ -1429,7 +1314,7 @@ In this technique the .scc file in the board template is slightly different
|
||||
<para>
|
||||
The previous examples created the board templates and configured a build
|
||||
before beginning work on a new BSP. It is also possible for advanced users to
|
||||
simply treat the Yocto Project git repository as an upstream source and begin
|
||||
simply treat the Yocto Project Git repository as an upstream source and begin
|
||||
BSP development directly on the repository. This is the closest match to how
|
||||
the kernel community at large would operate.
|
||||
</para>
|
||||
@@ -1679,7 +1564,7 @@ Or you can do this:
|
||||
</para>
|
||||
<para>
|
||||
For details on conflict resolution and patch application, see the
|
||||
git manual, or other suitable online references.
|
||||
Git manual, or other suitable online references.
|
||||
<literallayout class='monospaced'>
|
||||
> git am <mbox>
|
||||
# conflict
|
||||
@@ -1807,8 +1692,8 @@ Other guilt operations of interest are:
|
||||
</literallayout>
|
||||
</para>
|
||||
<note><para>
|
||||
Guilt only uses git commands and git plumbing to perform its operations,
|
||||
anything that guilt does can also be done using git directly. It is provided
|
||||
Guilt only uses Git commands and Git plumbing to perform its operations,
|
||||
anything that guilt does can also be done using Git directly. It is provided
|
||||
as a convenience utility, but is not required and the developer can use whatever
|
||||
tools or workflow they wish.
|
||||
</para></note>
|
||||
@@ -1817,7 +1702,7 @@ The following builds from the above instructions to show how guilt can be
|
||||
used to assist in getting your BSP kernel patches ready. You should follow
|
||||
the above instructions up to and including 'make linux.config'. In this
|
||||
example I will create a new commit (patch) from scratch and import another
|
||||
fictitious patch from some external public git tree (ie, a commit with full
|
||||
fictitious patch from some external public Git tree (ie, a commit with full
|
||||
message, signoff etc.). Please ensure you have host-cross/bin in your path.
|
||||
<literallayout class='monospaced'>
|
||||
%> cd linux
|
||||
@@ -1835,7 +1720,7 @@ message, signoff etc.). Please ensure you have host-cross/bin in your path.
|
||||
Here are a few notes about the above:
|
||||
<itemizedlist>
|
||||
<listitem><para>guilt-header -e ‐‐ this will open editing of the patch header in
|
||||
EDITOR. As with a git commit the first line is the short log and
|
||||
EDITOR. As with a Git commit the first line is the short log and
|
||||
should be just that short and concise message about the commit. Follow
|
||||
the short log with lines of text that will be the long description but
|
||||
note Do not put a blank line after the short log. As usual you will
|
||||
@@ -1849,7 +1734,7 @@ Here are a few notes about the above:
|
||||
review comment in the first patch (first_one.patch in the case of this
|
||||
example) it is very easy to use guilt to pop the other patches off
|
||||
allowing you to make the necessary changes without having to use more
|
||||
inventive git type strategies.</para></listitem>
|
||||
inventive Git type strategies.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
@@ -1954,7 +1839,7 @@ This section shows an example of transforms:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can use the git command above to report modified, removed, or added files.
|
||||
You can use the Git command above to report modified, removed, or added files.
|
||||
You should commit those changes to the tree regardless of whether they will be saved,
|
||||
exported, or used.
|
||||
Once you commit the changes you need to rebuild the kernel.
|
||||
@@ -1981,7 +1866,7 @@ This section shows an example of transforms:
|
||||
|
||||
<orderedlist>
|
||||
<listitem><para>Create a custom kernel layer.</para></listitem>
|
||||
<listitem><para>Create a git repository of the transition kernel.</para></listitem>
|
||||
<listitem><para>Create a Git repository of the transition kernel.</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
|
||||
@@ -2023,12 +1908,12 @@ patches. If a custom BSP is being used, this is not required.
|
||||
</section> -->
|
||||
|
||||
<!-- <section id='git-repo-of-the-transition-kernel'>
|
||||
<title>git Repo of the Transition Kernel</title>
|
||||
<title>Git Repo of the Transition Kernel</title>
|
||||
<para>
|
||||
The kernel build system requires a base kernel repository to
|
||||
seed the build process. This repository must be found in the
|
||||
same layer as the build infrastructure (i.e wrll-linux-2.6.27)
|
||||
in the 'git' subdir, with the name 'default_kernel'
|
||||
in the <filename>.git</filename> subdir, with the name 'default_kernel'
|
||||
</para>
|
||||
<para>Since Yocto Project Linux ships with a default_kernel
|
||||
(the validated Yocto Project kernel) in the wrll-linux-2.6.27
|
||||
@@ -2037,15 +1922,15 @@ transition kernel.
|
||||
</para>
|
||||
<para>If the Yocto Project install cannot be directly modified
|
||||
with the new default kernel, then the path to the transition
|
||||
kernel layer's 'git' subdir must be passed to the build
|
||||
kernel layer's <filename>.git</filename> subdir must be passed to the build
|
||||
process via:
|
||||
<programlisting>
|
||||
linux_GIT_BASE=<absolute path to layer>/git
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
If the transition kernel has not been delivered via git,
|
||||
then a git repo should be created, and bare cloned into
|
||||
If the transition kernel has not been delivered via Git,
|
||||
then a Git repo should be created, and bare cloned into
|
||||
place. Creating this repository is as simple as:
|
||||
<literallayout class='monospaced'>
|
||||
> tar zxvf temp_kernel.tgz
|
||||
@@ -2118,7 +2003,7 @@ To build the kernel:
|
||||
</para>
|
||||
<para>
|
||||
If this is to build without some user intervention (passing of the
|
||||
GIT_BASE), you must do the clone into the wrll-linux-2.6.27/git directory.
|
||||
GIT_BASE), you must do the clone into the <filename>wrll-linux-2.6.27/.git</filename> directory.
|
||||
</para>
|
||||
<note><para>Unless you define valid "hardware.kcf" and "non-hardware.kcf" some
|
||||
non fatal warnings will be seen. They can be fixed by populating these
|
||||
@@ -2168,7 +2053,7 @@ options.
|
||||
<listitem><para>Building a 'dirty' image.</para></listitem>
|
||||
<listitem><para>Temporarily using a different base kernel.</para></listitem>
|
||||
<listitem><para>Creating a custom kernel layer.</para></listitem>
|
||||
<listitem><para>Creating the git repository of the transition kernel.</para></listitem>
|
||||
<listitem><para>Creating the Git repository of the transition kernel.</para></listitem>
|
||||
</itemizedlist> -->
|
||||
|
||||
|
||||
|
||||
@@ -56,6 +56,14 @@
|
||||
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.
|
||||
</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/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>
|
||||
|
||||
</bookinfo>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
DESCRIPTION = "GNU Helloworld application"
|
||||
SECTION = "examples"
|
||||
LICENSE = "GPLv3"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=adefda309052235aa5d1e99ce7557010"
|
||||
|
||||
SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.bz2"
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
DESCRIPTION = "Simple helloworld application"
|
||||
SECTION = "examples"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
|
||||
SRC_URI = "file://helloworld.c"
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ require xorg-lib-common.inc
|
||||
|
||||
DESCRIPTION = "X11 Pixmap library"
|
||||
LICENSE = "X-BSD"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=3e07763d16963c3af12db271a31abaa5"
|
||||
DEPENDS += "libxext"
|
||||
PR = "r2"
|
||||
PE = "1"
|
||||
|
||||
@@ -3,6 +3,8 @@ SECTION = "base"
|
||||
DEPENDS = "zlib"
|
||||
HOMEPAGE = "http://www.linux-mtd.infradead.org/"
|
||||
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"
|
||||
|
||||
|
||||
@@ -12,24 +12,20 @@
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
Poky is a derivative of <ulink
|
||||
url='http://www.openembedded.org/'>OpenEmbedded</ulink>, a stable,
|
||||
smaller subset focused on the GNOME Mobile environment. Development
|
||||
in Poky is closely tied to OpenEmbedded with features being merged
|
||||
regularly between the two for mutual benefit.
|
||||
Poky is the Yocto Project build system that was derived from <ulink
|
||||
url='http://www.openembedded.org/'>OpenEmbedded</ulink>.
|
||||
Poky is a stable, smaller subset focused on the GNOME Mobile environment.
|
||||
Development in the Yocto Project using Poky is closely tied to OpenEmbedded with
|
||||
features being merged regularly between the two for mutual benefit.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
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>
|
||||
</question>
|
||||
<answer>
|
||||
@@ -57,10 +53,6 @@
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -70,216 +62,221 @@
|
||||
<answer>
|
||||
<para>
|
||||
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>
|
||||
<listitem>
|
||||
<para>
|
||||
"Development tools" (selected during installation)
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
texi2html
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
compat-gcc-34
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem><para>The Yocto Project team keeps Poky small and focused.
|
||||
It contains around 650 packages as compared to over 5000 for full
|
||||
OpenEmbedded.</para></listitem>
|
||||
<listitem><para>The Yocto Project only supports hardware that the
|
||||
team has access to for testing.</para></listitem>
|
||||
<listitem><para>The Yocto Project uses an 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 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>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
On top of those the following external packages are needed:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
python-sqlite2 from <ulink
|
||||
url='http://dag.wieers.com/rpm/packages/python-sqlite2/'>DAG
|
||||
repository</ulink>
|
||||
</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.
|
||||
Once these packages are installed, the Yocto Project will be able to build standard
|
||||
images.
|
||||
However, there might be a problem with the QEMU emulator segfaulting.
|
||||
You can either disable the generation of binary locales by setting
|
||||
<filename><link linkend='var-ENABLE_BINARY_LOCALE_GENERATION'>ENABLE_BINARY_LOCALE_GENERATION</link>
|
||||
</filename> to "0" or by removing the <filename>linux-2.6-execshield.patch</filename>
|
||||
from the kernel and rebuilding it since that is the patch that causes the problems with QEMU.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
I see lots of 404 responses for files on
|
||||
http://autobuilder.yoctoproject.org/sources/*. Is something wrong?
|
||||
<filename>http://autobuilder.yoctoproject.org/sources/*</filename>. Is something wrong?
|
||||
</para>
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
Nothing is wrong, Poky will check any configured source mirrors before downloading
|
||||
from the upstream sources. It does this searching for both source archives and
|
||||
pre-checked out versions of SCM managed software. This is so in large installations,
|
||||
it can reduce load on the SCM servers themselves. The address above is one of the
|
||||
default mirrors configured into standard Poky so if an upstream source disappears,
|
||||
we can place sources there so builds continue to work.
|
||||
Nothing is wrong.
|
||||
The Yocto Project checks any configured source mirrors before downloading
|
||||
from the upstream sources.
|
||||
The Yocto Project does this searching for both source archives and
|
||||
pre-checked out versions of SCM managed software.
|
||||
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>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
I have a 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?
|
||||
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 prevent this?
|
||||
</para>
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
Set <glossterm><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
|
||||
machine specific in the case that needs it. The code which handles <glossterm><link
|
||||
linkend='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'>SRC_URI_OVERRIDES_PACKAGE_ARCH</link></glossterm>
|
||||
is in base.bbclass.
|
||||
Set <filename><link linkend='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'>SRC_URI_OVERRIDES_PACKAGE_ARCH</link>
|
||||
</filename> = "0" in the <filename>.bb</filename> file but make sure the package is
|
||||
manually marked as
|
||||
machine-specific in the case that needs it.
|
||||
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>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -288,42 +285,60 @@
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
Most source fetching by Poky is done by wget and you therefore need to specify the proxy
|
||||
settings in a .wgetrc file in your home directory. Example settings in that file would be
|
||||
'http_proxy = http://proxy.yoyodyne.com:18023/' and 'ftp_proxy = http://proxy.yoyodyne.com:18023/'.
|
||||
Poky also includes a site.conf.sample file which shows how to configure cvs and git proxy servers
|
||||
Most source fetching by the Yocto Project is done by <filename>wget</filename>
|
||||
and you therefore need to specify the proxy settings in a
|
||||
<filename>.wgetrc</filename> file in your home directory.
|
||||
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.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<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>
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
In Intrepid, Ubuntu turned on by default normally optional compile-time security features
|
||||
and warnings. There are more details at <ulink
|
||||
url='https://wiki.ubuntu.com/CompilerFlags'>https://wiki.ubuntu.com/CompilerFlags</ulink>.
|
||||
You can work around this problem by disabling those options by adding " -Wno-format-security -U_FORTIFY_SOURCE"
|
||||
to the BUILD_CPPFLAGS variable in conf/bitbake.conf.
|
||||
In Intrepid, Ubuntu turns on by default the normally optional compile-time security features
|
||||
and warnings.
|
||||
There are more details at
|
||||
<ulink url='https://wiki.ubuntu.com/CompilerFlags'>https://wiki.ubuntu.com/CompilerFlags</ulink>.
|
||||
You can work around this problem by disabling those options by adding
|
||||
the following to the <filename>BUILD_CPPFLAGS</filename> variable in the
|
||||
<filename>conf/bitbake.conf</filename> file.
|
||||
<literallayout class='monospaced'>
|
||||
" -Wno-format-security -U_FORTIFY_SOURCE"
|
||||
</literallayout>
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
Whats the difference between foo and foo-native?
|
||||
What’s the difference between <filename>foo</filename> and <filename>foo-native</filename>?
|
||||
</para>
|
||||
</question>
|
||||
<answer>
|
||||
<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>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -332,10 +347,17 @@
|
||||
</question>
|
||||
<answer>
|
||||
<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>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -344,7 +366,13 @@
|
||||
</question>
|
||||
<answer>
|
||||
<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>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
@@ -359,7 +387,7 @@
|
||||
<para>
|
||||
You need to create a form factor file as described in
|
||||
<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'>
|
||||
HAVE_TOUCHSCREEN=1
|
||||
</literallayout>
|
||||
@@ -377,7 +405,7 @@
|
||||
<para>
|
||||
The default interfaces file provided by the netbase recipe does not
|
||||
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.
|
||||
See <xref linkend='bsp-filelayout-misc-recipes'>"Miscellaneous Recipe Files"</xref>
|
||||
for information on creating these types of miscellaneous recipe files.
|
||||
@@ -401,7 +429,7 @@
|
||||
<answer>
|
||||
<para>
|
||||
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>.
|
||||
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
|
||||
@@ -421,9 +449,10 @@
|
||||
</question>
|
||||
<answer>
|
||||
<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.
|
||||
Until that situation changes we will not support spaces in pathnames.
|
||||
Until that situation changes, the team will not support spaces in pathnames.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
@@ -437,17 +466,18 @@
|
||||
<answer>
|
||||
<para>
|
||||
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
|
||||
(<filename>conf/distro/include/tcmode-*.inc</filename>).
|
||||
</para>
|
||||
<para>
|
||||
The default value of TCMODE is "default".
|
||||
The default value of <filename>TCMODE</filename> is "default".
|
||||
However, other patterns are accepted.
|
||||
In particular, "external-*" refers to external toolchains of which there are some basic examples
|
||||
included with the core.
|
||||
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>.
|
||||
</para>
|
||||
<para>
|
||||
@@ -461,29 +491,27 @@
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<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>
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
The way Poky obtains source code is highly configurable.
|
||||
You can setup Poky to get source code in most environmnents if
|
||||
The way the Yocto Project obtains source code is highly configurable.
|
||||
You can setup the Yocto Project to get source code in most environments if
|
||||
HTTP transport is available.
|
||||
</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,
|
||||
and then MIRRORS in that order.
|
||||
</para>
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
<para>
|
||||
@@ -499,9 +527,9 @@
|
||||
</literallayout>
|
||||
</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.
|
||||
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.
|
||||
</para>
|
||||
<para>
|
||||
@@ -509,8 +537,6 @@
|
||||
<literallayout class='monospaced'>
|
||||
BB_NO_NETWORK = "1"
|
||||
</literallayout>
|
||||
</para>
|
||||
<para>
|
||||
This statement tells BitBake to throw an error instead of trying to access the
|
||||
Internet.
|
||||
This technique is useful if you want to ensure code builds only from local sources.
|
||||
@@ -520,8 +546,6 @@
|
||||
<literallayout class='monospaced'>
|
||||
BB_FETCH_PREMIRRORONLY = "1"
|
||||
</literallayout>
|
||||
</para>
|
||||
<para>
|
||||
This statement limits Poky to pulling source from the PREMIRRORS only.
|
||||
Again, this technique is useful for reproducing builds.
|
||||
</para>
|
||||
@@ -530,8 +554,6 @@
|
||||
<literallayout class='monospaced'>
|
||||
BB_GENERATE_MIRROR_TARBALLS = "1"
|
||||
</literallayout>
|
||||
</para>
|
||||
<para>
|
||||
This statement tells Poky to generate mirror tarballs.
|
||||
This technique is useful if you want to create a mirror server.
|
||||
If not, however, the technique can simply waste time during the build.
|
||||
@@ -539,7 +561,7 @@
|
||||
<para>
|
||||
Finally, consider an example where you are behind an HTTP-only firewall.
|
||||
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'>
|
||||
PREMIRRORS_prepend = "\
|
||||
ftp://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \
|
||||
@@ -547,10 +569,8 @@
|
||||
https://.*/.* http://autobuilder.yoctoproject.org/sources/ \n"
|
||||
BB_FETCH_PREMIRRORONLY = "1"
|
||||
</literallayout>
|
||||
</para>
|
||||
<para>
|
||||
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>
|
||||
Poky also honors the standard environment variables
|
||||
@@ -560,9 +580,6 @@
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
|
||||
</qandaset>
|
||||
</appendix>
|
||||
<!--
|
||||
|
||||
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 38 KiB |
@@ -5,166 +5,133 @@
|
||||
<title>Introduction</title>
|
||||
|
||||
<section id='intro-welcome'>
|
||||
<title>Welcome to Poky!</title>
|
||||
<title>Introduction</title>
|
||||
|
||||
<para>
|
||||
Poky is the build tool in the Yocto Project.
|
||||
The Yocto Project uses Poky to build images (kernel, system, and application software) for
|
||||
targeted hardware.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Before diving into Poky, it helps to have an understanding of the Yocto Project.
|
||||
Especially useful for newcomers is the information in the Yocto Project Quick Start, which
|
||||
you can find on the <ulink url="http://www.yoctoproject.org">Yocto Project website</ulink>.
|
||||
Specifically, the guide is
|
||||
at <ulink url="http://www.yoctoproject.org/docs/yocto-quick-start/yocto-project-qs.html"/>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<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.
|
||||
This manual provides reference information for the current release of the Yocto Project.
|
||||
The Yocto Project is an open-source collaboration project focused on embedded Linux
|
||||
developers.
|
||||
Amongst other things, the Yocto Project uses the Poky build tool to
|
||||
construct complete Linux images.
|
||||
You can find complete introductory and getting started information on the Yocto Project
|
||||
by reading the
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||
Yocto Project Quick Start</ulink>.
|
||||
You can also find lots of information on the Yocto Project on the
|
||||
<ulink url="http://www.yoctoproject.org">Yocto Project website</ulink>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='intro-manualoverview'>
|
||||
<title>Documentation Overview</title>
|
||||
<para>
|
||||
The sections in this reference manual describe different aspects of Poky.
|
||||
The <link linkend='usingpoky'>'Using Poky'</link> section provides an overview of the components
|
||||
that make up Poky followed by information about using Poky and debugging images created in
|
||||
the Yocto Project.
|
||||
The <link linkend='extendpoky'>'Extending Poky'</link> and
|
||||
<link linkend='bsp'>'Board Support Packages'</link> sections provide information
|
||||
about how to extend and customize Poky along with advice on how to manage these changes.
|
||||
The <link linkend='platdev'>'Platform Development with Poky'</link> section provides information about
|
||||
interaction between Poky and target hardware for common platform development tasks such as software
|
||||
development, debugging and profiling.
|
||||
The rest of the manual consists of several reference sections, each providing details on a specific
|
||||
area of Poky functionality.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This manual applies to Poky Release 5.0 (Bernard).
|
||||
This reference manual consists of the following:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>
|
||||
<link linkend='usingpoky'>Using the Yocto Project</link>:</emphasis> This chapter
|
||||
provides an overview of the components that make up the Yocto Project
|
||||
followed by information about debugging images created in the Yocto Project.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<link linkend='extendpoky'>Extending the Yocto Project</link>:</emphasis> This chapter
|
||||
provides information about how to extend and customize the Yocto Project
|
||||
along with advice on how to manage these changes.</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>
|
||||
</section>
|
||||
|
||||
|
||||
<section id='intro-requirements'>
|
||||
<title>System Requirements</title>
|
||||
<title>System Requirements</title>
|
||||
<para>
|
||||
Although we recommend Debian-based distributions
|
||||
(Ubuntu 10.04 or newer) as the host system for Poky, nothing in Poky is
|
||||
distribution-specific. Consequently, other distributions should work as long
|
||||
as the appropriate prerequisites are installed. For example, we know of Poky being used
|
||||
successfully on Redhat, SUSE, Gentoo and Slackware host systems.
|
||||
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'/>.
|
||||
For system Yocto Project system requirements, see the
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html#resources'>
|
||||
What You Need and How You Get It</ulink> section in the
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||
Yocto Project Quick Start</ulink>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='intro-getit'>
|
||||
<title>Obtaining Poky</title>
|
||||
|
||||
<section id='intro-getit-releases'>
|
||||
<title>Releases</title>
|
||||
|
||||
<para>Periodically, we make releases of Poky available
|
||||
at <ulink url='http://yoctoproject.org/downloads/poky/'/>.
|
||||
These releases are more stable and more rigorously tested than the nightly development images.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='intro-getit-nightly'>
|
||||
<title>Nightly Builds</title>
|
||||
|
||||
<para>
|
||||
We make nightly builds of Poky for testing purposes and to make the
|
||||
latest developments available. The output from these builds is available
|
||||
at <ulink url='http://autobuilder.yoctoproject.org/'/>.
|
||||
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>
|
||||
<title>Obtaining the Yocto Project</title>
|
||||
<para>
|
||||
The Yocto Project development team makes the Yocto Project available through a number
|
||||
of methods:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Releases:</emphasis> Stable, tested releases are available through
|
||||
<ulink url='http://yoctoproject.org/downloads/poky/'/>.</para></listitem>
|
||||
<listitem><para><emphasis>Nightly Builds:</emphasis> These releases are available at
|
||||
<ulink url='http://autobuilder.yoctoproject.org/'/>.
|
||||
These builds include Yocto Project releases, meta-toolchain tarballs, and
|
||||
experimental builds.</para></listitem>
|
||||
<listitem><para><emphasis>Yocto Project Website:</emphasis> You can find releases
|
||||
of the Yocto Project and supported BSPs at the
|
||||
<ulink url='http://www.yoctoproject.org'>Yocto Project website</ulink>.
|
||||
Along with these downloads, you can find lots of other information at this site.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</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/dev-manual/dev-manual.html#getting-setup'>
|
||||
Getting Setup</ulink> section in
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/dev-manual/dev-manual.html'>
|
||||
The Yocto Project Development Manual</ulink>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
<!--
|
||||
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 |
@@ -69,6 +69,14 @@
|
||||
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.
|
||||
</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/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>
|
||||
|
||||
</bookinfo>
|
||||
|
||||
@@ -6,23 +6,23 @@
|
||||
<title>Reference: BitBake</title>
|
||||
|
||||
<para>
|
||||
BitBake is a program written in Python that interprets the metadata that makes up Poky.
|
||||
At some point, people wonder what actually happens when you enter:
|
||||
<literallayout class='monospaced'>
|
||||
BitBake is a program written in Python that interprets the metadata that makes up the Yocto Project.
|
||||
At some point, developers wonder what actually happens when you enter:
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake core-image-sato
|
||||
</literallayout>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This appendix provides an overview of what happens behind the scenes from BitBake's perspective.
|
||||
</para>
|
||||
|
||||
<note><para>
|
||||
<note>
|
||||
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.
|
||||
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.
|
||||
</para></note>
|
||||
</note>
|
||||
|
||||
<section id='ref-bitbake-parsing'>
|
||||
<title>Parsing</title>
|
||||
@@ -33,61 +33,64 @@
|
||||
|
||||
<para>
|
||||
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
|
||||
variable and looking for the <filename>meta/conf/</filename>
|
||||
directory.
|
||||
</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>
|
||||
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
|
||||
settings for Poky.
|
||||
settings for the Yocto Project build environment.
|
||||
Other notable configuration files are the distribution
|
||||
configuration file (set by the <glossterm><link linkend='var-DISTRO'>
|
||||
DISTRO</link></glossterm> variable) and the machine configuration file
|
||||
(set by the <glossterm><link linkend='var-MACHINE'>MACHINE</link>
|
||||
</glossterm> variable).
|
||||
The DISTRO and MACHINE environment variables are both usually set in
|
||||
configuration file (set by the
|
||||
<filename><link linkend='var-DISTRO'>DISTRO</link></filename> variable)
|
||||
and the machine configuration file
|
||||
(set by the
|
||||
<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.
|
||||
Valid distribution
|
||||
configuration files are available in the <filename>
|
||||
meta/conf/distro/</filename> directory and valid machine configuration
|
||||
files in the <filename>meta/conf/machine/</filename>
|
||||
directory.
|
||||
configuration files are available in the <filename>meta/conf/distro/</filename> directory
|
||||
and valid machine configuration
|
||||
files in the <filename>meta/conf/machine/</filename> directory.
|
||||
Within the <filename>meta/conf/machine/include/</filename>
|
||||
directory are various <filename>tune-*.inc</filename> configuration files that provide common
|
||||
"tuning" settings specific to and shared between particular architectures and machines.
|
||||
</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.
|
||||
Other classes that are specified in the configuration using the
|
||||
<glossterm><link linkend='var-INHERIT'>INHERIT</link></glossterm>
|
||||
variable are also inculded.
|
||||
Class files are searched for in a classes subdirectory
|
||||
<filename><link linkend='var-INHERIT'>INHERIT</link></filename>
|
||||
variable are also included.
|
||||
Class files are searched for in a <filename>classes</filename> subdirectory
|
||||
under the paths in <filename>BBPATH</filename> in the same way as
|
||||
configuration files.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
After classes are included, the
|
||||
variable <glossterm><link linkend='var-BBFILES'>BBFILES</link></glossterm>
|
||||
After classes are included, the variable
|
||||
<filename><link linkend='var-BBFILES'>BBFILES</link></filename>
|
||||
is set, usually in
|
||||
<filename>local.conf</filename>, and defines the list of places to search for
|
||||
<filename>.bb</filename> files.
|
||||
By default, the BBFILES variable specifies the <filename>meta/recipes-*/
|
||||
</filename> directory within Poky.
|
||||
Adding extra content to BBFILES is best achieved through the use of BitBake
|
||||
<link linkend='usingpoky-changes-layers'>"layers"</link>.
|
||||
By default, the <filename>BBFILES</filename> variable specifies the
|
||||
<filename>meta/recipes-*/</filename> directory within Poky.
|
||||
Adding extra content to <filename>BBFILES</filename> is best achieved through the use of
|
||||
BitBake layers as described in the
|
||||
<link linkend='usingpoky-changes-layers'>BitBake Layers</link> section.
|
||||
</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.
|
||||
In summary, for each <filename>.bb</filename>
|
||||
file the configuration plus the base class of variables are set, followed
|
||||
@@ -111,29 +114,30 @@
|
||||
|
||||
<para>
|
||||
Once all the <filename>.bb</filename> files have been
|
||||
parsed, BitBake starts to build the target (core-image-sato in the previous section's
|
||||
example) and looks for providers of that target.
|
||||
parsed, BitBake starts to build the target (<filename>core-image-sato</filename>
|
||||
in the previous section's example) and looks for providers of that target.
|
||||
Once a provider is selected, BitBake resolves all the dependencies for
|
||||
the target.
|
||||
In the case of "core-image-sato", it would lead to <filename>task-base.bb</filename>,
|
||||
which in turn leads to packages like <application>Contacts</application>,
|
||||
<application>Dates</application> and <application>BusyBox</application>.
|
||||
In the case of <filename>core-image-sato</filename>, it would lead to
|
||||
<filename>task-base.bb</filename>,
|
||||
which in turn leads to packages like <filename>Contacts</filename>,
|
||||
<filename>Dates</filename> and <filename>BusyBox</filename>.
|
||||
These packages in turn depend on glibc and the toolchain.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Sometimes a target might have multiple providers.
|
||||
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:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-rp"
|
||||
</programlisting>
|
||||
<literallayout class='monospaced'>
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
|
||||
</literallayout>
|
||||
|
||||
<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.
|
||||
</para>
|
||||
|
||||
@@ -142,17 +146,18 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-rp"
|
||||
that multiple versions might exist.
|
||||
BitBake defaults to the highest version of a provider.
|
||||
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).
|
||||
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.
|
||||
By default, files have a preference of "0".
|
||||
Setting the DEFAULT_PREFERENCE to "-1" makes the package unlikely to be used unless it is
|
||||
explicitly referenced.
|
||||
Setting the DEFAULT_PREFERENCE to "1" makes it likely the package is used.
|
||||
PREFERRED_VERSION overrides any DEFAULT_PREFERENCE setting.
|
||||
DEFAULT_PREFERENCE is often used to mark newer and more experimental package
|
||||
Setting the <filename>DEFAULT_PREFERENCE</filename> to "-1" makes the
|
||||
package unlikely to be used unless it is explicitly referenced.
|
||||
Setting the <filename>DEFAULT_PREFERENCE</filename> to "1" makes it likely the package is used.
|
||||
<filename>PREFERRED_VERSION</filename> overrides any <filename>DEFAULT_PREFERENCE</filename> setting.
|
||||
<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.
|
||||
</para>
|
||||
|
||||
@@ -165,8 +170,10 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-rp"
|
||||
<title>Dependencies</title>
|
||||
|
||||
<para>
|
||||
Each target BitBake builds consists of multiple tasks such as fetch, unpack, patch, configure,
|
||||
and compile.
|
||||
Each target BitBake builds consists of multiple tasks such as
|
||||
<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
|
||||
entity with its own set of dependencies.
|
||||
</para>
|
||||
@@ -175,12 +182,11 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-rp"
|
||||
Dependencies are defined through several variables.
|
||||
You can find information about variables BitBake uses in the
|
||||
<ulink url='http://bitbake.berlios.de/manual/'>BitBake manual</ulink>.
|
||||
At a basic level it is sufficient to know that BitBake uses the
|
||||
<glossterm><link linkend='var-DEPENDS'>DEPENDS</link></glossterm> and
|
||||
<glossterm><link linkend='var-RDEPENDS'>RDEPENDS</link></glossterm> variables when
|
||||
At a basic level, it is sufficient to know that BitBake uses the
|
||||
<filename><link linkend='var-DEPENDS'>DEPENDS</link></filename> and
|
||||
<filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename> variables when
|
||||
calculating dependencies.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<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
|
||||
order it needs to run them.
|
||||
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,
|
||||
those tasks have all their dependencies met, and the thread threshold has not been
|
||||
exceeded.
|
||||
</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/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/yocto-project-qs/yocto-project-qs.html'>
|
||||
Yocto Project Quick Start</ulink> for more information.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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>).
|
||||
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.
|
||||
Currently, invalid timestamps are only considered on a per
|
||||
<filename>.bb</filename> file basis.
|
||||
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
|
||||
that depend on that target.
|
||||
This behavior could change or become configurable in future versions of BitBake.
|
||||
</para>
|
||||
|
||||
<note><para>
|
||||
<note>
|
||||
Some tasks are marked as "nostamp" tasks.
|
||||
No timestamp file is created when these tasks are run.
|
||||
Consequently, "nostamp" tasks are always rerun.
|
||||
</para></note>
|
||||
</note>
|
||||
</section>
|
||||
|
||||
<section id='ref-bitbake-runtask'>
|
||||
<title>Running a Task</title>
|
||||
|
||||
<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
|
||||
<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
|
||||
@@ -251,7 +267,7 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-rp"
|
||||
<title>BitBake Command Line</title>
|
||||
|
||||
<para>
|
||||
Following is the bitbake manpage:
|
||||
Following is the BitBake help output:
|
||||
</para>
|
||||
|
||||
<screen>
|
||||
@@ -268,7 +284,8 @@ Options:
|
||||
-h, --help show this help message and exit
|
||||
-b BUILDFILE, --buildfile=BUILDFILE
|
||||
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
|
||||
target that failed, and those that depend on it,
|
||||
cannot be remade, the other dependencies of these
|
||||
@@ -276,8 +293,6 @@ Options:
|
||||
-a, --tryaltconfigs continue with builds by trying to use alternative
|
||||
providers where possible.
|
||||
-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
|
||||
the specified task for the providee and the packages
|
||||
it depends on, i.e. 'compile' does not implicitly call
|
||||
@@ -285,26 +300,35 @@ Options:
|
||||
what you are doing). Depending on the base.bbclass a
|
||||
listtasks tasks is defined and will show available
|
||||
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
|
||||
-D, --debug Increase the debug level. You can specify this more
|
||||
than once.
|
||||
-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)
|
||||
-d, --disable-psyco disable using the psyco just-in-time compiler (not
|
||||
recommended)
|
||||
-s, --show-versions show current and preferred versions of all packages
|
||||
-e, --environment show the global or per-package environment (this is
|
||||
what used to be bbread)
|
||||
-g, --graphviz emit the dependency trees of the specified packages in
|
||||
the dot syntax
|
||||
-I IGNORED_DOT_DEPS, --ignore-deps=IGNORED_DOT_DEPS
|
||||
Stop processing at the given list of dependencies when
|
||||
generating dependency graphs. This can help to make
|
||||
the graph more appealing
|
||||
-I EXTRA_ASSUME_PROVIDED, --ignore-deps=EXTRA_ASSUME_PROVIDED
|
||||
Assume these dependencies don't exist and are already
|
||||
provided (equivalent to ASSUME_PROVIDED). Useful to
|
||||
make dependency graphs more appealing
|
||||
-l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS
|
||||
Show debug logging for the specified logging domains
|
||||
-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>
|
||||
</section>
|
||||
|
||||
@@ -321,22 +345,22 @@ Options:
|
||||
|
||||
<para>
|
||||
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
|
||||
fetchers in the <ulink url='http://bitbake.berlios.de/manual/'>BitBake manual</ulink>.
|
||||
</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.
|
||||
Since this ability requires certain functionality from the SCM, not all
|
||||
systems support it.
|
||||
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.
|
||||
See the
|
||||
<link linkend='platdev-appdev-srcrev'>Developing within Poky with an External SCM-based Package</link>
|
||||
section for more information.
|
||||
<link linkend='platdev-appdev-srcrev'>Development Within Yocto Project for a Package that Uses
|
||||
an External SCM</link> section for more information.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
@@ -6,21 +6,21 @@
|
||||
|
||||
<para>
|
||||
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> file can also be placed in a class
|
||||
file. Class files are identified by the extension
|
||||
<filename>.bbclass</filename> and are usually placed
|
||||
<filename>.bb</filename> files.
|
||||
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 <filename>.bbclass</filename> and are usually placed
|
||||
in a <filename>classes/</filename> directory beneath the
|
||||
<filename>meta*/</filename> directory or the directory pointed
|
||||
by BUILDDIR (e.g. <filename>build/</filename>)in the same way as
|
||||
<filename>.conf</filename> files in the <filename
|
||||
class="directory">conf</filename> directory. Class files are searched for
|
||||
in BBPATH in the same was as <filename>.conf</filename> files too.
|
||||
<filename>meta*/</filename> directory found in the Yocto Project file's area
|
||||
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>conf</filename> directory.
|
||||
Class files are searched for in <filename>BBPATH</filename>
|
||||
using the same method by which <filename>.conf</filename> files are searched.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
|
||||
@@ -29,13 +29,14 @@
|
||||
|
||||
<para>
|
||||
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
|
||||
(runs any Makefile present), installing (empty by default) and packaging
|
||||
(empty by default). These are often overridden or extended by other classes
|
||||
such as <filename>autotools.bbclass</filename> or
|
||||
<filename>package.bbclass</filename>. The class also contains some commonly
|
||||
used functions such as <filename>oe_runmake</filename>.
|
||||
(runs any <filename>Makefile</filename> present), installing (empty by default) and packaging
|
||||
(empty by default).
|
||||
These classes are often overridden or extended by other classes
|
||||
such as <filename>autotools.bbclass</filename> or <filename>package.bbclass</filename>.
|
||||
The class also contains some commonly used functions such as <filename>oe_runmake</filename>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -43,84 +44,71 @@
|
||||
<title>Autotooled Packages - <filename>autotools.bbclass</filename></title>
|
||||
|
||||
<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
|
||||
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
|
||||
<link linkend='usingpoky-extend-addpkg-autotools'>simple autotools
|
||||
example</link> section and then simply "inherit autotools".
|
||||
This class can also work with software that emulates autotools.
|
||||
<link linkend='usingpoky-extend-addpkg-autotools'>Autotooled Package</link> section
|
||||
and then simply <filename>inherit autotools</filename>.
|
||||
This class can also work with software that emulates Autotools.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
It's useful to have some idea of how the tasks defined by this class work
|
||||
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>
|
||||
|
||||
<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 id='ref-classes-update-alternatives'>
|
||||
<title>Alternatives - <filename>update-alternatives.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
Several programs can fulfill the same or similar function and
|
||||
be installed with the same name.
|
||||
For example, the <filename>ar</filename>
|
||||
command is available from the "busybox", "binutils" and "elfutils" packages.
|
||||
Several programs can fulfill the same or similar function and be installed with the same name.
|
||||
For example, the <filename>ar</filename> command is available from the
|
||||
<filename>busybox</filename>, <filename>binutils</filename> and
|
||||
<filename>elfutils</filename> packages.
|
||||
The <filename>update-alternatives.bbclass</filename> class handles renaming the
|
||||
binaries so that multiple packages can be installed without conflicts.
|
||||
The <filename>ar</filename> command still works regardless of which packages are installed
|
||||
or subsequently removed.
|
||||
The class renames the conflicting binary in each package
|
||||
and symlinks the highest priority binary during installation or removal
|
||||
of packages.
|
||||
The class renames the conflicting binary in each package and symlinks the highest
|
||||
priority binary during installation or removal of packages.
|
||||
</para>
|
||||
<para>
|
||||
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>
|
||||
<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>
|
||||
Currently, only one binary per package is supported.
|
||||
Currently, the Yocto Project supports only one binary per package.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -128,14 +116,15 @@
|
||||
<title>Initscripts - <filename>update-rc.d.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
This class uses update-rc.d to safely install an initscript on behalf of
|
||||
the package. Details such as making sure the initscript is stopped before
|
||||
a package is removed and started when the package is installed are taken
|
||||
care of. Three variables control this class,
|
||||
<link linkend='var-INITSCRIPT_PACKAGES'>INITSCRIPT_PACKAGES</link>,
|
||||
<link linkend='var-INITSCRIPT_NAME'>INITSCRIPT_NAME</link> and
|
||||
<link linkend='var-INITSCRIPT_PARAMS'>INITSCRIPT_PARAMS</link>. See the
|
||||
links for details.
|
||||
This class uses <filename>update-rc.d</filename> to safely install an
|
||||
initialization script on behalf of the package.
|
||||
The Yocto Project takes care of details such as making sure the script is stopped before
|
||||
a package is removed and started when the package is installed.
|
||||
Three variables control this class:
|
||||
<filename><link linkend='var-INITSCRIPT_PACKAGES'>INITSCRIPT_PACKAGES</link></filename>,
|
||||
<filename><link linkend='var-INITSCRIPT_NAME'>INITSCRIPT_NAME</link></filename> and
|
||||
<filename><link linkend='var-INITSCRIPT_PARAMS'>INITSCRIPT_PARAMS</link></filename>.
|
||||
See the variable links for details.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -143,17 +132,17 @@
|
||||
<title>Binary config scripts - <filename>binconfig.bbclass</filename></title>
|
||||
|
||||
<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
|
||||
to build software (usually named 'LIBNAME-config'). This class assists
|
||||
any recipe using such scripts.
|
||||
to build software (usually named <filename>LIBNAME-config</filename>).
|
||||
This class assists any recipe using such scripts.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
During staging Bitbake installs such scripts into the <filename
|
||||
class="directory">sysroots/</filename> directory. It also changes all
|
||||
paths to point into the <filename>sysroots/</filename>
|
||||
directory so all builds which use the script will use the correct
|
||||
During staging, Bitbake installs such scripts into the
|
||||
<filename>sysroots/</filename> directory.
|
||||
BitBake also changes all paths to point into the <filename>sysroots/</filename>
|
||||
directory so all builds that use the script will use the correct
|
||||
directories for the cross compiling layout.
|
||||
</para>
|
||||
</section>
|
||||
@@ -163,8 +152,8 @@
|
||||
|
||||
<para>
|
||||
This class renames packages so that they follow the Debian naming
|
||||
policy, i.e. 'glibc' becomes 'libc6' and 'glibc-devel' becomes
|
||||
'libc6-dev'.
|
||||
policy (i.e. <filename>glibc</filename> becomes <filename>libc6</filename>
|
||||
and <filename>glibc-devel</filename> becomes <filename>libc6-dev</filename>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -172,15 +161,15 @@
|
||||
<title>Pkg-config - <filename>pkgconfig.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
Pkg-config brought standardisation and this class aims to make its
|
||||
integration smooth for all libraries which make use of it.
|
||||
<filename>pkg-config</filename> brought standardization and this class aims to make its
|
||||
integration smooth for all libraries that make use of it.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
During staging Bitbake installs pkg-config data into the <filename
|
||||
class="directory">sysroots/</filename> directory. By making use of
|
||||
sysroot functionality within pkgconfig this class no longer has to
|
||||
manipulate the files.
|
||||
During staging, Bitbake installs <filename>pkg-config</filename> data into the
|
||||
<filename>sysroots/</filename> directory.
|
||||
By making use of sysroot functionality within <filename>pkg-config</filename>,
|
||||
this class no longer has to manipulate the files.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -188,126 +177,173 @@
|
||||
<title>Distribution of sources - <filename>src_distribute_local.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
Many software licenses require providing the sources for compiled
|
||||
binaries. To simplify this process two classes were created:
|
||||
Many software licenses require that source files be provided along with the binaries.
|
||||
To simplify this process, two classes were created:
|
||||
<filename>src_distribute.bbclass</filename> and
|
||||
<filename>src_distribute_local.bbclass</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Result of their work are <filename>tmp/deploy/source/</filename>
|
||||
subdirs with sources sorted by <glossterm><link linkend='var-LICENSE'>LICENSE</link>
|
||||
</glossterm> field. If recipe lists few licenses (or has entries like "Bitstream Vera") source archive is put in each
|
||||
license dir.
|
||||
The results of these classes are <filename>tmp/deploy/source/</filename>
|
||||
subdirs with sources sorted by
|
||||
<filename><link linkend='var-LICENSE'>LICENSE</link></filename> field.
|
||||
If recipes list few licenses (or have entries like "Bitstream Vera"),
|
||||
the source archive is placed in each license directory.
|
||||
</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>
|
||||
|
||||
<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 id='ref-classes-perl'>
|
||||
<title>Perl modules - <filename>cpan.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
Recipes for Perl modules are simple - usually needs only
|
||||
pointing to source archive and inheriting of proper bbclass.
|
||||
Building is split into two methods dependly on method used by
|
||||
module authors.
|
||||
Recipes for Perl modules are simple.
|
||||
These recipes usually only need to point to the source's archive and then inherit the
|
||||
proper <filename>.bbclass</filename> file.
|
||||
Building is split into two methods depending on which method the module authors used.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Modules which use old Makefile.PL based build system require
|
||||
using of <filename>cpan.bbclass</filename> in their recipes.
|
||||
Modules that use old <filename>Makefile.PL</filename>-based build system require
|
||||
<filename>cpan.bbclass</filename> in their recipes.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Modules which use Build.PL based build system require
|
||||
using of <filename>cpan_build.bbclass</filename> in their recipes.
|
||||
Modules that use <filename>Build.PL</filename>-based build system require
|
||||
using <filename>cpan_build.bbclass</filename> in their recipes.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section id='ref-classes-distutils'>
|
||||
<title>Python extensions - <filename>distutils.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
Recipes for Python extensions are simple - they usually only
|
||||
require pointing to the source archive and inheriting the proper
|
||||
bbclasses.
|
||||
Building is split into two methods depending on the build method
|
||||
used by the module authors.
|
||||
Recipes for Python extensions are simple.
|
||||
These recipes usually only need to point to the source's archive and then inherit
|
||||
the proper <filename>.bbclass</filename> file.
|
||||
Building is split into two methods dependling on which method the module authors used.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Extensions which use autotools based build system require use
|
||||
of autotools and distutils-base bbclasses in their recipes.
|
||||
Extensions that use an Autotools-based build system require Autotools and
|
||||
<filename>distutils</filename>-based <filename>.bbclasse</filename> files in their recipes.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Extensions which use distutils build system require use
|
||||
of <filename>distutils.bbclass</filename> in their recipes.
|
||||
Extensions that use <filename>distutils</filename>-based build systems require
|
||||
<filename>distutils.bbclass</filename> in their recipes.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section id='ref-classes-devshell'>
|
||||
<title>Developer Shell - <filename>devshell.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
This class adds the devshell task. Its usually up to distribution policy
|
||||
to include this class (Poky does). See the <link
|
||||
linkend='platdev-appdev-devshell'>developing with 'devshell' section</link>
|
||||
This class adds the <filename>devshell</filename> task.
|
||||
Distribution policy dictates whether to include this class as the Yocto Project does.
|
||||
See the <link
|
||||
linkend='platdev-appdev-devshell'>Development Within a Development Shell</link> section
|
||||
for more information about using devshell.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section id='ref-classes-package'>
|
||||
<title>Packaging - <filename>package*.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
The packaging classes add support for generating packages from a builds
|
||||
output. The core generic functionality is in
|
||||
<filename>package.bbclass</filename>, code specific to particular package
|
||||
types is contained in various sub classes such as
|
||||
<filename>package_deb.bbclass</filename>, <filename>package_ipk.bbclass</filename>
|
||||
and <filename>package_rpm.bbclass</filename>. Most users will
|
||||
want one or more of these classes and this is controlled by the <glossterm>
|
||||
<link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link></glossterm>
|
||||
variable. The first class listed in this variable will be used for image
|
||||
generation. Since images are generated from packages a packaging class is
|
||||
The packaging classes add support for generating packages from a build's
|
||||
output.
|
||||
The core generic functionality is in <filename>package.bbclass</filename>.
|
||||
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>,
|
||||
and <filename>package_rpm.bbclass</filename>.
|
||||
Most users will want one or more of these classes.
|
||||
</para>
|
||||
|
||||
<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.
|
||||
The first class listed in this variable is used for image generation.
|
||||
</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 id='ref-classes-kernel'>
|
||||
<title>Building kernels - <filename>kernel.bbclass</filename></title>
|
||||
|
||||
<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
|
||||
staged into <glossterm><link
|
||||
linkend='var-STAGING_KERNEL_DIR'>STAGING_KERNEL_DIR</link></glossterm>
|
||||
directory to allow building of out-of-tree modules using <filename>module.bbclass</filename>.
|
||||
This class handles building Linux kernels.
|
||||
The class contains code to build all kernel trees.
|
||||
All needed headers are staged into the
|
||||
<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>
|
||||
This means that each kernel module built is packaged separately and inter-module dependencies are
|
||||
created by parsing the <filename>modinfo</filename> output. If all modules are
|
||||
required then installing the "kernel-modules" package will install all
|
||||
packages with modules and various other kernel packages such as "kernel-vmlinux".
|
||||
This means that each built kernel module is packaged separately and inter-module
|
||||
dependencies are created by parsing the <filename>modinfo</filename> output.
|
||||
If all modules are required, then installing the <filename>kernel-modules</filename>
|
||||
package installs all packages with modules and various other kernel packages
|
||||
such as <filename>kernel-vmlinux</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Various other classes are used by the kernel and module classes internally including
|
||||
<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>
|
||||
</section>
|
||||
|
||||
@@ -315,18 +351,20 @@
|
||||
<title>Creating images - <filename>image.bbclass</filename> and <filename>rootfs*.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
Those classes add support for creating images in many formats. First the
|
||||
rootfs is created from packages by one of the <filename>rootfs_*.bbclass</filename>
|
||||
files (depending on package format used) and then image is created.
|
||||
These classes add support for creating images in several formats.
|
||||
First, the root filesystem is created from packages using
|
||||
one of the <filename>rootfs_*.bbclass</filename>
|
||||
files (depending on the package format used) and then the image is created.
|
||||
</para>
|
||||
|
||||
The <glossterm><link
|
||||
linkend='var-IMAGE_FSTYPES'>IMAGE_FSTYPES</link></glossterm>
|
||||
variable controls which types of image to generate.
|
||||
|
||||
The list of packages to install into the image is controlled by the
|
||||
<glossterm><link
|
||||
linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></glossterm>
|
||||
variable.
|
||||
<para>
|
||||
The <filename><link linkend='var-IMAGE_FSTYPES'>IMAGE_FSTYPES</link></filename>
|
||||
variable controls the types of images to generate.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename>
|
||||
variable controls the list of packages to install into the image.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -334,11 +372,12 @@
|
||||
<title>Host System sanity checks - <filename>sanity.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
This class checks prerequisite software is present to
|
||||
notify the users of potential problems that will affect their build. It
|
||||
also performs basic checks of the user configuration from local.conf to
|
||||
prevent common mistakes resulting in build failures. It's usually up to
|
||||
distribution policy whether to include this class (Poky does).
|
||||
This class checks to see if prerequisite software is present so that
|
||||
users can be notified of potential problems that might affect their build.
|
||||
The class also performs basic user configuration checks from
|
||||
the <filename>local.conf</filename> configuration file to
|
||||
prevent common mistakes that cause build failures.
|
||||
Distribution policy usually whether to include this class as the Yocto Project does.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -346,11 +385,11 @@
|
||||
<title>Generated output quality assurance checks - <filename>insane.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
This class adds a step to package generation which sanity checks the
|
||||
packages generated by Poky. There are an ever increasing range of checks
|
||||
it performs, checking for common problems which break builds/packages/images,
|
||||
see the bbclass file for more information. It's usually up to distribution
|
||||
policy whether to include this class (Poky does).
|
||||
This class adds a step to the package generation process that sanity checks the
|
||||
packages generated by the Yocto Project.
|
||||
An ever-increasing range of checks are performed that check for
|
||||
common problems that break builds.
|
||||
Distribution policy usually dictates whether to include this class as the Yocto Project does.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -358,23 +397,28 @@
|
||||
<title>Autotools configuration data cache - <filename>siteinfo.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
Autotools can require tests which have to execute on the target hardware.
|
||||
Since this isn't possible in general when cross compiling, siteinfo is
|
||||
Autotools can require tests that must execute on the target hardware.
|
||||
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
|
||||
the correct values used. The <link linkend='structure-meta-site'>meta/site directory</link>
|
||||
contains test results sorted into different categories like architecture, endianess and
|
||||
the libc used. Siteinfo provides a list of files containing data relevant to
|
||||
the current build in the <glossterm><link linkend='var-CONFIG_SITE'>CONFIG_SITE
|
||||
</link></glossterm> variable which autotools will automatically pick up.
|
||||
still make the correct values available.
|
||||
The <filename><link linkend='structure-meta-site'>meta/site directory</link></filename>
|
||||
contains test results sorted into different categories such as architecture, endianness, and
|
||||
the libc used.
|
||||
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>
|
||||
The class also provides variables like <glossterm><link
|
||||
linkend='var-SITEINFO_ENDIANESS'>SITEINFO_ENDIANESS</link></glossterm>
|
||||
and <glossterm><link linkend='var-SITEINFO_BITS'>SITEINFO_BITS</link>
|
||||
</glossterm> which can be used elsewhere in the metadata.
|
||||
The class also provides variables like
|
||||
<filename><link linkend='var-SITEINFO_ENDIANNESS'>SITEINFO_ENDIANNESS</link></filename>
|
||||
and <filename><link linkend='var-SITEINFO_BITS'>SITEINFO_BITS</link></filename>
|
||||
that can be used elsewhere in the metadata.
|
||||
</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>
|
||||
|
||||
@@ -382,8 +426,12 @@
|
||||
<title>Other Classes</title>
|
||||
|
||||
<para>
|
||||
Only the most useful/important classes are covered here but there are
|
||||
others, see the <filename>meta/classes</filename> directory for the rest.
|
||||
Thus far, this appendix has discussed only the most useful and important
|
||||
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>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -4,298 +4,157 @@
|
||||
<appendix id='ref-features'>
|
||||
<title>Reference: Features</title>
|
||||
|
||||
<para>'Features' provide a mechanism for working out which packages
|
||||
should be included in the generated images. Distributions can
|
||||
select which features they want to support through the
|
||||
<glossterm linkend='var-DISTRO_FEATURES'><link
|
||||
linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></glossterm>
|
||||
variable which is set in the distribution configuration file
|
||||
(poky.conf for Poky). Machine features are set in the
|
||||
<glossterm linkend='var-MACHINE_FEATURES'><link
|
||||
linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></glossterm>
|
||||
variable which is set in the machine configuration file and
|
||||
specifies which hardware features a given machine has.
|
||||
<para>
|
||||
Features provide a mechanism for working out which packages
|
||||
should be included in the generated images.
|
||||
Distributions can select which features they want to support through the
|
||||
<filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>
|
||||
variable, which is set in the <filename>poky.conf</filename> distribution configuration file.
|
||||
Machine features are set in the
|
||||
<filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>
|
||||
variable, which is set in the machine configuration file and
|
||||
specifies the hardware features for a given machine.
|
||||
</para>
|
||||
|
||||
<para>These two variables are combined to work out which kernel modules,
|
||||
utilities and other packages to include. A given distribution can
|
||||
support a selected subset of features so some machine features might not
|
||||
be included if the distribution itself doesn't support them.
|
||||
<para>
|
||||
These two variables combine to work out which kernel modules,
|
||||
utilities, and other packages to include.
|
||||
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>
|
||||
|
||||
<section id='ref-features-distro'>
|
||||
<title>Distro</title>
|
||||
|
||||
<para>The items below are valid options for <glossterm linkend='var-DISTRO_FEATURES'><link
|
||||
linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></glossterm>.
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
alsa - ALSA support will be included (OSS compatibility
|
||||
kernel modules will be installed if available)
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
bluetooth - Include bluetooth support (integrated BT only)
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
ext2 - Include tools for supporting for devices with internal
|
||||
<para>
|
||||
The items below are valid options for
|
||||
<filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>alsa:</emphasis> ALSA support will be included (OSS compatibility
|
||||
kernel modules will be installed if available).</para></listitem>
|
||||
<listitem><para><emphasis>bluetooth:</emphasis> Include bluetooth support (integrated BT only)
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>ext2:</emphasis> Include tools for supporting for devices with internal
|
||||
HDD/Microdrive for storing files (instead of Flash only devices)
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
irda - Include Irda support
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
keyboard - Include keyboard support (e.g. keymaps will be
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>irda:</emphasis> Include Irda support
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>keyboard:</emphasis> Include keyboard support (e.g. keymaps will be
|
||||
loaded during boot).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
pci - Include PCI bus support
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
pcmcia - Include PCMCIA/CompactFlash support
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
usbgadget - USB Gadget Device support (for USB
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>pci:</emphasis> Include PCI bus support
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>pcmcia:</emphasis> Include PCMCIA/CompactFlash support
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>usbgadget:</emphasis> USB Gadget Device support (for USB
|
||||
networking/serial/storage)
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
usbhost - USB Host support (allows to connect external
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>usbhost:</emphasis> USB Host support (allows to connect external
|
||||
keyboard, mouse, storage, network etc)
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
wifi - WiFi support (integrated only)
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
cramfs - CramFS support
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
ipsec - IPSec support
|
||||
</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>
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>wifi:</emphasis> WiFi support (integrated only)
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>cramfs:</emphasis> CramFS support
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>ipsec:</emphasis> IPSec support
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>ipv6:</emphasis> IPv6 support
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>nfs:</emphasis> NFS client support (for mounting NFS exports on
|
||||
device)</para></listitem>
|
||||
<listitem><para><emphasis>ppp:</emphasis> PPP dialup support</para></listitem>
|
||||
<listitem><para><emphasis>smbfs:</emphasis> SMB networks client support (for mounting
|
||||
Samba/Microsoft Windows shares on device)</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='ref-features-machine'>
|
||||
<title>Machine</title>
|
||||
|
||||
<para>The items below are valid options for <glossterm linkend='var-MACHINE_FEATURES'><link
|
||||
linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></glossterm>.
|
||||
<para>
|
||||
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>
|
||||
|
||||
<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 id='ref-features-image'>
|
||||
<title>Reference: Images</title>
|
||||
|
||||
<para>
|
||||
The contents of images generated by Poky can be controlled by the
|
||||
<glossterm linkend='var-IMAGE_FEATURES'><link linkend='var-IMAGE_FEATURES'>
|
||||
IMAGE_FEATURES</link></glossterm> variable and the in local.conf and the
|
||||
<glossterm linkend='var-EXTRA_IMAGE_FEATURES'><link linkend='var-EXTRA_IMAGE_FEATURES'>
|
||||
EXTRA_IMAGE_FEATURES</link></glossterm> that you typically configure in your image recipes.
|
||||
Through these varibales you can add several different
|
||||
The contents of images generated by the Yocto Project can be controlled by the
|
||||
<filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>
|
||||
and <filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</link></filename>
|
||||
variables that you typically configure in your image recipes.
|
||||
Through these variables you can add several different
|
||||
predefined packages such as development utilities or packages with debug
|
||||
information needed to investigate application problems or profile applications.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Current list of <glossterm
|
||||
linkend='var-IMAGE_FEATURES'><link
|
||||
linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></glossterm> contains:
|
||||
Current list of
|
||||
<filename>IMAGE_FEATURES</filename> contains the following:
|
||||
<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>
|
||||
|
||||
<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>
|
||||
</appendix>
|
||||
|
||||
|
||||
@@ -5,12 +5,9 @@
|
||||
<title>Reference: Images</title>
|
||||
|
||||
<para>
|
||||
Poky has several standard images covering most people's standard needs.
|
||||
Use the following command to list the supported images:
|
||||
<literallayout class='monospaced'>
|
||||
$ ls meta*/recipes*/images/*.bb
|
||||
</literallayout>
|
||||
Images are listed below along with details of what they contain:
|
||||
The Yocto Project build process supports several types of images to satisfy different needs.
|
||||
When you issue the <filename>bitbake</filename> command you provide a “top-level” recipe
|
||||
that essentially begins the build for the type of image you want.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
@@ -25,67 +22,88 @@
|
||||
</literallayout>
|
||||
</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>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>core-image-minimal</emphasis> - A small image just capable
|
||||
of allowing a device to boot.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>core-image-base</emphasis> - A console-only image that fully
|
||||
supports the target device hardware.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>core-image-core</emphasis> - An X11 image with simple
|
||||
applications such as terminal, editor, and file manager.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>core-image-sato</emphasis> - An X11 image with Sato theme and
|
||||
Pimlico applications.
|
||||
The image also contains terminal, editor, and file manager.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>core-image-sato-dev</emphasis> - An X11 image similar to
|
||||
core-image-sato but
|
||||
also includes a native toolchain and libraries needed to build applications
|
||||
on the device itself. The image also includes testing and profiling tools
|
||||
as well as debug symbols. This image was formerly core-image-sdk.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>core-image-lsb</emphasis> - An image suitable for implementations
|
||||
that conform to Linux Standard Base (LSB).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>meta-toolchain</emphasis> - This image generates a tarball
|
||||
that contains a stand-alone toolchain that can be used externally to Poky.
|
||||
The tarball is self-contained and unpacks to the
|
||||
<filename class="directory">/opt/poky</filename> directory.
|
||||
The tarball also contains a copy of QEMU and the scripts necessary to run
|
||||
poky QEMU images.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>meta-toolchain-sdk</emphasis> - This image includes everything in
|
||||
meta-toolchain but also includes development headers and libraries
|
||||
to form a complete standalone SDK.
|
||||
See the <link linkend='platdev-appdev-external-sdk'>
|
||||
External Development Using the Poky SDK</link> section for more information.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem><para><emphasis><filename>core-image-base</filename>:</emphasis>
|
||||
A console-only image that fully supports the target device hardware.</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-core</filename>:</emphasis>
|
||||
An X11 image with simple applications such as terminal, editor, and file manager.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-minimal</filename>:</emphasis>
|
||||
A small image just capable of allowing a device to boot.</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-minimal-dev</filename>:</emphasis>
|
||||
A <filename>core-image-minimal</filename> image suitable for development work.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-minimal-initramfs</filename>:</emphasis>
|
||||
A <filename>core-image-minimal</filename> image that has the Minimal RAM-based
|
||||
Initial Root Filesystem (<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><filename>core-image-minimal-mtdutils</filename>:</emphasis>
|
||||
A <filename>core-image-minimal</filename> image that has support
|
||||
for the Minimal 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><filename>core-image-basic</filename>:</emphasis>
|
||||
A foundational basic image without support for X that can be reasonably used for
|
||||
customization.</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-lsb</filename>:</emphasis>
|
||||
A <filename>core-image-basic</filename> image suitable for implementations
|
||||
that conform to Linux Standard Base (LSB).</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-lsb-dev</filename>:</emphasis>
|
||||
A <filename>core-image-lsb</filename> image that is suitable for development work.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-lsb-sdk</filename>:</emphasis>
|
||||
A <filename>core-image-lsb</filename> that includes everything in meta-toolchain
|
||||
but also includes development headers and libraries to form a complete standalone SDK.
|
||||
See the <link linkend='platdev-appdev-external-sdk'>
|
||||
External Development Using the Poky SDK</link> section for more information.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-clutter</filename>:</emphasis>
|
||||
An image with support for the Open GL-based toolkit Clutter, which enables development of
|
||||
rich and animated graphical user interfaces.</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-sato</filename>:</emphasis>
|
||||
An image with Sato support, a mobile environment and visual style that works well
|
||||
with mobile devices.
|
||||
The image supports X11 with a Sato theme and Pimlico applications and also
|
||||
contains terminal, editor, and file manager.</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-sato-dev</filename>:</emphasis>
|
||||
A <filename>core-image-sato</filename> image suitable for development
|
||||
that also includes a native toolchain and libraries needed to build applications on
|
||||
the device itself.
|
||||
The image also includes testing and profiling tools as well as debug symbols.
|
||||
This image was formerly <filename>core-image-sdk</filename>.</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-sato-sdk</filename>:</emphasis>
|
||||
A <filename>core-image-sato</filename> image that includes everything in meta-toolchain.
|
||||
The image also includes development headers and libraries to form a complete standalone SDK.
|
||||
See the <link linkend='platdev-appdev-external-sdk'>
|
||||
External Development Using the Poky SDK</link> section for more information.
|
||||
</para></listitem>
|
||||
</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>
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
|
||||
@@ -6,28 +6,36 @@
|
||||
<title>Reference: Directory Structure</title>
|
||||
|
||||
<para>
|
||||
Poky consists of several components.
|
||||
Understanding them and knowing where they are located is key to using Poky well.
|
||||
This appendix describes the Poky directory structure and gives information about the various
|
||||
The Yocto Project consists of several components.
|
||||
Understanding them and knowing where they are located is key to using the Yocto Project well.
|
||||
This appendix describes the Yocto Project file's directory structure and gives information about the various
|
||||
files and directories.
|
||||
</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/dev-manual/dev-manual.html#getting-started'>
|
||||
Getting Setup</ulink> section in the
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/dev-manual/dev-manual.html'>
|
||||
The Yocto Project Development Manual</ulink>.
|
||||
</para>
|
||||
|
||||
<section id='structure-core'>
|
||||
<title>Top level core components</title>
|
||||
|
||||
<section id='structure-core-bitbake'>
|
||||
<title><filename class="directory">bitbake/</filename></title>
|
||||
<title><filename>bitbake/</filename></title>
|
||||
|
||||
<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.
|
||||
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.
|
||||
Failures are usually from the metadata and not
|
||||
from BitBake itself.
|
||||
Consequently, most users do not need to worry about BitBake.
|
||||
The <filename class="directory">bitbake/bin/</filename> directory is placed
|
||||
into the PATH environment variable by the
|
||||
The <filename>bitbake/bin/</filename> directory is placed
|
||||
into the <filename>PATH</filename> environment variable by the
|
||||
<link linkend="structure-core-script">oe-init-build-env</link> script.
|
||||
</para>
|
||||
|
||||
@@ -38,118 +46,88 @@
|
||||
</section>
|
||||
|
||||
<section id='structure-core-build'>
|
||||
<title><filename class="directory">build/</filename></title>
|
||||
<title><filename>build/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains user configuration files and the output
|
||||
generated by Poky in its standard configuration where the source tree is
|
||||
combined with the output.
|
||||
generated by the Yocto Project in its standard configuration where the source tree is
|
||||
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
|
||||
files in a directory separate from the Poky source.
|
||||
For information on separating output from the Poky source, see <link
|
||||
files in a directory separate from the Yocto Project files
|
||||
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>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='structure-core-meta'>
|
||||
<title><filename class="directory">meta/</filename></title>
|
||||
<section id='handbook'>
|
||||
<title><filename>documentation</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains the core metadata, which is a key part of Poky.
|
||||
This directory contains the machine definitions, the Poky distribution,
|
||||
This directory holds the source for the Yocto Project documentation
|
||||
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.
|
||||
</para>
|
||||
</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'>
|
||||
<title><filename class="directory">meta-demoapps/</filename></title>
|
||||
<title><filename>meta-demoapps/</filename></title>
|
||||
|
||||
<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>
|
||||
</section>
|
||||
|
||||
<section id='structure-core-meta-rt'>
|
||||
<title><filename class="directory">meta-rt/</filename></title>
|
||||
<title><filename>meta-rt/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains recipes for RealTime.
|
||||
This directory contains recipes for real-time kernels.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<!-- <section id='structure-core-meta-***'>
|
||||
<title><filename class="directory">meta-***/</filename></title>
|
||||
<section id='structure-meta-skeleton'>
|
||||
<title><filename>meta-skeleton/</filename></title>
|
||||
|
||||
<para>
|
||||
These directories are optional layers that are added to core metadata.
|
||||
The layers are enabled by adding them to the <filename>conf/bblayers.conf</filename> file.
|
||||
This directory contains template recipes for BSP and kernel development.
|
||||
</para>
|
||||
</section>
|
||||
-->
|
||||
|
||||
<section id='structure-core-scripts'>
|
||||
<title><filename class="directory">scripts/</filename></title>
|
||||
<title><filename>scripts/</filename></title>
|
||||
|
||||
<para>
|
||||
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
|
||||
directory to the PATH 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.
|
||||
directory to the <filename>PATH</filename> environment variable.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
It's worth noting that BitBake creates <filename class="extension">.md5
|
||||
</filename> stamp files for downloads.
|
||||
BitBake uses these files to mark downloads as
|
||||
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>.
|
||||
The <filename>scripts</filename> directory has useful scripts that assist contributing
|
||||
back to the Yocto Project, such as <filename>create_pull_request</filename> and
|
||||
<filename>send_pull_request</filename>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -157,25 +135,25 @@
|
||||
<title><filename>oe-init-build-env</filename></title>
|
||||
|
||||
<para>
|
||||
This script sets up the Poky build environment.
|
||||
Sourcing this file in
|
||||
a shell makes changes to PATH and sets other core BitBake variables based on the
|
||||
This script sets up the Yocto Project build environment.
|
||||
Running this script with the <filename>source</filename> command in
|
||||
a shell makes changes to <filename>PATH</filename> and sets other core BitBake variables based on the
|
||||
current working directory.
|
||||
You need to run this script before running Poky commands.
|
||||
The script uses other scripts within the <filename class="directory">scripts/
|
||||
</filename> directory to do the bulk of the work.
|
||||
You can use this script to specify any directory for the build's output by doing the following:
|
||||
You need to run this script before running BitBake commands.
|
||||
The script uses other scripts within the <filename>scripts</filename> directory to do
|
||||
the bulk of the work.
|
||||
</para>
|
||||
|
||||
<literallayout class='monospaced'>
|
||||
$ source POKY_SRC/oe-init-build-env [BUILDDIR]
|
||||
</literallayout>
|
||||
|
||||
<para>
|
||||
You can enter the above command from any directory, as long as POKY_SRC points to
|
||||
the desired Poky source tree.
|
||||
The optional BUILDDIR can be any directory into which you would
|
||||
like Poky to generate the build output.
|
||||
By default, running this script without a build directory argument creates the
|
||||
<filename>build</filename> directory.
|
||||
If you provide a build directory argument when you <filename>source</filename>
|
||||
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>
|
||||
</section>
|
||||
|
||||
@@ -189,14 +167,14 @@
|
||||
</section>
|
||||
|
||||
<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'>
|
||||
<title><filename>build/pseudodone</filename></title>
|
||||
|
||||
<para>
|
||||
This tag file indicates that the intitial pseudo binar was created.
|
||||
The first time BitBake is invoked this file is built.
|
||||
This tag file indicates that the initial pseudo binary was created.
|
||||
The file is built the first time BitBake is invoked.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -204,21 +182,21 @@
|
||||
<title><filename>build/conf/local.conf</filename></title>
|
||||
|
||||
<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
|
||||
<filename>local.conf.sample</filename>.
|
||||
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
|
||||
that variable is hard-coded within Poky (e.g. by using '=' instead of '?=').
|
||||
Any variable set here overrides any variable set elsewhere within the Yocto Project unless
|
||||
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
|
||||
relatively rare.
|
||||
</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
|
||||
wish to use (PACKAGE_CLASSES) or where you want to downloaded files
|
||||
(<glossterm><link linkend='var-DL_DIR'>DL_DIR</link></glossterm>).
|
||||
wish to use (<filename>PACKAGE_CLASSES</filename>), or where you want to downloaded files
|
||||
(<filename><link linkend='var-DL_DIR'>DL_DIR</link></filename>).
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -228,8 +206,8 @@
|
||||
<para>
|
||||
This file defines layers, which is a directory tree, traversed (or walked) by BitBake.
|
||||
If <filename>bblayers.conf</filename>
|
||||
is not present, it is created from <filename>bblayers.conf.sample</filename> when the environment
|
||||
setup script is sourced.
|
||||
is not present, it is created from <filename>bblayers.conf.sample</filename> when
|
||||
you <filename>source</filename> the environment setup script.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -248,7 +226,7 @@
|
||||
This directory is used for the upstream source tarballs.
|
||||
The directory can be reused by multiple builds or moved to another location.
|
||||
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>
|
||||
</section>
|
||||
|
||||
@@ -259,25 +237,25 @@
|
||||
This directory is used for the shared state cache.
|
||||
The directory can be reused by multiple builds or moved to another location.
|
||||
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>
|
||||
</section>
|
||||
|
||||
<section id='structure-build-tmp'>
|
||||
<title><filename class="directory">build/tmp/</filename></title>
|
||||
<title><filename>build/tmp/</filename></title>
|
||||
|
||||
<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.
|
||||
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.
|
||||
The <filename class="directory">tmp/</filename> directory has some important
|
||||
sub-components detailed below.
|
||||
If you do, you should also completely remove the <filename>build/sstate-cache</filename>
|
||||
directory as well.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='structure-build-tmp-buildstats'>
|
||||
<title><filename class="directory">build/tmp/buildstats/</filename></title>
|
||||
<title><filename>build/tmp/buildstats/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory stores the build statistics.
|
||||
@@ -285,56 +263,68 @@
|
||||
</section>
|
||||
|
||||
<section id='structure-build-tmp-cache'>
|
||||
<title><filename class="directory">build/tmp/cache/</filename></title>
|
||||
<title><filename>build/tmp/cache/</filename></title>
|
||||
|
||||
<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.
|
||||
These results are stored here on a per-machine basis.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<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 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>
|
||||
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.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<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>
|
||||
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.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<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>
|
||||
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.
|
||||
</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 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 id='structure-build-tmp-sysroots'>
|
||||
<title><filename class="directory">build/tmp/sysroots/</filename></title>
|
||||
<title><filename>build/tmp/sysroots/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains shared header files and libraries as well as other shared
|
||||
@@ -346,7 +336,7 @@
|
||||
</section>
|
||||
|
||||
<section id='structure-build-tmp-stamps'>
|
||||
<title><filename class="directory">build/tmp/stamps/</filename></title>
|
||||
<title><filename>build/tmp/stamps/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory holds information that that BitBake uses for accounting purposes
|
||||
@@ -358,17 +348,18 @@
|
||||
</section>
|
||||
|
||||
<section id='structure-build-tmp-log'>
|
||||
<title><filename class="directory">build/tmp/log/</filename></title>
|
||||
<title><filename>build/tmp/log/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains general logs that are not otherwise placed using the
|
||||
package's <glossterm><link linkend='var-WORKDIR'>WORKDIR</link></glossterm>.
|
||||
Examples of logs are the output from the "check_pkg" or "distro_check" tasks.
|
||||
package's <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>.
|
||||
Examples of logs are the output from the <filename>check_pkg</filename> or
|
||||
<filename>distro_check</filename> tasks.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='structure-build-tmp-pkgdata'>
|
||||
<title><filename class="directory">build/tmp/pkgdata/</filename></title>
|
||||
<title><filename>build/tmp/pkgdata/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains intermediate packaging data that is used later in the packaging process.
|
||||
@@ -376,72 +367,65 @@
|
||||
</para>
|
||||
</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'>
|
||||
<title><filename class="directory">build/tmp/work/</filename></title>
|
||||
<title><filename>build/tmp/work/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains architecture-specific work sub-directories for packages built by BitBake.
|
||||
All tasks execute from a work directory.
|
||||
For example, the source for a particular package is unpacked, patched, configured and compiled all
|
||||
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>
|
||||
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
|
||||
built within Poky.
|
||||
For this package a work directory of
|
||||
<filename class="directory">tmp/work/spitz-poky-linux-gnueabi/linux-rp-2.6.20-r7/</filename>,
|
||||
referred to as <glossterm><link linkend='var-WORKDIR'>WORKDIR</link></glossterm>, is created.
|
||||
Within this directory, the source is unpacked to linux-2.6.20 and then patched by quilt
|
||||
(see <link linkend="usingpoky-modifying-packages-quilt">Section 3.5.1</link>).
|
||||
Within the <filename class="directory">linux-2.6.20</filename> directory,
|
||||
standard quilt directories <filename class="directory">linux-2.6.20/patches</filename>
|
||||
and <filename class="directory">linux-2.6.20/.pc</filename> are created,
|
||||
and standard quilt commands can be used.
|
||||
As an example, consider the linux-yocto kernel 3.0 on the machine <filename>qemux86</filename>
|
||||
built within the Yocto Project.
|
||||
For this package, a work directory of
|
||||
<filename>tmp/work/qemux86-poky-linux/linux-yocto-3.0+git1+<.....></filename>,
|
||||
referred to as <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>, is created.
|
||||
Within this directory, the source is unpacked to
|
||||
<filename>linux-qemux86-standard-build</filename> and then patched by Quilt
|
||||
(see the <link linkend="usingpoky-modifying-packages-quilt">Modifying Package Source Code
|
||||
With Quilt</link> section).
|
||||
Within the <filename>linux-qemux86-standard-build</filename> directory,
|
||||
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>
|
||||
There are other directories generated within WORKDIR.
|
||||
The most important directory is WORKDIR
|
||||
<filename class="directory">/temp/</filename>, which has log files for each
|
||||
The most important directory is WORKDIR<filename>/temp/</filename>, which has log files for each
|
||||
task (<filename>log.do_*.pid</filename>) and contains the scripts BitBake runs for
|
||||
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
|
||||
within WORKDIR<filename class="directory">/packages-split/</filename>.
|
||||
within WORKDIR<filename>/packages-split/</filename>.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id='structure-meta'>
|
||||
<title>The Metadata - <filename class="directory">meta/</filename></title>
|
||||
<title>The Metadata - <filename>meta/</filename></title>
|
||||
|
||||
<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:
|
||||
</para>
|
||||
|
||||
<section id='structure-meta-classes'>
|
||||
<title><filename class="directory">meta/classes/</filename></title>
|
||||
<title><filename>meta/classes/</filename></title>
|
||||
|
||||
<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
|
||||
packages.
|
||||
Every package inherits the <filename>base.bbclass</filename> file.
|
||||
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
|
||||
for working with the Linux kernel.
|
||||
Functions like image generation or packaging also have their specific class files
|
||||
@@ -451,14 +435,14 @@
|
||||
</section>
|
||||
|
||||
<section id='structure-meta-conf'>
|
||||
<title><filename class="directory">meta/conf/</filename></title>
|
||||
<title><filename>meta/conf/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains the core set of configuration files that start from
|
||||
<filename>bitbake.conf</filename> and from which all other configuration
|
||||
files are included.
|
||||
See the includes at the end of the file and you will note that even
|
||||
<filename>local.conf</filename> is loaded from there!
|
||||
See the include statements at the end of the file and you will note that even
|
||||
<filename>local.conf</filename> is loaded from there.
|
||||
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
|
||||
the distribution configuration file.
|
||||
@@ -466,41 +450,43 @@
|
||||
</section>
|
||||
|
||||
<section id='structure-meta-conf-machine'>
|
||||
<title><filename class="directory">meta/conf/machine/</filename></title>
|
||||
<title><filename>meta/conf/machine/</filename></title>
|
||||
|
||||
<para>
|
||||
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.
|
||||
The includes directory contains various data common to multiple machines.
|
||||
If you want to add support for a new machine to Poky, look in this directory.
|
||||
The <filename>include</filename> directory contains various data common to multiple machines.
|
||||
If you want to add support for a new machine to the Yocto Project, look in this directory.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='structure-meta-conf-distro'>
|
||||
<title><filename class="directory">meta/conf/distro/</filename></title>
|
||||
<title><filename>meta/conf/distro/</filename></title>
|
||||
|
||||
<para>
|
||||
Any distribution-specific configuration is controlled from this directory.
|
||||
Poky only contains the Poky distribution so <filename>poky.conf</filename>
|
||||
is the main file here.
|
||||
This directory includes the versions and SRCDATES for applications that are configured here.
|
||||
The Yocto Project only contains the Yocto Project distribution so
|
||||
<filename>defaultsetup.conf</filename> is the main file 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>
|
||||
although this file mainly inherits its configuration from Poky itself.
|
||||
although this file mainly inherits its configuration from the Yocto Project itself.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='structure-meta-recipes-bsp'>
|
||||
<title><filename class="directory">meta/recipes-bsp/</filename></title>
|
||||
<title><filename>meta/recipes-bsp/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains anything linking to specific hardware or hardware configuration information
|
||||
such as "uboot" and "grub".
|
||||
such as "u-boot" and "grub".
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='structure-meta-recipes-connectivity'>
|
||||
<title><filename class="directory">meta/recipes-connectivity/</filename></title>
|
||||
<title><filename>meta/recipes-connectivity/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains libraries and applications related to communication with other devices.
|
||||
@@ -508,7 +494,7 @@
|
||||
</section>
|
||||
|
||||
<section id='structure-meta-recipes-core'>
|
||||
<title><filename class="directory">meta/recipes-core/</filename></title>
|
||||
<title><filename>meta/recipes-core/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains what is needed to build a basic working Linux image
|
||||
@@ -517,7 +503,7 @@
|
||||
</section>
|
||||
|
||||
<section id='structure-meta-recipes-devtools'>
|
||||
<title><filename class="directory">meta/recipes-devtools/</filename></title>
|
||||
<title><filename>meta/recipes-devtools/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains tools that are primarily used by the build system.
|
||||
@@ -526,7 +512,7 @@
|
||||
</section>
|
||||
|
||||
<section id='structure-meta-recipes-extended'>
|
||||
<title><filename class="directory">meta/recipes-extended/</filename></title>
|
||||
<title><filename>meta/recipes-extended/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains non-essential applications that add features compared to the
|
||||
@@ -537,7 +523,7 @@
|
||||
</section>
|
||||
|
||||
<section id='structure-meta-recipes-gnome'>
|
||||
<title><filename class="directory">meta/recipes-gnome/</filename></title>
|
||||
<title><filename>meta/recipes-gnome/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains all things related to the GTK+ application framework.
|
||||
@@ -545,7 +531,7 @@
|
||||
</section>
|
||||
|
||||
<section id='structure-meta-recipes-graphics'>
|
||||
<title><filename class="directory">meta/recipes-graphics/</filename></title>
|
||||
<title><filename>meta/recipes-graphics/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains X and other graphically related system libraries
|
||||
@@ -553,7 +539,7 @@
|
||||
</section>
|
||||
|
||||
<section id='structure-meta-recipes-kernel'>
|
||||
<title><filename class="directory">meta/recipes-kernel/</filename></title>
|
||||
<title><filename>meta/recipes-kernel/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains the kernel and generic applications and libraries that
|
||||
@@ -562,7 +548,7 @@
|
||||
</section>
|
||||
|
||||
<section id='structure-meta-recipes-multimedia'>
|
||||
<title><filename class="directory">meta/recipes-multimedia/</filename></title>
|
||||
<title><filename>meta/recipes-multimedia/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains codecs and support utilities for audio, images and video.
|
||||
@@ -570,15 +556,15 @@
|
||||
</section>
|
||||
|
||||
<section id='structure-meta-recipes-qt'>
|
||||
<title><filename class="directory">meta/recipes-qt/</filename></title>
|
||||
<title><filename>meta/recipes-qt/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains all things related to the QT application framework.
|
||||
This directory contains all things related to the Qt application framework.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='structure-meta-recipes-sato'>
|
||||
<title><filename class="directory">meta/recipes-sato/</filename></title>
|
||||
<title><filename>meta/recipes-sato/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains the Sato demo/reference UI/UX and its associated applications
|
||||
@@ -587,16 +573,16 @@
|
||||
</section>
|
||||
|
||||
<section id='structure-meta-recipes-support'>
|
||||
<title><filename class="directory">meta/recipes-support/</filename></title>
|
||||
<title><filename>meta/recipes-support/</filename></title>
|
||||
|
||||
<para>
|
||||
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>
|
||||
</section>
|
||||
|
||||
<section id='structure-meta-site'>
|
||||
<title><filename class="directory">meta/site/</filename></title>
|
||||
<title><filename>meta/site/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains a list of cached results for various architectures.
|
||||
@@ -607,7 +593,7 @@
|
||||
</section>
|
||||
|
||||
<section id='structure-meta-recipes-txt'>
|
||||
<title><filename class="directory">meta/recipes.txt/</filename></title>
|
||||
<title><filename>meta/recipes.txt/</filename></title>
|
||||
|
||||
<para>
|
||||
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">
|
||||
|
||||
<appendix id='ref-varlocality'>
|
||||
<title>Reference: Variable Locality (Distro, Machine, Recipe etc.)</title>
|
||||
<title>Reference: Variable Context</title>
|
||||
|
||||
<para>
|
||||
Whilst most variables can be used in almost any context (.conf, .bbclass,
|
||||
.inc or .bb file), variables are often associated with a particular
|
||||
locality/context. This section describes some common associations.
|
||||
While most variables can be used in almost any context such as
|
||||
<filename>.conf</filename>, <filename>.bbclass</filename>,
|
||||
<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>
|
||||
|
||||
<section id='ref-varlocality-config-distro'>
|
||||
<title>Distro Configuration</title>
|
||||
<section id='ref-varlocality-configuration'>
|
||||
<title>Configuration</title>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><glossterm linkend='var-DISTRO'><link linkend='var-DISTRO'>DISTRO</link></glossterm></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><glossterm linkend='var-DISTRO_NAME'><link linkend='var-DISTRO_NAME'>DISTRO_NAME</link></glossterm></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><glossterm linkend='var-DISTRO_VERSION'><link linkend='var-DISTRO_VERSION'>DISTRO_VERSION</link></glossterm></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><glossterm linkend='var-MAINTAINER'><link linkend='var-MAINTAINER'>MAINTAINER</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-TARGET_OS'><link linkend='var-TARGET_OS'>TARGET_OS</link></glossterm></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><glossterm linkend='var-TARGET_FPU'><link linkend='var-TARGET_FPU'>TARGET_FPU</link></glossterm></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><glossterm linkend='var-POKYMODE'><link linkend='var-POKYMODE'>POKYMODE</link></glossterm></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><glossterm linkend='var-POKYLIBC'><link linkend='var-POKYLIBC'>POKYLIBC</link></glossterm></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
The following subsections provide lists of variables whose context is
|
||||
configuration: distribution, machine, and local.
|
||||
</para>
|
||||
|
||||
<section id='ref-varlocality-config-distro'>
|
||||
<title>Distribution (Distro)</title>
|
||||
|
||||
<para>
|
||||
This section lists variables whose context is the distribution, or distro.
|
||||
<itemizedlist>
|
||||
<listitem><para><filename><link linkend='var-DISTRO'>DISTRO</link></filename></para></listitem>
|
||||
<listitem><para><filename><link linkend='var-DISTRO_NAME'>DISTRO_NAME</link></filename>
|
||||
</para></listitem>
|
||||
<listitem><para><filename><link linkend='var-DISTRO_VERSION'>DISTRO_VERSION</link>
|
||||
</filename></para></listitem>
|
||||
<listitem><para><filename><link linkend='var-MAINTAINER'>MAINTAINER</link></filename>
|
||||
</para></listitem>
|
||||
<listitem><para><filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link>
|
||||
</filename></para></listitem>
|
||||
<listitem><para><filename><link linkend='var-TARGET_OS'>TARGET_OS</link></filename>
|
||||
</para></listitem>
|
||||
<listitem><para><filename><link linkend='var-TARGET_FPU'>TARGET_FPU</link></filename>
|
||||
</para></listitem>
|
||||
<listitem><para><filename><link linkend='var-POKYMODE'>POKYMODE</link></filename>
|
||||
</para></listitem>
|
||||
<listitem><para><filename><link linkend='var-TCMODE'>TCMODE</link></filename>
|
||||
</para></listitem>
|
||||
<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_RDEPENDS'>MACHINE_ESSENTIAL_RDEPENDS
|
||||
</link></filename></para></listitem>
|
||||
<listitem><para><filename><link linkend='var-MACHINE_ESSENTIAL_RRECOMMENDS'>
|
||||
MACHINE_ESSENTIAL_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 id='ref-varlocality-config-machine'>
|
||||
<title>Machine Configuration</title>
|
||||
<section id='ref-varlocality-recipes'>
|
||||
<title>Recipes</title>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><glossterm linkend='var-TARGET_ARCH'><link linkend='var-TARGET_ARCH'>TARGET_ARCH</link></glossterm></para>
|
||||
</listitem>
|
||||
<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>
|
||||
<para>
|
||||
The following subsections provide lists of variables whose context is
|
||||
recipes: required, dependencies, path, and extra build information.
|
||||
</para>
|
||||
|
||||
<section id='ref-varlocality-config-local'>
|
||||
<title>Local Configuration (local.conf)</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'>
|
||||
<title>Required</title>
|
||||
|
||||
<section id='ref-varlocality-recipe-required'>
|
||||
<title>Recipe Variables - Required</title>
|
||||
<para>
|
||||
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>
|
||||
<listitem>
|
||||
<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'>
|
||||
<title>Dependencies</title>
|
||||
|
||||
<section id='ref-varlocality-recipe-dependencies'>
|
||||
<title>Recipe Variables - Dependencies</title>
|
||||
<para>
|
||||
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>
|
||||
<listitem>
|
||||
<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'>
|
||||
<title>Paths</title>
|
||||
|
||||
<section id='ref-varlocality-recipe-paths'>
|
||||
<title>Recipe Variables - Paths</title>
|
||||
<para>
|
||||
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>
|
||||
<listitem>
|
||||
<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'>
|
||||
<title>Extra Build Information</title>
|
||||
|
||||
<section id='ref-varlocality-recipe-build'>
|
||||
<title>Recipe Variables - Extra Build Information</title>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><glossterm><link
|
||||
linkend='var-DISTRO_PN_ALIAS'>DISTRO_PN_ALIAS</link></glossterm></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><glossterm><link linkend='var-EXTRA_OECMAKE'>EXTRA_OECMAKE</link></glossterm></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><glossterm><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link></glossterm></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><glossterm><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link></glossterm></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<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>
|
||||
<para>
|
||||
This section lists variables that define extra build information for recipes.
|
||||
<itemizedlist>
|
||||
<listitem><para><filename><link linkend='var-DISTRO_PN_ALIAS'>DISTRO_PN_ALIAS</link>
|
||||
</filename></para></listitem>
|
||||
<listitem><para><filename><link linkend='var-EXTRA_OECMAKE'>EXTRA_OECMAKE</link>
|
||||
</filename></para></listitem>
|
||||
<listitem><para><filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link>
|
||||
</filename></para></listitem>
|
||||
<listitem><para><filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link>
|
||||
</filename></para></listitem>
|
||||
<listitem><para><filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
|
||||
</para></listitem>
|
||||
<listitem><para><filename><link linkend='var-DEFAULT_PREFERENCE'>DEFAULT_PREFERENCE
|
||||
</link></filename></para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
</appendix>
|
||||
<!--
|
||||
|
||||
@@ -2,24 +2,27 @@
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||
|
||||
<appendix id='resources'>
|
||||
<title>Contributing to Poky</title>
|
||||
<title>Contributing to the Yocto Project</title>
|
||||
|
||||
<section id='resources-intro'>
|
||||
<title>Introduction</title>
|
||||
<para>
|
||||
We're happy for people to experiment with Poky and there are a number of places to
|
||||
find help if you run into difficulties or find bugs. To find out how to download
|
||||
source code see the <link linkend='intro-getit'>Obtaining Poky</link> section of
|
||||
the Introduction.
|
||||
The Yocto Project team is happy for people to experiment with the Yocto Project.
|
||||
A number of places exist to find help if you run into difficulties or find bugs.
|
||||
To find out how to download source code,
|
||||
see the <ulink url='http://www.yoctoproject.org/docs/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/dev-manual/dev-manual.html'>The Yocto
|
||||
Project Development Manual</ulink>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='resources-bugtracker'>
|
||||
<title>Bugtracker</title>
|
||||
<title>Tracking Bugs</title>
|
||||
|
||||
<para>
|
||||
Problems with Poky should be reported using the Bugzilla application at
|
||||
<ulink url='http://bugzilla.yoctoproject.org/'></ulink>.
|
||||
If you find problems with the Yocto Project, you should report them using the
|
||||
Bugzilla application at <ulink url='http://bugzilla.yoctoproject.org/'></ulink>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -27,26 +30,17 @@
|
||||
<title>Mailing lists</title>
|
||||
|
||||
<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><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
|
||||
Yocto Project 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
|
||||
as well as Yocto Project milestones.</para></listitem>
|
||||
</itemizedlist>
|
||||
</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 id='resources-irc'>
|
||||
@@ -54,111 +48,89 @@
|
||||
|
||||
<para>
|
||||
Two IRC channels on freenode are available for Yocto Project and Poky discussions:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
#yocto
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
#poky
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
<itemizedlist>
|
||||
<listitem><para><filename>#yocto</filename></para></listitem>
|
||||
<listitem><para><filename>#poky</filename></para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='resources-links'>
|
||||
<title>Links</title>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
<ulink url='http://yoctoproject.org'>The Yocto Project website</ulink> - The home site
|
||||
for Yocto Project.
|
||||
</para></listitem>
|
||||
<!-- <listitem><para>
|
||||
<ulink url='http://pokylinux.org'>The Poky website</ulink> - The home site
|
||||
for Poky Linux.
|
||||
</para></listitem>
|
||||
-->
|
||||
<listitem><para>
|
||||
<ulink url='http://www.openedhand.com/'>OpenedHand</ulink> - The
|
||||
original company behind Poky.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<ulink url='http://www.intel.com/'>Intel Corporation</ulink> - The
|
||||
company who acquired OpenedHand in 2008.
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
<ulink url='http://www.openembedded.org/'>OpenEmbedded</ulink>
|
||||
- The upstream generic embedded distribution Poky derives
|
||||
from (and contributes to).
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<ulink url='http://developer.berlios.de/projects/bitbake/'>Bitbake</ulink>
|
||||
- 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>
|
||||
<para>
|
||||
Following is a list of resources you will find helpful:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis><ulink url='http://yoctoproject.org'>The Yocto Project website</ulink>:
|
||||
</emphasis> The home site for the Yocto Project.</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>
|
||||
|
||||
<section id='resources-contributions'>
|
||||
<title>Contributions</title>
|
||||
|
||||
<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:
|
||||
Contributions to the Yocto Project are very welcome.
|
||||
You should send patches to the Yocto Project mailing list along with a "signed-off-by:"
|
||||
line in the same style as required by the Linux kernel.
|
||||
Adding this line signifies the developer has agreed to the Developer's Certificate of Origin 1.1
|
||||
as follows:
|
||||
<literallayout class='monospaced'>
|
||||
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.
|
||||
</literallayout>
|
||||
A Poky contributions tree (<filename>poky-contrib</filename>,
|
||||
<filename>git://git.yoctoproject.org/poky-contrib.git</filename>)
|
||||
exists for contributors to stage contributions.
|
||||
If people desire such access, please ask on the mailing list.
|
||||
Usually, the Yocto Project team will grant access to anyone with a proven track
|
||||
record of good patches.
|
||||
</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>
|
||||
|
||||
|
||||
</appendix>
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||
<chapter id='usingpoky'>
|
||||
<title>Using Poky</title>
|
||||
<title>Using the Yocto Project</title>
|
||||
|
||||
<para>
|
||||
This section gives an overview of the components that make up Poky
|
||||
followed by information about running poky builds and dealing with any
|
||||
problems that may arise.
|
||||
This section gives an overview of the components that make up the Yocto Project
|
||||
followed by information about Yocto Project builds and dealing with any
|
||||
problems that might arise.
|
||||
</para>
|
||||
|
||||
<section id='usingpoky-components'>
|
||||
<title>Poky Overview</title>
|
||||
<title>Yocto Project Components</title>
|
||||
|
||||
<para>
|
||||
The BitBake task executor together with various types of configuration files form the core of Poky.
|
||||
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 they they interact.
|
||||
</para>
|
||||
@@ -22,12 +23,19 @@
|
||||
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>
|
||||
<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 a 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/dev-manual/dev-manual.html#yocto-project-terms'>
|
||||
Yocto Project Terms</ulink> section in
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/dev-manual/dev-manual.html'>
|
||||
The Yocto Project Development Manual</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -46,16 +54,19 @@
|
||||
<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'.
|
||||
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
|
||||
packagename is the name of the package you want to build (referred to as the 'target'
|
||||
in this manual).
|
||||
<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:
|
||||
@@ -64,43 +75,46 @@
|
||||
</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.
|
||||
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>glibc</filename> 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.
|
||||
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 Poky (i.e. .ipk or .deb
|
||||
files), this document avoids it.
|
||||
The term "package" can also be used to describe recipes.
|
||||
However, since the same word is used for the packaged output from the Yocto
|
||||
Project (i.e. <filename>.ipk</filename> or <filename>.deb</filename> files),
|
||||
this document avoids using the term "package" to refer to recipes.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section id='usingpoky-components-classes'>
|
||||
@@ -109,8 +123,8 @@
|
||||
<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.
|
||||
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>
|
||||
@@ -121,13 +135,13 @@
|
||||
|
||||
<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,
|
||||
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>).
|
||||
options and user configuration options (<filename>local.conf</filename>, which is found
|
||||
in the Yocto Project files build directory).
|
||||
</para>
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
@@ -135,47 +149,64 @@
|
||||
<title>Running a Build</title>
|
||||
|
||||
<para>
|
||||
First the Poky build environment needs to be set up using the following command:
|
||||
You can find information on how to build an image using the Yocto Project 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
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||
Yocto Project Quick Start</ulink>.
|
||||
This section provides a quick overview.
|
||||
</para>
|
||||
|
||||
<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>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The build_dir is the dir containing all the build's object files. The default
|
||||
build dir is poky-dir/build. A different build_dir can be used for each of the targets.
|
||||
For example, ~/build/x86 for a qemux86 target, and ~/build/arm for a qemuarm target.
|
||||
Please refer to <link linkend="structure-core-script">oe-init-build-env</link>
|
||||
for more detailed information.
|
||||
</para>
|
||||
<para>
|
||||
Once the Poky build environment is set up, a target can be built using:
|
||||
The <filename>build_dir</filename> is optional and specifies the directory Yocto Project
|
||||
uses for the build.
|
||||
If you do not specify a build directory it defaults to <filename>build</filename>
|
||||
in the Yocto Project files directory structure.
|
||||
A common practice is to use a different build directory for different targets.
|
||||
For example, <filename>~/build/x86</filename> for a <filename>qemux86</filename>
|
||||
target, and <filename>~/build/arm</filename> for a <filename>qemuarm</filename> target.
|
||||
See <link linkend="structure-core-script">oe-init-build-env</link>
|
||||
for more information on this script.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Once the Yocto Project build environment is set up, you can build a target using:
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake <target>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The target is the name of the recipe you want to build.
|
||||
The <filename>target</filename> is the name of the recipe you want to build.
|
||||
Common targets are the images in <filename>meta/recipes-core/images</filename>,
|
||||
<filename>/meta/recipes-sato/images</filename>, etc.
|
||||
<filename>/meta/recipes-sato/images</filename>, etc. all found in the Yocto Project
|
||||
files.
|
||||
Or, the target can be the name of a recipe for a specific piece of software such as
|
||||
<application>busybox</application>.
|
||||
For more details about the standard images available, see the
|
||||
For more details about the images Yocto Project supports, see the
|
||||
<link linkend="ref-images">'Reference: Images'</link> appendix.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
Building an image without GNU Public License Version 3 (GPLv3) components is
|
||||
only supported for minimal and base images.
|
||||
See <link linkend='ref-images'>'Reference: Images'</link> for more information.
|
||||
</note>
|
||||
|
||||
<note>
|
||||
When building an image using GPL components you need to maintain your original
|
||||
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 you can get
|
||||
dependency errors due to some components not being rebuilt.
|
||||
Public License.
|
||||
If you rebuild using different versions of GPL, dependency errors might occur
|
||||
due to some components not being rebuilt.
|
||||
</note>
|
||||
</section>
|
||||
|
||||
@@ -183,45 +214,48 @@
|
||||
<title>Installing and Using the Result</title>
|
||||
|
||||
<para>
|
||||
Once an image has been built it often needs to be installed.
|
||||
The images/kernels built by Poky are placed in the
|
||||
<filename class="directory">tmp/deploy/images</filename> directory.
|
||||
Running qemux86 and qemuarm images is described in the
|
||||
'Using Pre-Built Binaries and QEMU' section of the Yocto Project Quick Start.
|
||||
See <ulink url="http://www.yoctoproject.org//docs/yocto-quick-start/yocto-project-qs.html"/>
|
||||
for the guide.
|
||||
Once an image has been built, it often needs to be installed.
|
||||
The images and kernels built by the Yocto Project are placed in the build directory in
|
||||
<filename class="directory">tmp/deploy/images</filename>.
|
||||
For information on how to run pre-built images such as <filename>qemux86</filename>
|
||||
and <filename>qemuarm</filename>, see the
|
||||
<ulink url='http://www.yoctoproject.org//docs/yocto-quick-start/yocto-project-qs.html#using-pre-built'>
|
||||
Using Pre-Built Binaries and QEMU</ulink> section in the
|
||||
<ulink url='http://www.yoctoproject.org//docs/yocto-quick-start/yocto-project-qs.html'>
|
||||
Yocto Project Quick Start</ulink>.
|
||||
For information about how to install these images, see the documentation for your
|
||||
particular board/machine.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section id='usingpoky-debugging'>
|
||||
<title>Debugging Build Failures</title>
|
||||
|
||||
<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.
|
||||
Standard debugging practices such as comparison against the last
|
||||
known working version with examination of the changes and the re-application of steps
|
||||
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,
|
||||
here are some general tips to aid in debugging:
|
||||
this section provides some general tips to aid in debugging.
|
||||
</para>
|
||||
|
||||
<section id='usingpoky-debugging-taskfailures'>
|
||||
<title>Task Failures</title>
|
||||
|
||||
<para>The log file for shell tasks is available in <filename>${WORKDIR}/temp/log.do_taskname.pid</filename>.
|
||||
For example, the "compile" task of busybox 1.01 on the ARM spitz machine might be
|
||||
<filename>tmp/work/armv5te-poky-linux-gnueabi/busybox-1.01/temp/log.do_compile.1234</filename>.
|
||||
<para>The log file for shell tasks is available in
|
||||
<filename>${WORKDIR}/temp/log.do_taskname.pid</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
|
||||
<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>
|
||||
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>
|
||||
</section>
|
||||
|
||||
@@ -230,28 +264,33 @@
|
||||
|
||||
<para>
|
||||
Any given package consists of a set of tasks.
|
||||
In most cases the series is: fetch, unpack, patch, configure,
|
||||
compile, install, package, package_write and build.
|
||||
The default task is "build" and any tasks on which it depends build first - hence,
|
||||
the standard BitBake behaviour.
|
||||
Some tasks exist, such as devshell, 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
|
||||
"-c" option in BitBake as follows:
|
||||
The standard BitBake behavior in most cases is: <filename>fetch</filename>,
|
||||
<filename>unpack</filename>,
|
||||
<filename>patch</filename>, <filename>configure</filename>,
|
||||
<filename>compile</filename>, <filename>install</filename>, <filename>package</filename>,
|
||||
<filename>package_write</filename>, and <filename>build</filename>.
|
||||
The default task is <filename>build</filename> and any tasks on which it depends
|
||||
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'>
|
||||
$ bitbake matchbox-desktop -c devshell
|
||||
</literallayout>
|
||||
</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
|
||||
working directory.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<literallayout class='monospaced'>
|
||||
$ 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
|
||||
</literallayout>
|
||||
@@ -259,14 +298,14 @@
|
||||
|
||||
<para>
|
||||
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.
|
||||
BitBake recognizes that the "compile" task was rerun and therefore understands that the other
|
||||
tasks also need to be run again.
|
||||
The last command reruns all tasks (basically the packaging tasks) after the compile.
|
||||
BitBake recognizes that the <filename>compile</filename> task was rerun and therefore
|
||||
understands that the other tasks also need to be run again.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can view a list of tasks in a given package by running the "listtasks" task.
|
||||
For example:
|
||||
You can view a list of tasks in a given package by running the
|
||||
<filename>listtasks</filename> task as follows:
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake matchbox-desktop -c
|
||||
</literallayout>
|
||||
@@ -279,12 +318,13 @@
|
||||
|
||||
<para>
|
||||
Sometimes it can be hard to see why BitBake wants to build some other packages before a given
|
||||
package you've specified.
|
||||
The <filename>bitbake -g targetname</filename> command creates the <filename>depends.dot</filename> and
|
||||
<filename>task-depends.dot</filename> files in the current directory.
|
||||
package you have specified.
|
||||
The <filename>bitbake -g targetname</filename> command creates the
|
||||
<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.
|
||||
You can use the <filename>bitbake -g -u depexp targetname</filename> command to display the results
|
||||
in a more human-readable form.
|
||||
You can use the <filename>bitbake -g -u depexp targetname</filename> command to
|
||||
display the results in a more human-readable form.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -292,10 +332,10 @@
|
||||
<title>General BitBake Problems</title>
|
||||
|
||||
<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
|
||||
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>.
|
||||
</para>
|
||||
|
||||
@@ -312,41 +352,137 @@
|
||||
<title>Building with No Dependencies</title>
|
||||
<para>
|
||||
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
|
||||
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>
|
||||
</section>
|
||||
|
||||
<section id='usingpoky-debugging-variables'>
|
||||
<title>Variables</title>
|
||||
<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
|
||||
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>
|
||||
</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'>
|
||||
<title>Other Tips</title>
|
||||
<tip>
|
||||
|
||||
<para>
|
||||
When adding new packages it is worth watching for undesireable 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>.
|
||||
Here are some other tips that you might find useful:
|
||||
<itemizedlist>
|
||||
<listitem><para>When adding new packages, it is worth watching for
|
||||
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>
|
||||
</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>
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 9.4 KiB |
@@ -15,7 +15,7 @@
|
||||
Welcome to the Yocto Project!
|
||||
The Yocto Project is an open-source collaboration project focused on embedded Linux
|
||||
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.
|
||||
</para>
|
||||
<para>
|
||||
@@ -37,14 +37,22 @@
|
||||
at <ulink url='https://wiki.yoctoproject.org/wiki/FAQ'>Yocto Project FAQ</ulink> and
|
||||
the FAQ appendix located in the
|
||||
<ulink url='http://www.yoctoproject.org/docs/poky-ref-manual/poky-ref-manual.html'>
|
||||
Poky Reference Manual</ulink> helpful.
|
||||
Yocto Project Reference Manual</ulink> helpful.
|
||||
</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/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 id='yp-intro'>
|
||||
<title>Introducing the Yocto Project Development Environment</title>
|
||||
<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
|
||||
platforms including x86-64 and emulated ones.
|
||||
You can use components from the Yocto Project to design, develop, build, debug, simulate,
|
||||
@@ -102,8 +110,8 @@
|
||||
<para>
|
||||
Another important Yocto Project feature is the Sato reference User Interface.
|
||||
This optional GNOME mobile-based UI, which is intended for devices with
|
||||
resolution but restricted size screens, sits neatly on top of a device using the
|
||||
GNOME Mobile Stack providing a well-defined user experience.
|
||||
restricted screen sizes, sits neatly on top of a device using the
|
||||
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
|
||||
their own UIs on top of Yocto Linux.
|
||||
</para>
|
||||
@@ -119,7 +127,7 @@
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<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>
|
||||
For notes about using the Yocto Project on development systems that use
|
||||
older Linux distributions see
|
||||
@@ -145,7 +153,7 @@
|
||||
<itemizedlist>
|
||||
<listitem><para>Ubuntu</para></listitem>
|
||||
<listitem><para>Fedora</para></listitem>
|
||||
<listitem><para>OpenSuse</para></listitem>
|
||||
<listitem><para>openSUSE</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
@@ -180,7 +188,7 @@
|
||||
<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>.
|
||||
See <ulink url='https://fedoraproject.org/wiki/Configureing_Sudo'></ulink> for details.
|
||||
See <ulink url='https://fedoraproject.org/wiki/Configuring_Sudo'></ulink> for details.
|
||||
</para></note>
|
||||
|
||||
<para>
|
||||
@@ -192,11 +200,11 @@
|
||||
unzip texi2html texinfo libsdl1.2-dev docbook-utils gawk \
|
||||
python-pysqlite2 diffstat help2man make gcc build-essential \
|
||||
g++ desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev \
|
||||
mercurial autoconf automake groff libtool
|
||||
mercurial autoconf automake groff libtool xterm
|
||||
</literallayout>
|
||||
|
||||
<para>
|
||||
The packages you need for an RPM-based host like Fedora and OpenSUSE,
|
||||
The packages you need for an RPM-based host like Fedora and openSUSE,
|
||||
respectively, are as follows:
|
||||
</para>
|
||||
|
||||
@@ -209,13 +217,13 @@
|
||||
groff linuxdoc-tools patch linuxdoc-tools cmake help2man \
|
||||
perl-ExtUtils-MakeMaker tcl-devel gettext chrpath ncurses apr \
|
||||
SDL-devel mesa-libGL-devel mesa-libGLU-devel gnome-doc-utils \
|
||||
autoconf automake libtool
|
||||
autoconf automake libtool xterm
|
||||
</literallayout>
|
||||
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo zypper install python gcc gcc-c++ libtool
|
||||
$ subversion git chrpath automake
|
||||
$ help2man diffstat texinfo mercurial wget
|
||||
$ sudo zypper install python gcc gcc-c++ libtool \
|
||||
subversion git chrpath automake \
|
||||
help2man diffstat texinfo mercurial wget
|
||||
</literallayout>
|
||||
|
||||
</section>
|
||||
@@ -283,13 +291,13 @@
|
||||
</para></note>
|
||||
|
||||
<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.
|
||||
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
|
||||
firewall or proxy server?" in the
|
||||
<ulink url='http://www.yoctoproject.org/docs/poky-ref-manual/poky-ref-manual.html'>
|
||||
Poky Reference Manual</ulink>.
|
||||
Yocto Project Reference Manual</ulink>.
|
||||
</para></note>
|
||||
|
||||
<para>
|
||||
@@ -322,7 +330,8 @@
|
||||
<filename>conf/local.conf</filename> file.</para></listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
Take some time to examine your <filename>conf/local.conf</filename> file.
|
||||
Take some time to examine your <filename>conf/local.conf</filename> file found in the
|
||||
Yocto Project file's <filename>conf</filename>.
|
||||
The defaults should work fine.
|
||||
However, if you have a multi-core CPU you might want to set the variable
|
||||
BB_NUMBER_THREADS equal to twice the number of processor cores your system has.
|
||||
@@ -330,25 +339,38 @@
|
||||
Setting these variables can significantly shorten your build time.
|
||||
By default, these variables are commented out.
|
||||
</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/poky-ref-manual/poky-ref-manual.html#var-PACKAGE_CLASSES'>PACKAGE_CLASSES</ulink></filename> variable.
|
||||
For additional package manager selection information, see
|
||||
<ulink url='http://www.yoctoproject.org/docs/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/poky-ref-manual/poky-ref-manual.html'>
|
||||
The Yocto Project Reference Manual</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Continue with the following command to build an OS image for the target, which is
|
||||
<filename>poky-image-sato</filename> in this example.
|
||||
<filename>core-image-sato</filename> in this example.
|
||||
For information on the <filename>‐k</filename> option use the
|
||||
<filename>bitbake ‐‐help</filename> command or see
|
||||
<filename>bitbake --help</filename> command or see
|
||||
<ulink url='http://www.yoctoproject.org/docs/poky-ref-manual/poky-ref-manual.html#usingpoky-components-bitbake'>
|
||||
BitBake</ulink> section in the Poky Reference Manual.
|
||||
BitBake</ulink> section in the Yocto Project Reference Manual.
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake -k poky-image-sato
|
||||
$ bitbake -k core-image-sato
|
||||
</literallayout>
|
||||
<note><para>
|
||||
BitBake requires Python 2.6 or 2.7. For more information on this requirement,
|
||||
see the FAQ appendix in the
|
||||
<ulink url='http://www.yoctoproject.org/docs/poky-ref-manual/poky-ref-manual.html'>
|
||||
Poky Reference Manual</ulink>.
|
||||
Yocto Project Reference Manual</ulink>.
|
||||
</para></note>
|
||||
The final command runs the image:
|
||||
<literallayout class='monospaced'>
|
||||
$ poky-qemu qemux86
|
||||
$ runqemu qemux86
|
||||
</literallayout>
|
||||
<note><para>
|
||||
Depending on the number of processors and cores, the amount or RAM, the speed of your
|
||||
@@ -413,8 +435,8 @@
|
||||
<section id='installing-the-toolchain'>
|
||||
<title>Installing the Toolchain</title>
|
||||
<para>
|
||||
You can download the pre-built toolchain, which includes the poky-qemu script and
|
||||
support files, from
|
||||
You can download the pre-built toolchain, which includes the <filename>runqemu</filename>
|
||||
script and support files, from
|
||||
<ulink url='http://yoctoproject.org/downloads/yocto-1.0/toolchain/'></ulink>.
|
||||
Toolchains are available for 32-bit and 64-bit development systems from the
|
||||
<filename>i686</filename> and <filename>x86_64</filename> folders, respectively.
|
||||
@@ -425,14 +447,14 @@
|
||||
</para>
|
||||
|
||||
<literallayout class='monospaced'>
|
||||
yocto-eglibc<<emphasis>host_system</emphasis>>-<<emphasis>arch</emphasis>>-toolchain-sdk-<<emphasis>release</emphasis>>.tar.bz2
|
||||
yocto-eglibc<<emphasis>host_system</emphasis>>-<<emphasis>arch</emphasis>>-toolchain-gmae-<<emphasis>release</emphasis>>.tar.bz2
|
||||
|
||||
Where:
|
||||
<<emphasis>host_system</emphasis>> is a string representing your development system:
|
||||
i686 or x86_64.
|
||||
|
||||
<<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.
|
||||
</literallayout>
|
||||
@@ -443,19 +465,20 @@
|
||||
</para>
|
||||
|
||||
<literallayout class='monospaced'>
|
||||
yocto-eglibc-x86_64-i686-toolchain-sdk-1.0.tar.bz2
|
||||
yocto-eglibc-x86_64-i586-toolchain-gmae-1.1.tar.bz2
|
||||
</literallayout>
|
||||
|
||||
<para>
|
||||
The toolchain tarballs are self-contained and should 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
|
||||
and a 32-bit target architecture.
|
||||
The example assumes the toolchain tarball is located in <filename>~/toolchains/</filename>:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<literallayout class='monospaced'>
|
||||
$ cd /
|
||||
$ sudo tar -xvjf yocto-eglibc-x86_64-i686-toolchain-sdk-1.0.tar.bz2
|
||||
$ sudo tar -xvjf ~/toolchains/yocto-eglibc-x86_64-i586-toolchain-gmae-1.1.tar.bz2
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
@@ -468,40 +491,55 @@
|
||||
<ulink url='http://yoctoproject.org/downloads/yocto-1.0/machines/qemu'></ulink>.
|
||||
Be sure to use the kernel and filesystem image that matches the architecture you want
|
||||
to simulate.
|
||||
Download areas exist for the five supported machine architectures:
|
||||
<filename>qemuarm</filename>, <filename>qemumips</filename>, <filename>qemuppc</filename>,
|
||||
<filename>qemux86</filename>, and <filename>qemux86_64</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Most kernel files have the following form:
|
||||
Most kernel files have one of the following forms:
|
||||
</para>
|
||||
|
||||
<literallayout class='monospaced'>
|
||||
*zImage*qemu<<emphasis>arch</emphasis>>*.bin
|
||||
*zImage-<<emphasis>kernel-rev</emphasis>>-qemu<<emphasis>arch</emphasis>>-<<emphasis>release</emphasis>>*.bin
|
||||
vmlinux-<<emphasis>kernel-rev</emphasis>>-qemu<<emphasis>arch</emphasis>>-<<emphasis>release</emphasis>>*.bin
|
||||
|
||||
Where:
|
||||
<<emphasis>kernel-rev</emphasis>> is the base Linux kernel revision
|
||||
(e.g. 2.6.37).
|
||||
|
||||
<<emphasis>arch</emphasis>> is a string representing the target architecture:
|
||||
x86, x86-64, ppc, mips, or arm.
|
||||
|
||||
<<emphasis>release</emphasis>> is the version of Yocto Project.
|
||||
</literallayout>
|
||||
</section>
|
||||
|
||||
<section id='downloading-the-filesystem'>
|
||||
<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:
|
||||
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.
|
||||
</para>
|
||||
|
||||
<literallayout class='monospaced'>
|
||||
yocto-image-<<emphasis>profile</emphasis>>-qemu<<emphasis>arch</emphasis>>.rootfs.ext3
|
||||
yocto-image-<<emphasis>profile</emphasis>>-qemu<<emphasis>arch</emphasis>>.rootfs.tar.bz2
|
||||
yocto-image-<<emphasis>profile</emphasis>>-qemu<<emphasis>arch</emphasis>>-<<emphasis>release</emphasis>>.rootfs.ext3.bz2
|
||||
yocto-image-<<emphasis>profile</emphasis>>-qemu<<emphasis>arch</emphasis>>-<<emphasis>release</emphasis>>.rootfs.tar.bz2
|
||||
|
||||
Where:
|
||||
<<emphasis>profile</emphasis>> is the filesystem image's profile:
|
||||
sdk, sato, minimal, or lsb.
|
||||
lsb, lsb-dev, lsb-sdk, 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/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:
|
||||
x86, x86-64, ppc, mips, or arm.
|
||||
|
||||
<<emphasis>release</emphasis>> is the version of Yocto Project.
|
||||
</literallayout>
|
||||
</section>
|
||||
|
||||
@@ -513,11 +551,11 @@
|
||||
</para>
|
||||
|
||||
<literallayout class='monospaced'>
|
||||
$ source /opt/poky/environment-setup-<<emphasis>arch</emphasis>>-poky-linux-<<emphasis>if</emphasis>>
|
||||
$ source /opt/poky/1.1/environment-setup-<<emphasis>arch</emphasis>>-poky-linux-<<emphasis>if</emphasis>>
|
||||
|
||||
Where:
|
||||
<<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.
|
||||
Not all setup scripts include this string.
|
||||
@@ -528,27 +566,29 @@
|
||||
</para>
|
||||
|
||||
<literallayout class='monospaced'>
|
||||
$ poky-qemu <<emphasis>qemuarch</emphasis>> <<emphasis>kernel</emphasis>> <<emphasis>filesystem_image</emphasis>>
|
||||
$ runqemu <<emphasis>qemuarch</emphasis>> <<emphasis>kernel-image</emphasis>> <<emphasis>filesystem-image</emphasis>>
|
||||
|
||||
Where:
|
||||
<<emphasis>qemuarch</emphasis>> is a string representing the target architecture: qemux86, qemux86-64,
|
||||
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>
|
||||
|
||||
<para>
|
||||
Continuing with the example, the following two commands setup the emulation
|
||||
environment and launch QEMU.
|
||||
The kernel and filesystem are for a 32-bit target architecture.
|
||||
environment and launch QEMU.
|
||||
This example assumes the root filesystem tarball has been downloaded and expanded, and
|
||||
that the kernel and filesystem are for a 32-bit target architecture.
|
||||
</para>
|
||||
|
||||
<literallayout class='monospaced'>
|
||||
$ source /opt/poky/environment-setup-i686-poky-linux
|
||||
$ poky-qemu qemux86 zImage-2.6.34-qemux86-1.0.bin yocto-image-sdk-qemux86-1.0.rootfs.ext3
|
||||
$ source /opt/poky/1.1/environment-setup-i686-poky-linux
|
||||
$ runqemu qemux86 bzImage-3.0-qemux86-1.1.bin \
|
||||
yocto-image-sato-qemux86-1.1.rootfs.ext3
|
||||
</literallayout>
|
||||
|
||||
<para>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
DESCRIPTION = "FarSight is an audio/video conferencing framework specifically designed for Instant Messengers."
|
||||
HOMEPAGE = "http://farsight.sf.net"
|
||||
SRC_URI = "http://farsight.freedesktop.org/releases/farsight2/${P}.tar.gz"
|
||||
SRC_URI = "http://farsight.freedesktop.org/releases/farsight2/${BPN}-${PV}.tar.gz"
|
||||
LICENSE = "GPLv2.1"
|
||||
DEPENDS = "libnice glib-2.0 libxml2 zlib dbus gstreamer gst-plugins-base"
|
||||
|
||||
|
||||
@@ -5,6 +5,6 @@ LICENSE = "LGPL"
|
||||
DEPENDS = "glib-2.0 gnutls libcheck"
|
||||
PR = "r2"
|
||||
|
||||
SRC_URI = "http://ftp.imendio.com/pub/imendio/${PN}/src/${PN}-${PV}.tar.bz2"
|
||||
SRC_URI = "http://ftp.imendio.com/pub/imendio/${BPN}/src/${BPN}-${PV}.tar.bz2"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
|
||||
@@ -2,7 +2,7 @@ DEPENDS = "libopensync (>= 0.36)"
|
||||
|
||||
DESCRIPTION ?= "OpenSync plugin"
|
||||
|
||||
SRC_URI = "http://opensync.org/download/releases/${PV}/${P}.tar.bz2"
|
||||
SRC_URI = "http://opensync.org/download/releases/${PV}/${BPN}-${PV}.tar.bz2"
|
||||
|
||||
inherit cmake
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ HOMEPAGE = "http://telepathy.freedesktop.org/wiki/"
|
||||
DEPENDS = "glib-2.0 dbus telepathy-glib farsight2"
|
||||
LICENSE = "LGPLv2"
|
||||
|
||||
SRC_URI = "http://telepathy.freedesktop.org/releases/telepathy-farsight/${P}.tar.gz \
|
||||
SRC_URI = "http://telepathy.freedesktop.org/releases/telepathy-farsight/${BPN}-${PV}.tar.gz \
|
||||
"
|
||||
|
||||
inherit autotools
|
||||
|
||||
@@ -5,7 +5,7 @@ DEPENDS = "glib-2.0 dbus loudmouth telepathy-glib dbus-glib"
|
||||
LICENSE = "LGPL"
|
||||
|
||||
# gabble.manager needs to get regenerated every release, so please don't copy it over blindly
|
||||
SRC_URI = "http://telepathy.freedesktop.org/releases/telepathy-gabble/${P}.tar.gz \
|
||||
SRC_URI = "http://telepathy.freedesktop.org/releases/telepathy-gabble/${BPN}-${PV}.tar.gz \
|
||||
file://gabble.manager"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
|
||||
@@ -7,7 +7,7 @@ LICENSE = "GPLv2"
|
||||
|
||||
DEPENDS = "libxml2 sed-native expat"
|
||||
|
||||
SRC_URI = "${SOURCEFORGE_MIRROR}/wbxmllib/${P}.tar.gz \
|
||||
SRC_URI = "${SOURCEFORGE_MIRROR}/wbxmllib/${BPN}-${PV}.tar.gz \
|
||||
file://no-doc-install.patch;patch=1"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
|
||||
@@ -4,7 +4,7 @@ DEPENDS = "gtk+"
|
||||
DESCRIPTION = "gcalctool is a powerful calculator"
|
||||
PR = "r2"
|
||||
|
||||
SRC_URI = "http://download.gnome.org/sources/${PN}/5.7/${PN}-${PV}.tar.gz \
|
||||
SRC_URI = "http://download.gnome.org/sources/${BPN}/5.7/${BPN}-${PV}.tar.gz \
|
||||
file://makefile-fix.diff;patch=1\
|
||||
file://fix-includedir.patch;patch=1"
|
||||
|
||||
|
||||